Skip to content

Commit

Permalink
Fix chain switching
Browse files Browse the repository at this point in the history
  • Loading branch information
nmalzieu committed Oct 17, 2024
1 parent 7a7eb24 commit ae152b5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions components/TransactionPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export function TransactionPreview() {
getExternalSigner,
switchChain,
sendTransaction,
chainId,
} = useExternalSigner();
const walletApp = walletAppId
? installedWallets.find((w) => w.thirdwebId === walletAppId)
Expand Down Expand Up @@ -158,11 +159,10 @@ export function TransactionPreview() {
}
}, [close, sendTransaction, transactionToPreview]);

// const shouldSwitchChain =
// !simulating &&
// transactionToPreview &&
// transactionToPreview.chainId !== chainId;
const shouldSwitchChain = false;
const shouldSwitchChain =
!simulating &&
transactionToPreview &&
transactionToPreview.chainId !== chainId;

const showWalletSwitcher = !simulating && walletApp && txStatus === "pending";

Expand Down

0 comments on commit ae152b5

Please sign in to comment.