thirdweb 5.40.1-nightly-b128530355f0dc47d897bd2ef7c3823752ea9b6c-20240727000321 → 5.42.0-nightly-e27ebef85bb61342c3de53f85e134cf4a29f787c-20240730000342
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/client/client.js +19 -1
- package/dist/cjs/client/client.js.map +1 -1
- package/dist/cjs/exports/extensions/common.js +3 -1
- package/dist/cjs/exports/extensions/common.js.map +1 -1
- package/dist/cjs/exports/extensions/erc1155.js +2 -1
- package/dist/cjs/exports/extensions/erc1155.js.map +1 -1
- package/dist/cjs/exports/extensions/erc20.js +3 -1
- package/dist/cjs/exports/extensions/erc20.js.map +1 -1
- package/dist/cjs/exports/react.js +7 -2
- package/dist/cjs/exports/react.js.map +1 -1
- package/dist/cjs/exports/utils.js +3 -1
- package/dist/cjs/exports/utils.js.map +1 -1
- package/dist/cjs/extensions/erc20/write/getApprovalForTransaction.js +38 -0
- package/dist/cjs/extensions/erc20/write/getApprovalForTransaction.js.map +1 -1
- package/dist/cjs/react/core/hooks/others/useChainQuery.js +19 -3
- package/dist/cjs/react/core/hooks/others/useChainQuery.js.map +1 -1
- package/dist/cjs/react/core/hooks/transaction/transaction-button-utils.js.map +1 -1
- package/dist/cjs/react/core/utils/socialIcons.js +3 -1
- package/dist/cjs/react/core/utils/socialIcons.js.map +1 -1
- package/dist/cjs/react/native/ui/components/WalletImage.js +2 -0
- package/dist/cjs/react/native/ui/components/WalletImage.js.map +1 -1
- package/dist/cjs/react/native/ui/connect/InAppWalletUI.js +3 -1
- package/dist/cjs/react/native/ui/connect/InAppWalletUI.js.map +1 -1
- package/dist/cjs/react/native/ui/icons/svgs.js +7 -1
- package/dist/cjs/react/native/ui/icons/svgs.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/Details.js +5 -5
- package/dist/cjs/react/web/ui/ConnectWallet/Details.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/TransactionsScreen.js +12 -1
- package/dist/cjs/react/web/ui/ConnectWallet/TransactionsScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.js +4 -3
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewAssets.js +37 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewAssets.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewNFTs.js +21 -18
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewNFTs.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewTokens.js +12 -9
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewTokens.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.js +3 -2
- package/dist/cjs/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.js.map +1 -1
- package/dist/cjs/react/web/ui/components/Tabs.js +5 -3
- package/dist/cjs/react/web/ui/components/Tabs.js.map +1 -1
- package/dist/cjs/react/web/ui/components/WalletImage.js +3 -0
- package/dist/cjs/react/web/ui/components/WalletImage.js.map +1 -1
- package/dist/cjs/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.js +127 -0
- package/dist/cjs/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.js.map +1 -0
- package/dist/cjs/react/web/ui/prebuilt/thirdweb/ClaimButton/index.js +70 -3
- package/dist/cjs/react/web/ui/prebuilt/thirdweb/ClaimButton/index.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/ConnectWalletSocialOptions.js +1 -0
- package/dist/cjs/react/web/wallets/shared/ConnectWalletSocialOptions.js.map +1 -1
- package/dist/cjs/react/web/wallets/shared/oauthSignIn.js +2 -1
- package/dist/cjs/react/web/wallets/shared/oauthSignIn.js.map +1 -1
- package/dist/cjs/storage/download.js +44 -4
- package/dist/cjs/storage/download.js.map +1 -1
- package/dist/cjs/transaction/actions/send-and-confirm-transaction.js +1 -1
- package/dist/cjs/utils/contract/parse-abi-params.js +87 -0
- package/dist/cjs/utils/contract/parse-abi-params.js.map +1 -0
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wallets/in-app/core/authentication/getLoginPath.js +11 -5
- package/dist/cjs/wallets/in-app/core/authentication/getLoginPath.js.map +1 -1
- package/dist/cjs/wallets/in-app/core/authentication/type.js +1 -0
- package/dist/cjs/wallets/in-app/core/authentication/type.js.map +1 -1
- package/dist/cjs/wallets/in-app/core/wallet/index.js +2 -3
- package/dist/cjs/wallets/in-app/core/wallet/index.js.map +1 -1
- package/dist/cjs/wallets/in-app/native/auth/native-auth.js +5 -1
- package/dist/cjs/wallets/in-app/native/auth/native-auth.js.map +1 -1
- package/dist/cjs/wallets/in-app/native/native-connector.js +1 -0
- package/dist/cjs/wallets/in-app/native/native-connector.js.map +1 -1
- package/dist/cjs/wallets/in-app/web/lib/auth/oauth.js +7 -17
- package/dist/cjs/wallets/in-app/web/lib/auth/oauth.js.map +1 -1
- package/dist/cjs/wallets/in-app/web/lib/web-connector.js +1 -0
- package/dist/cjs/wallets/in-app/web/lib/web-connector.js.map +1 -1
- package/dist/cjs/wallets/types.js +1 -0
- package/dist/cjs/wallets/types.js.map +1 -1
- package/dist/esm/client/client.js +19 -1
- package/dist/esm/client/client.js.map +1 -1
- package/dist/esm/exports/extensions/common.js +1 -0
- package/dist/esm/exports/extensions/common.js.map +1 -1
- package/dist/esm/exports/extensions/erc1155.js +1 -1
- package/dist/esm/exports/extensions/erc1155.js.map +1 -1
- package/dist/esm/exports/extensions/erc20.js +1 -0
- package/dist/esm/exports/extensions/erc20.js.map +1 -1
- package/dist/esm/exports/react.js +3 -0
- package/dist/esm/exports/react.js.map +1 -1
- package/dist/esm/exports/utils.js +1 -0
- package/dist/esm/exports/utils.js.map +1 -1
- package/dist/esm/extensions/erc20/write/getApprovalForTransaction.js +38 -0
- package/dist/esm/extensions/erc20/write/getApprovalForTransaction.js.map +1 -1
- package/dist/esm/react/core/hooks/others/useChainQuery.js +19 -3
- package/dist/esm/react/core/hooks/others/useChainQuery.js.map +1 -1
- package/dist/esm/react/core/hooks/transaction/transaction-button-utils.js.map +1 -1
- package/dist/esm/react/core/utils/socialIcons.js +2 -0
- package/dist/esm/react/core/utils/socialIcons.js.map +1 -1
- package/dist/esm/react/native/ui/components/WalletImage.js +3 -1
- package/dist/esm/react/native/ui/components/WalletImage.js.map +1 -1
- package/dist/esm/react/native/ui/connect/InAppWalletUI.js +4 -2
- package/dist/esm/react/native/ui/connect/InAppWalletUI.js.map +1 -1
- package/dist/esm/react/native/ui/icons/svgs.js +6 -0
- package/dist/esm/react/native/ui/icons/svgs.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/Details.js +5 -5
- package/dist/esm/react/web/ui/ConnectWallet/Details.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/TransactionsScreen.js +12 -1
- package/dist/esm/react/web/ui/ConnectWallet/TransactionsScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js +2 -2
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js +2 -2
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.js +4 -3
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/ViewAssets.js +34 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/ViewAssets.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/ViewNFTs.js +21 -19
- package/dist/esm/react/web/ui/ConnectWallet/screens/ViewNFTs.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/ViewTokens.js +12 -10
- package/dist/esm/react/web/ui/ConnectWallet/screens/ViewTokens.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.js +3 -2
- package/dist/esm/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.js.map +1 -1
- package/dist/esm/react/web/ui/components/Tabs.js +5 -3
- package/dist/esm/react/web/ui/components/Tabs.js.map +1 -1
- package/dist/esm/react/web/ui/components/WalletImage.js +4 -1
- package/dist/esm/react/web/ui/components/WalletImage.js.map +1 -1
- package/dist/esm/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.js +124 -0
- package/dist/esm/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.js.map +1 -0
- package/dist/esm/react/web/ui/prebuilt/thirdweb/ClaimButton/index.js +69 -3
- package/dist/esm/react/web/ui/prebuilt/thirdweb/ClaimButton/index.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/ConnectWalletSocialOptions.js +1 -0
- package/dist/esm/react/web/wallets/shared/ConnectWalletSocialOptions.js.map +1 -1
- package/dist/esm/react/web/wallets/shared/oauthSignIn.js +2 -1
- package/dist/esm/react/web/wallets/shared/oauthSignIn.js.map +1 -1
- package/dist/esm/storage/download.js +44 -4
- package/dist/esm/storage/download.js.map +1 -1
- package/dist/esm/transaction/actions/send-and-confirm-transaction.js +1 -1
- package/dist/esm/utils/contract/parse-abi-params.js +84 -0
- package/dist/esm/utils/contract/parse-abi-params.js.map +1 -0
- package/dist/esm/version.js +1 -1
- package/dist/esm/wallets/in-app/core/authentication/getLoginPath.js +11 -5
- package/dist/esm/wallets/in-app/core/authentication/getLoginPath.js.map +1 -1
- package/dist/esm/wallets/in-app/core/authentication/type.js +1 -0
- package/dist/esm/wallets/in-app/core/authentication/type.js.map +1 -1
- package/dist/esm/wallets/in-app/core/wallet/index.js +2 -3
- package/dist/esm/wallets/in-app/core/wallet/index.js.map +1 -1
- package/dist/esm/wallets/in-app/native/auth/native-auth.js +5 -1
- package/dist/esm/wallets/in-app/native/auth/native-auth.js.map +1 -1
- package/dist/esm/wallets/in-app/native/native-connector.js +1 -0
- package/dist/esm/wallets/in-app/native/native-connector.js.map +1 -1
- package/dist/esm/wallets/in-app/web/lib/auth/oauth.js +6 -15
- package/dist/esm/wallets/in-app/web/lib/auth/oauth.js.map +1 -1
- package/dist/esm/wallets/in-app/web/lib/web-connector.js +1 -0
- package/dist/esm/wallets/in-app/web/lib/web-connector.js.map +1 -1
- package/dist/esm/wallets/types.js +1 -0
- package/dist/esm/wallets/types.js.map +1 -1
- package/dist/types/client/client.d.ts +19 -1
- package/dist/types/client/client.d.ts.map +1 -1
- package/dist/types/exports/extensions/common.d.ts +1 -0
- package/dist/types/exports/extensions/common.d.ts.map +1 -1
- package/dist/types/exports/extensions/erc1155.d.ts +1 -1
- package/dist/types/exports/extensions/erc1155.d.ts.map +1 -1
- package/dist/types/exports/extensions/erc20.d.ts +1 -0
- package/dist/types/exports/extensions/erc20.d.ts.map +1 -1
- package/dist/types/exports/react.d.ts +2 -0
- package/dist/types/exports/react.d.ts.map +1 -1
- package/dist/types/exports/utils.d.ts +2 -0
- package/dist/types/exports/utils.d.ts.map +1 -1
- package/dist/types/extensions/erc20/write/getApprovalForTransaction.d.ts +44 -0
- package/dist/types/extensions/erc20/write/getApprovalForTransaction.d.ts.map +1 -1
- package/dist/types/react/core/hooks/others/useChainQuery.d.ts +21 -4
- package/dist/types/react/core/hooks/others/useChainQuery.d.ts.map +1 -1
- package/dist/types/react/core/hooks/transaction/transaction-button-utils.d.ts +1 -0
- package/dist/types/react/core/hooks/transaction/transaction-button-utils.d.ts.map +1 -1
- package/dist/types/react/core/utils/socialIcons.d.ts +2 -0
- package/dist/types/react/core/utils/socialIcons.d.ts.map +1 -1
- package/dist/types/react/core/utils/storage.d.ts +1 -1
- package/dist/types/react/core/utils/storage.d.ts.map +1 -1
- package/dist/types/react/native/ui/components/WalletImage.d.ts.map +1 -1
- package/dist/types/react/native/ui/connect/InAppWalletUI.d.ts.map +1 -1
- package/dist/types/react/native/ui/icons/svgs.d.ts +1 -0
- package/dist/types/react/native/ui/icons/svgs.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/TransactionsScreen.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/{ViewFunds.d.ts → ViewAssets.d.ts} +4 -2
- package/dist/types/react/web/ui/ConnectWallet/screens/ViewAssets.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/ViewNFTs.d.ts +6 -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 +5 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/ViewTokens.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/types.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/types.d.ts.map +1 -1
- package/dist/types/react/web/ui/PayEmbed.d.ts +1 -1
- package/dist/types/react/web/ui/components/Tabs.d.ts +5 -1
- package/dist/types/react/web/ui/components/Tabs.d.ts.map +1 -1
- package/dist/types/react/web/ui/components/WalletImage.d.ts.map +1 -1
- package/dist/types/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.d.ts +63 -0
- package/dist/types/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.d.ts.map +1 -0
- package/dist/types/react/web/ui/prebuilt/thirdweb/ClaimButton/index.d.ts +21 -0
- package/dist/types/react/web/ui/prebuilt/thirdweb/ClaimButton/index.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/ConnectWalletSocialOptions.d.ts.map +1 -1
- package/dist/types/react/web/wallets/shared/oauthSignIn.d.ts.map +1 -1
- package/dist/types/storage/download.d.ts +43 -3
- package/dist/types/storage/download.d.ts.map +1 -1
- package/dist/types/transaction/actions/send-and-confirm-transaction.d.ts +1 -1
- package/dist/types/utils/contract/parse-abi-params.d.ts +29 -0
- package/dist/types/utils/contract/parse-abi-params.d.ts.map +1 -0
- package/dist/types/version.d.ts +1 -1
- package/dist/types/wallets/in-app/core/authentication/getLoginPath.d.ts +6 -1
- package/dist/types/wallets/in-app/core/authentication/getLoginPath.d.ts.map +1 -1
- package/dist/types/wallets/in-app/core/authentication/type.d.ts +2 -1
- package/dist/types/wallets/in-app/core/authentication/type.d.ts.map +1 -1
- package/dist/types/wallets/in-app/core/wallet/index.d.ts.map +1 -1
- package/dist/types/wallets/in-app/native/auth/native-auth.d.ts.map +1 -1
- package/dist/types/wallets/in-app/native/native-connector.d.ts.map +1 -1
- package/dist/types/wallets/in-app/web/lib/auth/oauth.d.ts +0 -1
- package/dist/types/wallets/in-app/web/lib/auth/oauth.d.ts.map +1 -1
- package/dist/types/wallets/in-app/web/lib/web-connector.d.ts.map +1 -1
- package/dist/types/wallets/types.d.ts +1 -1
- package/dist/types/wallets/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/client/client.ts +19 -1
- package/src/exports/extensions/common.ts +5 -0
- package/src/exports/extensions/erc1155.ts +1 -0
- package/src/exports/extensions/erc20.ts +5 -0
- package/src/exports/react.ts +7 -0
- package/src/exports/utils.ts +3 -0
- package/src/extensions/erc20/write/getApprovalForTransaction.ts +44 -0
- package/src/react/core/hooks/others/useChainQuery.ts +24 -4
- package/src/react/core/hooks/transaction/transaction-button-utils.ts +1 -0
- package/src/react/core/utils/socialIcons.ts +3 -0
- package/src/react/native/ui/components/WalletImage.tsx +3 -0
- package/src/react/native/ui/connect/InAppWalletUI.tsx +8 -3
- package/src/react/native/ui/icons/svgs.ts +7 -0
- package/src/react/web/ui/ConnectWallet/Details.tsx +5 -4
- package/src/react/web/ui/ConnectWallet/TransactionsScreen.tsx +20 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/DirectPaymentModeScreen.tsx +2 -2
- package/src/react/web/ui/ConnectWallet/screens/Buy/TransactionModeScreen.tsx +2 -2
- package/src/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.tsx +25 -22
- package/src/react/web/ui/ConnectWallet/screens/ViewAssets.tsx +104 -0
- package/src/react/web/ui/ConnectWallet/screens/ViewNFTs.tsx +63 -52
- package/src/react/web/ui/ConnectWallet/screens/ViewTokens.tsx +38 -29
- package/src/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.tsx +8 -2
- package/src/react/web/ui/ConnectWallet/screens/types.ts +1 -1
- package/src/react/web/ui/PayEmbed.tsx +1 -1
- package/src/react/web/ui/components/Tabs.tsx +11 -6
- package/src/react/web/ui/components/WalletImage.tsx +4 -0
- package/src/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/BuyDirectListingButton.test.tsx +27 -0
- package/src/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/index.tsx +200 -0
- package/src/react/web/ui/prebuilt/thirdweb/ClaimButton/index.tsx +78 -5
- package/src/react/web/wallets/shared/ConnectWalletSocialOptions.tsx +1 -0
- package/src/react/web/wallets/shared/oauthSignIn.ts +2 -1
- package/src/storage/download.ts +47 -4
- package/src/transaction/actions/send-and-confirm-transaction.ts +1 -1
- package/src/utils/contract/parse-abi-params.test.ts +160 -0
- package/src/utils/contract/parse-abi-params.ts +90 -0
- package/src/version.ts +1 -1
- package/src/wallets/in-app/core/authentication/getLoginPath.ts +22 -9
- package/src/wallets/in-app/core/authentication/type.ts +1 -0
- package/src/wallets/in-app/core/wallet/index.ts +2 -3
- package/src/wallets/in-app/native/auth/native-auth.ts +5 -1
- package/src/wallets/in-app/native/native-connector.ts +1 -0
- package/src/wallets/in-app/web/lib/auth/oauth.ts +6 -24
- package/src/wallets/in-app/web/lib/web-connector.ts +1 -0
- package/src/wallets/types.ts +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewFunds.js +0 -31
- package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewFunds.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/ViewFunds.js +0 -28
- package/dist/esm/react/web/ui/ConnectWallet/screens/ViewFunds.js.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/ViewFunds.d.ts.map +0 -1
- package/src/react/web/ui/ConnectWallet/screens/ViewFunds.tsx +0 -76
@@ -128,6 +128,7 @@ export function PayTxHistoryList(props: {
|
|
128
128
|
width: "100%",
|
129
129
|
minHeight: "250px",
|
130
130
|
maxHeight: "370px",
|
131
|
+
paddingBottom: spacing.lg,
|
131
132
|
}}
|
132
133
|
>
|
133
134
|
<Container flex="column" gap="xs" expand>
|
@@ -158,24 +159,26 @@ export function PayTxHistoryList(props: {
|
|
158
159
|
</Container>
|
159
160
|
)}
|
160
161
|
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
162
|
+
{txInfosToShow.length > 0 && (
|
163
|
+
<Container animate="fadein" flex="column" gap="xs">
|
164
|
+
{txInfosToShow.map((txInfo) => {
|
165
|
+
return (
|
166
|
+
<BuyTxHistoryButton
|
167
|
+
key={
|
168
|
+
txInfo.type === "swap"
|
169
|
+
? txInfo.status.source?.transactionHash
|
170
|
+
: txInfo.status.intentId
|
171
|
+
}
|
172
|
+
txInfo={txInfo}
|
173
|
+
client={props.client}
|
174
|
+
onClick={() => {
|
175
|
+
props.onSelectTx(txInfo);
|
176
|
+
}}
|
177
|
+
/>
|
178
|
+
);
|
179
|
+
})}
|
180
|
+
</Container>
|
181
|
+
)}
|
179
182
|
|
180
183
|
{isLoading && txInfosToShow.length > 0 && (
|
181
184
|
<>
|
@@ -186,8 +189,8 @@ export function PayTxHistoryList(props: {
|
|
186
189
|
)}
|
187
190
|
</Container>
|
188
191
|
|
189
|
-
|
190
|
-
|
192
|
+
{pagination && !hidePagination && (
|
193
|
+
<Container py="md">
|
191
194
|
<div
|
192
195
|
style={{
|
193
196
|
display: "grid",
|
@@ -234,8 +237,8 @@ export function PayTxHistoryList(props: {
|
|
234
237
|
<ArrowRightIcon width={iconSize.sm} height={iconSize.sm} />
|
235
238
|
</Button>
|
236
239
|
</div>
|
237
|
-
|
238
|
-
|
240
|
+
</Container>
|
241
|
+
)}
|
239
242
|
</Container>
|
240
243
|
);
|
241
244
|
}
|
@@ -0,0 +1,104 @@
|
|
1
|
+
import { useState } from "react";
|
2
|
+
import type { ThirdwebClient } from "../../../../../client/client.js";
|
3
|
+
import { type Theme, iconSize } from "../../../../core/design-system/index.js";
|
4
|
+
import type {
|
5
|
+
SupportedNFTs,
|
6
|
+
SupportedTokens,
|
7
|
+
} from "../../../../core/utils/defaultTokens.js";
|
8
|
+
import { Spacer } from "../../components/Spacer.js";
|
9
|
+
import Tabs from "../../components/Tabs.js";
|
10
|
+
import { Container, Line, ModalHeader } from "../../components/basic.js";
|
11
|
+
import { CoinsIcon } from "../icons/CoinsIcon.js";
|
12
|
+
import { ImageIcon } from "../icons/ImageIcon.js";
|
13
|
+
import type { ConnectLocale } from "../locale/types.js";
|
14
|
+
import { ViewNFTsContent } from "./ViewNFTs.js";
|
15
|
+
import { ViewTokensContent } from "./ViewTokens.js";
|
16
|
+
import type { WalletDetailsModalScreen } from "./types.js";
|
17
|
+
|
18
|
+
/**
|
19
|
+
* @internal
|
20
|
+
*/
|
21
|
+
export function ViewAssets(props: {
|
22
|
+
supportedTokens?: SupportedTokens;
|
23
|
+
supportedNFTs?: SupportedNFTs;
|
24
|
+
theme: Theme | "light" | "dark";
|
25
|
+
onBack: () => void;
|
26
|
+
setScreen: (screen: WalletDetailsModalScreen) => void;
|
27
|
+
client: ThirdwebClient;
|
28
|
+
connectLocale: ConnectLocale;
|
29
|
+
}) {
|
30
|
+
const [activeTab, setActiveTab] = useState("Tokens");
|
31
|
+
const { connectLocale } = props;
|
32
|
+
|
33
|
+
return (
|
34
|
+
<Container
|
35
|
+
animate="fadein"
|
36
|
+
style={{
|
37
|
+
minHeight: "300px",
|
38
|
+
}}
|
39
|
+
>
|
40
|
+
<Container p="lg">
|
41
|
+
<ModalHeader
|
42
|
+
title={connectLocale.viewFunds.title}
|
43
|
+
onBack={props.onBack}
|
44
|
+
/>
|
45
|
+
</Container>
|
46
|
+
<Line />
|
47
|
+
<Container
|
48
|
+
px="lg"
|
49
|
+
scrollY
|
50
|
+
style={{
|
51
|
+
minHeight: "330px",
|
52
|
+
}}
|
53
|
+
>
|
54
|
+
<Spacer y="md" />
|
55
|
+
<Tabs
|
56
|
+
options={[
|
57
|
+
{
|
58
|
+
label: (
|
59
|
+
<span className="flex gap-2">
|
60
|
+
<CoinsIcon size={iconSize.sm} /> Tokens
|
61
|
+
</span>
|
62
|
+
),
|
63
|
+
value: "Tokens",
|
64
|
+
},
|
65
|
+
{
|
66
|
+
label: (
|
67
|
+
<span className="flex gap-2">
|
68
|
+
<ImageIcon size={iconSize.sm} /> NFTs
|
69
|
+
</span>
|
70
|
+
),
|
71
|
+
value: "NFTs",
|
72
|
+
},
|
73
|
+
]}
|
74
|
+
selected={activeTab}
|
75
|
+
onSelect={setActiveTab}
|
76
|
+
>
|
77
|
+
<Container
|
78
|
+
scrollY
|
79
|
+
style={{
|
80
|
+
maxHeight: "300px",
|
81
|
+
}}
|
82
|
+
>
|
83
|
+
{activeTab === "Tokens" && (
|
84
|
+
<ViewTokensContent
|
85
|
+
client={props.client}
|
86
|
+
connectLocale={connectLocale}
|
87
|
+
supportedTokens={props.supportedTokens}
|
88
|
+
/>
|
89
|
+
)}
|
90
|
+
{activeTab === "NFTs" && (
|
91
|
+
<ViewNFTsContent
|
92
|
+
supportedNFTs={props.supportedNFTs}
|
93
|
+
client={props.client}
|
94
|
+
theme={props.theme}
|
95
|
+
connectLocale={connectLocale}
|
96
|
+
/>
|
97
|
+
)}
|
98
|
+
</Container>
|
99
|
+
</Tabs>
|
100
|
+
<Spacer y="lg" />
|
101
|
+
</Container>
|
102
|
+
</Container>
|
103
|
+
);
|
104
|
+
}
|
@@ -71,6 +71,39 @@ export function ViewNFTs(props: {
|
|
71
71
|
onBack: () => void;
|
72
72
|
client: ThirdwebClient;
|
73
73
|
connectLocale: ConnectLocale;
|
74
|
+
}) {
|
75
|
+
return (
|
76
|
+
<Container
|
77
|
+
style={{
|
78
|
+
minHeight: "300px",
|
79
|
+
}}
|
80
|
+
>
|
81
|
+
<Container p="lg">
|
82
|
+
<ModalHeader
|
83
|
+
title={props.connectLocale.viewFunds.viewNFTs}
|
84
|
+
onBack={props.onBack}
|
85
|
+
/>
|
86
|
+
</Container>
|
87
|
+
<Line />
|
88
|
+
<Container
|
89
|
+
px="sm"
|
90
|
+
scrollY
|
91
|
+
style={{
|
92
|
+
maxHeight: "500px",
|
93
|
+
}}
|
94
|
+
>
|
95
|
+
<Spacer y="md" />
|
96
|
+
<ViewNFTsContent {...props} />
|
97
|
+
</Container>
|
98
|
+
</Container>
|
99
|
+
);
|
100
|
+
}
|
101
|
+
|
102
|
+
export function ViewNFTsContent(props: {
|
103
|
+
supportedNFTs?: SupportedNFTs;
|
104
|
+
client: ThirdwebClient;
|
105
|
+
theme: Theme | "light" | "dark";
|
106
|
+
connectLocale: ConnectLocale;
|
74
107
|
}) {
|
75
108
|
const activeAccount = useActiveAccount();
|
76
109
|
const activeChain = useActiveWalletChain();
|
@@ -79,8 +112,6 @@ export function ViewNFTs(props: {
|
|
79
112
|
return null;
|
80
113
|
}
|
81
114
|
|
82
|
-
const { connectLocale } = props;
|
83
|
-
|
84
115
|
const nftList = useMemo(() => {
|
85
116
|
const nfts = [];
|
86
117
|
if (!props.supportedNFTs) return [];
|
@@ -106,60 +137,40 @@ export function ViewNFTs(props: {
|
|
106
137
|
});
|
107
138
|
|
108
139
|
return (
|
109
|
-
|
110
|
-
style={{
|
111
|
-
minHeight: "300px",
|
112
|
-
}}
|
113
|
-
>
|
114
|
-
<Container p="lg">
|
115
|
-
<ModalHeader
|
116
|
-
title={connectLocale.viewFunds.viewNFTs}
|
117
|
-
onBack={props.onBack}
|
118
|
-
/>
|
119
|
-
</Container>
|
120
|
-
<Line />
|
140
|
+
<>
|
121
141
|
<Container
|
122
|
-
px="sm"
|
123
|
-
scrollY
|
124
142
|
style={{
|
125
|
-
|
143
|
+
display: "grid",
|
144
|
+
gridTemplateColumns: "1fr 1fr",
|
145
|
+
gap: "12px",
|
126
146
|
}}
|
127
147
|
>
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
148
|
+
{results.map((result, index) => {
|
149
|
+
if (result.error) {
|
150
|
+
console.error(result.error);
|
151
|
+
return null;
|
152
|
+
}
|
153
|
+
return result.isLoading || !result.data ? (
|
154
|
+
<Skeleton
|
155
|
+
key={`${nftList[index]?.chain?.id}:${nftList[index]?.address}`}
|
156
|
+
height="150px"
|
157
|
+
width="150px"
|
158
|
+
/>
|
159
|
+
) : (
|
160
|
+
result.data.map((nft) => (
|
161
|
+
<NftCard
|
162
|
+
key={`${nft.chain.id}:${nft.address}:${nft.id}`}
|
163
|
+
{...nft}
|
164
|
+
client={props.client}
|
165
|
+
chain={nft.chain}
|
166
|
+
theme={props.theme}
|
146
167
|
/>
|
147
|
-
)
|
148
|
-
|
149
|
-
|
150
|
-
key={`${nft.chain.id}:${nft.address}:${nft.id}`}
|
151
|
-
{...nft}
|
152
|
-
client={props.client}
|
153
|
-
chain={nft.chain}
|
154
|
-
theme={props.theme}
|
155
|
-
/>
|
156
|
-
))
|
157
|
-
);
|
158
|
-
})}
|
159
|
-
</Container>
|
160
|
-
<Spacer y="lg" />
|
168
|
+
))
|
169
|
+
);
|
170
|
+
})}
|
161
171
|
</Container>
|
162
|
-
|
172
|
+
<Spacer y="lg" />
|
173
|
+
</>
|
163
174
|
);
|
164
175
|
}
|
165
176
|
|
@@ -188,8 +199,8 @@ function NftCard(
|
|
188
199
|
display: "flex",
|
189
200
|
flexShrink: 0,
|
190
201
|
alignItems: "center",
|
191
|
-
width: "
|
192
|
-
height: "
|
202
|
+
width: "150px",
|
203
|
+
height: "150px",
|
193
204
|
borderRadius: "8px",
|
194
205
|
overflow: "hidden",
|
195
206
|
background:
|
@@ -30,17 +30,6 @@ export function ViewTokens(props: {
|
|
30
30
|
client: ThirdwebClient;
|
31
31
|
connectLocale: ConnectLocale;
|
32
32
|
}) {
|
33
|
-
const activeChain = useActiveWalletChain();
|
34
|
-
const supportedTokens = props.supportedTokens || defaultTokens;
|
35
|
-
|
36
|
-
if (!activeChain) {
|
37
|
-
return null;
|
38
|
-
}
|
39
|
-
|
40
|
-
const tokenList =
|
41
|
-
(activeChain?.id ? supportedTokens[activeChain.id] : undefined) || [];
|
42
|
-
const { connectLocale } = props;
|
43
|
-
|
44
33
|
return (
|
45
34
|
<Container
|
46
35
|
style={{
|
@@ -49,7 +38,7 @@ export function ViewTokens(props: {
|
|
49
38
|
>
|
50
39
|
<Container p="lg">
|
51
40
|
<ModalHeader
|
52
|
-
title={connectLocale.viewFunds.title}
|
41
|
+
title={props.connectLocale.viewFunds.title}
|
53
42
|
onBack={props.onBack}
|
54
43
|
/>
|
55
44
|
</Container>
|
@@ -62,29 +51,49 @@ export function ViewTokens(props: {
|
|
62
51
|
}}
|
63
52
|
>
|
64
53
|
<Spacer y="md" />
|
65
|
-
|
66
|
-
<TokenInfo
|
67
|
-
token={NATIVE_TOKEN}
|
68
|
-
chain={activeChain}
|
69
|
-
client={props.client}
|
70
|
-
/>
|
71
|
-
|
72
|
-
{tokenList.map((token) => {
|
73
|
-
return (
|
74
|
-
<TokenInfo
|
75
|
-
token={token}
|
76
|
-
key={token.address}
|
77
|
-
chain={activeChain}
|
78
|
-
client={props.client}
|
79
|
-
/>
|
80
|
-
);
|
81
|
-
})}
|
54
|
+
<ViewTokensContent {...props} />
|
82
55
|
<Spacer y="lg" />
|
83
56
|
</Container>
|
84
57
|
</Container>
|
85
58
|
);
|
86
59
|
}
|
87
60
|
|
61
|
+
export function ViewTokensContent(props: {
|
62
|
+
supportedTokens?: SupportedTokens;
|
63
|
+
client: ThirdwebClient;
|
64
|
+
connectLocale: ConnectLocale;
|
65
|
+
}) {
|
66
|
+
const activeChain = useActiveWalletChain();
|
67
|
+
if (!activeChain) {
|
68
|
+
return null;
|
69
|
+
}
|
70
|
+
const supportedTokens = props.supportedTokens || defaultTokens;
|
71
|
+
|
72
|
+
const tokenList =
|
73
|
+
(activeChain?.id ? supportedTokens[activeChain.id] : undefined) || [];
|
74
|
+
|
75
|
+
return (
|
76
|
+
<>
|
77
|
+
<TokenInfo
|
78
|
+
token={NATIVE_TOKEN}
|
79
|
+
chain={activeChain}
|
80
|
+
client={props.client}
|
81
|
+
/>
|
82
|
+
|
83
|
+
{tokenList.map((token) => {
|
84
|
+
return (
|
85
|
+
<TokenInfo
|
86
|
+
token={token}
|
87
|
+
key={token.address}
|
88
|
+
chain={activeChain}
|
89
|
+
client={props.client}
|
90
|
+
/>
|
91
|
+
);
|
92
|
+
})}
|
93
|
+
</>
|
94
|
+
);
|
95
|
+
}
|
96
|
+
|
88
97
|
function TokenInfo(props: {
|
89
98
|
token: ERC20OrNativeToken;
|
90
99
|
chain: Chain;
|
@@ -46,7 +46,7 @@ export function WalletTransactionHistory(props: {
|
|
46
46
|
fullHeight
|
47
47
|
style={{
|
48
48
|
minHeight: "250px",
|
49
|
-
maxHeight: "
|
49
|
+
maxHeight: "370px",
|
50
50
|
paddingBottom: spacing.lg,
|
51
51
|
}}
|
52
52
|
>
|
@@ -59,13 +59,19 @@ export function WalletTransactionHistory(props: {
|
|
59
59
|
color="secondaryText"
|
60
60
|
style={{
|
61
61
|
flex: "1",
|
62
|
+
minHeight: "250px",
|
62
63
|
}}
|
63
64
|
>
|
64
65
|
<CrossCircledIcon width={iconSize.xl} height={iconSize.xl} />
|
65
66
|
<Text>No Transactions</Text>
|
66
67
|
</Container>
|
67
68
|
) : (
|
68
|
-
<Container
|
69
|
+
<Container
|
70
|
+
animate="fadein"
|
71
|
+
flex="column"
|
72
|
+
gap="xs"
|
73
|
+
style={{ minHeight: "250px" }}
|
74
|
+
>
|
69
75
|
{transactions.map((tx) => {
|
70
76
|
return (
|
71
77
|
<TransactionButton
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type React from "react";
|
1
2
|
import { useCustomTheme } from "../../../core/design-system/CustomThemeProvider.js";
|
2
3
|
import { radius, spacing } from "../../../core/design-system/index.js";
|
3
4
|
import { Text } from "../components/text.js";
|
@@ -13,7 +14,7 @@ export default function Tabs({
|
|
13
14
|
}: {
|
14
15
|
selected: string;
|
15
16
|
onSelect: (selected: string) => void;
|
16
|
-
options: string[];
|
17
|
+
options: { label: React.ReactNode; value: string }[];
|
17
18
|
children: React.ReactNode;
|
18
19
|
}) {
|
19
20
|
const theme = useCustomTheme();
|
@@ -30,8 +31,8 @@ export default function Tabs({
|
|
30
31
|
<Button
|
31
32
|
variant="accent"
|
32
33
|
type="button"
|
33
|
-
key={option}
|
34
|
-
onClick={() => onSelect(option)}
|
34
|
+
key={option.value}
|
35
|
+
onClick={() => onSelect(option.value)}
|
35
36
|
style={{
|
36
37
|
flex: 1,
|
37
38
|
paddingBlock: spacing.sm,
|
@@ -41,15 +42,19 @@ export default function Tabs({
|
|
41
42
|
position: "relative",
|
42
43
|
borderRadius: radius.md,
|
43
44
|
backgroundColor:
|
44
|
-
option === selected
|
45
|
+
option.value === selected
|
46
|
+
? theme.colors.modalBg
|
47
|
+
: "transparent",
|
45
48
|
}}
|
46
49
|
>
|
47
50
|
<Text
|
48
|
-
color={
|
51
|
+
color={
|
52
|
+
option.value === selected ? "primaryText" : "secondaryText"
|
53
|
+
}
|
49
54
|
style={{ textAlign: "center" }}
|
50
55
|
size="sm"
|
51
56
|
>
|
52
|
-
{option}
|
57
|
+
{option.label}
|
53
58
|
</Text>
|
54
59
|
</Button>
|
55
60
|
))}
|
@@ -13,6 +13,7 @@ import {
|
|
13
13
|
discordIconUri,
|
14
14
|
emailIcon,
|
15
15
|
facebookIconUri,
|
16
|
+
farcasterIconUri,
|
16
17
|
genericWalletIcon,
|
17
18
|
googleIconUri,
|
18
19
|
passkeyIcon,
|
@@ -77,6 +78,9 @@ export function WalletImage(props: {
|
|
77
78
|
case "discord":
|
78
79
|
image = discordIconUri;
|
79
80
|
break;
|
81
|
+
case "farcaster":
|
82
|
+
image = farcasterIconUri;
|
83
|
+
break;
|
80
84
|
}
|
81
85
|
} else {
|
82
86
|
const mipdImage = getInstalledWalletProviders().find(
|
package/src/react/web/ui/prebuilt/thirdweb/BuyDirectListingButton/BuyDirectListingButton.test.tsx
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
2
|
+
import { render, screen } from "~test/react-render.js";
|
3
|
+
import { TEST_CLIENT } from "~test/test-clients.js";
|
4
|
+
import { sepolia } from "../../../../../../chains/chain-definitions/sepolia.js";
|
5
|
+
import { BuyDirectListingButton } from "./index.js";
|
6
|
+
|
7
|
+
const client = TEST_CLIENT;
|
8
|
+
|
9
|
+
// marketplace v3 on sepolia
|
10
|
+
const marketplaceAddress = "0xe0eFD6fb388405b67b3E9FaFc02649c70E749f03";
|
11
|
+
|
12
|
+
describe.runIf(process.env.TW_SECRET_KEY)("BuyDirectListingButton", () => {
|
13
|
+
it("should render", () => {
|
14
|
+
render(
|
15
|
+
<BuyDirectListingButton
|
16
|
+
client={client}
|
17
|
+
chain={sepolia}
|
18
|
+
contractAddress={marketplaceAddress}
|
19
|
+
listingId={1n}
|
20
|
+
>
|
21
|
+
Buy NFT
|
22
|
+
</BuyDirectListingButton>,
|
23
|
+
);
|
24
|
+
expect(screen.queryByText("Buy NFT")).toBeInTheDocument();
|
25
|
+
expect(screen.getByRole("button")).toBeInTheDocument();
|
26
|
+
});
|
27
|
+
});
|