diff --git a/components/getEXA/TXStatus.tsx b/components/getEXA/TXStatus.tsx index 2d98b564c..34fd2579f 100644 --- a/components/getEXA/TXStatus.tsx +++ b/components/getEXA/TXStatus.tsx @@ -96,7 +96,7 @@ const BridgeTXStatus = () => { const { sourceTxStatus, destinationTxStatus, sourceTransactionHash } = bridgeStatus || { sourceTxStatus: 'PENDING', destinationTxStatus: 'PENDING', - sourceTransactionHash: undefined, + sourceTransactionHash: tx?.hash, }; const socketScanURL = `https://socketscan.io/tx/${sourceTransactionHash}`; const optimisticEtherscanURL = `https://optimistic.etherscan.io/tx/${sourceTransactionHash}`; diff --git a/contexts/GetEXAContext.tsx b/contexts/GetEXAContext.tsx index e4a221673..3be793641 100644 --- a/contexts/GetEXAContext.tsx +++ b/contexts/GetEXAContext.tsx @@ -234,6 +234,7 @@ export const GetEXAProvider: FC = ({ children }) => { const { status, transactionHash } = await waitForTransaction({ hash }); setTX({ status: status ? 'success' : 'error', hash: transactionHash }); } + } setTXStep(TXStep.CONFIRM); } } catch (err) { @@ -333,7 +334,6 @@ export const GetEXAProvider: FC = ({ children }) => { }); const permit = { - owner: walletAddress, amount: value, deadline, signature, @@ -414,7 +414,6 @@ export const GetEXAProvider: FC = ({ children }) => { if (isBridge) return confirmBridge(); if (!walletAddress || !route || !swapper || !erc20?.address || !opts || !asset) return; - const { swap } = swapper.write; setTXStep(TXStep.CONFIRM_PENDING); @@ -427,7 +426,7 @@ export const GetEXAProvider: FC = ({ children }) => { const args = [erc20.address, amount, txData, minEXA, keepETH] as const; const gas = await swapper.estimateGas.swap(args, opts); - hash = await swap(args, { + hash = await swapper.write.swap(args, { ...opts, gasLimit: gasLimit(gas), }); @@ -439,7 +438,7 @@ export const GetEXAProvider: FC = ({ children }) => { case 'permit': { const args = [erc20.address, permit.value, txData, minEXA, keepETH] as const; const gas = await swapper.estimateGas.swap(args, opts); - hash = await swap(args, { + hash = await swapper.write.swap(args, { ...opts, gasLimit: gasLimit(gas), }); @@ -448,7 +447,7 @@ export const GetEXAProvider: FC = ({ children }) => { case 'permit2': { const args = [erc20.address, permit.value, txData, minEXA, keepETH] as const; const gas = await swapper.estimateGas.swap(args, opts); - hash = await swap(args, { + hash = await swapper.write.swap(args, { ...opts, gasLimit: gasLimit(gas), }); diff --git a/hooks/useWeb3.ts b/hooks/useWeb3.ts index 6e6a476c1..e7b77cad6 100644 --- a/hooks/useWeb3.ts +++ b/hooks/useWeb3.ts @@ -54,7 +54,7 @@ export const useWeb3 = (): Web3 => { const opts = useMemo( () => walletAddress - ? { account: walletAddress, chain: defaultChain, value: connector?.id === 'safe' ? 0n : undefined } + ? { account: walletAddress, chain: defaultChain, ...(connector?.id === 'safe' ? { value: 0n } : {}) } : undefined, [walletAddress, connector?.id], );