diff --git a/src/components/stakingPoolDetailsView.tsx b/src/components/stakingPoolDetailsView.tsx index 8f12850..966469a 100644 --- a/src/components/stakingPoolDetailsView.tsx +++ b/src/components/stakingPoolDetailsView.tsx @@ -81,45 +81,9 @@ const StakingPoolDetailsView: React.FC< stakingPoolData.definition.tokenDecimals ); - //method 1 - - const { data: walletClient } = useWalletClient(); - - const { walletAddress } = WalletConnector.useContainer(); - - const handleClick1 = async () => { - if (walletAddress && walletClient) { - try { - console.log(walletClient); - const result = await walletClient.watchAsset({ - type: 'ERC20', - options: { - address: stakingPoolData.definition.tokenAddress, - symbol: stakingPoolData.definition.tokenSymbol, - decimals: stakingPoolData.definition.tokenDecimals, - }, - }); - - if (result) { - console.log('Asset watched successfully!'); - } - else { - console.error('Failed to watch asset.'); - } - } - catch (error) { - console.error('Error watching asset:', error); - } - } - else console.log('not wallet client'); - }; - - //method 1 end - - //method 2 - const { watchAsset } = useWatchAsset(); - const handleClick2 = () => + + const handleClickAaddToken = () => watchAsset( { type: 'ERC20', @@ -139,10 +103,6 @@ const StakingPoolDetailsView: React.FC< } ); - // - - //method 2 end - return (