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.
Files changed (318) hide show
  1. package/dist/cjs/extensions/modular/ModularCore/write/installPublishedExtension.js +19 -0
  2. package/dist/cjs/extensions/modular/ModularCore/write/installPublishedExtension.js.map +1 -1
  3. package/dist/cjs/extensions/modular/ModularCore/write/uninstallExtensionByProxy.js +17 -0
  4. package/dist/cjs/extensions/modular/ModularCore/write/uninstallExtensionByProxy.js.map +1 -1
  5. package/dist/cjs/extensions/modular/ModularCore/write/uninstallPublishedExtension.js +18 -0
  6. package/dist/cjs/extensions/modular/ModularCore/write/uninstallPublishedExtension.js.map +1 -1
  7. package/dist/cjs/pay/getBuyHistory.js +1 -1
  8. package/dist/cjs/react/core/hooks/contract/useReadContract.js.map +1 -1
  9. package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js +9 -3
  10. package/dist/cjs/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
  11. package/dist/cjs/react/web/hooks/transaction/useSendTransaction.js +2 -2
  12. package/dist/cjs/react/web/hooks/transaction/useSendTransaction.js.map +1 -1
  13. package/dist/cjs/react/web/ui/ConnectWallet/Details.js +5 -5
  14. package/dist/cjs/react/web/ui/ConnectWallet/Details.js.map +1 -1
  15. package/dist/cjs/react/web/ui/ConnectWallet/TransactionsScreen.js +48 -0
  16. package/dist/cjs/react/web/ui/ConnectWallet/TransactionsScreen.js.map +1 -0
  17. package/dist/cjs/react/web/ui/ConnectWallet/locale/en.js +2 -0
  18. package/dist/cjs/react/web/ui/ConnectWallet/locale/en.js.map +1 -1
  19. package/dist/cjs/react/web/ui/ConnectWallet/locale/es.js +3 -1
  20. package/dist/cjs/react/web/ui/ConnectWallet/locale/es.js.map +1 -1
  21. package/dist/cjs/react/web/ui/ConnectWallet/locale/ja.js +3 -1
  22. package/dist/cjs/react/web/ui/ConnectWallet/locale/ja.js.map +1 -1
  23. package/dist/cjs/react/web/ui/ConnectWallet/locale/tl.js +3 -1
  24. package/dist/cjs/react/web/ui/ConnectWallet/locale/tl.js.map +1 -1
  25. package/dist/cjs/react/web/ui/ConnectWallet/locale/vi.js +3 -1
  26. package/dist/cjs/react/web/ui/ConnectWallet/locale/vi.js.map +1 -1
  27. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.js +1 -1
  28. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.js.map +1 -1
  29. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js +1 -1
  30. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js.map +1 -1
  31. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js +1 -1
  32. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js.map +1 -1
  33. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.js +83 -0
  34. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.js.map +1 -0
  35. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistoryButton.js.map +1 -0
  36. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.js.map +1 -0
  37. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.js.map +1 -0
  38. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.js.map +1 -0
  39. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.js.map +1 -0
  40. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.js.map +1 -0
  41. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/useBuyTransactionsToShow.js.map +1 -0
  42. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.js +1 -1
  43. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.js.map +1 -1
  44. package/dist/cjs/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.js +78 -0
  45. package/dist/cjs/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.js.map +1 -0
  46. package/dist/cjs/react/web/ui/PayEmbed.js +2 -2
  47. package/dist/cjs/react/web/ui/PayEmbed.js.map +1 -1
  48. package/dist/cjs/react/web/ui/components/Tabs.js +25 -0
  49. package/dist/cjs/react/web/ui/components/Tabs.js.map +1 -0
  50. package/dist/cjs/storage/unpin.js +1 -1
  51. package/dist/cjs/transaction/actions/wait-for-tx-receipt.js +2 -2
  52. package/dist/cjs/transaction/actions/wait-for-tx-receipt.js.map +1 -1
  53. package/dist/cjs/transaction/read-contract.js +1 -0
  54. package/dist/cjs/transaction/read-contract.js.map +1 -1
  55. package/dist/cjs/transaction/transaction-store.js +10 -0
  56. package/dist/cjs/transaction/transaction-store.js.map +1 -1
  57. package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc1155.js +1 -2
  58. package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc1155.js.map +1 -1
  59. package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc20.js +1 -2
  60. package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc20.js.map +1 -1
  61. package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc721.js +1 -2
  62. package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc721.js.map +1 -1
  63. package/dist/cjs/utils/extensions/drops/get-claim-params.js +19 -0
  64. package/dist/cjs/utils/extensions/drops/get-claim-params.js.map +1 -1
  65. package/dist/cjs/utils/jwt/decode-jwt.js +1 -0
  66. package/dist/cjs/utils/jwt/decode-jwt.js.map +1 -1
  67. package/dist/cjs/utils/jwt/encode-jwt.js +1 -0
  68. package/dist/cjs/utils/jwt/encode-jwt.js.map +1 -1
  69. package/dist/cjs/utils/jwt/refresh-jwt.js +1 -0
  70. package/dist/cjs/utils/jwt/refresh-jwt.js.map +1 -1
  71. package/dist/cjs/utils/signatures/resolve-signature.js +0 -2
  72. package/dist/cjs/utils/signatures/resolve-signature.js.map +1 -1
  73. package/dist/cjs/version.js +1 -1
  74. package/dist/cjs/version.js.map +1 -1
  75. package/dist/cjs/wallets/eip5792/wait-for-bundle.js +2 -2
  76. package/dist/cjs/wallets/eip5792/wait-for-bundle.js.map +1 -1
  77. package/dist/cjs/wallets/smart/index.js +0 -1
  78. package/dist/cjs/wallets/smart/index.js.map +1 -1
  79. package/dist/esm/extensions/modular/ModularCore/write/installPublishedExtension.js +19 -0
  80. package/dist/esm/extensions/modular/ModularCore/write/installPublishedExtension.js.map +1 -1
  81. package/dist/esm/extensions/modular/ModularCore/write/uninstallExtensionByProxy.js +17 -0
  82. package/dist/esm/extensions/modular/ModularCore/write/uninstallExtensionByProxy.js.map +1 -1
  83. package/dist/esm/extensions/modular/ModularCore/write/uninstallPublishedExtension.js +18 -0
  84. package/dist/esm/extensions/modular/ModularCore/write/uninstallPublishedExtension.js.map +1 -1
  85. package/dist/esm/pay/getBuyHistory.js +1 -1
  86. package/dist/esm/react/core/hooks/contract/useReadContract.js.map +1 -1
  87. package/dist/esm/react/core/hooks/transaction/useSendTransaction.js +9 -3
  88. package/dist/esm/react/core/hooks/transaction/useSendTransaction.js.map +1 -1
  89. package/dist/esm/react/web/hooks/transaction/useSendTransaction.js +2 -2
  90. package/dist/esm/react/web/hooks/transaction/useSendTransaction.js.map +1 -1
  91. package/dist/esm/react/web/ui/ConnectWallet/Details.js +5 -5
  92. package/dist/esm/react/web/ui/ConnectWallet/Details.js.map +1 -1
  93. package/dist/esm/react/web/ui/ConnectWallet/TransactionsScreen.js +45 -0
  94. package/dist/esm/react/web/ui/ConnectWallet/TransactionsScreen.js.map +1 -0
  95. package/dist/esm/react/web/ui/ConnectWallet/locale/en.js +2 -0
  96. package/dist/esm/react/web/ui/ConnectWallet/locale/en.js.map +1 -1
  97. package/dist/esm/react/web/ui/ConnectWallet/locale/es.js +3 -1
  98. package/dist/esm/react/web/ui/ConnectWallet/locale/es.js.map +1 -1
  99. package/dist/esm/react/web/ui/ConnectWallet/locale/ja.js +3 -1
  100. package/dist/esm/react/web/ui/ConnectWallet/locale/ja.js.map +1 -1
  101. package/dist/esm/react/web/ui/ConnectWallet/locale/tl.js +3 -1
  102. package/dist/esm/react/web/ui/ConnectWallet/locale/tl.js.map +1 -1
  103. package/dist/esm/react/web/ui/ConnectWallet/locale/vi.js +3 -1
  104. package/dist/esm/react/web/ui/ConnectWallet/locale/vi.js.map +1 -1
  105. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.js +1 -1
  106. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.js.map +1 -1
  107. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js +1 -1
  108. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.js.map +1 -1
  109. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js +1 -1
  110. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.js.map +1 -1
  111. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.js +79 -0
  112. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.js.map +1 -0
  113. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistoryButton.js.map +1 -0
  114. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.js.map +1 -0
  115. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.js.map +1 -0
  116. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.js.map +1 -0
  117. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.js.map +1 -0
  118. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.js.map +1 -0
  119. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/useBuyTransactionsToShow.js.map +1 -0
  120. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.js +1 -1
  121. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.js.map +1 -1
  122. package/dist/esm/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.js +74 -0
  123. package/dist/esm/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.js.map +1 -0
  124. package/dist/esm/react/web/ui/PayEmbed.js +2 -2
  125. package/dist/esm/react/web/ui/PayEmbed.js.map +1 -1
  126. package/dist/esm/react/web/ui/components/Tabs.js +22 -0
  127. package/dist/esm/react/web/ui/components/Tabs.js.map +1 -0
  128. package/dist/esm/storage/unpin.js +1 -1
  129. package/dist/esm/transaction/actions/wait-for-tx-receipt.js +2 -2
  130. package/dist/esm/transaction/actions/wait-for-tx-receipt.js.map +1 -1
  131. package/dist/esm/transaction/read-contract.js +1 -0
  132. package/dist/esm/transaction/read-contract.js.map +1 -1
  133. package/dist/esm/transaction/transaction-store.js +10 -0
  134. package/dist/esm/transaction/transaction-store.js.map +1 -1
  135. package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc1155.js +1 -2
  136. package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc1155.js.map +1 -1
  137. package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc20.js +1 -2
  138. package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc20.js.map +1 -1
  139. package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc721.js +1 -2
  140. package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc721.js.map +1 -1
  141. package/dist/esm/utils/extensions/drops/get-claim-params.js +19 -0
  142. package/dist/esm/utils/extensions/drops/get-claim-params.js.map +1 -1
  143. package/dist/esm/utils/jwt/decode-jwt.js +1 -0
  144. package/dist/esm/utils/jwt/decode-jwt.js.map +1 -1
  145. package/dist/esm/utils/jwt/encode-jwt.js +1 -0
  146. package/dist/esm/utils/jwt/encode-jwt.js.map +1 -1
  147. package/dist/esm/utils/jwt/refresh-jwt.js +1 -0
  148. package/dist/esm/utils/jwt/refresh-jwt.js.map +1 -1
  149. package/dist/esm/utils/signatures/resolve-signature.js +0 -2
  150. package/dist/esm/utils/signatures/resolve-signature.js.map +1 -1
  151. package/dist/esm/version.js +1 -1
  152. package/dist/esm/version.js.map +1 -1
  153. package/dist/esm/wallets/eip5792/wait-for-bundle.js +2 -2
  154. package/dist/esm/wallets/eip5792/wait-for-bundle.js.map +1 -1
  155. package/dist/esm/wallets/smart/index.js +0 -1
  156. package/dist/esm/wallets/smart/index.js.map +1 -1
  157. package/dist/types/extensions/modular/ModularCore/write/installPublishedExtension.d.ts +20 -1
  158. package/dist/types/extensions/modular/ModularCore/write/installPublishedExtension.d.ts.map +1 -1
  159. package/dist/types/extensions/modular/ModularCore/write/uninstallExtensionByProxy.d.ts +17 -0
  160. package/dist/types/extensions/modular/ModularCore/write/uninstallExtensionByProxy.d.ts.map +1 -1
  161. package/dist/types/extensions/modular/ModularCore/write/uninstallPublishedExtension.d.ts +19 -1
  162. package/dist/types/extensions/modular/ModularCore/write/uninstallPublishedExtension.d.ts.map +1 -1
  163. package/dist/types/pay/getBuyHistory.d.ts +1 -1
  164. package/dist/types/react/core/hooks/contract/useReadContract.d.ts +2 -3
  165. package/dist/types/react/core/hooks/contract/useReadContract.d.ts.map +1 -1
  166. package/dist/types/react/core/hooks/transaction/useSendTransaction.d.ts.map +1 -1
  167. package/dist/types/react/web/ui/ConnectWallet/Details.d.ts.map +1 -1
  168. package/dist/types/react/web/ui/ConnectWallet/TransactionsScreen.d.ts +14 -0
  169. package/dist/types/react/web/ui/ConnectWallet/TransactionsScreen.d.ts.map +1 -0
  170. package/dist/types/react/web/ui/ConnectWallet/locale/en.d.ts.map +1 -1
  171. package/dist/types/react/web/ui/ConnectWallet/locale/es.d.ts.map +1 -1
  172. package/dist/types/react/web/ui/ConnectWallet/locale/ja.d.ts.map +1 -1
  173. package/dist/types/react/web/ui/ConnectWallet/locale/tl.d.ts.map +1 -1
  174. package/dist/types/react/web/ui/ConnectWallet/locale/types.d.ts +2 -0
  175. package/dist/types/react/web/ui/ConnectWallet/locale/types.d.ts.map +1 -1
  176. package/dist/types/react/web/ui/ConnectWallet/locale/vi.d.ts.map +1 -1
  177. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.d.ts +1 -1
  178. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.d.ts.map +1 -1
  179. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/BuyTxHistory.d.ts +2 -4
  180. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistory.d.ts.map +1 -0
  181. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/BuyTxHistoryButton.d.ts.map +1 -0
  182. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/FiatDetailsScreen.d.ts.map +1 -0
  183. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/SwapDetailsScreen.d.ts.map +1 -0
  184. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TokenInfoRow.d.ts.map +1 -0
  185. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/TxDetailsScreen.d.ts.map +1 -0
  186. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/statusMeta.d.ts.map +1 -0
  187. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/pay-transactions/useBuyTransactionsToShow.d.ts.map +1 -0
  188. package/dist/types/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.d.ts +15 -0
  189. package/dist/types/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.d.ts.map +1 -0
  190. package/dist/types/react/web/ui/ConnectWallet/screens/types.d.ts +1 -1
  191. package/dist/types/react/web/ui/ConnectWallet/screens/types.d.ts.map +1 -1
  192. package/dist/types/react/web/ui/components/Tabs.d.ts +7 -0
  193. package/dist/types/react/web/ui/components/Tabs.d.ts.map +1 -0
  194. package/dist/types/storage/unpin.d.ts +1 -1
  195. package/dist/types/transaction/actions/wait-for-tx-receipt.d.ts +2 -2
  196. package/dist/types/transaction/actions/wait-for-tx-receipt.d.ts.map +1 -1
  197. package/dist/types/transaction/read-contract.d.ts +1 -0
  198. package/dist/types/transaction/read-contract.d.ts.map +1 -1
  199. package/dist/types/transaction/transaction-store.d.ts +10 -0
  200. package/dist/types/transaction/transaction-store.d.ts.map +1 -1
  201. package/dist/types/utils/extensions/airdrop/fetch-proofs-erc1155.d.ts +34 -0
  202. package/dist/types/utils/extensions/airdrop/fetch-proofs-erc1155.d.ts.map +1 -1
  203. package/dist/types/utils/extensions/airdrop/fetch-proofs-erc20.d.ts +34 -0
  204. package/dist/types/utils/extensions/airdrop/fetch-proofs-erc20.d.ts.map +1 -1
  205. package/dist/types/utils/extensions/airdrop/fetch-proofs-erc721.d.ts +34 -0
  206. package/dist/types/utils/extensions/airdrop/fetch-proofs-erc721.d.ts.map +1 -1
  207. package/dist/types/utils/extensions/drops/get-claim-params.d.ts +19 -0
  208. package/dist/types/utils/extensions/drops/get-claim-params.d.ts.map +1 -1
  209. package/dist/types/utils/jwt/decode-jwt.d.ts +1 -0
  210. package/dist/types/utils/jwt/decode-jwt.d.ts.map +1 -1
  211. package/dist/types/utils/jwt/encode-jwt.d.ts +1 -0
  212. package/dist/types/utils/jwt/encode-jwt.d.ts.map +1 -1
  213. package/dist/types/utils/jwt/refresh-jwt.d.ts +1 -0
  214. package/dist/types/utils/jwt/refresh-jwt.d.ts.map +1 -1
  215. package/dist/types/utils/signatures/resolve-signature.d.ts.map +1 -1
  216. package/dist/types/version.d.ts +1 -1
  217. package/dist/types/version.d.ts.map +1 -1
  218. package/dist/types/wallets/eip5792/wait-for-bundle.d.ts +2 -2
  219. package/dist/types/wallets/eip5792/wait-for-bundle.d.ts.map +1 -1
  220. package/package.json +1 -1
  221. package/src/extensions/modular/ModularCore/write/installPublishedExtension.ts +20 -1
  222. package/src/extensions/modular/ModularCore/write/uninstallExtensionByProxy.ts +17 -0
  223. package/src/extensions/modular/ModularCore/write/uninstallPublishedExtension.ts +19 -1
  224. package/src/pay/getBuyHistory.ts +1 -1
  225. package/src/react/core/hooks/contract/useReadContract.ts +3 -3
  226. package/src/react/core/hooks/transaction/useSendTransaction.ts +12 -3
  227. package/src/react/web/hooks/transaction/useSendTransaction.tsx +2 -2
  228. package/src/react/web/ui/ConnectWallet/Details.tsx +8 -18
  229. package/src/react/web/ui/ConnectWallet/TransactionsScreen.tsx +122 -0
  230. package/src/react/web/ui/ConnectWallet/locale/en.ts +2 -0
  231. package/src/react/web/ui/ConnectWallet/locale/es.ts +3 -1
  232. package/src/react/web/ui/ConnectWallet/locale/ja.ts +3 -1
  233. package/src/react/web/ui/ConnectWallet/locale/tl.ts +3 -1
  234. package/src/react/web/ui/ConnectWallet/locale/types.ts +2 -0
  235. package/src/react/web/ui/ConnectWallet/locale/vi.ts +3 -1
  236. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatStatusScreen.tsx +1 -1
  237. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatSteps.tsx +1 -1
  238. package/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatTxDetailsTable.tsx +2 -2
  239. package/src/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/BuyTxHistory.tsx +118 -121
  240. package/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapStatusScreen.tsx +1 -1
  241. package/src/react/web/ui/ConnectWallet/screens/WalletTransactionHistory.tsx +214 -0
  242. package/src/react/web/ui/ConnectWallet/screens/types.ts +1 -1
  243. package/src/react/web/ui/PayEmbed.tsx +2 -2
  244. package/src/react/web/ui/components/Tabs.tsx +56 -0
  245. package/src/storage/unpin.ts +1 -1
  246. package/src/transaction/actions/wait-for-tx-receipt.test.ts +5 -7
  247. package/src/transaction/actions/wait-for-tx-receipt.ts +2 -2
  248. package/src/transaction/read-contract.test.ts +1 -0
  249. package/src/transaction/read-contract.ts +2 -0
  250. package/src/transaction/transaction-store.ts +10 -0
  251. package/src/utils/extensions/airdrop/fetch-proofs-erc1155.ts +1 -2
  252. package/src/utils/extensions/airdrop/fetch-proofs-erc20.ts +1 -2
  253. package/src/utils/extensions/airdrop/fetch-proofs-erc721.ts +1 -2
  254. package/src/utils/extensions/drops/get-claim-params.ts +19 -0
  255. package/src/utils/jwt/decode-jwt.ts +1 -0
  256. package/src/utils/jwt/encode-jwt.ts +1 -0
  257. package/src/utils/jwt/refresh-jwt.ts +1 -0
  258. package/src/utils/signatures/resolve-signature.ts +0 -2
  259. package/src/version.ts +1 -1
  260. package/src/wallets/eip5792/wait-for-bundle.test.ts +5 -7
  261. package/src/wallets/eip5792/wait-for-bundle.ts +2 -2
  262. package/src/wallets/smart/index.ts +0 -3
  263. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.js +0 -85
  264. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.js.map +0 -1
  265. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistoryButton.js.map +0 -1
  266. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/FiatDetailsScreen.js.map +0 -1
  267. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/SwapDetailsScreen.js.map +0 -1
  268. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/TokenInfoRow.js.map +0 -1
  269. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/TxDetailsScreen.js.map +0 -1
  270. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/statusMeta.js.map +0 -1
  271. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/useBuyTransactionsToShow.js.map +0 -1
  272. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.js +0 -81
  273. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.js.map +0 -1
  274. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistoryButton.js.map +0 -1
  275. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/FiatDetailsScreen.js.map +0 -1
  276. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/SwapDetailsScreen.js.map +0 -1
  277. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/TokenInfoRow.js.map +0 -1
  278. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/TxDetailsScreen.js.map +0 -1
  279. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/statusMeta.js.map +0 -1
  280. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/useBuyTransactionsToShow.js.map +0 -1
  281. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.d.ts.map +0 -1
  282. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistoryButton.d.ts.map +0 -1
  283. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/tx-history/FiatDetailsScreen.d.ts.map +0 -1
  284. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/tx-history/SwapDetailsScreen.d.ts.map +0 -1
  285. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/tx-history/TokenInfoRow.d.ts.map +0 -1
  286. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/tx-history/TxDetailsScreen.d.ts.map +0 -1
  287. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/tx-history/statusMeta.d.ts.map +0 -1
  288. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/tx-history/useBuyTransactionsToShow.d.ts.map +0 -1
  289. package/src/extensions/erc1155/drops/write/updateMetadata.test.ts +0 -127
  290. package/src/extensions/erc721/drops/write/updateMetadata.test.ts +0 -127
  291. /package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/BuyTxHistoryButton.js +0 -0
  292. /package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/FiatDetailsScreen.js +0 -0
  293. /package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/SwapDetailsScreen.js +0 -0
  294. /package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/TokenInfoRow.js +0 -0
  295. /package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/TxDetailsScreen.js +0 -0
  296. /package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/statusMeta.js +0 -0
  297. /package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/useBuyTransactionsToShow.js +0 -0
  298. /package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/BuyTxHistoryButton.js +0 -0
  299. /package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/FiatDetailsScreen.js +0 -0
  300. /package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/SwapDetailsScreen.js +0 -0
  301. /package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/TokenInfoRow.js +0 -0
  302. /package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/TxDetailsScreen.js +0 -0
  303. /package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/statusMeta.js +0 -0
  304. /package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/useBuyTransactionsToShow.js +0 -0
  305. /package/dist/types/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/BuyTxHistoryButton.d.ts +0 -0
  306. /package/dist/types/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/FiatDetailsScreen.d.ts +0 -0
  307. /package/dist/types/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/SwapDetailsScreen.d.ts +0 -0
  308. /package/dist/types/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/TokenInfoRow.d.ts +0 -0
  309. /package/dist/types/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/TxDetailsScreen.d.ts +0 -0
  310. /package/dist/types/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/statusMeta.d.ts +0 -0
  311. /package/dist/types/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/useBuyTransactionsToShow.d.ts +0 -0
  312. /package/src/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/BuyTxHistoryButton.tsx +0 -0
  313. /package/src/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/FiatDetailsScreen.tsx +0 -0
  314. /package/src/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/SwapDetailsScreen.tsx +0 -0
  315. /package/src/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/TokenInfoRow.tsx +0 -0
  316. /package/src/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/TxDetailsScreen.tsx +0 -0
  317. /package/src/react/web/ui/ConnectWallet/screens/Buy/{tx-history → pay-transactions}/statusMeta.ts +0 -0
  318. /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: "Giao dịch",
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 "../tx-history/statusMeta.js";
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 "../tx-history/statusMeta.js";
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 "../tx-history/TokenInfoRow.js";
15
- import type { FiatStatusMeta } from "../tx-history/statusMeta.js";
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
  /**
@@ -35,7 +35,7 @@ import {
35
35
  /**
36
36
  * @internal
37
37
  */
38
- export function BuyTxHistory(props: {
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 <BuyTxHistoryList {...props} onSelectTx={setSelectedTx} />;
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 BuyTxHistoryList(props: {
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 animate="fadein">
102
- <Container p="lg">
103
- <ModalHeader title="Transactions" onBack={props.onBack} />
104
- </Container>
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
- <Container
107
- scrollY
108
- flex="column"
109
- fullHeight
110
- style={{
111
- minHeight: "250px",
112
- maxHeight: "370px",
113
- }}
114
- >
115
- <Container flex="column" gap="xs" px="lg" expand>
116
- {noTransactions && !isLoading && (
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
- <Container p="lg">
170
- {pagination && !hidePagination && (
171
- <div
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
- display: "grid",
174
- gridTemplateColumns: "1fr 1fr",
175
- gap: spacing.sm,
201
+ fontSize: fontSize.sm,
202
+ paddingBlock: spacing.sm,
203
+ }}
204
+ onClick={() => {
205
+ setPageIndex((prev) => prev - 1);
176
206
  }}
177
207
  >
178
- <Button
179
- variant="outline"
180
- gap="xs"
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
- fontSize: fontSize.sm,
207
- paddingBlock: spacing.sm,
212
+ transform: "rotate(180deg)",
208
213
  }}
209
- onClick={() => {
210
- setPageIndex((prev) => prev + 1);
211
- }}
212
- >
213
- Next
214
- <ArrowRightIcon width={iconSize.sm} height={iconSize.sm} />
215
- </Button>
216
- </div>
217
- )}
218
- </Container>
219
- </Container>
220
-
221
- <Line />
222
- <Container p="lg">
223
- <ButtonLink
224
- fullWidth
225
- variant="outline"
226
- href={`${chainExplorers.explorers[0]?.url}/address/${activeAccount?.address}`}
227
- target="_blank"
228
- as="a"
229
- gap="xs"
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 "../tx-history/SwapDetailsScreen.js";
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
+ });
@@ -66,7 +66,7 @@ export type WalletDetailsModalScreen =
66
66
  | "receive"
67
67
  | "buy"
68
68
  | "network-switcher"
69
- | "pending-tx"
69
+ | "transactions"
70
70
  | "view-funds"
71
71
  | "view-tokens"
72
72
  | "view-nfts"
@@ -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 { BuyTxHistory } from "./ConnectWallet/screens/Buy/tx-history/BuyTxHistory.js";
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
- <BuyTxHistory
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
+ }
@@ -22,8 +22,8 @@ export type UnpinOptions = {
22
22
  * client: thirdwebClient,
23
23
  * cid: "QmTzQ1N1z1Q1N1z1Q1N1z1Q1N1z1Q1N1z1Q1N1z1Q1N1z1",
24
24
  * });
25
- *
26
25
  * ```
26
+ * @storage
27
27
  */
28
28
 
29
29
  export async function unpin(options: UnpinOptions) {