Skip to content

Commit

Permalink
Fix syntax error in example code (MetaMask#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinm2h authored Jun 6, 2021
1 parent b58ba96 commit 9044551
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions docs/guide/rpc-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,18 +388,19 @@ Once added, the token is indistinguishable from those added via legacy methods,
#### Example

```javascript
ethereum.request({
method: 'wallet_watchAsset',
params: {
type: 'ERC20',
options: {
address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',
symbol: 'FOO',
decimals: 18,
image: 'https://foo.io/token-image.svg',
ethereum
.request({
method: 'wallet_watchAsset',
params: {
type: 'ERC20',
options: {
address: '0xb60e8dd61c5d32be8058bb8eb970870f07233155',
symbol: 'FOO',
decimals: 18,
image: 'https://foo.io/token-image.svg',
},
},
},
});
})
.then((success) => {
if (success) {
console.log('FOO successfully added to wallet!')
Expand Down

0 comments on commit 9044551

Please sign in to comment.