thirdweb 5.34.4-nightly-88fa60d4ad7ee6ce0a8305ce35e023d1a858ea85-20240716000333 → 5.35.0-nightly-aadbd33e9d696bd7dd77561fa3f3a0a0fa7747f5-20240716082511
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/exports/extensions/airdrop.js +7 -1
- package/dist/cjs/exports/extensions/airdrop.js.map +1 -1
- package/dist/cjs/exports/thirdweb.js +3 -1
- package/dist/cjs/exports/thirdweb.js.map +1 -1
- package/dist/cjs/extensions/airdrop/write/claimERC20.js +1 -1
- package/dist/cjs/extensions/airdrop/write/claimERC20.js.map +1 -1
- package/dist/cjs/react/core/hooks/others/useWalletBalance.js.map +1 -1
- package/dist/cjs/react/core/utils/wallet.js +8 -0
- package/dist/cjs/react/core/utils/wallet.js.map +1 -1
- package/dist/cjs/react/native/ui/connect/ConnectButton.js +13 -2
- package/dist/cjs/react/native/ui/connect/ConnectButton.js.map +1 -1
- package/dist/cjs/react/native/ui/connect/ConnectModal.js +69 -14
- package/dist/cjs/react/native/ui/connect/ConnectModal.js.map +1 -1
- package/dist/cjs/react/native/ui/connect/ConnectedModal.js +3 -0
- package/dist/cjs/react/native/ui/connect/ConnectedModal.js.map +1 -1
- package/dist/cjs/react/native/ui/connect/WalletLoadingThumbnail.js +5 -3
- package/dist/cjs/react/native/ui/connect/WalletLoadingThumbnail.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Details.js +8 -6
- package/dist/cjs/react/web/ui/ConnectWallet/Details.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/locale/en.js +11 -0
- package/dist/cjs/react/web/ui/ConnectWallet/locale/en.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/locale/es.js +11 -0
- package/dist/cjs/react/web/ui/ConnectWallet/locale/es.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/locale/getConnectLocale.js +3 -0
- package/dist/cjs/react/web/ui/ConnectWallet/locale/getConnectLocale.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/locale/ja.js +11 -0
- package/dist/cjs/react/web/ui/ConnectWallet/locale/ja.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/locale/tl.js +11 -0
- package/dist/cjs/react/web/ui/ConnectWallet/locale/tl.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/locale/vi.js +112 -0
- package/dist/cjs/react/web/ui/ConnectWallet/locale/vi.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ManageWalletScreen.js +3 -3
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ManageWalletScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewFunds.js +4 -3
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewFunds.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewNFTs.js +2 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewNFTs.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewTokens.js +2 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewTokens.js.map +1 -1
- package/dist/cjs/react/web/wallets/injected/locale/getInjectedWalletLocale.js +2 -0
- package/dist/cjs/react/web/wallets/injected/locale/getInjectedWalletLocale.js.map +1 -1
- package/dist/cjs/react/web/wallets/injected/locale/vi.js +27 -0
- package/dist/cjs/react/web/wallets/injected/locale/vi.js.map +1 -0
- package/dist/cjs/react/web/wallets/local/locale/getLocalWalletLocale.js +2 -0
- package/dist/cjs/react/web/wallets/local/locale/getLocalWalletLocale.js.map +1 -1
- package/dist/cjs/react/web/wallets/local/locale/vi.js +44 -0
- package/dist/cjs/react/web/wallets/local/locale/vi.js.map +1 -0
- package/dist/cjs/react/web/wallets/shared/locale/getConnectLocale.js +2 -0
- package/dist/cjs/react/web/wallets/shared/locale/getConnectLocale.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/locale/vi.js +54 -0
- package/dist/cjs/react/web/wallets/shared/locale/vi.js.map +1 -0
- package/dist/cjs/react/web/wallets/smartWallet/locale/getSmartWalletLocale.js +2 -0
- package/dist/cjs/react/web/wallets/smartWallet/locale/getSmartWalletLocale.js.map +1 -1
- package/dist/cjs/react/web/wallets/smartWallet/locale/vi.js +13 -0
- package/dist/cjs/react/web/wallets/smartWallet/locale/vi.js.map +1 -0
- package/dist/cjs/react/web/wallets/walletConnect/locale.js +4 -0
- package/dist/cjs/react/web/wallets/walletConnect/locale.js.map +1 -1
- package/dist/cjs/transaction/extract-error.js +12 -13
- package/dist/cjs/transaction/extract-error.js.map +1 -1
- package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc1155.js +34 -0
- package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc1155.js.map +1 -1
- package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc20.js +36 -2
- package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc20.js.map +1 -1
- package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc721.js +34 -0
- package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc721.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wallets/in-app/web/lib/in-app-account.js +12 -8
- package/dist/cjs/wallets/in-app/web/lib/in-app-account.js.map +1 -1
- package/dist/esm/exports/extensions/airdrop.js +3 -0
- package/dist/esm/exports/extensions/airdrop.js.map +1 -1
- package/dist/esm/exports/thirdweb.js +1 -0
- package/dist/esm/exports/thirdweb.js.map +1 -1
- package/dist/esm/extensions/airdrop/write/claimERC20.js +2 -2
- package/dist/esm/extensions/airdrop/write/claimERC20.js.map +1 -1
- package/dist/esm/react/core/hooks/others/useWalletBalance.js.map +1 -1
- package/dist/esm/react/core/utils/wallet.js +8 -0
- package/dist/esm/react/core/utils/wallet.js.map +1 -1
- package/dist/esm/react/native/ui/connect/ConnectButton.js +13 -2
- package/dist/esm/react/native/ui/connect/ConnectButton.js.map +1 -1
- package/dist/esm/react/native/ui/connect/ConnectModal.js +70 -15
- package/dist/esm/react/native/ui/connect/ConnectModal.js.map +1 -1
- package/dist/esm/react/native/ui/connect/ConnectedModal.js +3 -0
- package/dist/esm/react/native/ui/connect/ConnectedModal.js.map +1 -1
- package/dist/esm/react/native/ui/connect/WalletLoadingThumbnail.js +5 -3
- package/dist/esm/react/native/ui/connect/WalletLoadingThumbnail.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Details.js +8 -6
- package/dist/esm/react/web/ui/ConnectWallet/Details.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/locale/en.js +11 -0
- package/dist/esm/react/web/ui/ConnectWallet/locale/en.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/locale/es.js +11 -0
- package/dist/esm/react/web/ui/ConnectWallet/locale/es.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/locale/getConnectLocale.js +3 -0
- package/dist/esm/react/web/ui/ConnectWallet/locale/getConnectLocale.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/locale/ja.js +11 -0
- package/dist/esm/react/web/ui/ConnectWallet/locale/ja.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/locale/tl.js +11 -0
- package/dist/esm/react/web/ui/ConnectWallet/locale/tl.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/locale/vi.js +110 -0
- package/dist/esm/react/web/ui/ConnectWallet/locale/vi.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/ManageWalletScreen.js +3 -3
- package/dist/esm/react/web/ui/ConnectWallet/screens/ManageWalletScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/ViewFunds.js +4 -3
- package/dist/esm/react/web/ui/ConnectWallet/screens/ViewFunds.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/ViewNFTs.js +2 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/ViewNFTs.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/ViewTokens.js +2 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/ViewTokens.js.map +1 -1
- package/dist/esm/react/web/wallets/injected/locale/getInjectedWalletLocale.js +2 -0
- package/dist/esm/react/web/wallets/injected/locale/getInjectedWalletLocale.js.map +1 -1
- package/dist/esm/react/web/wallets/injected/locale/vi.js +25 -0
- package/dist/esm/react/web/wallets/injected/locale/vi.js.map +1 -0
- package/dist/esm/react/web/wallets/local/locale/getLocalWalletLocale.js +2 -0
- package/dist/esm/react/web/wallets/local/locale/getLocalWalletLocale.js.map +1 -1
- package/dist/esm/react/web/wallets/local/locale/vi.js +42 -0
- package/dist/esm/react/web/wallets/local/locale/vi.js.map +1 -0
- package/dist/esm/react/web/wallets/shared/locale/getConnectLocale.js +2 -0
- package/dist/esm/react/web/wallets/shared/locale/getConnectLocale.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/locale/vi.js +52 -0
- package/dist/esm/react/web/wallets/shared/locale/vi.js.map +1 -0
- package/dist/esm/react/web/wallets/smartWallet/locale/getSmartWalletLocale.js +2 -0
- package/dist/esm/react/web/wallets/smartWallet/locale/getSmartWalletLocale.js.map +1 -1
- package/dist/esm/react/web/wallets/smartWallet/locale/vi.js +11 -0
- package/dist/esm/react/web/wallets/smartWallet/locale/vi.js.map +1 -0
- package/dist/esm/react/web/wallets/walletConnect/locale.js +4 -0
- package/dist/esm/react/web/wallets/walletConnect/locale.js.map +1 -1
- package/dist/esm/transaction/extract-error.js +12 -13
- package/dist/esm/transaction/extract-error.js.map +1 -1
- package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc1155.js +34 -0
- package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc1155.js.map +1 -1
- package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc20.js +35 -1
- package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc20.js.map +1 -1
- package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc721.js +34 -0
- package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc721.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/wallets/in-app/web/lib/in-app-account.js +12 -8
- package/dist/esm/wallets/in-app/web/lib/in-app-account.js.map +1 -1
- package/dist/types/exports/extensions/airdrop.d.ts +3 -0
- package/dist/types/exports/extensions/airdrop.d.ts.map +1 -1
- package/dist/types/exports/thirdweb.d.ts +1 -0
- package/dist/types/exports/thirdweb.d.ts.map +1 -1
- package/dist/types/react/core/hooks/others/useWalletBalance.d.ts +7 -1
- package/dist/types/react/core/hooks/others/useWalletBalance.d.ts.map +1 -1
- package/dist/types/react/core/utils/wallet.d.ts +2 -2
- package/dist/types/react/core/utils/wallet.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 +4 -0
- package/dist/types/react/native/ui/connect/ConnectModal.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/ConnectedModal.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/WalletLoadingThumbnail.d.ts +2 -1
- package/dist/types/react/native/ui/connect/WalletLoadingThumbnail.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/Details.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/locale/en.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/locale/es.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/locale/getConnectLocale.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/locale/ja.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/locale/tl.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/locale/types.d.ts +11 -0
- package/dist/types/react/web/ui/ConnectWallet/locale/types.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/locale/vi.d.ts +4 -0
- package/dist/types/react/web/ui/ConnectWallet/locale/vi.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/ManageWalletScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/ViewFunds.d.ts +2 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/ViewFunds.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/ViewNFTs.d.ts +2 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/ViewNFTs.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/ViewTokens.d.ts +2 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/ViewTokens.d.ts.map +1 -1
- package/dist/types/react/web/ui/types.d.ts +1 -1
- package/dist/types/react/web/ui/types.d.ts.map +1 -1
- package/dist/types/react/web/wallets/injected/locale/getInjectedWalletLocale.d.ts.map +1 -1
- package/dist/types/react/web/wallets/injected/locale/vi.d.ts +7 -0
- package/dist/types/react/web/wallets/injected/locale/vi.d.ts.map +1 -0
- package/dist/types/react/web/wallets/local/locale/getLocalWalletLocale.d.ts.map +1 -1
- package/dist/types/react/web/wallets/local/locale/vi.d.ts +4 -0
- package/dist/types/react/web/wallets/local/locale/vi.d.ts.map +1 -0
- package/dist/types/react/web/wallets/shared/locale/getConnectLocale.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/locale/vi.d.ts +53 -0
- package/dist/types/react/web/wallets/shared/locale/vi.d.ts.map +1 -0
- package/dist/types/react/web/wallets/smartWallet/locale/getSmartWalletLocale.d.ts.map +1 -1
- package/dist/types/react/web/wallets/smartWallet/locale/vi.d.ts +4 -0
- package/dist/types/react/web/wallets/smartWallet/locale/vi.d.ts.map +1 -0
- package/dist/types/react/web/wallets/walletConnect/locale.d.ts.map +1 -1
- package/dist/types/utils/extensions/airdrop/fetch-proofs-erc1155.d.ts.map +1 -1
- package/dist/types/utils/extensions/airdrop/fetch-proofs-erc20.d.ts +1 -1
- package/dist/types/utils/extensions/airdrop/fetch-proofs-erc20.d.ts.map +1 -1
- package/dist/types/utils/extensions/airdrop/fetch-proofs-erc721.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/wallets/in-app/web/lib/in-app-account.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/exports/extensions/airdrop.ts +3 -0
- package/src/exports/thirdweb.ts +5 -0
- package/src/extensions/airdrop/write/claimERC20.ts +2 -2
- package/src/react/core/hooks/others/useWalletBalance.ts +9 -1
- package/src/react/core/utils/wallet.ts +10 -2
- package/src/react/native/ui/connect/ConnectButton.tsx +16 -4
- package/src/react/native/ui/connect/ConnectModal.tsx +181 -19
- package/src/react/native/ui/connect/ConnectedModal.tsx +3 -0
- package/src/react/native/ui/connect/WalletLoadingThumbnail.tsx +18 -13
- package/src/react/web/ui/ConnectWallet/Details.tsx +8 -2
- package/src/react/web/ui/ConnectWallet/locale/en.ts +11 -0
- package/src/react/web/ui/ConnectWallet/locale/es.ts +11 -0
- package/src/react/web/ui/ConnectWallet/locale/getConnectLocale.ts +3 -0
- package/src/react/web/ui/ConnectWallet/locale/ja.ts +11 -0
- package/src/react/web/ui/ConnectWallet/locale/tl.ts +11 -0
- package/src/react/web/ui/ConnectWallet/locale/types.ts +11 -0
- package/src/react/web/ui/ConnectWallet/locale/vi.ts +114 -0
- package/src/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/screens/ManageWalletScreen.tsx +10 -3
- package/src/react/web/ui/ConnectWallet/screens/ViewFunds.tsx +9 -3
- package/src/react/web/ui/ConnectWallet/screens/ViewNFTs.tsx +8 -1
- package/src/react/web/ui/ConnectWallet/screens/ViewTokens.tsx +7 -1
- package/src/react/web/ui/types.ts +1 -1
- package/src/react/web/wallets/injected/locale/getInjectedWalletLocale.ts +2 -0
- package/src/react/web/wallets/injected/locale/vi.ts +27 -0
- package/src/react/web/wallets/local/locale/getLocalWalletLocale.ts +2 -0
- package/src/react/web/wallets/local/locale/vi.ts +48 -0
- package/src/react/web/wallets/shared/locale/getConnectLocale.ts +2 -0
- package/src/react/web/wallets/shared/locale/vi.ts +56 -0
- package/src/react/web/wallets/smartWallet/locale/getSmartWalletLocale.ts +2 -0
- package/src/react/web/wallets/smartWallet/locale/vi.ts +13 -0
- package/src/react/web/wallets/walletConnect/locale.ts +4 -0
- package/src/transaction/extract-error.ts +9 -9
- package/src/utils/extensions/airdrop/fetch-proofs-erc1155.ts +34 -0
- package/src/utils/extensions/airdrop/fetch-proofs-erc20.ts +35 -1
- package/src/utils/extensions/airdrop/fetch-proofs-erc721.ts +34 -0
- package/src/version.ts +1 -1
- package/src/wallets/in-app/web/lib/in-app-account.ts +12 -8
@@ -34,7 +34,10 @@ export function ManageWalletScreen(props: {
|
|
34
34
|
}}
|
35
35
|
>
|
36
36
|
<Container p="lg">
|
37
|
-
<ModalHeader
|
37
|
+
<ModalHeader
|
38
|
+
title={props.locale.manageWallet.title}
|
39
|
+
onBack={props.onBack}
|
40
|
+
/>
|
38
41
|
</Container>
|
39
42
|
<Line />
|
40
43
|
<Container
|
@@ -62,7 +65,9 @@ export function ManageWalletScreen(props: {
|
|
62
65
|
}}
|
63
66
|
>
|
64
67
|
<WalletConnectIcon size={iconSize.md} />
|
65
|
-
<Text color="primaryText">
|
68
|
+
<Text color="primaryText">
|
69
|
+
{props.locale.manageWallet.connectAnApp}
|
70
|
+
</Text>
|
66
71
|
</MenuButton>
|
67
72
|
|
68
73
|
{/* Private Key Export (if enabled) */}
|
@@ -79,7 +84,9 @@ export function ManageWalletScreen(props: {
|
|
79
84
|
}}
|
80
85
|
>
|
81
86
|
<KeyIcon size={iconSize.md} />
|
82
|
-
<Text color="primaryText">
|
87
|
+
<Text color="primaryText">
|
88
|
+
{props.locale.manageWallet.exportPrivateKey}
|
89
|
+
</Text>
|
83
90
|
</MenuButton>
|
84
91
|
)}
|
85
92
|
</Container>
|
@@ -10,6 +10,7 @@ import { Text } from "../../components/text.js";
|
|
10
10
|
import { MenuButton } from "../MenuButton.js";
|
11
11
|
import { CoinsIcon } from "../icons/CoinsIcon.js";
|
12
12
|
import { ImageIcon } from "../icons/ImageIcon.js";
|
13
|
+
import type { ConnectLocale } from "../locale/types.js";
|
13
14
|
import type { WalletDetailsModalScreen } from "./types.js";
|
14
15
|
|
15
16
|
/**
|
@@ -21,7 +22,9 @@ export function ViewFunds(props: {
|
|
21
22
|
onBack: () => void;
|
22
23
|
setScreen: (screen: WalletDetailsModalScreen) => void;
|
23
24
|
client: ThirdwebClient;
|
25
|
+
connectLocale: ConnectLocale;
|
24
26
|
}) {
|
27
|
+
const { connectLocale } = props;
|
25
28
|
return (
|
26
29
|
<Container
|
27
30
|
style={{
|
@@ -29,7 +32,10 @@ export function ViewFunds(props: {
|
|
29
32
|
}}
|
30
33
|
>
|
31
34
|
<Container p="lg">
|
32
|
-
<ModalHeader
|
35
|
+
<ModalHeader
|
36
|
+
title={connectLocale.viewFunds.title}
|
37
|
+
onBack={props.onBack}
|
38
|
+
/>
|
33
39
|
</Container>
|
34
40
|
<Line />
|
35
41
|
<Container
|
@@ -50,7 +56,7 @@ export function ViewFunds(props: {
|
|
50
56
|
}}
|
51
57
|
>
|
52
58
|
<CoinsIcon size={iconSize.md} />
|
53
|
-
<Text color="primaryText">
|
59
|
+
<Text color="primaryText">{connectLocale.viewFunds.viewTokens}</Text>
|
54
60
|
</MenuButton>
|
55
61
|
<MenuButton
|
56
62
|
onClick={() => {
|
@@ -61,7 +67,7 @@ export function ViewFunds(props: {
|
|
61
67
|
}}
|
62
68
|
>
|
63
69
|
<ImageIcon size={iconSize.md} />
|
64
|
-
<Text color="primaryText">
|
70
|
+
<Text color="primaryText">{connectLocale.viewFunds.viewNFTs}</Text>
|
65
71
|
</MenuButton>
|
66
72
|
<Spacer y="lg" />
|
67
73
|
</Container>
|
@@ -16,6 +16,7 @@ import { MediaRenderer } from "../../MediaRenderer/MediaRenderer.js";
|
|
16
16
|
import { Skeleton } from "../../components/Skeleton.js";
|
17
17
|
import { Spacer } from "../../components/Spacer.js";
|
18
18
|
import { Container, Line, ModalHeader } from "../../components/basic.js";
|
19
|
+
import type { ConnectLocale } from "../locale/types.js";
|
19
20
|
|
20
21
|
const fetchNFTs = async (
|
21
22
|
client: ThirdwebClient,
|
@@ -69,6 +70,7 @@ export function ViewNFTs(props: {
|
|
69
70
|
theme: Theme | "light" | "dark";
|
70
71
|
onBack: () => void;
|
71
72
|
client: ThirdwebClient;
|
73
|
+
connectLocale: ConnectLocale;
|
72
74
|
}) {
|
73
75
|
const activeAccount = useActiveAccount();
|
74
76
|
const activeChain = useActiveWalletChain();
|
@@ -77,6 +79,8 @@ export function ViewNFTs(props: {
|
|
77
79
|
return null;
|
78
80
|
}
|
79
81
|
|
82
|
+
const { connectLocale } = props;
|
83
|
+
|
80
84
|
const nftList = useMemo(() => {
|
81
85
|
const nfts = [];
|
82
86
|
if (!props.supportedNFTs) return [];
|
@@ -108,7 +112,10 @@ export function ViewNFTs(props: {
|
|
108
112
|
}}
|
109
113
|
>
|
110
114
|
<Container p="lg">
|
111
|
-
<ModalHeader
|
115
|
+
<ModalHeader
|
116
|
+
title={connectLocale.viewFunds.viewNFTs}
|
117
|
+
onBack={props.onBack}
|
118
|
+
/>
|
112
119
|
</Container>
|
113
120
|
<Line />
|
114
121
|
<Container
|
@@ -13,6 +13,7 @@ import { Spacer } from "../../components/Spacer.js";
|
|
13
13
|
import { TokenIcon } from "../../components/TokenIcon.js";
|
14
14
|
import { Container, Line, ModalHeader } from "../../components/basic.js";
|
15
15
|
import { Text } from "../../components/text.js";
|
16
|
+
import type { ConnectLocale } from "../locale/types.js";
|
16
17
|
import { formatTokenBalance } from "./formatTokenBalance.js";
|
17
18
|
import {
|
18
19
|
type ERC20OrNativeToken,
|
@@ -27,6 +28,7 @@ export function ViewTokens(props: {
|
|
27
28
|
supportedTokens?: SupportedTokens;
|
28
29
|
onBack: () => void;
|
29
30
|
client: ThirdwebClient;
|
31
|
+
connectLocale: ConnectLocale;
|
30
32
|
}) {
|
31
33
|
const activeChain = useActiveWalletChain();
|
32
34
|
const supportedTokens = props.supportedTokens || defaultTokens;
|
@@ -37,6 +39,7 @@ export function ViewTokens(props: {
|
|
37
39
|
|
38
40
|
const tokenList =
|
39
41
|
(activeChain?.id ? supportedTokens[activeChain.id] : undefined) || [];
|
42
|
+
const { connectLocale } = props;
|
40
43
|
|
41
44
|
return (
|
42
45
|
<Container
|
@@ -45,7 +48,10 @@ export function ViewTokens(props: {
|
|
45
48
|
}}
|
46
49
|
>
|
47
50
|
<Container p="lg">
|
48
|
-
<ModalHeader
|
51
|
+
<ModalHeader
|
52
|
+
title={connectLocale.viewFunds.title}
|
53
|
+
onBack={props.onBack}
|
54
|
+
/>
|
49
55
|
</Container>
|
50
56
|
<Line />
|
51
57
|
<Container
|
@@ -1,2 +1,2 @@
|
|
1
1
|
// valid combinations of ISO language code and ISO country code
|
2
|
-
export type LocaleId = "en_US" | "es_ES" | "ja_JP" | "tl_PH";
|
2
|
+
export type LocaleId = "en_US" | "es_ES" | "ja_JP" | "tl_PH" | "vi_VN";
|
@@ -14,6 +14,8 @@ export async function getInjectedWalletLocale(
|
|
14
14
|
return (await import("./ja.js")).default;
|
15
15
|
case "tl_PH":
|
16
16
|
return (await import("./tl.js")).default;
|
17
|
+
case "vi_VN":
|
18
|
+
return (await import("./vi.js")).default;
|
17
19
|
default:
|
18
20
|
return (await import("./en.js")).default;
|
19
21
|
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import type { InjectedWalletLocale } from "./types.js";
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @internal
|
5
|
+
*/
|
6
|
+
const injectedWalletLocaleVi = (wallet: string): InjectedWalletLocale => ({
|
7
|
+
connectionScreen: {
|
8
|
+
inProgress: "Đang đợi xác nhận",
|
9
|
+
failed: "Kết nối thất bại",
|
10
|
+
instruction: `Kết nối bằng ứng dụng ${wallet}`,
|
11
|
+
retry: "Thử lại",
|
12
|
+
},
|
13
|
+
getStartedScreen: {
|
14
|
+
instruction: `Quét mã QR để tải ứng dụng ${wallet}`,
|
15
|
+
},
|
16
|
+
scanScreen: {
|
17
|
+
instruction: `Quét mã QR bằng ứng dụng ${wallet} để kết nối`,
|
18
|
+
},
|
19
|
+
getStartedLink: `Tôi không có ứng dụng ${wallet}`,
|
20
|
+
download: {
|
21
|
+
chrome: "Tải cho trình duyệt Chrome",
|
22
|
+
android: "Tải trên Google Play",
|
23
|
+
iOS: "Tải trên App Store",
|
24
|
+
},
|
25
|
+
});
|
26
|
+
|
27
|
+
export default injectedWalletLocaleVi;
|
@@ -14,6 +14,8 @@ export async function getLocalWalletLocale(
|
|
14
14
|
return (await import("./ja.js")).default;
|
15
15
|
case "tl_PH":
|
16
16
|
return (await import("./tl.js")).default;
|
17
|
+
case "vi_VN":
|
18
|
+
return (await import("./vi.js")).default;
|
17
19
|
default:
|
18
20
|
return (await import("./en.js")).default;
|
19
21
|
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import type { LocalWalletLocale } from "./types.js";
|
2
|
+
|
3
|
+
const localWalletLocaleVi: LocalWalletLocale = {
|
4
|
+
passwordLabel: "Mật khẩu",
|
5
|
+
confirmPasswordLabel: "Xác nhận mật khẩu",
|
6
|
+
enterYourPassword: "Nhập mật khẩu của bạn",
|
7
|
+
warningScreen: {
|
8
|
+
title: "Cảnh báo",
|
9
|
+
warning:
|
10
|
+
"Ví hiện tại sẽ bị xoá nếu bạn tạo một ví mới. Hãy cân nhắc sao lưu ví về thiết bị",
|
11
|
+
backupWallet: "Sao lưu ví",
|
12
|
+
skip: "Bỏ qua",
|
13
|
+
},
|
14
|
+
reconnectScreen: {
|
15
|
+
title: "Kết nối bằng ví đã lưu",
|
16
|
+
savedWallet: "Ví đã lưu",
|
17
|
+
continue: "Tiếp tục",
|
18
|
+
createNewWallet: "Tạo ví mới",
|
19
|
+
},
|
20
|
+
createScreen: {
|
21
|
+
instruction:
|
22
|
+
"Chọn một mật khẩu cho ví của bạn. Bạn có thể dùng mật khẩu đã đặt để truy cập và sao lưu ví sau này",
|
23
|
+
importWallet: "Thêm ví",
|
24
|
+
createNewWallet: "Tạo ví mới",
|
25
|
+
connecting: "Đang kết nối",
|
26
|
+
},
|
27
|
+
exportScreen: {
|
28
|
+
downloadMessage: "Một tệp chứa private key sẽ được tải về thiết bị của bạn",
|
29
|
+
decryptMessage: "Nhập mật khẩu để giải mã private key",
|
30
|
+
walletAddress: "Địa chỉ ví",
|
31
|
+
download: "Tải về",
|
32
|
+
title: "Sao lưu ví",
|
33
|
+
},
|
34
|
+
importScreen: {
|
35
|
+
title: "Thêm ví mới",
|
36
|
+
description1:
|
37
|
+
"Ứng dụng này có thể tự do giao dịch mà không cần sự cho phép của bạn",
|
38
|
+
description2: "Bạn chỉ nên kết nối ví với những ứng dụng đáng tin cậy",
|
39
|
+
passwordDescription:
|
40
|
+
"Chọn một mật khẩu để mã hoá private key. Private key đã mã hoá sẽ được lưu trên trình duyệt",
|
41
|
+
import: "Thêm",
|
42
|
+
uploadJSON: "Tải lên tệp JSON",
|
43
|
+
uploadedSuccessfully: "Tải lên thành công",
|
44
|
+
invalidPrivateKey: "Private Key không hợp lệ",
|
45
|
+
},
|
46
|
+
};
|
47
|
+
|
48
|
+
export default localWalletLocaleVi;
|
@@ -14,6 +14,8 @@ export async function getInAppWalletLocale(
|
|
14
14
|
return (await import("./ja.js")).default;
|
15
15
|
case "tl_PH":
|
16
16
|
return (await import("./tl.js")).default;
|
17
|
+
case "vi_VN":
|
18
|
+
return (await import("./vi.js")).default;
|
17
19
|
default:
|
18
20
|
return (await import("./en.js")).default;
|
19
21
|
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import type { InAppWalletLocale } from "./types.js";
|
2
|
+
|
3
|
+
export default {
|
4
|
+
signInWithGoogle: "Google",
|
5
|
+
signInWithFacebook: "Facebook",
|
6
|
+
signInWithApple: "Apple",
|
7
|
+
emailPlaceholder: "Địa chỉ email",
|
8
|
+
submitEmail: "Tiếp tục",
|
9
|
+
signIn: "Đăng nhập",
|
10
|
+
or: "Hoặc",
|
11
|
+
emailRequired: "Vui lòng nhập địa chỉ email",
|
12
|
+
invalidEmail: "Địa chỉ email không hợp lệ",
|
13
|
+
maxAccountsExceeded:
|
14
|
+
"Số tài khoản vượt quá mức quy định. Vui lòng liên hệ với lập trình viên của ứng dụng này",
|
15
|
+
socialLoginScreen: {
|
16
|
+
title: "Đăng nhập",
|
17
|
+
instruction: "Đăng nhập ở cửa sổ hiện lên",
|
18
|
+
failed: "Đăng nhập thất bại",
|
19
|
+
retry: "Thử lại",
|
20
|
+
},
|
21
|
+
emailLoginScreen: {
|
22
|
+
title: "Đăng nhập",
|
23
|
+
enterCodeSendTo: "Nhập mã xác nhận được gửi tới",
|
24
|
+
newDeviceDetected: "Bạn đang đăng nhập trên một thiết bị mới",
|
25
|
+
enterRecoveryCode:
|
26
|
+
"Nhập mã khôi phục mà bạn nhận được khi đăng nhập lần đầu",
|
27
|
+
invalidCode: "Mã xác nhận không hợp lệ",
|
28
|
+
invalidCodeOrRecoveryCode: "Mã xác nhận hoặc mã khôi phục bị sai",
|
29
|
+
verify: "Xác nhận",
|
30
|
+
failedToSendCode: "Gửi mã xác nhận thất bại",
|
31
|
+
sendingCode: "Đang gửi mã xác nhận",
|
32
|
+
resendCode: "Gửi lại mã xác nhận",
|
33
|
+
},
|
34
|
+
createPassword: {
|
35
|
+
title: "Tạo mật khẩu",
|
36
|
+
instruction:
|
37
|
+
"Đặt mật khẩu cho tài khoản của bạn. Bạn cần mật khẩu này mỗi khi đăng nhập trên một thiết bị mới",
|
38
|
+
saveInstruction: "Vui lòng sao lưu mật khẩu",
|
39
|
+
inputPlaceholder: "Nhập mật khẩu của bạn",
|
40
|
+
confirmation: "Tôi đã sao lưu mật khẩu",
|
41
|
+
submitButton: "Đặt mật khẩu",
|
42
|
+
failedToSetPassword: "Đặt mật khẩu thất bại",
|
43
|
+
},
|
44
|
+
enterPassword: {
|
45
|
+
title: "Nhập mật khẩu",
|
46
|
+
instruction: "Nhập mật khẩu cho tài khoản của bạn",
|
47
|
+
inputPlaceholder: "Nhập mật khẩu của bạn",
|
48
|
+
submitButton: "Xác nhân",
|
49
|
+
wrongPassword: "Sai mật khẩu",
|
50
|
+
},
|
51
|
+
signInWithEmail: "Đăng nhập bằng email",
|
52
|
+
invalidPhone: "Số điện thoại không hợp lệ",
|
53
|
+
phonePlaceholder: "Số điện thoại",
|
54
|
+
signInWithPhone: "Đăng nhập bằng số điện thoại",
|
55
|
+
phoneRequired: "Vui lòng nhập số điện thoại",
|
56
|
+
} satisfies InAppWalletLocale;
|
@@ -14,6 +14,8 @@ export async function getSmartWalletLocale(
|
|
14
14
|
return (await import("./ja.js")).default;
|
15
15
|
case "tl_PH":
|
16
16
|
return (await import("./tl.js")).default;
|
17
|
+
case "vi_VN":
|
18
|
+
return (await import("./vi.js")).default;
|
17
19
|
default:
|
18
20
|
return (await import("./en.js")).default;
|
19
21
|
}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import type { SmartWalletLocale } from "./types.js";
|
2
|
+
|
3
|
+
const smartWalletLocalVi: SmartWalletLocale = {
|
4
|
+
connecting: "Đang kết nối Tài Khoản Thông Minh",
|
5
|
+
failedToConnect: "Kết nối Tài Khoản Thông Minh thất bại",
|
6
|
+
wrongNetworkScreen: {
|
7
|
+
title: "Sai mạng lưới",
|
8
|
+
subtitle: "Vui lòng chuyển sang mạng lưới được yêu cầu",
|
9
|
+
failedToSwitch: "Chuyển mạng lưới thất bại",
|
10
|
+
},
|
11
|
+
};
|
12
|
+
|
13
|
+
export default smartWalletLocalVi;
|
@@ -25,4 +25,8 @@ export const walletConnectLocales: Record<LocaleId, WalletConnectLocale> = {
|
|
25
25
|
scanInstruction: "Escanea esto con tu aplicación de cartera para conectar",
|
26
26
|
openWCModal: "Abre el Modal Oficial de WalletConnect",
|
27
27
|
},
|
28
|
+
vi_VN: {
|
29
|
+
scanInstruction: "Quét mã QR bằng ứng dụng ví để kết nối",
|
30
|
+
openWCModal: "Mở giao diện WalletConnect",
|
31
|
+
},
|
28
32
|
};
|
@@ -48,20 +48,20 @@ class TransactionError<abi extends Abi> extends Error {
|
|
48
48
|
public chainId: number | undefined;
|
49
49
|
|
50
50
|
constructor(reason: string, contract?: ThirdwebContract<abi>) {
|
51
|
-
|
52
|
-
this.name = "TransactionError";
|
53
|
-
this.contractAddress = contract?.address;
|
54
|
-
this.chainId = contract?.chain?.id;
|
51
|
+
let message = reason;
|
55
52
|
if (__DEV__ && contract) {
|
56
53
|
// show more infor in dev
|
57
|
-
|
54
|
+
message = [
|
58
55
|
reason,
|
59
56
|
"",
|
60
|
-
`contract: ${
|
61
|
-
`chainId: ${
|
57
|
+
`contract: ${contract.address}`,
|
58
|
+
`chainId: ${contract.chain?.id}`,
|
62
59
|
].join("\n");
|
63
|
-
} else {
|
64
|
-
this.message = reason;
|
65
60
|
}
|
61
|
+
super(message);
|
62
|
+
this.name = "TransactionError";
|
63
|
+
this.contractAddress = contract?.address;
|
64
|
+
this.chainId = contract?.chain?.id;
|
65
|
+
this.message = message;
|
66
66
|
}
|
67
67
|
}
|
@@ -10,6 +10,40 @@ import type {
|
|
10
10
|
ShardedMerkleTreeInfo,
|
11
11
|
} from "./types.js";
|
12
12
|
|
13
|
+
/*
|
14
|
+
* Retrieves the claim merkle proof for the provided address.
|
15
|
+
* @param {Object} options
|
16
|
+
* @param {@link ThirdwebContract} contract - The ERC1155 airdrop contract
|
17
|
+
* @param {string} recipient - The address of the drop recipient
|
18
|
+
* @param {string} merkleRoot - The merkle root, found on the active claim condition
|
19
|
+
*
|
20
|
+
* @returns {Promise<ClaimProofERC20 | null>} A promise that resolves to the proof or null if the recipient is not in the allowlist
|
21
|
+
*
|
22
|
+
* @example
|
23
|
+
* ```ts
|
24
|
+
* import { fetchProofsERCC1155 } from "thirdweb/extensions/airdrop";
|
25
|
+
* import { getContract, defineChain } from "thirdweb";
|
26
|
+
*
|
27
|
+
* const TOKEN = getContracct({
|
28
|
+
* client,
|
29
|
+
* chain: defineChain(1),
|
30
|
+
* address: "0x..."
|
31
|
+
* });
|
32
|
+
*
|
33
|
+
* const merkleRoot = await tokenMerkleRoot({
|
34
|
+
* contract: TOKEN,
|
35
|
+
* tokenAddress: TOKEN.address
|
36
|
+
* });
|
37
|
+
*
|
38
|
+
* const proof = await fetchProofsERC1155({
|
39
|
+
* contract: TOKEN,
|
40
|
+
* recipient: "0x...",
|
41
|
+
* merkleRoot
|
42
|
+
* });
|
43
|
+
* ```
|
44
|
+
*
|
45
|
+
* @extension AIRDROP
|
46
|
+
*/
|
13
47
|
export async function fetchProofsERC1155(options: {
|
14
48
|
contract: ThirdwebContract;
|
15
49
|
recipient: string;
|
@@ -11,7 +11,41 @@ import type {
|
|
11
11
|
ShardedMerkleTreeInfo,
|
12
12
|
} from "./types.js";
|
13
13
|
|
14
|
-
|
14
|
+
/*
|
15
|
+
* Retrieves the claim merkle proof for the provided address.
|
16
|
+
* @param {Object} options
|
17
|
+
* @param {@link ThirdwebContract} contract - The ERC20 airdrop contract
|
18
|
+
* @param {string} recipient - The address of the drop recipient
|
19
|
+
* @param {string} merkleRoot - The merkle root, found on the active claim condition
|
20
|
+
*
|
21
|
+
* @returns {Promise<ClaimProofERC20 | null>} A promise that resolves to the proof or null if the recipient is not in the allowlist
|
22
|
+
*
|
23
|
+
* @example
|
24
|
+
* ```ts
|
25
|
+
* import { fetchProofsERCC20 } from "thirdweb/extensions/airdrop";
|
26
|
+
* import { getContract, defineChain } from "thirdweb";
|
27
|
+
*
|
28
|
+
* const TOKEN = getContracct({
|
29
|
+
* client,
|
30
|
+
* chain: defineChain(1),
|
31
|
+
* address: "0x..."
|
32
|
+
* });
|
33
|
+
*
|
34
|
+
* const merkleRoot = await tokenMerkleRoot({
|
35
|
+
* contract: TOKEN,
|
36
|
+
* tokenAddress: TOKEN.address
|
37
|
+
* });
|
38
|
+
*
|
39
|
+
* const proof = await fetchProofsERC20({
|
40
|
+
* contract: TOKEN,
|
41
|
+
* recipient: "0x...",
|
42
|
+
* merkleRoot
|
43
|
+
* });
|
44
|
+
* ```
|
45
|
+
*
|
46
|
+
* @extension AIRDROP
|
47
|
+
*/
|
48
|
+
export async function fetchProofsERC20(options: {
|
15
49
|
contract: ThirdwebContract;
|
16
50
|
recipient: string;
|
17
51
|
merkleRoot: string;
|
@@ -10,6 +10,40 @@ import type {
|
|
10
10
|
ShardedMerkleTreeInfo,
|
11
11
|
} from "./types.js";
|
12
12
|
|
13
|
+
/*
|
14
|
+
* Retrieves the claim merkle proof for the provided address.
|
15
|
+
* @param {Object} options
|
16
|
+
* @param {@link ThirdwebContract} contract - The ERC721 airdrop contract
|
17
|
+
* @param {string} recipient - The address of the drop recipient
|
18
|
+
* @param {string} merkleRoot - The merkle root, found on the active claim condition
|
19
|
+
*
|
20
|
+
* @returns {Promise<ClaimProofERC721 | null>} A promise that resolves to the proof or null if the recipient is not in the allowlist
|
21
|
+
*
|
22
|
+
* @example
|
23
|
+
* ```ts
|
24
|
+
* import { fetchProofsERC721 } from "thirdweb/extensions/airdrop";
|
25
|
+
* import { getContract, defineChain } from "thirdweb";
|
26
|
+
*
|
27
|
+
* const NFT = getContracct({
|
28
|
+
* client,
|
29
|
+
* chain: defineChain(1),
|
30
|
+
* address: "0x..."
|
31
|
+
* });
|
32
|
+
*
|
33
|
+
* const merkleRoot = await tokenMerkleRoot({
|
34
|
+
* contract: NFT,
|
35
|
+
* tokenAddress: NFT.address
|
36
|
+
* });
|
37
|
+
*
|
38
|
+
* const proof = await fetchProofsERC721({
|
39
|
+
* contract: NFT,
|
40
|
+
* recipient: "0x...",
|
41
|
+
* merkleRoot
|
42
|
+
* });
|
43
|
+
* ```
|
44
|
+
*
|
45
|
+
* @extension AIRDROP
|
46
|
+
*/
|
13
47
|
export async function fetchProofsERC721(options: {
|
14
48
|
contract: ThirdwebContract;
|
15
49
|
recipient: string;
|
package/src/version.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export const version = "5.
|
1
|
+
export const version = "5.35.0-nightly-aadbd33e9d696bd7dd77561fa3f3a0a0fa7747f5-20240716082511";
|
@@ -307,23 +307,27 @@ export class IFrameWallet {
|
|
307
307
|
parsedTypedData.types.EIP712Domain = undefined;
|
308
308
|
}
|
309
309
|
const domain = parsedTypedData.domain as TypedDataDefinition["domain"];
|
310
|
-
const chainId = domain?.chainId
|
310
|
+
const chainId = domain?.chainId;
|
311
|
+
const domainData = {
|
312
|
+
verifyingContract: domain?.verifyingContract,
|
313
|
+
name: domain?.name,
|
314
|
+
version: domain?.version,
|
315
|
+
};
|
316
|
+
// chain id can't be included if it wasn't explicitly specified
|
317
|
+
if (chainId) {
|
318
|
+
(domainData as Record<string, unknown>).chainId = chainId;
|
319
|
+
}
|
311
320
|
|
312
321
|
const { signedTypedData } =
|
313
322
|
await querier.call<SignedTypedDataReturnType>({
|
314
323
|
procedureName: "signTypedDataV4",
|
315
324
|
params: {
|
316
|
-
domain:
|
317
|
-
chainId: chainId,
|
318
|
-
verifyingContract: domain?.verifyingContract,
|
319
|
-
name: domain?.name,
|
320
|
-
version: domain?.version,
|
321
|
-
},
|
325
|
+
domain: domainData,
|
322
326
|
types:
|
323
327
|
parsedTypedData.types as SignerProcedureTypes["signTypedDataV4"]["types"],
|
324
328
|
message:
|
325
329
|
parsedTypedData.message as SignerProcedureTypes["signTypedDataV4"]["message"],
|
326
|
-
chainId,
|
330
|
+
chainId: chainId || 1,
|
327
331
|
partnerId,
|
328
332
|
rpcEndpoint: `https://${chainId}.rpc.thirdweb.com`, // TODO (ew) shouldnt be needed
|
329
333
|
},
|