Skip to content

Commit

Permalink
update metamask wallet_watchAsset
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-gray committed Sep 5, 2023
1 parent 0880d8a commit 67341b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Transfer/AddToMetamask.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export default function AddToMetamask() {
signerAddress
);
const ethereum = (await detectEthereumProvider()) as any;
// https://docs.metamask.io/wallet/reference/wallet_watchasset/
ethereum.request({
method: "wallet_watchAsset",
params: {
Expand All @@ -55,7 +56,7 @@ export default function AddToMetamask() {
symbol ||
sourceParsedTokenAccount?.symbol ||
"wh"
).substr(0, 5), // A ticker symbol or shorthand, up to 5 characters
).substring(0, 11), // A ticker symbol or shorthand, up to 11 characters as of 2023-09-05
decimals, // The number of token decimals
// image: string; // A string url of the token logo
},
Expand Down

0 comments on commit 67341b1

Please sign in to comment.