diff --git a/apps/laboratory/src/components/Ethers/EthersGetCallsStatusTest.tsx b/apps/laboratory/src/components/Ethers/EthersGetCallsStatusTest.tsx index 491b2c5bcd..7ff0a52d4a 100644 --- a/apps/laboratory/src/components/Ethers/EthersGetCallsStatusTest.tsx +++ b/apps/laboratory/src/components/Ethers/EthersGetCallsStatusTest.tsx @@ -3,9 +3,9 @@ import { useState } from 'react' import { sepolia } from '../../utils/ChainsUtil' import { useWeb3ModalAccount, useWeb3ModalProvider } from '@web3modal/ethers/react' import { useChakraToast } from '../Toast' -import { BrowserProvider} from 'ethers' +import { BrowserProvider } from 'ethers' -export type GetCallsStatusParams = `0x${string}` +export type GetCallsStatusParams = `0x${string}` export function EthersGetCallsStatusTest() { const toast = useChakraToast() @@ -17,14 +17,16 @@ export function EthersGetCallsStatusTest() { async function onGetCallsStatus() { try { setLoading(true) - if (!walletProvider || !address ) { + if (!walletProvider || !address) { throw Error('user is disconnected') } - if( !chainId) throw Error('chain not selected') - if( !batchCallId) throw Error('call tx hash not valid') + if (!chainId) throw Error('chain not selected') + if (!batchCallId) throw Error('call tx hash not valid') const provider = new BrowserProvider(walletProvider, chainId) - const batchCallsStatus = await provider.send("wallet_getCallsStatus", [batchCallId as GetCallsStatusParams]); - + const batchCallsStatus = await provider.send('wallet_getCallsStatus', [ + batchCallId as GetCallsStatusParams + ]) + toast({ title: 'Success', description: JSON.stringify(batchCallsStatus), @@ -45,9 +47,11 @@ export function EthersGetCallsStatusTest() { return allowedChains.includes(Number(chainId)) && address ? ( - setBatchCallId(e.target.value)} - value={batchCallId} /> + setBatchCallId(e.target.value)} + value={batchCallId} + /> @@ -108,4 +104,4 @@ export function EthersSendCallsTest() { Switch to Sepolia to test this feature ) -} \ No newline at end of file +}