thirdweb 5.88.5-nightly-0574eac02c832c382972fd545df79c36e11796e1-20250217000342 → 5.88.5
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/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +53 -71
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js +2 -2
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js +4 -14
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js +2 -32
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.js +9 -3
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.js +15 -8
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.js +39 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.js +58 -53
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.js +3 -10
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js +35 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/TokenSelector.js +1 -2
- package/dist/cjs/react/web/ui/ConnectWallet/screens/TokenSelector.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/nativeToken.js +4 -2
- package/dist/cjs/react/web/ui/ConnectWallet/screens/nativeToken.js.map +1 -1
- package/dist/cjs/react/web/ui/components/token/TokenRow.js +11 -4
- package/dist/cjs/react/web/ui/components/token/TokenRow.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/cjs/wallets/connection/autoConnect.js +3 -4
- package/dist/cjs/wallets/connection/autoConnect.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js +55 -73
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js +4 -14
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js +4 -34
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.js +9 -3
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.js +15 -8
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.js +36 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.js +59 -53
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.js +4 -11
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js +32 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/TokenSelector.js +1 -2
- package/dist/esm/react/web/ui/ConnectWallet/screens/TokenSelector.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/nativeToken.js +4 -2
- package/dist/esm/react/web/ui/ConnectWallet/screens/nativeToken.js.map +1 -1
- package/dist/esm/react/web/ui/components/token/TokenRow.js +11 -4
- package/dist/esm/react/web/ui/components/token/TokenRow.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/esm/wallets/connection/autoConnect.js +2 -2
- package/dist/esm/wallets/connection/autoConnect.js.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.d.ts +2 -2
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.d.ts +2 -2
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.d.ts +2 -2
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.d.ts +15 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.d.ts +2 -16
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.d.ts +9 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/TokenSelector.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/nativeToken.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/nativeToken.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/token/TokenRow.d.ts +2 -2
- package/dist/types/react/web/ui/components/token/TokenRow.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/version.d.ts.map +1 -1
- package/dist/types/wallets/connection/autoConnect.d.ts +2 -2
- package/dist/types/wallets/connection/autoConnect.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx +70 -157
- package/src/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.tsx +1 -0
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/main/useUISelectionStates.ts +4 -18
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/ConfirmationScreen.tsx +20 -161
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/PayWithCrypto.tsx +25 -14
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.tsx +58 -34
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapSummary.tsx +134 -0
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/TokenSelectorScreen.tsx +134 -128
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/TransferConfirmationScreen.tsx +18 -48
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/WalletRow.tsx +70 -0
- package/src/react/web/ui/ConnectWallet/screens/TokenSelector.tsx +1 -3
- package/src/react/web/ui/ConnectWallet/screens/nativeToken.ts +5 -3
- package/src/react/web/ui/components/token/TokenRow.tsx +38 -14
- package/src/version.ts +1 -1
- package/src/wallets/connection/autoConnect.ts +3 -3
@@ -10,17 +10,17 @@ import {
|
|
10
10
|
spacing,
|
11
11
|
} from "../../../../core/design-system/index.js";
|
12
12
|
import { useChainName } from "../../../../core/hooks/others/useChainQuery.js";
|
13
|
+
import { PayTokenIcon } from "../../ConnectWallet/screens/Buy/PayTokenIcon.js";
|
13
14
|
import type { ERC20OrNativeToken } from "../../ConnectWallet/screens/nativeToken.js";
|
14
15
|
import { Skeleton } from "../Skeleton.js";
|
15
|
-
import { TokenIcon } from "../TokenIcon.js";
|
16
16
|
import { Container } from "../basic.js";
|
17
17
|
import { Button } from "../buttons.js";
|
18
18
|
import { Text } from "../text.js";
|
19
19
|
import { TokenSymbol } from "./TokenSymbol.js";
|
20
20
|
|
21
21
|
export function TokenRow(props: {
|
22
|
-
token: ERC20OrNativeToken;
|
23
|
-
chain: Chain;
|
22
|
+
token: ERC20OrNativeToken | undefined;
|
23
|
+
chain: Chain | undefined;
|
24
24
|
client: ThirdwebClient;
|
25
25
|
onSelectToken: () => void;
|
26
26
|
freezeChainAndToken?: boolean;
|
@@ -29,6 +29,32 @@ export function TokenRow(props: {
|
|
29
29
|
style?: React.CSSProperties;
|
30
30
|
}) {
|
31
31
|
const { name } = useChainName(props.chain);
|
32
|
+
|
33
|
+
if (!props.token || !props.chain) {
|
34
|
+
return (
|
35
|
+
<Button
|
36
|
+
variant="secondary"
|
37
|
+
fullWidth
|
38
|
+
style={{
|
39
|
+
fontSize: fontSize.sm,
|
40
|
+
justifyContent: "space-between",
|
41
|
+
paddingTop: spacing.md,
|
42
|
+
paddingBottom: spacing.md,
|
43
|
+
...props.style,
|
44
|
+
}}
|
45
|
+
gap="xxs"
|
46
|
+
onClick={props.onSelectToken}
|
47
|
+
>
|
48
|
+
<Text size="sm" color="primaryText">
|
49
|
+
Select payment token
|
50
|
+
</Text>
|
51
|
+
<Container color="primaryText">
|
52
|
+
<ChevronDownIcon width={iconSize.sm} height={iconSize.sm} />
|
53
|
+
</Container>
|
54
|
+
</Button>
|
55
|
+
);
|
56
|
+
}
|
57
|
+
|
32
58
|
return (
|
33
59
|
<TokenButton
|
34
60
|
variant="secondary"
|
@@ -42,21 +68,16 @@ export function TokenRow(props: {
|
|
42
68
|
disabled={props.freezeChainAndToken}
|
43
69
|
>
|
44
70
|
<Container flex="row" center="y" gap="sm">
|
45
|
-
<
|
71
|
+
<PayTokenIcon
|
46
72
|
token={props.token}
|
47
73
|
chain={props.chain}
|
48
74
|
size="md"
|
49
75
|
client={props.client}
|
50
76
|
/>
|
51
77
|
|
52
|
-
<Container
|
53
|
-
flex="column"
|
54
|
-
style={{
|
55
|
-
gap: "4px",
|
56
|
-
}}
|
57
|
-
>
|
78
|
+
<Container flex="column" gap="4xs">
|
58
79
|
{/* Token Symbol */}
|
59
|
-
<Container flex="column" gap="
|
80
|
+
<Container flex="column" gap="4xs">
|
60
81
|
{props.isLoading ? (
|
61
82
|
<Skeleton
|
62
83
|
width="120px"
|
@@ -74,6 +95,7 @@ export function TokenRow(props: {
|
|
74
95
|
<TokenSymbol
|
75
96
|
token={props.token}
|
76
97
|
chain={props.chain}
|
98
|
+
color="secondaryText"
|
77
99
|
size="sm"
|
78
100
|
/>
|
79
101
|
</Container>
|
@@ -92,9 +114,11 @@ export function TokenRow(props: {
|
|
92
114
|
)}
|
93
115
|
</Container>
|
94
116
|
</Container>
|
95
|
-
|
96
|
-
<
|
97
|
-
|
117
|
+
{!props.freezeChainAndToken && (
|
118
|
+
<Container color="primaryText">
|
119
|
+
<ChevronDownIcon width={iconSize.sm} height={iconSize.sm} />
|
120
|
+
</Container>
|
121
|
+
)}
|
98
122
|
</TokenButton>
|
99
123
|
);
|
100
124
|
}
|
package/src/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = "5.88.5
|
1
|
+
export const version = "5.88.5";
|
@@ -29,11 +29,11 @@ import type { AutoConnectProps } from "./types.js";
|
|
29
29
|
* @returns {boolean} a promise resolving to true or false depending on whether the auto connect function connected to a wallet or not
|
30
30
|
* @walletConnection
|
31
31
|
*/
|
32
|
-
export
|
32
|
+
export async function autoConnect(
|
33
33
|
props: AutoConnectProps & {
|
34
34
|
wallets?: Wallet[];
|
35
35
|
},
|
36
|
-
)
|
36
|
+
): Promise<boolean> {
|
37
37
|
const wallets = props.wallets || getDefaultWallets(props);
|
38
38
|
const manager = createConnectionManager(webLocalStorage);
|
39
39
|
const result = await autoConnectCore({
|
@@ -56,4 +56,4 @@ export const autoConnect = async (
|
|
56
56
|
manager,
|
57
57
|
});
|
58
58
|
return result;
|
59
|
-
}
|
59
|
+
}
|