Skip to content

Commit 3be61dd

Browse files
authored
Enable Buy Modal by default with useSendTransaction hook (#2839)
1 parent a0e26a8 commit 3be61dd

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

.changeset/ten-seahorses-fly.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Enable Buy Modal by default with useSendTransaction hook

packages/thirdweb/src/react/web/hooks/useSendTransaction.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,9 @@ export function useSendTransaction(config: SendTransactionConfig = {}) {
7070

7171
const setRootEl = useContext(SetRootElementContext);
7272
return useSendTransactionCore(
73-
typeof payModal === "object"
74-
? (data) => {
73+
payModal === false
74+
? undefined
75+
: (data) => {
7576
setRootEl(
7677
<TxModal
7778
tx={data.tx}
@@ -89,8 +90,7 @@ export function useSendTransaction(config: SendTransactionConfig = {}) {
8990
nativeTokenSymbol={data.walletBalance.symbol}
9091
/>,
9192
);
92-
}
93-
: undefined,
93+
},
9494
);
9595
}
9696

0 commit comments

Comments
 (0)