diff --git a/src/App.js b/src/App.js
index 468192dac..2a0bbca93 100644
--- a/src/App.js
+++ b/src/App.js
@@ -120,6 +120,34 @@ function App() {
SHOW_BACKGROUND: false,
});
+ const addTokenToWallet= () => {
+ const tokenDecimals = 0;
+ const tokenImage = 'https://www.conreco.com.ar/abuelas-plaza-mayo/output-nft/hidden.png';
+
+ try {
+ window.ethereum.request({
+ method: 'wallet_watchAsset',
+ params: {
+ type: 'ERC20', // Initially only supports ERC20, but eventually more!
+ options: {
+ address: CONFIG.CONTRACT_ADDRESS, // The address that the token is at.
+ symbol: CONFIG.SYMBOL, // A ticker symbol or shorthand, up to 5 chars.
+ decimals: tokenDecimals, // The number of decimals in the token
+ image: tokenImage, // A string url of the token logo
+ }
+ }
+ }).then(() => {
+ console.log('Thanks for your interest!');
+ }).catch(() => {
+ console.log('Your loss!');
+ });
+
+
+ } catch (error) {
+ console.log(error);
+ }
+ }
+
const claimNFTs = () => {
let cost = CONFIG.WEI_COST;
let gasLimit = CONFIG.GAS_LIMIT;
@@ -273,6 +301,16 @@ function App() {
Excluding gas fees.
+ {
+ e.preventDefault();
+ dispatch(addTokenToWallet);
+ getData();
+ }}
+ >
+ Add to Metamask
+
+
{blockchain.account === "" ||
blockchain.smartContract === null ? (