Skip to content

Commit

Permalink
fix: the 2nd
Browse files Browse the repository at this point in the history
  • Loading branch information
nick134-bit committed Jul 24, 2024
1 parent d233035 commit 0eb3cb5
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion components/Pages/Flashloan/Vaults/hooks/useTransaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export const useTransaction = ({
message = (
<Finder
txHash={txInfo?.hash}
chainId={await signingClient.getChainId()}
chainId={await signingClient?.getChainId()}
>
{' '}
</Finder>
Expand Down
2 changes: 1 addition & 1 deletion components/Pages/Flashloan/hooks/useTransaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export const useTransaction = ({
description: (
<Finder
txHash={data?.transactionHash || data?.txHash}
chainId={await signingClient.getChainId()}
chainId={await signingClient?.getChainId()}
>
{' '}
</Finder>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export const useTransaction: any = ({
message = (
<Finder
txHash={txInfo?.hash}
chainId={await signingClient.getChainId()}
chainId={await signingClient?.getChainId()}
>
{' '}
</Finder>
Expand Down Expand Up @@ -220,7 +220,7 @@ export const useTransaction: any = ({
description: (
<Finder
txHash={data.transactionHash || data?.txHash}
chainId={await signingClient.getChainId()}
chainId={await signingClient?.getChainId()}
>
{' '}
</Finder>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export const useWithdrawTransaction: any = ({
)

const { mutate } = useMutation(async () => {
if (injectiveSigningClient && await signingClient.getChainId() === ChainId.injective) {
if (injectiveSigningClient && await signingClient?.getChainId() === ChainId.injective) {
const injectiveTxData = await injectiveSigningClient.sign(
senderAddress, debouncedMsgs, await createGasFee(
injectiveSigningClient, senderAddress, debouncedMsgs,
Expand Down Expand Up @@ -163,7 +163,7 @@ export const useWithdrawTransaction: any = ({
onSuccess: async (data: any) => {
setTxStep(TxStep.Broadcasting)
setTxHash(data.transactionHash || data?.txHash)
const chainId = await signingClient.getChainId()
const chainId = await signingClient?.getChainId()
await queryClient.invalidateQueries({
queryKey: [
'@pool-liquidity',
Expand Down
3 changes: 2 additions & 1 deletion hooks/useClients.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ export const useClients = (walletChainName: string) => {
},
)
return client
} catch {
} catch (e:any){
console.error(e)
return null
}
},
Expand Down
2 changes: 1 addition & 1 deletion hooks/useTransaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ export const useTransaction = ({
toast({
title: 'Swap Success.',
description: (
<Finder txHash={data.transactionHash} chainId={await signingClient.getChainId()}>
<Finder txHash={data.transactionHash} chainId={await signingClient?.getChainId()}>
{' '}
From: {tokenA.symbol} To: {tokenB.symbol}{' '}
</Finder>
Expand Down
2 changes: 1 addition & 1 deletion hooks/useTxStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const useTxStatus = ({ signingClient, transactionType }: Props) => {
}, [txInfo, txState.txHash])

const description = async (hash: string) => (
<Finder txHash={hash} chainId={await signingClient.getChainId()}>
<Finder txHash={hash} chainId={await signingClient?.getChainId()}>
{' '}
</Finder>
)
Expand Down

0 comments on commit 0eb3cb5

Please sign in to comment.