thirdweb 5.105.17-nightly-84eaded1520ba3f346486bb62e5d998abacc2e93-20250721000428 → 5.105.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/engine/list-server-wallets.js +4 -0
- package/dist/cjs/engine/list-server-wallets.js.map +1 -1
- package/dist/cjs/engine/server-wallet.js +22 -1
- package/dist/cjs/engine/server-wallet.js.map +1 -1
- package/dist/cjs/react/core/hooks/transaction/useSendAndConfirmTransaction.js.map +1 -1
- package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/cjs/react/core/hooks/usePaymentMethods.js +17 -0
- package/dist/cjs/react/core/hooks/usePaymentMethods.js.map +1 -1
- package/dist/cjs/react/native/ui/connect/ConnectButton.js +7 -6
- package/dist/cjs/react/native/ui/connect/ConnectButton.js.map +1 -1
- package/dist/cjs/react/native/ui/connect/ConnectModal.js +12 -1
- package/dist/cjs/react/native/ui/connect/ConnectModal.js.map +1 -1
- package/dist/cjs/react/web/ui/Bridge/TransactionPayment.js +10 -2
- package/dist/cjs/react/web/ui/Bridge/TransactionPayment.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Details.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Details.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/MenuButton.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/MenuButton.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/NetworkSelector.js +2 -2
- package/dist/cjs/react/web/ui/ConnectWallet/NetworkSelector.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/WalletEntryButton.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/WalletEntryButton.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ReceiveFunds.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ReceiveFunds.js.map +1 -1
- package/dist/cjs/react/web/ui/TransactionButton/DepositScreen.js +1 -1
- package/dist/cjs/react/web/ui/TransactionButton/DepositScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/components/buttons.js +2 -2
- package/dist/cjs/react/web/ui/components/buttons.js.map +1 -1
- package/dist/cjs/react/web/ui/components/text.js +1 -1
- package/dist/cjs/react/web/ui/components/text.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/GetStartedScreen.js +1 -1
- package/dist/cjs/react/web/wallets/shared/GetStartedScreen.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/OTPLoginUI.js +1 -1
- package/dist/cjs/react/web/wallets/shared/OTPLoginUI.js.map +1 -1
- package/dist/cjs/transaction/actions/send-batch-transaction.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/engine/list-server-wallets.js +4 -0
- package/dist/esm/engine/list-server-wallets.js.map +1 -1
- package/dist/esm/engine/server-wallet.js +22 -1
- package/dist/esm/engine/server-wallet.js.map +1 -1
- package/dist/esm/react/core/hooks/transaction/useSendAndConfirmTransaction.js.map +1 -1
- package/dist/esm/react/core/hooks/transaction/useSendTransaction.js +1 -1
- package/dist/esm/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/esm/react/core/hooks/usePaymentMethods.js +17 -0
- package/dist/esm/react/core/hooks/usePaymentMethods.js.map +1 -1
- package/dist/esm/react/native/ui/connect/ConnectButton.js +7 -6
- package/dist/esm/react/native/ui/connect/ConnectButton.js.map +1 -1
- package/dist/esm/react/native/ui/connect/ConnectModal.js +12 -1
- package/dist/esm/react/native/ui/connect/ConnectModal.js.map +1 -1
- package/dist/esm/react/web/ui/Bridge/TransactionPayment.js +10 -2
- package/dist/esm/react/web/ui/Bridge/TransactionPayment.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Details.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Details.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/MenuButton.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/MenuButton.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/NetworkSelector.js +2 -2
- package/dist/esm/react/web/ui/ConnectWallet/NetworkSelector.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/WalletEntryButton.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/WalletEntryButton.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/ReceiveFunds.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/ReceiveFunds.js.map +1 -1
- package/dist/esm/react/web/ui/TransactionButton/DepositScreen.js +1 -1
- package/dist/esm/react/web/ui/TransactionButton/DepositScreen.js.map +1 -1
- package/dist/esm/react/web/ui/components/buttons.js +2 -2
- package/dist/esm/react/web/ui/components/buttons.js.map +1 -1
- package/dist/esm/react/web/ui/components/text.js +1 -1
- package/dist/esm/react/web/ui/components/text.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/GetStartedScreen.js +1 -1
- package/dist/esm/react/web/wallets/shared/GetStartedScreen.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/OTPLoginUI.js +1 -1
- package/dist/esm/react/web/wallets/shared/OTPLoginUI.js.map +1 -1
- package/dist/esm/transaction/actions/send-batch-transaction.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/types/engine/create-server-wallet.d.ts +1 -0
- package/dist/types/engine/create-server-wallet.d.ts.map +1 -1
- package/dist/types/engine/list-server-wallets.d.ts +14 -4
- package/dist/types/engine/list-server-wallets.d.ts.map +1 -1
- package/dist/types/engine/server-wallet.d.ts.map +1 -1
- package/dist/types/react/core/hooks/transaction/useSendAndConfirmTransaction.d.ts +2 -2
- package/dist/types/react/core/hooks/transaction/useSendAndConfirmTransaction.d.ts.map +1 -1
- package/dist/types/react/core/hooks/transaction/useSendBatchTransaction.d.ts +2 -2
- package/dist/types/react/core/hooks/transaction/useSendBatchTransaction.d.ts.map +1 -1
- package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts +2 -1
- package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts.map +1 -1
- package/dist/types/react/core/hooks/usePaymentMethods.d.ts.map +1 -1
- package/dist/types/react/native/hooks/transaction/useSendTransaction.d.ts +1 -1
- package/dist/types/react/native/hooks/transaction/useSendTransaction.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/ConnectButton.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/ConnectModal.d.ts +1 -1
- package/dist/types/react/native/ui/connect/ConnectModal.d.ts.map +1 -1
- package/dist/types/react/web/hooks/transaction/useSendTransaction.d.ts +1 -1
- package/dist/types/react/web/hooks/transaction/useSendTransaction.d.ts.map +1 -1
- package/dist/types/react/web/ui/Bridge/TransactionPayment.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/MenuButton.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/WalletEntryButton.d.ts.map +1 -1
- package/dist/types/transaction/actions/send-batch-transaction.d.ts +2 -2
- package/dist/types/transaction/actions/send-batch-transaction.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/engine/list-server-wallets.ts +6 -0
- package/src/engine/server-wallet.test.ts +11 -12
- package/src/engine/server-wallet.ts +22 -2
- package/src/react/core/hooks/transaction/useSendAndConfirmTransaction.ts +6 -2
- package/src/react/core/hooks/transaction/useSendBatchTransaction.ts +2 -2
- package/src/react/core/hooks/transaction/useSendTransaction.ts +9 -2
- package/src/react/core/hooks/usePaymentMethods.ts +19 -0
- package/src/react/native/ui/connect/ConnectButton.tsx +22 -6
- package/src/react/native/ui/connect/ConnectModal.tsx +37 -5
- package/src/react/web/ui/Bridge/TransactionPayment.tsx +19 -5
- package/src/react/web/ui/ConnectWallet/Details.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/MenuButton.tsx +2 -1
- package/src/react/web/ui/ConnectWallet/NetworkSelector.tsx +2 -2
- package/src/react/web/ui/ConnectWallet/WalletEntryButton.tsx +2 -1
- package/src/react/web/ui/ConnectWallet/screens/ReceiveFunds.tsx +1 -1
- package/src/react/web/ui/TransactionButton/DepositScreen.tsx +1 -1
- package/src/react/web/ui/components/buttons.tsx +2 -2
- package/src/react/web/ui/components/text.tsx +1 -1
- package/src/react/web/wallets/shared/GetStartedScreen.tsx +1 -1
- package/src/react/web/wallets/shared/OTPLoginUI.tsx +1 -1
- package/src/transaction/actions/send-batch-transaction.ts +2 -2
- package/src/version.ts +1 -1
|
@@ -361,12 +361,26 @@ export function TransactionPayment({
|
|
|
361
361
|
fullWidth
|
|
362
362
|
onClick={() => {
|
|
363
363
|
if (transactionDataQuery.data?.tokenInfo) {
|
|
364
|
+
if (
|
|
365
|
+
userBalance &&
|
|
366
|
+
Number(userBalance) <
|
|
367
|
+
Number(transactionDataQuery.data.totalCost)
|
|
368
|
+
) {
|
|
369
|
+
// if user has funds, but not enough, we need to fund the wallet with the difference
|
|
370
|
+
onContinue(
|
|
371
|
+
(
|
|
372
|
+
Number(transactionDataQuery.data.totalCost) -
|
|
373
|
+
Number(userBalance)
|
|
374
|
+
).toString(),
|
|
375
|
+
transactionDataQuery.data.tokenInfo,
|
|
376
|
+
getAddress(activeAccount.address),
|
|
377
|
+
);
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
// otherwise, use the full transaction cost
|
|
364
382
|
onContinue(
|
|
365
|
-
|
|
366
|
-
0,
|
|
367
|
-
Number(transactionDataQuery.data.totalCost) -
|
|
368
|
-
Number(userBalance ?? "0"),
|
|
369
|
-
).toString(),
|
|
383
|
+
transactionDataQuery.data.totalCost,
|
|
370
384
|
transactionDataQuery.data.tokenInfo,
|
|
371
385
|
getAddress(activeAccount.address),
|
|
372
386
|
);
|
|
@@ -1153,12 +1153,12 @@ export function NetworkSwitcherButton(props: {
|
|
|
1153
1153
|
const WalletInfoButton = /* @__PURE__ */ StyledButton((_) => {
|
|
1154
1154
|
const theme = useCustomTheme();
|
|
1155
1155
|
return {
|
|
1156
|
+
all: "unset",
|
|
1156
1157
|
"&:hover": {
|
|
1157
1158
|
background: theme.colors.connectedButtonBgHover,
|
|
1158
1159
|
transition: "background 250ms ease",
|
|
1159
1160
|
},
|
|
1160
1161
|
alignItems: "center",
|
|
1161
|
-
all: "unset",
|
|
1162
1162
|
animation: `${fadeInAnimation} 300ms ease`,
|
|
1163
1163
|
background: theme.colors.connectedButtonBg,
|
|
1164
1164
|
border: `1px solid ${theme.colors.borderColor}`,
|
|
@@ -9,6 +9,7 @@ import { StyledButton } from "../design-system/elements.js";
|
|
|
9
9
|
export const MenuButton = /* @__PURE__ */ StyledButton((_) => {
|
|
10
10
|
const theme = useCustomTheme();
|
|
11
11
|
return {
|
|
12
|
+
all: "unset",
|
|
12
13
|
"&:hover": {
|
|
13
14
|
backgroundColor: theme.colors.tertiaryBg,
|
|
14
15
|
svg: {
|
|
@@ -24,8 +25,8 @@ export const MenuButton = /* @__PURE__ */ StyledButton((_) => {
|
|
|
24
25
|
"&[disabled]": {
|
|
25
26
|
cursor: "not-allowed",
|
|
26
27
|
},
|
|
28
|
+
|
|
27
29
|
alignItems: "center",
|
|
28
|
-
all: "unset",
|
|
29
30
|
backgroundColor: "transparent",
|
|
30
31
|
borderRadius: radius.md,
|
|
31
32
|
// border: `1px solid ${theme.colors.borderColor}`,
|
|
@@ -735,11 +735,11 @@ export const TabButton = /* @__PURE__ */ (() =>
|
|
|
735
735
|
styled.button((_) => {
|
|
736
736
|
const theme = useCustomTheme();
|
|
737
737
|
return {
|
|
738
|
+
all: "unset",
|
|
738
739
|
"&[data-active='true']": {
|
|
739
740
|
background: theme.colors.secondaryButtonBg,
|
|
740
741
|
color: theme.colors.primaryText,
|
|
741
742
|
},
|
|
742
|
-
all: "unset",
|
|
743
743
|
borderRadius: radius.lg,
|
|
744
744
|
color: theme.colors.secondaryText,
|
|
745
745
|
cursor: "pointer",
|
|
@@ -784,8 +784,8 @@ export const NetworkButton = /* @__PURE__ */ StyledButton((_) => {
|
|
|
784
784
|
"&:hover": {
|
|
785
785
|
background: theme.colors.secondaryButtonBg,
|
|
786
786
|
},
|
|
787
|
-
alignItems: "center",
|
|
788
787
|
all: "unset",
|
|
788
|
+
alignItems: "center",
|
|
789
789
|
borderRadius: radius.md,
|
|
790
790
|
boxSizing: "border-box",
|
|
791
791
|
color: theme.colors.primaryText,
|
|
@@ -95,6 +95,7 @@ export function WalletEntryButton(props: {
|
|
|
95
95
|
export const WalletButtonEl = /* @__PURE__ */ StyledButton((_) => {
|
|
96
96
|
const theme = useCustomTheme();
|
|
97
97
|
return {
|
|
98
|
+
all: "unset",
|
|
98
99
|
"&:hover": {
|
|
99
100
|
backgroundColor: theme.colors.tertiaryBg,
|
|
100
101
|
transform: "scale(1.01)",
|
|
@@ -102,7 +103,7 @@ export const WalletButtonEl = /* @__PURE__ */ StyledButton((_) => {
|
|
|
102
103
|
'&[data-active="true"]': {
|
|
103
104
|
backgroundColor: theme.colors.tertiaryBg,
|
|
104
105
|
},
|
|
105
|
-
|
|
106
|
+
|
|
106
107
|
alignItems: "center",
|
|
107
108
|
borderRadius: radius.md,
|
|
108
109
|
boxSizing: "border-box",
|
|
@@ -85,10 +85,10 @@ export function ReceiveFunds(props: {
|
|
|
85
85
|
const WalletAddressContainer = /* @__PURE__ */ StyledButton((_) => {
|
|
86
86
|
const theme = useCustomTheme();
|
|
87
87
|
return {
|
|
88
|
+
all: "unset",
|
|
88
89
|
"&:hover": {
|
|
89
90
|
borderColor: theme.colors.accentText,
|
|
90
91
|
},
|
|
91
|
-
all: "unset",
|
|
92
92
|
border: `1px solid ${theme.colors.borderColor}`,
|
|
93
93
|
borderRadius: radius.md,
|
|
94
94
|
boxSizing: "border-box",
|
|
@@ -283,10 +283,10 @@ export function DepositScreen(props: {
|
|
|
283
283
|
const WalletAddressContainer = /* @__PURE__ */ StyledButton((_) => {
|
|
284
284
|
const theme = useCustomTheme();
|
|
285
285
|
return {
|
|
286
|
+
all: "unset",
|
|
286
287
|
"&:hover": {
|
|
287
288
|
borderColor: theme.colors.accentText,
|
|
288
289
|
},
|
|
289
|
-
all: "unset",
|
|
290
290
|
border: `1px solid ${theme.colors.borderColor}`,
|
|
291
291
|
borderRadius: `0 0 ${radius.md} ${radius.md}`,
|
|
292
292
|
boxSizing: "border-box",
|
|
@@ -22,6 +22,7 @@ export const Button = /* @__PURE__ */ StyledButton((props: ButtonProps) => {
|
|
|
22
22
|
return {};
|
|
23
23
|
}
|
|
24
24
|
return {
|
|
25
|
+
all: "unset",
|
|
25
26
|
"&:active": {
|
|
26
27
|
transform: "translateY(1px)",
|
|
27
28
|
},
|
|
@@ -38,7 +39,6 @@ export const Button = /* @__PURE__ */ StyledButton((props: ButtonProps) => {
|
|
|
38
39
|
cursor: "not-allowed",
|
|
39
40
|
},
|
|
40
41
|
alignItems: "center",
|
|
41
|
-
all: "unset",
|
|
42
42
|
background: (() => {
|
|
43
43
|
if (props.bg) {
|
|
44
44
|
return theme.colors[props.bg];
|
|
@@ -144,6 +144,7 @@ export const ButtonLink = /* @__PURE__ */ (() => Button.withComponent("a"))();
|
|
|
144
144
|
export const IconButton = /* @__PURE__ */ StyledButton((_) => {
|
|
145
145
|
const theme = useCustomTheme();
|
|
146
146
|
return {
|
|
147
|
+
all: "unset",
|
|
147
148
|
"&:hover": {
|
|
148
149
|
background: theme.colors.secondaryIconHoverBg,
|
|
149
150
|
color: theme.colors.secondaryIconHoverColor,
|
|
@@ -152,7 +153,6 @@ export const IconButton = /* @__PURE__ */ StyledButton((_) => {
|
|
|
152
153
|
cursor: "not-allowed",
|
|
153
154
|
},
|
|
154
155
|
alignItems: "center",
|
|
155
|
-
all: "unset",
|
|
156
156
|
borderRadius: radius.sm,
|
|
157
157
|
color: theme.colors.secondaryIconColor,
|
|
158
158
|
cursor: "pointer",
|
|
@@ -44,11 +44,11 @@ type LinkProps = {
|
|
|
44
44
|
export const Link = /* @__PURE__ */ StyledAnchor<LinkProps>((p) => {
|
|
45
45
|
const theme = useCustomTheme();
|
|
46
46
|
return {
|
|
47
|
+
all: "unset",
|
|
47
48
|
"&:hover": {
|
|
48
49
|
color: theme.colors[p.hoverColor || "primaryText"],
|
|
49
50
|
textDecoration: "none",
|
|
50
51
|
},
|
|
51
|
-
all: "unset",
|
|
52
52
|
color: theme.colors[p.color || "accentText"],
|
|
53
53
|
cursor: "pointer",
|
|
54
54
|
display: p.inline ? "inline" : "block",
|
|
@@ -212,13 +212,13 @@ const InstallScanScreen: React.FC<{
|
|
|
212
212
|
const ButtonLink = /* @__PURE__ */ StyledButton((_) => {
|
|
213
213
|
const theme = useCustomTheme();
|
|
214
214
|
return {
|
|
215
|
+
all: "unset",
|
|
215
216
|
"&:hover": {
|
|
216
217
|
background: theme.colors.secondaryButtonHoverBg,
|
|
217
218
|
color: theme.colors.primaryText,
|
|
218
219
|
textDecoration: "none",
|
|
219
220
|
},
|
|
220
221
|
alignItems: "center",
|
|
221
|
-
all: "unset",
|
|
222
222
|
background: theme.colors.secondaryButtonBg,
|
|
223
223
|
borderRadius: radius.sm,
|
|
224
224
|
boxSizing: "border-box",
|
|
@@ -342,10 +342,10 @@ export function OTPLoginUI(props: {
|
|
|
342
342
|
const LinkButton = /* @__PURE__ */ StyledButton((_) => {
|
|
343
343
|
const theme = useCustomTheme();
|
|
344
344
|
return {
|
|
345
|
+
all: "unset",
|
|
345
346
|
"&:hover": {
|
|
346
347
|
color: theme.colors.primaryText,
|
|
347
348
|
},
|
|
348
|
-
all: "unset",
|
|
349
349
|
color: theme.colors.accentText,
|
|
350
350
|
cursor: "pointer",
|
|
351
351
|
fontSize: fontSize.sm,
|
|
@@ -3,12 +3,12 @@ import type {
|
|
|
3
3
|
Account,
|
|
4
4
|
SendTransactionOption,
|
|
5
5
|
} from "../../wallets/interfaces/wallet.js";
|
|
6
|
-
import type { PreparedTransaction } from "../prepare-transaction.js";
|
|
7
6
|
import { encode } from "./encode.js";
|
|
7
|
+
import type { SendTransactionOptions } from "./send-transaction.js";
|
|
8
8
|
import type { WaitForReceiptOptions } from "./wait-for-tx-receipt.js";
|
|
9
9
|
|
|
10
10
|
export type SendBatchTransactionOptions = {
|
|
11
|
-
transactions:
|
|
11
|
+
transactions: SendTransactionOptions["transaction"][];
|
|
12
12
|
account: Account;
|
|
13
13
|
};
|
|
14
14
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const version = "5.105.
|
|
1
|
+
export const version = "5.105.18";
|