diff --git a/advanced/dapps/react-dapp-v2/src/components/Banner.tsx b/advanced/dapps/react-dapp-v2/src/components/Banner.tsx index 1867307..d267474 100644 --- a/advanced/dapps/react-dapp-v2/src/components/Banner.tsx +++ b/advanced/dapps/react-dapp-v2/src/components/Banner.tsx @@ -10,9 +10,10 @@ const SBannerWrapper = styled.div` const SBanner = styled.div` width: 275px; height: 45px; - background: url(/assets/walletconnect.png) no-repeat; - background-size: cover; + background: url(https://avatars.githubusercontent.com/u/5237680) no-repeat; + background-size: 50% auto; background-position: center; + margin-top: 2rem; `; const Banner = () => ( diff --git a/advanced/dapps/react-dapp-v2/src/constants/default.ts b/advanced/dapps/react-dapp-v2/src/constants/default.ts index 6407ee4..48cc930 100644 --- a/advanced/dapps/react-dapp-v2/src/constants/default.ts +++ b/advanced/dapps/react-dapp-v2/src/constants/default.ts @@ -6,37 +6,12 @@ if (!process.env.NEXT_PUBLIC_PROJECT_ID) export const DEFAULT_MAIN_CHAINS = [ // mainnets "eip155:1", - "eip155:10", - "eip155:100", - "eip155:137", - "eip155:324", - "eip155:42161", - "eip155:42220", - "cosmos:cosmoshub-4", - "solana:4sGjMW1sUnHzSxGspuhpqLDx6wiyjNtZ", - "polkadot:91b171bb158e2d3848fa23a9f1c25182", - "mvx:1", - "tron:0x2b6653dc", - "tezos:mainnet", - "kadena:mainnet01", ]; export const DEFAULT_TEST_CHAINS = [ // testnets "eip155:5", "eip155:11155111", - "eip155:280", - "eip155:420", - "eip155:80001", - "eip155:421611", - "eip155:44787", - "solana:8E9rvCKLFQia2Y35HXjjpWzj8weVo44K", - "polkadot:e143f23803ac50e8f6f8e62695d1ce9e", - "near:testnet", - "mvx:D", - "tron:0xcd8690dc", - "tezos:testnet", - "kadena:testnet04", ]; export const DEFAULT_CHAINS = [...DEFAULT_MAIN_CHAINS, ...DEFAULT_TEST_CHAINS]; @@ -50,7 +25,7 @@ export const DEFAULT_APP_METADATA = { name: "React App", description: "React App for WalletConnect", url: "https://walletconnect.com/", - icons: ["https://avatars.githubusercontent.com/u/37784886"], + icons: ["https://avatars.githubusercontent.com/u/5237680"], verifyUrl: "https://verify.walletconnect.com", }; @@ -58,7 +33,6 @@ export const DEFAULT_APP_METADATA = { * EIP155 */ export enum DEFAULT_EIP155_METHODS { - ETH_SEND_TRANSACTION = "eth_sendTransaction", PERSONAL_SIGN = "personal_sign", } diff --git a/advanced/dapps/react-dapp-v2/src/contexts/JsonRpcContext.tsx b/advanced/dapps/react-dapp-v2/src/contexts/JsonRpcContext.tsx index d4192dc..3e0c79c 100644 --- a/advanced/dapps/react-dapp-v2/src/contexts/JsonRpcContext.tsx +++ b/advanced/dapps/react-dapp-v2/src/contexts/JsonRpcContext.tsx @@ -82,7 +82,6 @@ type TRpcRequestCallback = ( interface IContext { ping: () => Promise; ethereumRpc: { - testSendTransaction: TRpcRequestCallback; testSignTransaction: TRpcRequestCallback; testEthSign: TRpcRequestCallback; testSignPersonalMessage: TRpcRequestCallback; @@ -232,45 +231,6 @@ export function JsonRpcContextProvider({ // -------- ETHEREUM/EIP155 RPC METHODS -------- const ethereumRpc = { - testSendTransaction: _createJsonRpcRequestHandler( - async (chainId: string, address: string) => { - const caipAccountAddress = `${chainId}:${address}`; - const account = accounts.find( - (account) => account === caipAccountAddress - ); - if (account === undefined) - throw new Error(`Account for ${caipAccountAddress} not found`); - - const tx = await formatTestTransaction(account); - - const balance = BigNumber.from(balances[account][0].balance || "0"); - if (balance.lt(BigNumber.from(tx.gasPrice).mul(tx.gasLimit))) { - return { - method: DEFAULT_EIP155_METHODS.ETH_SEND_TRANSACTION, - address, - valid: false, - result: "Insufficient funds for intrinsic transaction cost", - }; - } - - const result = await client!.request({ - topic: session!.topic, - chainId, - request: { - method: DEFAULT_EIP155_METHODS.ETH_SEND_TRANSACTION, - params: [tx], - }, - }); - - // format displayed result - return { - method: DEFAULT_EIP155_METHODS.ETH_SEND_TRANSACTION, - address, - valid: true, - result, - }; - } - ), testSignTransaction: _createJsonRpcRequestHandler( async (chainId: string, address: string) => { const caipAccountAddress = `${chainId}:${address}`; diff --git a/advanced/dapps/react-dapp-v2/src/helpers/namespaces.ts b/advanced/dapps/react-dapp-v2/src/helpers/namespaces.ts index 561297e..901386c 100644 --- a/advanced/dapps/react-dapp-v2/src/helpers/namespaces.ts +++ b/advanced/dapps/react-dapp-v2/src/helpers/namespaces.ts @@ -63,7 +63,6 @@ export const getSupportedRequiredMethodsByNamespace = (namespace: string) => { export const getSupportedOptionalMethodsByNamespace = (namespace: string) => { switch (namespace) { case "eip155": - return Object.values(DEFAULT_EIP155_OPTIONAL_METHODS); case "cosmos": case "solana": case "polkadot": diff --git a/advanced/dapps/react-dapp-v2/src/pages/index.tsx b/advanced/dapps/react-dapp-v2/src/pages/index.tsx index c37457b..936a4f2 100644 --- a/advanced/dapps/react-dapp-v2/src/pages/index.tsx +++ b/advanced/dapps/react-dapp-v2/src/pages/index.tsx @@ -146,13 +146,6 @@ const Home: NextPage = () => { const getEthereumActions = (): AccountAction[] => { const actions = { - [DEFAULT_EIP155_METHODS.ETH_SEND_TRANSACTION]: { - method: DEFAULT_EIP155_METHODS.ETH_SEND_TRANSACTION, - callback: async (chainId: string, address: string) => { - openRequestModal(); - await ethereumRpc.testSendTransaction(chainId, address); - }, - }, [DEFAULT_EIP155_METHODS.PERSONAL_SIGN]: { method: DEFAULT_EIP155_METHODS.PERSONAL_SIGN, callback: async (chainId: string, address: string) => { diff --git a/dapps/ethereum-provider/src/App.tsx b/dapps/ethereum-provider/src/App.tsx index 5d4624e..1812c93 100644 --- a/dapps/ethereum-provider/src/App.tsx +++ b/dapps/ethereum-provider/src/App.tsx @@ -10,7 +10,7 @@ const projectId = import.meta.env.VITE_PROJECT_ID as string; const provider = await EthereumProvider.init({ projectId, chains: [1], - methods: ["personal_sign", "eth_sendTransaction"], + methods: ["personal_sign"], showQrModal: true, qrModalOptions: { themeMode: "light",