thirdweb 5.35.1-nightly-0a5af48f70a76fc060909b853e20c927328c31c3-20240717194138 → 5.36.0
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/extensions/modular/ModularCore/write/installPublishedExtension.js +19 -0
- package/dist/cjs/extensions/modular/ModularCore/write/installPublishedExtension.js.map +1 -1
- package/dist/cjs/extensions/modular/ModularCore/write/uninstallExtensionByProxy.js +17 -0
- package/dist/cjs/extensions/modular/ModularCore/write/uninstallExtensionByProxy.js.map +1 -1
- package/dist/cjs/extensions/modular/ModularCore/write/uninstallPublishedExtension.js +18 -0
- package/dist/cjs/extensions/modular/ModularCore/write/uninstallPublishedExtension.js.map +1 -1
- package/dist/cjs/pay/getBuyHistory.js +1 -1
- package/dist/cjs/react/core/hooks/contract/useReadContract.js.map +1 -1
- package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js +9 -3
- package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/cjs/react/web/hooks/transaction/useSendTransaction.js +2 -2
- package/dist/cjs/react/web/hooks/transaction/useSendTransaction.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 +48 -0
- package/dist/cjs/react/web/ui/ConnectWallet/TransactionsScreen.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/locale/en.js +2 -0
- package/dist/cjs/react/web/ui/ConnectWallet/locale/en.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/locale/es.js +3 -1
- package/dist/cjs/react/web/ui/ConnectWallet/locale/es.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/locale/ja.js +3 -1
- package/dist/cjs/react/web/ui/ConnectWallet/locale/ja.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/locale/tl.js +3 -1
- package/dist/cjs/react/web/ui/ConnectWallet/locale/tl.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/locale/vi.js +3 -1
- package/dist/cjs/react/web/ui/ConnectWallet/locale/vi.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.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/pay-transactions/BuyTxHistory.js +83 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistoryButton.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/useBuyTransactionsToShow.js.map +1 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.js +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.js.map +1 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.js +78 -0
- package/dist/cjs/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.js.map +1 -0
- package/dist/cjs/react/web/ui/PayEmbed.js +2 -2
- package/dist/cjs/react/web/ui/PayEmbed.js.map +1 -1
- package/dist/cjs/react/web/ui/components/Tabs.js +25 -0
- package/dist/cjs/react/web/ui/components/Tabs.js.map +1 -0
- package/dist/cjs/storage/unpin.js +1 -1
- package/dist/cjs/transaction/actions/wait-for-tx-receipt.js +2 -2
- package/dist/cjs/transaction/actions/wait-for-tx-receipt.js.map +1 -1
- package/dist/cjs/transaction/read-contract.js +1 -0
- package/dist/cjs/transaction/read-contract.js.map +1 -1
- package/dist/cjs/transaction/transaction-store.js +10 -0
- package/dist/cjs/transaction/transaction-store.js.map +1 -1
- package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc1155.js +1 -2
- package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc1155.js.map +1 -1
- package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc20.js +1 -2
- package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc20.js.map +1 -1
- package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc721.js +1 -2
- package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc721.js.map +1 -1
- package/dist/cjs/utils/extensions/drops/get-claim-params.js +19 -0
- package/dist/cjs/utils/extensions/drops/get-claim-params.js.map +1 -1
- package/dist/cjs/utils/jwt/decode-jwt.js +1 -0
- package/dist/cjs/utils/jwt/decode-jwt.js.map +1 -1
- package/dist/cjs/utils/jwt/encode-jwt.js +1 -0
- package/dist/cjs/utils/jwt/encode-jwt.js.map +1 -1
- package/dist/cjs/utils/jwt/refresh-jwt.js +1 -0
- package/dist/cjs/utils/jwt/refresh-jwt.js.map +1 -1
- package/dist/cjs/utils/signatures/resolve-signature.js +0 -2
- package/dist/cjs/utils/signatures/resolve-signature.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/cjs/wallets/eip5792/wait-for-bundle.js +2 -2
- package/dist/cjs/wallets/eip5792/wait-for-bundle.js.map +1 -1
- package/dist/cjs/wallets/smart/index.js +0 -1
- package/dist/cjs/wallets/smart/index.js.map +1 -1
- package/dist/esm/extensions/modular/ModularCore/write/installPublishedExtension.js +19 -0
- package/dist/esm/extensions/modular/ModularCore/write/installPublishedExtension.js.map +1 -1
- package/dist/esm/extensions/modular/ModularCore/write/uninstallExtensionByProxy.js +17 -0
- package/dist/esm/extensions/modular/ModularCore/write/uninstallExtensionByProxy.js.map +1 -1
- package/dist/esm/extensions/modular/ModularCore/write/uninstallPublishedExtension.js +18 -0
- package/dist/esm/extensions/modular/ModularCore/write/uninstallPublishedExtension.js.map +1 -1
- package/dist/esm/pay/getBuyHistory.js +1 -1
- package/dist/esm/react/core/hooks/contract/useReadContract.js.map +1 -1
- package/dist/esm/react/core/hooks/transaction/useSendTransaction.js +9 -3
- package/dist/esm/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
- package/dist/esm/react/web/hooks/transaction/useSendTransaction.js +2 -2
- package/dist/esm/react/web/hooks/transaction/useSendTransaction.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 +45 -0
- package/dist/esm/react/web/ui/ConnectWallet/TransactionsScreen.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/locale/en.js +2 -0
- package/dist/esm/react/web/ui/ConnectWallet/locale/en.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/locale/es.js +3 -1
- package/dist/esm/react/web/ui/ConnectWallet/locale/es.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/locale/ja.js +3 -1
- package/dist/esm/react/web/ui/ConnectWallet/locale/ja.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/locale/tl.js +3 -1
- package/dist/esm/react/web/ui/ConnectWallet/locale/tl.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/locale/vi.js +3 -1
- package/dist/esm/react/web/ui/ConnectWallet/locale/vi.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.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/pay-transactions/BuyTxHistory.js +79 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistoryButton.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/useBuyTransactionsToShow.js.map +1 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.js +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.js.map +1 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.js +74 -0
- package/dist/esm/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.js.map +1 -0
- package/dist/esm/react/web/ui/PayEmbed.js +2 -2
- package/dist/esm/react/web/ui/PayEmbed.js.map +1 -1
- package/dist/esm/react/web/ui/components/Tabs.js +22 -0
- package/dist/esm/react/web/ui/components/Tabs.js.map +1 -0
- package/dist/esm/storage/unpin.js +1 -1
- package/dist/esm/transaction/actions/wait-for-tx-receipt.js +2 -2
- package/dist/esm/transaction/actions/wait-for-tx-receipt.js.map +1 -1
- package/dist/esm/transaction/read-contract.js +1 -0
- package/dist/esm/transaction/read-contract.js.map +1 -1
- package/dist/esm/transaction/transaction-store.js +10 -0
- package/dist/esm/transaction/transaction-store.js.map +1 -1
- package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc1155.js +1 -2
- package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc1155.js.map +1 -1
- package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc20.js +1 -2
- package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc20.js.map +1 -1
- package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc721.js +1 -2
- package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc721.js.map +1 -1
- package/dist/esm/utils/extensions/drops/get-claim-params.js +19 -0
- package/dist/esm/utils/extensions/drops/get-claim-params.js.map +1 -1
- package/dist/esm/utils/jwt/decode-jwt.js +1 -0
- package/dist/esm/utils/jwt/decode-jwt.js.map +1 -1
- package/dist/esm/utils/jwt/encode-jwt.js +1 -0
- package/dist/esm/utils/jwt/encode-jwt.js.map +1 -1
- package/dist/esm/utils/jwt/refresh-jwt.js +1 -0
- package/dist/esm/utils/jwt/refresh-jwt.js.map +1 -1
- package/dist/esm/utils/signatures/resolve-signature.js +0 -2
- package/dist/esm/utils/signatures/resolve-signature.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/esm/version.js.map +1 -1
- package/dist/esm/wallets/eip5792/wait-for-bundle.js +2 -2
- package/dist/esm/wallets/eip5792/wait-for-bundle.js.map +1 -1
- package/dist/esm/wallets/smart/index.js +0 -1
- package/dist/esm/wallets/smart/index.js.map +1 -1
- package/dist/types/extensions/modular/ModularCore/write/installPublishedExtension.d.ts +20 -1
- package/dist/types/extensions/modular/ModularCore/write/installPublishedExtension.d.ts.map +1 -1
- package/dist/types/extensions/modular/ModularCore/write/uninstallExtensionByProxy.d.ts +17 -0
- package/dist/types/extensions/modular/ModularCore/write/uninstallExtensionByProxy.d.ts.map +1 -1
- package/dist/types/extensions/modular/ModularCore/write/uninstallPublishedExtension.d.ts +19 -1
- package/dist/types/extensions/modular/ModularCore/write/uninstallPublishedExtension.d.ts.map +1 -1
- package/dist/types/pay/getBuyHistory.d.ts +1 -1
- package/dist/types/react/core/hooks/contract/useReadContract.d.ts +2 -3
- package/dist/types/react/core/hooks/contract/useReadContract.d.ts.map +1 -1
- package/dist/types/react/core/hooks/transaction/useSendTransaction.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 +14 -0
- package/dist/types/react/web/ui/ConnectWallet/TransactionsScreen.d.ts.map +1 -0
- 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/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 +2 -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.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.d.ts +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.d.ts.map +1 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/BuyTxHistory.d.ts +2 -4
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistoryButton.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/useBuyTransactionsToShow.d.ts.map +1 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.d.ts +15 -0
- package/dist/types/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.d.ts.map +1 -0
- 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/components/Tabs.d.ts +7 -0
- package/dist/types/react/web/ui/components/Tabs.d.ts.map +1 -0
- package/dist/types/storage/unpin.d.ts +1 -1
- package/dist/types/transaction/actions/wait-for-tx-receipt.d.ts +2 -2
- package/dist/types/transaction/actions/wait-for-tx-receipt.d.ts.map +1 -1
- package/dist/types/transaction/read-contract.d.ts +1 -0
- package/dist/types/transaction/read-contract.d.ts.map +1 -1
- package/dist/types/transaction/transaction-store.d.ts +10 -0
- package/dist/types/transaction/transaction-store.d.ts.map +1 -1
- package/dist/types/utils/extensions/airdrop/fetch-proofs-erc1155.d.ts +34 -0
- 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 +34 -0
- 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 +34 -0
- package/dist/types/utils/extensions/airdrop/fetch-proofs-erc721.d.ts.map +1 -1
- package/dist/types/utils/extensions/drops/get-claim-params.d.ts +19 -0
- package/dist/types/utils/extensions/drops/get-claim-params.d.ts.map +1 -1
- package/dist/types/utils/jwt/decode-jwt.d.ts +1 -0
- package/dist/types/utils/jwt/decode-jwt.d.ts.map +1 -1
- package/dist/types/utils/jwt/encode-jwt.d.ts +1 -0
- package/dist/types/utils/jwt/encode-jwt.d.ts.map +1 -1
- package/dist/types/utils/jwt/refresh-jwt.d.ts +1 -0
- package/dist/types/utils/jwt/refresh-jwt.d.ts.map +1 -1
- package/dist/types/utils/signatures/resolve-signature.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/eip5792/wait-for-bundle.d.ts +2 -2
- package/dist/types/wallets/eip5792/wait-for-bundle.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/extensions/modular/ModularCore/write/installPublishedExtension.ts +20 -1
- package/src/extensions/modular/ModularCore/write/uninstallExtensionByProxy.ts +17 -0
- package/src/extensions/modular/ModularCore/write/uninstallPublishedExtension.ts +19 -1
- package/src/pay/getBuyHistory.ts +1 -1
- package/src/react/core/hooks/contract/useReadContract.ts +3 -3
- package/src/react/core/hooks/transaction/useSendTransaction.ts +12 -3
- package/src/react/web/hooks/transaction/useSendTransaction.tsx +2 -2
- package/src/react/web/ui/ConnectWallet/Details.tsx +8 -18
- package/src/react/web/ui/ConnectWallet/TransactionsScreen.tsx +122 -0
- package/src/react/web/ui/ConnectWallet/locale/en.ts +2 -0
- package/src/react/web/ui/ConnectWallet/locale/es.ts +3 -1
- package/src/react/web/ui/ConnectWallet/locale/ja.ts +3 -1
- package/src/react/web/ui/ConnectWallet/locale/tl.ts +3 -1
- package/src/react/web/ui/ConnectWallet/locale/types.ts +2 -0
- package/src/react/web/ui/ConnectWallet/locale/vi.ts +3 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.tsx +2 -2
- package/src/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/BuyTxHistory.tsx +118 -121
- package/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.tsx +1 -1
- package/src/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.tsx +214 -0
- package/src/react/web/ui/ConnectWallet/screens/types.ts +1 -1
- package/src/react/web/ui/PayEmbed.tsx +2 -2
- package/src/react/web/ui/components/Tabs.tsx +56 -0
- package/src/storage/unpin.ts +1 -1
- package/src/transaction/actions/wait-for-tx-receipt.test.ts +5 -7
- package/src/transaction/actions/wait-for-tx-receipt.ts +2 -2
- package/src/transaction/read-contract.test.ts +1 -0
- package/src/transaction/read-contract.ts +2 -0
- package/src/transaction/transaction-store.ts +10 -0
- package/src/utils/extensions/airdrop/fetch-proofs-erc1155.ts +1 -2
- package/src/utils/extensions/airdrop/fetch-proofs-erc20.ts +1 -2
- package/src/utils/extensions/airdrop/fetch-proofs-erc721.ts +1 -2
- package/src/utils/extensions/drops/get-claim-params.ts +19 -0
- package/src/utils/jwt/decode-jwt.ts +1 -0
- package/src/utils/jwt/encode-jwt.ts +1 -0
- package/src/utils/jwt/refresh-jwt.ts +1 -0
- package/src/utils/signatures/resolve-signature.ts +0 -2
- package/src/version.ts +1 -1
- package/src/wallets/eip5792/wait-for-bundle.test.ts +5 -7
- package/src/wallets/eip5792/wait-for-bundle.ts +2 -2
- package/src/wallets/smart/index.ts +0 -3
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.js +0 -85
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistoryButton.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/FiatDetailsScreen.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/SwapDetailsScreen.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/TokenInfoRow.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/TxDetailsScreen.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/statusMeta.js.map +0 -1
- package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/useBuyTransactionsToShow.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.js +0 -81
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistoryButton.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/FiatDetailsScreen.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/SwapDetailsScreen.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/TokenInfoRow.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/TxDetailsScreen.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/statusMeta.js.map +0 -1
- package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/useBuyTransactionsToShow.js.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistoryButton.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/tx-history/FiatDetailsScreen.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/tx-history/SwapDetailsScreen.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/tx-history/TokenInfoRow.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/tx-history/TxDetailsScreen.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/tx-history/statusMeta.d.ts.map +0 -1
- package/dist/types/react/web/ui/ConnectWallet/screens/Buy/tx-history/useBuyTransactionsToShow.d.ts.map +0 -1
- package/src/extensions/erc1155/drops/write/updateMetadata.test.ts +0 -127
- package/src/extensions/erc721/drops/write/updateMetadata.test.ts +0 -127
- /package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/BuyTxHistoryButton.js +0 -0
- /package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/FiatDetailsScreen.js +0 -0
- /package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/SwapDetailsScreen.js +0 -0
- /package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/TokenInfoRow.js +0 -0
- /package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/TxDetailsScreen.js +0 -0
- /package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/statusMeta.js +0 -0
- /package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/useBuyTransactionsToShow.js +0 -0
- /package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/BuyTxHistoryButton.js +0 -0
- /package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/FiatDetailsScreen.js +0 -0
- /package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/SwapDetailsScreen.js +0 -0
- /package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/TokenInfoRow.js +0 -0
- /package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/TxDetailsScreen.js +0 -0
- /package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/statusMeta.js +0 -0
- /package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/useBuyTransactionsToShow.js +0 -0
- /package/dist/types/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/BuyTxHistoryButton.d.ts +0 -0
- /package/dist/types/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/FiatDetailsScreen.d.ts +0 -0
- /package/dist/types/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/SwapDetailsScreen.d.ts +0 -0
- /package/dist/types/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/TokenInfoRow.d.ts +0 -0
- /package/dist/types/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/TxDetailsScreen.d.ts +0 -0
- /package/dist/types/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/statusMeta.d.ts +0 -0
- /package/dist/types/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/useBuyTransactionsToShow.d.ts +0 -0
- /package/src/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/BuyTxHistoryButton.tsx +0 -0
- /package/src/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/FiatDetailsScreen.tsx +0 -0
- /package/src/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/SwapDetailsScreen.tsx +0 -0
- /package/src/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/TokenInfoRow.tsx +0 -0
- /package/src/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/TxDetailsScreen.tsx +0 -0
- /package/src/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/statusMeta.ts +0 -0
- /package/src/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/useBuyTransactionsToShow.ts +0 -0
@@ -21,7 +21,9 @@ const connectLocaleVi: ConnectLocale = {
|
|
21
21
|
currentNetwork: "Mạng lưới hiện tại",
|
22
22
|
switchAccount: "Chuyển tài khoản",
|
23
23
|
requestTestnetFunds: "Nhận Testnet Funds",
|
24
|
-
transactions: "
|
24
|
+
transactions: "Transactions",
|
25
|
+
payTransactions: "Fiat Transactions",
|
26
|
+
walletTransactions: "Wallet Transactions",
|
25
27
|
viewAllTransactions: "Tất cả giao dịch",
|
26
28
|
backupWallet: "Sao lưu ví",
|
27
29
|
guestWalletWarning:
|
@@ -18,7 +18,7 @@ import { Container, ModalHeader } from "../../../../components/basic.js";
|
|
18
18
|
import { Button } from "../../../../components/buttons.js";
|
19
19
|
import { Text } from "../../../../components/text.js";
|
20
20
|
import { AccentFailIcon } from "../../../icons/AccentFailIcon.js";
|
21
|
-
import { getBuyWithFiatStatusMeta } from "../
|
21
|
+
import { getBuyWithFiatStatusMeta } from "../pay-transactions/statusMeta.js";
|
22
22
|
import { OnRampTxDetailsTable } from "./FiatTxDetailsTable.js";
|
23
23
|
|
24
24
|
type UIStatus = "loading" | "failed" | "completed" | "partialSuccess";
|
@@ -34,7 +34,7 @@ import { StepIcon } from "../Stepper.js";
|
|
34
34
|
import {
|
35
35
|
type FiatStatusMeta,
|
36
36
|
getBuyWithFiatStatusMeta,
|
37
|
-
} from "../
|
37
|
+
} from "../pay-transactions/statusMeta.js";
|
38
38
|
import { getCurrencyMeta } from "./currencies.js";
|
39
39
|
|
40
40
|
export type BuyWithFiatPartialQuote = {
|
@@ -11,8 +11,8 @@ import { Spacer } from "../../../../components/Spacer.js";
|
|
11
11
|
import { Container, Line } from "../../../../components/basic.js";
|
12
12
|
import { ButtonLink } from "../../../../components/buttons.js";
|
13
13
|
import { Text } from "../../../../components/text.js";
|
14
|
-
import { TokenInfoRow } from "../
|
15
|
-
import type { FiatStatusMeta } from "../
|
14
|
+
import { TokenInfoRow } from "../pay-transactions/TokenInfoRow.js";
|
15
|
+
import type { FiatStatusMeta } from "../pay-transactions/statusMeta.js";
|
16
16
|
import { getCurrencyMeta } from "./currencies.js";
|
17
17
|
|
18
18
|
/**
|
package/src/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/BuyTxHistory.tsx
RENAMED
@@ -35,7 +35,7 @@ import {
|
|
35
35
|
/**
|
36
36
|
* @internal
|
37
37
|
*/
|
38
|
-
export function
|
38
|
+
export function PayTxHistoryScreen(props: {
|
39
39
|
onBack?: () => void;
|
40
40
|
client: ThirdwebClient;
|
41
41
|
onDone: () => void;
|
@@ -46,6 +46,7 @@ export function BuyTxHistory(props: {
|
|
46
46
|
const activeChain = useActiveWalletChain();
|
47
47
|
const activeWallet = useActiveWallet();
|
48
48
|
const activeAccount = useActiveAccount();
|
49
|
+
const chainExplorers = useChainExplorers(activeChain);
|
49
50
|
|
50
51
|
const payer: PayerInfo | undefined =
|
51
52
|
activeChain && activeAccount && activeWallet
|
@@ -70,16 +71,39 @@ export function BuyTxHistory(props: {
|
|
70
71
|
);
|
71
72
|
}
|
72
73
|
|
73
|
-
return
|
74
|
+
return (
|
75
|
+
<Container animate="fadein">
|
76
|
+
<Container p="lg">
|
77
|
+
<ModalHeader title="Transactions" onBack={props.onBack} />
|
78
|
+
</Container>
|
79
|
+
<PayTxHistoryList {...props} onSelectTx={setSelectedTx} />
|
80
|
+
<Line />
|
81
|
+
<Container p="lg">
|
82
|
+
<ButtonLink
|
83
|
+
fullWidth
|
84
|
+
variant="outline"
|
85
|
+
href={`${chainExplorers.explorers[0]?.url}/address/${activeAccount?.address}`}
|
86
|
+
target="_blank"
|
87
|
+
as="a"
|
88
|
+
gap="xs"
|
89
|
+
style={{
|
90
|
+
textDecoration: "none",
|
91
|
+
color: "inherit",
|
92
|
+
}}
|
93
|
+
>
|
94
|
+
View on Explorer{" "}
|
95
|
+
<ExternalLinkIcon width={iconSize.sm} height={iconSize.sm} />
|
96
|
+
</ButtonLink>
|
97
|
+
</Container>
|
98
|
+
</Container>
|
99
|
+
);
|
74
100
|
}
|
75
101
|
|
76
102
|
/**
|
77
103
|
* @internal
|
78
104
|
*/
|
79
|
-
export function
|
80
|
-
onBack?: () => void;
|
105
|
+
export function PayTxHistoryList(props: {
|
81
106
|
client: ThirdwebClient;
|
82
|
-
onDone: () => void;
|
83
107
|
onSelectTx: (tx: TxStatusInfo) => void;
|
84
108
|
}) {
|
85
109
|
const {
|
@@ -91,55 +115,47 @@ export function BuyTxHistoryList(props: {
|
|
91
115
|
pagination,
|
92
116
|
} = useBuyTransactionsToShow(props.client);
|
93
117
|
|
94
|
-
const activeChain = useActiveWalletChain();
|
95
|
-
const chainExplorers = useChainExplorers(activeChain);
|
96
|
-
const activeAccount = useActiveAccount();
|
97
|
-
|
98
118
|
const noTransactions = txInfosToShow.length === 0;
|
99
119
|
|
100
120
|
return (
|
101
|
-
<Container
|
102
|
-
|
103
|
-
|
104
|
-
|
121
|
+
<Container
|
122
|
+
scrollY
|
123
|
+
flex="column"
|
124
|
+
fullHeight
|
125
|
+
style={{
|
126
|
+
minHeight: "250px",
|
127
|
+
maxHeight: "370px",
|
128
|
+
}}
|
129
|
+
>
|
130
|
+
<Container flex="column" gap="xs" px="lg" expand>
|
131
|
+
{noTransactions && !isLoading && (
|
132
|
+
<Container
|
133
|
+
flex="column"
|
134
|
+
gap="md"
|
135
|
+
center="both"
|
136
|
+
color="secondaryText"
|
137
|
+
style={{
|
138
|
+
minHeight: "250px",
|
139
|
+
}}
|
140
|
+
>
|
141
|
+
<CrossCircledIcon width={iconSize.xl} height={iconSize.xl} />
|
142
|
+
<Text>No Transactions</Text>
|
143
|
+
</Container>
|
144
|
+
)}
|
105
145
|
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
<Container
|
118
|
-
flex="column"
|
119
|
-
gap="md"
|
120
|
-
center="both"
|
121
|
-
color="secondaryText"
|
122
|
-
style={{
|
123
|
-
minHeight: "250px",
|
124
|
-
}}
|
125
|
-
>
|
126
|
-
<CrossCircledIcon width={iconSize.xl} height={iconSize.xl} />
|
127
|
-
<Text>No Transactions </Text>
|
128
|
-
</Container>
|
129
|
-
)}
|
130
|
-
|
131
|
-
{noTransactions && isLoading && (
|
132
|
-
<Container
|
133
|
-
flex="row"
|
134
|
-
center="both"
|
135
|
-
style={{
|
136
|
-
minHeight: "250px",
|
137
|
-
}}
|
138
|
-
>
|
139
|
-
<Spinner size="xl" color="accentText" />
|
140
|
-
</Container>
|
141
|
-
)}
|
146
|
+
{noTransactions && isLoading && (
|
147
|
+
<Container
|
148
|
+
flex="row"
|
149
|
+
center="both"
|
150
|
+
style={{
|
151
|
+
minHeight: "250px",
|
152
|
+
}}
|
153
|
+
>
|
154
|
+
<Spinner size="xl" color="accentText" />
|
155
|
+
</Container>
|
156
|
+
)}
|
142
157
|
|
158
|
+
<Container animate="fadein" flex="column" gap="xs">
|
143
159
|
{txInfosToShow.map((txInfo) => {
|
144
160
|
return (
|
145
161
|
<BuyTxHistoryButton
|
@@ -156,85 +172,66 @@ export function BuyTxHistoryList(props: {
|
|
156
172
|
/>
|
157
173
|
);
|
158
174
|
})}
|
159
|
-
|
160
|
-
{isLoading && txInfosToShow.length > 0 && (
|
161
|
-
<>
|
162
|
-
<Skeleton width="100%" height={BuyTxHistoryButtonHeight} />
|
163
|
-
<Skeleton width="100%" height={BuyTxHistoryButtonHeight} />
|
164
|
-
<Skeleton width="100%" height={BuyTxHistoryButtonHeight} />
|
165
|
-
</>
|
166
|
-
)}
|
167
175
|
</Container>
|
168
176
|
|
169
|
-
|
170
|
-
|
171
|
-
<
|
177
|
+
{isLoading && txInfosToShow.length > 0 && (
|
178
|
+
<>
|
179
|
+
<Skeleton width="100%" height={BuyTxHistoryButtonHeight} />
|
180
|
+
<Skeleton width="100%" height={BuyTxHistoryButtonHeight} />
|
181
|
+
<Skeleton width="100%" height={BuyTxHistoryButtonHeight} />
|
182
|
+
</>
|
183
|
+
)}
|
184
|
+
</Container>
|
185
|
+
|
186
|
+
<Container p="lg">
|
187
|
+
{pagination && !hidePagination && (
|
188
|
+
<div
|
189
|
+
style={{
|
190
|
+
display: "grid",
|
191
|
+
gridTemplateColumns: "1fr 1fr",
|
192
|
+
gap: spacing.sm,
|
193
|
+
}}
|
194
|
+
>
|
195
|
+
<Button
|
196
|
+
variant="outline"
|
197
|
+
gap="xs"
|
198
|
+
disabled={pageIndex === 0}
|
199
|
+
data-disabled={pageIndex === 0}
|
172
200
|
style={{
|
173
|
-
|
174
|
-
|
175
|
-
|
201
|
+
fontSize: fontSize.sm,
|
202
|
+
paddingBlock: spacing.sm,
|
203
|
+
}}
|
204
|
+
onClick={() => {
|
205
|
+
setPageIndex((prev) => prev - 1);
|
176
206
|
}}
|
177
207
|
>
|
178
|
-
<
|
179
|
-
|
180
|
-
|
181
|
-
disabled={pageIndex === 0}
|
182
|
-
data-disabled={pageIndex === 0}
|
183
|
-
style={{
|
184
|
-
fontSize: fontSize.sm,
|
185
|
-
paddingBlock: spacing.sm,
|
186
|
-
}}
|
187
|
-
onClick={() => {
|
188
|
-
setPageIndex((prev) => prev - 1);
|
189
|
-
}}
|
190
|
-
>
|
191
|
-
<ArrowRightIcon
|
192
|
-
width={iconSize.sm}
|
193
|
-
height={iconSize.sm}
|
194
|
-
style={{
|
195
|
-
transform: "rotate(180deg)",
|
196
|
-
}}
|
197
|
-
/>
|
198
|
-
Prev
|
199
|
-
</Button>
|
200
|
-
<Button
|
201
|
-
variant="outline"
|
202
|
-
gap="xs"
|
203
|
-
disabled={!pagination.hasNextPage}
|
204
|
-
data-disabled={!pagination.hasNextPage}
|
208
|
+
<ArrowRightIcon
|
209
|
+
width={iconSize.sm}
|
210
|
+
height={iconSize.sm}
|
205
211
|
style={{
|
206
|
-
|
207
|
-
paddingBlock: spacing.sm,
|
212
|
+
transform: "rotate(180deg)",
|
208
213
|
}}
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
style={{
|
231
|
-
textDecoration: "none",
|
232
|
-
color: "inherit",
|
233
|
-
}}
|
234
|
-
>
|
235
|
-
View on Explorer{" "}
|
236
|
-
<ExternalLinkIcon width={iconSize.sm} height={iconSize.sm} />
|
237
|
-
</ButtonLink>
|
214
|
+
/>
|
215
|
+
Prev
|
216
|
+
</Button>
|
217
|
+
<Button
|
218
|
+
variant="outline"
|
219
|
+
gap="xs"
|
220
|
+
disabled={!pagination.hasNextPage}
|
221
|
+
data-disabled={!pagination.hasNextPage}
|
222
|
+
style={{
|
223
|
+
fontSize: fontSize.sm,
|
224
|
+
paddingBlock: spacing.sm,
|
225
|
+
}}
|
226
|
+
onClick={() => {
|
227
|
+
setPageIndex((prev) => prev + 1);
|
228
|
+
}}
|
229
|
+
>
|
230
|
+
Next
|
231
|
+
<ArrowRightIcon width={iconSize.sm} height={iconSize.sm} />
|
232
|
+
</Button>
|
233
|
+
</div>
|
234
|
+
)}
|
238
235
|
</Container>
|
239
236
|
</Container>
|
240
237
|
);
|
@@ -12,7 +12,7 @@ import { Container, ModalHeader } from "../../../../components/basic.js";
|
|
12
12
|
import { Button } from "../../../../components/buttons.js";
|
13
13
|
import { Text } from "../../../../components/text.js";
|
14
14
|
import { AccentFailIcon } from "../../../icons/AccentFailIcon.js";
|
15
|
-
import { SwapTxDetailsTable } from "../
|
15
|
+
import { SwapTxDetailsTable } from "../pay-transactions/SwapDetailsScreen.js";
|
16
16
|
|
17
17
|
type UIStatus = "pending" | "success" | "failed" | "partialSuccess";
|
18
18
|
|
@@ -0,0 +1,214 @@
|
|
1
|
+
"use client";
|
2
|
+
import styled from "@emotion/styled";
|
3
|
+
import { CheckIcon, CrossCircledIcon } from "@radix-ui/react-icons";
|
4
|
+
import { useSyncExternalStore } from "react";
|
5
|
+
import { getCachedChain } from "../../../../../chains/utils.js";
|
6
|
+
import type { ThirdwebClient } from "../../../../../client/client.js";
|
7
|
+
import { getTransactionStore } from "../../../../../transaction/transaction-store.js";
|
8
|
+
import { shortenHex } from "../../../../../utils/address.js";
|
9
|
+
import type { Hex } from "../../../../../utils/encoding/hex.js";
|
10
|
+
import { useCustomTheme } from "../../../../core/design-system/CustomThemeProvider.js";
|
11
|
+
import { iconSize, spacing } from "../../../../core/design-system/index.js";
|
12
|
+
import { useWaitForReceipt } from "../../../../core/hooks/contract/useWaitForReceipt.js";
|
13
|
+
import {
|
14
|
+
useChainExplorers,
|
15
|
+
useChainIconUrl,
|
16
|
+
} from "../../../../core/hooks/others/useChainQuery.js";
|
17
|
+
import { useActiveWalletChain } from "../../../hooks/wallets/useActiveWalletChain.js";
|
18
|
+
import { ChainIcon } from "../../components/ChainIcon.js";
|
19
|
+
import { ChainName } from "../../components/ChainName.js";
|
20
|
+
import { Spacer } from "../../components/Spacer.js";
|
21
|
+
import { Spinner } from "../../components/Spinner.js";
|
22
|
+
import { Container } from "../../components/basic.js";
|
23
|
+
import { Button } from "../../components/buttons.js";
|
24
|
+
import { Text } from "../../components/text.js";
|
25
|
+
import type { ConnectLocale } from "../locale/types.js";
|
26
|
+
|
27
|
+
export function WalletTransactionHistory(props: {
|
28
|
+
onBack?: () => void;
|
29
|
+
locale: ConnectLocale;
|
30
|
+
client: ThirdwebClient;
|
31
|
+
address: string;
|
32
|
+
}) {
|
33
|
+
const activeChain = useActiveWalletChain();
|
34
|
+
const chainExplorers = useChainExplorers(activeChain);
|
35
|
+
const transactionStore = getTransactionStore(props.address);
|
36
|
+
const reverseChronologicalTransactions = useSyncExternalStore(
|
37
|
+
transactionStore.subscribe,
|
38
|
+
transactionStore.getValue,
|
39
|
+
);
|
40
|
+
const transactions = [...reverseChronologicalTransactions].reverse();
|
41
|
+
|
42
|
+
return (
|
43
|
+
<Container
|
44
|
+
scrollY
|
45
|
+
flex="column"
|
46
|
+
fullHeight
|
47
|
+
style={{
|
48
|
+
minHeight: "250px",
|
49
|
+
maxHeight: "370px",
|
50
|
+
}}
|
51
|
+
>
|
52
|
+
<Container
|
53
|
+
flex="column"
|
54
|
+
gap="xs"
|
55
|
+
style={{ paddingBottom: "24px" }}
|
56
|
+
expand
|
57
|
+
>
|
58
|
+
{transactions.length === 0 && (
|
59
|
+
<Container
|
60
|
+
flex="column"
|
61
|
+
gap="md"
|
62
|
+
center="both"
|
63
|
+
color="secondaryText"
|
64
|
+
style={{
|
65
|
+
minHeight: "250px",
|
66
|
+
}}
|
67
|
+
>
|
68
|
+
<CrossCircledIcon width={iconSize.xl} height={iconSize.xl} />
|
69
|
+
<Text>No Transactions</Text>
|
70
|
+
</Container>
|
71
|
+
)}
|
72
|
+
|
73
|
+
<Container animate="fadein" flex="column" gap="xs">
|
74
|
+
{transactions.map((tx) => {
|
75
|
+
return (
|
76
|
+
<TransactionButton
|
77
|
+
key={tx.transactionHash}
|
78
|
+
explorerUrl={chainExplorers.explorers[0]?.url}
|
79
|
+
client={props.client}
|
80
|
+
hash={tx.transactionHash}
|
81
|
+
chainId={tx.chainId}
|
82
|
+
/>
|
83
|
+
);
|
84
|
+
})}
|
85
|
+
</Container>
|
86
|
+
</Container>
|
87
|
+
</Container>
|
88
|
+
);
|
89
|
+
}
|
90
|
+
|
91
|
+
export function TransactionButton(props: {
|
92
|
+
hash: string;
|
93
|
+
client: ThirdwebClient;
|
94
|
+
chainId: number;
|
95
|
+
explorerUrl?: string;
|
96
|
+
}) {
|
97
|
+
const {
|
98
|
+
data: receipt,
|
99
|
+
isLoading,
|
100
|
+
error,
|
101
|
+
} = useWaitForReceipt({
|
102
|
+
transactionHash: props.hash as Hex,
|
103
|
+
chain: getCachedChain(props.chainId),
|
104
|
+
client: props.client,
|
105
|
+
});
|
106
|
+
const chainIconQuery = useChainIconUrl(getCachedChain(props.chainId));
|
107
|
+
|
108
|
+
const content = (
|
109
|
+
<TxButton
|
110
|
+
variant="secondary"
|
111
|
+
fullWidth
|
112
|
+
style={{
|
113
|
+
paddingBlock: spacing.sm,
|
114
|
+
}}
|
115
|
+
>
|
116
|
+
<Container
|
117
|
+
flex="row"
|
118
|
+
center="y"
|
119
|
+
gap="md"
|
120
|
+
style={{
|
121
|
+
flex: 1,
|
122
|
+
}}
|
123
|
+
>
|
124
|
+
<ChainIcon
|
125
|
+
chainIconUrl={chainIconQuery.url}
|
126
|
+
size={iconSize.lg}
|
127
|
+
client={props.client}
|
128
|
+
/>
|
129
|
+
<div
|
130
|
+
style={{
|
131
|
+
flex: 1,
|
132
|
+
display: "flex",
|
133
|
+
flexDirection: "column",
|
134
|
+
justifyContent: "center",
|
135
|
+
}}
|
136
|
+
>
|
137
|
+
{/* Row 1 */}
|
138
|
+
<Container
|
139
|
+
flex="row"
|
140
|
+
gap="xs"
|
141
|
+
center="y"
|
142
|
+
style={{
|
143
|
+
justifyContent: "space-between",
|
144
|
+
}}
|
145
|
+
>
|
146
|
+
<Text size="sm" color="primaryText">
|
147
|
+
{receipt?.to
|
148
|
+
? `Interacted with ${shortenHex(receipt.to, 4)}`
|
149
|
+
: `Hash: ${shortenHex(props.hash, 4)}`}
|
150
|
+
</Text>
|
151
|
+
</Container>
|
152
|
+
|
153
|
+
<Spacer y="xxs" />
|
154
|
+
|
155
|
+
{/* Row 2 */}
|
156
|
+
<Container
|
157
|
+
flex="row"
|
158
|
+
center="y"
|
159
|
+
gap="xxs"
|
160
|
+
style={{
|
161
|
+
justifyContent: "space-between",
|
162
|
+
}}
|
163
|
+
>
|
164
|
+
<ChainName
|
165
|
+
chain={getCachedChain(props.chainId)}
|
166
|
+
size="xs"
|
167
|
+
client={props.client}
|
168
|
+
/>
|
169
|
+
</Container>
|
170
|
+
</div>
|
171
|
+
</Container>
|
172
|
+
|
173
|
+
{/* Status */}
|
174
|
+
<Container flex="row" gap="xxs" center="y">
|
175
|
+
{isLoading && <Spinner size="sm" color="primaryText" />}
|
176
|
+
{!isLoading && receipt && receipt.status === "success" && (
|
177
|
+
<Text size="md" color={"success"}>
|
178
|
+
<CheckIcon width={iconSize.md} height={iconSize.md} />
|
179
|
+
</Text>
|
180
|
+
)}
|
181
|
+
{(error || (!isLoading && receipt && receipt.status !== "success")) && (
|
182
|
+
<Text size="md" color={"danger"}>
|
183
|
+
<CrossCircledIcon width={iconSize.md} height={iconSize.md} />
|
184
|
+
</Text>
|
185
|
+
)}
|
186
|
+
</Container>
|
187
|
+
</TxButton>
|
188
|
+
);
|
189
|
+
|
190
|
+
if (props.explorerUrl) {
|
191
|
+
return (
|
192
|
+
<a
|
193
|
+
href={`${props.explorerUrl}/tx/${props.hash}`}
|
194
|
+
target="_blank"
|
195
|
+
rel="noreferrer"
|
196
|
+
>
|
197
|
+
{content}
|
198
|
+
</a>
|
199
|
+
);
|
200
|
+
}
|
201
|
+
|
202
|
+
return content;
|
203
|
+
}
|
204
|
+
|
205
|
+
const TxButton = /* @__PURE__ */ styled(Button)(() => {
|
206
|
+
const theme = useCustomTheme();
|
207
|
+
return {
|
208
|
+
background: theme.colors.tertiaryBg,
|
209
|
+
"&:hover": {
|
210
|
+
background: theme.colors.secondaryButtonBg,
|
211
|
+
},
|
212
|
+
height: "62px",
|
213
|
+
};
|
214
|
+
});
|
@@ -18,7 +18,7 @@ import type { SupportedTokens } from "../../core/utils/defaultTokens.js";
|
|
18
18
|
import { EmbedContainer } from "./ConnectWallet/Modal/ConnectEmbed.js";
|
19
19
|
import { useConnectLocale } from "./ConnectWallet/locale/getConnectLocale.js";
|
20
20
|
import BuyScreen from "./ConnectWallet/screens/Buy/BuyScreen.js";
|
21
|
-
import {
|
21
|
+
import { PayTxHistoryScreen } from "./ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.js";
|
22
22
|
import { DynamicHeight } from "./components/DynamicHeight.js";
|
23
23
|
import { Spinner } from "./components/Spinner.js";
|
24
24
|
import type { LocaleId } from "./types.js";
|
@@ -212,7 +212,7 @@ export function PayEmbed(props: PayEmbedProps) {
|
|
212
212
|
</div>
|
213
213
|
{/* this does not need to persist so we can just show-hide it with JS */}
|
214
214
|
{screen === "tx-history" && (
|
215
|
-
<
|
215
|
+
<PayTxHistoryScreen
|
216
216
|
client={props.client}
|
217
217
|
onBack={() => {
|
218
218
|
setScreen("buy");
|
@@ -0,0 +1,56 @@
|
|
1
|
+
import { useCustomTheme } from "../../../core/design-system/CustomThemeProvider.js";
|
2
|
+
import { Text } from "../components/text.js";
|
3
|
+
import { Container, Line } from "./basic.js";
|
4
|
+
|
5
|
+
export default function Tabs({
|
6
|
+
selected,
|
7
|
+
onSelect,
|
8
|
+
options,
|
9
|
+
children,
|
10
|
+
}: {
|
11
|
+
selected: string;
|
12
|
+
onSelect: (selected: string) => void;
|
13
|
+
options: string[];
|
14
|
+
children: React.ReactNode;
|
15
|
+
}) {
|
16
|
+
const theme = useCustomTheme();
|
17
|
+
return (
|
18
|
+
<Container>
|
19
|
+
<Container flex="row" center="y" style={{ width: "100%" }}>
|
20
|
+
{options.map((option) => (
|
21
|
+
<button
|
22
|
+
type="button"
|
23
|
+
key={option}
|
24
|
+
onClick={() => onSelect(option)}
|
25
|
+
style={{
|
26
|
+
flex: 1,
|
27
|
+
height: "50px",
|
28
|
+
display: "flex",
|
29
|
+
alignItems: "center",
|
30
|
+
justifyContent: "center",
|
31
|
+
position: "relative",
|
32
|
+
}}
|
33
|
+
>
|
34
|
+
<Text
|
35
|
+
color={option === selected ? "primaryText" : "secondaryText"}
|
36
|
+
style={{ textAlign: "center" }}
|
37
|
+
>
|
38
|
+
{option}
|
39
|
+
</Text>
|
40
|
+
<Line
|
41
|
+
style={{
|
42
|
+
position: "absolute",
|
43
|
+
bottom: 0,
|
44
|
+
left: 0,
|
45
|
+
width: "100%",
|
46
|
+
backgroundColor:
|
47
|
+
option === selected ? "white" : theme.colors.separatorLine,
|
48
|
+
}}
|
49
|
+
/>
|
50
|
+
</button>
|
51
|
+
))}
|
52
|
+
</Container>
|
53
|
+
<Container py="sm">{children}</Container>
|
54
|
+
</Container>
|
55
|
+
);
|
56
|
+
}
|