Skip to content

Commit

Permalink
Fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
nmalzieu committed Oct 17, 2024
1 parent 83bde8b commit 60ad4c0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions components/TransactionPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export function TransactionPreview() {
getExternalSigner,
switchChain,
sendTransaction,
chainId,
} = useExternalSigner();
const walletApp = walletAppId
? installedWallets.find((w) => w.thirdwebId === walletAppId)
Expand Down Expand Up @@ -205,7 +204,11 @@ export function TransactionPreview() {
title={translate("transaction_switch_chain", {
chainName: transactionToPreview?.chainId,
})}
onPress={() => switchChain(transactionToPreview?.chainId)}
onPress={
transactionToPreview?.chainId
? () => switchChain(transactionToPreview.chainId)
: undefined
}
/>
)}
{showTriggerButton && (
Expand Down

0 comments on commit 60ad4c0

Please sign in to comment.