thirdweb 5.34.4-nightly-b67519aecba8dba28dc87faea72e16d0ce6a4ab8-20240715000324 → 5.35.0-nightly-aadbd33e9d696bd7dd77561fa3f3a0a0fa7747f5-20240716082511

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (297) hide show
  1. package/dist/cjs/exports/extensions/airdrop.js +7 -1
  2. package/dist/cjs/exports/extensions/airdrop.js.map +1 -1
  3. package/dist/cjs/exports/thirdweb.js +3 -1
  4. package/dist/cjs/exports/thirdweb.js.map +1 -1
  5. package/dist/cjs/exports/utils.js +6 -1
  6. package/dist/cjs/exports/utils.js.map +1 -1
  7. package/dist/cjs/extensions/airdrop/write/claimERC20.js +1 -1
  8. package/dist/cjs/extensions/airdrop/write/claimERC20.js.map +1 -1
  9. package/dist/cjs/react/core/hooks/others/useWalletBalance.js +9 -5
  10. package/dist/cjs/react/core/hooks/others/useWalletBalance.js.map +1 -1
  11. package/dist/cjs/react/core/hooks/transaction/transaction-button-utils.js.map +1 -1
  12. package/dist/cjs/react/core/utils/wallet.js +8 -0
  13. package/dist/cjs/react/core/utils/wallet.js.map +1 -1
  14. package/dist/cjs/react/native/ui/components/TokenIcon.js +0 -1
  15. package/dist/cjs/react/native/ui/components/TokenIcon.js.map +1 -1
  16. package/dist/cjs/react/native/ui/connect/ConnectButton.js +13 -2
  17. package/dist/cjs/react/native/ui/connect/ConnectButton.js.map +1 -1
  18. package/dist/cjs/react/native/ui/connect/ConnectModal.js +69 -14
  19. package/dist/cjs/react/native/ui/connect/ConnectModal.js.map +1 -1
  20. package/dist/cjs/react/native/ui/connect/ConnectedModal.js +3 -0
  21. package/dist/cjs/react/native/ui/connect/ConnectedModal.js.map +1 -1
  22. package/dist/cjs/react/native/ui/connect/WalletLoadingThumbnail.js +5 -3
  23. package/dist/cjs/react/native/ui/connect/WalletLoadingThumbnail.js.map +1 -1
  24. package/dist/cjs/react/web/ui/ConnectWallet/Details.js +8 -6
  25. package/dist/cjs/react/web/ui/ConnectWallet/Details.js.map +1 -1
  26. package/dist/cjs/react/web/ui/ConnectWallet/NetworkSelector.js +1 -1
  27. package/dist/cjs/react/web/ui/ConnectWallet/NetworkSelector.js.map +1 -1
  28. package/dist/cjs/react/web/ui/ConnectWallet/locale/en.js +11 -0
  29. package/dist/cjs/react/web/ui/ConnectWallet/locale/en.js.map +1 -1
  30. package/dist/cjs/react/web/ui/ConnectWallet/locale/es.js +11 -0
  31. package/dist/cjs/react/web/ui/ConnectWallet/locale/es.js.map +1 -1
  32. package/dist/cjs/react/web/ui/ConnectWallet/locale/getConnectLocale.js +3 -0
  33. package/dist/cjs/react/web/ui/ConnectWallet/locale/getConnectLocale.js.map +1 -1
  34. package/dist/cjs/react/web/ui/ConnectWallet/locale/ja.js +11 -0
  35. package/dist/cjs/react/web/ui/ConnectWallet/locale/ja.js.map +1 -1
  36. package/dist/cjs/react/web/ui/ConnectWallet/locale/tl.js +11 -0
  37. package/dist/cjs/react/web/ui/ConnectWallet/locale/tl.js.map +1 -1
  38. package/dist/cjs/react/web/ui/ConnectWallet/locale/vi.js +112 -0
  39. package/dist/cjs/react/web/ui/ConnectWallet/locale/vi.js.map +1 -0
  40. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
  41. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.js +1 -1
  42. package/dist/cjs/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.js.map +1 -1
  43. package/dist/cjs/react/web/ui/ConnectWallet/screens/ManageWalletScreen.js +3 -3
  44. package/dist/cjs/react/web/ui/ConnectWallet/screens/ManageWalletScreen.js.map +1 -1
  45. package/dist/cjs/react/web/ui/ConnectWallet/screens/TokenSelector.js +0 -1
  46. package/dist/cjs/react/web/ui/ConnectWallet/screens/TokenSelector.js.map +1 -1
  47. package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewFunds.js +4 -3
  48. package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewFunds.js.map +1 -1
  49. package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewNFTs.js +2 -1
  50. package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewNFTs.js.map +1 -1
  51. package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewTokens.js +2 -1
  52. package/dist/cjs/react/web/ui/ConnectWallet/screens/ViewTokens.js.map +1 -1
  53. package/dist/cjs/react/web/ui/components/ChainIcon.js +0 -1
  54. package/dist/cjs/react/web/ui/components/ChainIcon.js.map +1 -1
  55. package/dist/cjs/react/web/ui/components/Img.js +0 -1
  56. package/dist/cjs/react/web/ui/components/Img.js.map +1 -1
  57. package/dist/cjs/react/web/ui/components/TokenIcon.js +0 -1
  58. package/dist/cjs/react/web/ui/components/TokenIcon.js.map +1 -1
  59. package/dist/cjs/react/web/ui/components/WalletImage.js +0 -1
  60. package/dist/cjs/react/web/ui/components/WalletImage.js.map +1 -1
  61. package/dist/cjs/react/web/wallets/injected/locale/getInjectedWalletLocale.js +2 -0
  62. package/dist/cjs/react/web/wallets/injected/locale/getInjectedWalletLocale.js.map +1 -1
  63. package/dist/cjs/react/web/wallets/injected/locale/vi.js +27 -0
  64. package/dist/cjs/react/web/wallets/injected/locale/vi.js.map +1 -0
  65. package/dist/cjs/react/web/wallets/local/locale/getLocalWalletLocale.js +2 -0
  66. package/dist/cjs/react/web/wallets/local/locale/getLocalWalletLocale.js.map +1 -1
  67. package/dist/cjs/react/web/wallets/local/locale/vi.js +44 -0
  68. package/dist/cjs/react/web/wallets/local/locale/vi.js.map +1 -0
  69. package/dist/cjs/react/web/wallets/shared/locale/getConnectLocale.js +2 -0
  70. package/dist/cjs/react/web/wallets/shared/locale/getConnectLocale.js.map +1 -1
  71. package/dist/cjs/react/web/wallets/shared/locale/vi.js +54 -0
  72. package/dist/cjs/react/web/wallets/shared/locale/vi.js.map +1 -0
  73. package/dist/cjs/react/web/wallets/smartWallet/locale/getSmartWalletLocale.js +2 -0
  74. package/dist/cjs/react/web/wallets/smartWallet/locale/getSmartWalletLocale.js.map +1 -1
  75. package/dist/cjs/react/web/wallets/smartWallet/locale/vi.js +13 -0
  76. package/dist/cjs/react/web/wallets/smartWallet/locale/vi.js.map +1 -0
  77. package/dist/cjs/react/web/wallets/walletConnect/locale.js +4 -0
  78. package/dist/cjs/react/web/wallets/walletConnect/locale.js.map +1 -1
  79. package/dist/cjs/transaction/extract-error.js +12 -13
  80. package/dist/cjs/transaction/extract-error.js.map +1 -1
  81. package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc1155.js +34 -0
  82. package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc1155.js.map +1 -1
  83. package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc20.js +36 -2
  84. package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc20.js.map +1 -1
  85. package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc721.js +34 -0
  86. package/dist/cjs/utils/extensions/airdrop/fetch-proofs-erc721.js.map +1 -1
  87. package/dist/cjs/version.js +1 -1
  88. package/dist/cjs/wallets/coinbase/coinbaseMobileSDK.js +12 -0
  89. package/dist/cjs/wallets/coinbase/coinbaseMobileSDK.js.map +1 -1
  90. package/dist/cjs/wallets/in-app/web/lib/in-app-account.js +12 -8
  91. package/dist/cjs/wallets/in-app/web/lib/in-app-account.js.map +1 -1
  92. package/dist/esm/exports/extensions/airdrop.js +3 -0
  93. package/dist/esm/exports/extensions/airdrop.js.map +1 -1
  94. package/dist/esm/exports/thirdweb.js +1 -0
  95. package/dist/esm/exports/thirdweb.js.map +1 -1
  96. package/dist/esm/exports/utils.js +4 -0
  97. package/dist/esm/exports/utils.js.map +1 -1
  98. package/dist/esm/extensions/airdrop/write/claimERC20.js +2 -2
  99. package/dist/esm/extensions/airdrop/write/claimERC20.js.map +1 -1
  100. package/dist/esm/react/core/hooks/others/useWalletBalance.js +10 -6
  101. package/dist/esm/react/core/hooks/others/useWalletBalance.js.map +1 -1
  102. package/dist/esm/react/core/hooks/transaction/transaction-button-utils.js.map +1 -1
  103. package/dist/esm/react/core/utils/wallet.js +8 -0
  104. package/dist/esm/react/core/utils/wallet.js.map +1 -1
  105. package/dist/esm/react/native/ui/components/TokenIcon.js +0 -1
  106. package/dist/esm/react/native/ui/components/TokenIcon.js.map +1 -1
  107. package/dist/esm/react/native/ui/connect/ConnectButton.js +13 -2
  108. package/dist/esm/react/native/ui/connect/ConnectButton.js.map +1 -1
  109. package/dist/esm/react/native/ui/connect/ConnectModal.js +70 -15
  110. package/dist/esm/react/native/ui/connect/ConnectModal.js.map +1 -1
  111. package/dist/esm/react/native/ui/connect/ConnectedModal.js +3 -0
  112. package/dist/esm/react/native/ui/connect/ConnectedModal.js.map +1 -1
  113. package/dist/esm/react/native/ui/connect/WalletLoadingThumbnail.js +5 -3
  114. package/dist/esm/react/native/ui/connect/WalletLoadingThumbnail.js.map +1 -1
  115. package/dist/esm/react/web/ui/ConnectWallet/Details.js +8 -6
  116. package/dist/esm/react/web/ui/ConnectWallet/Details.js.map +1 -1
  117. package/dist/esm/react/web/ui/ConnectWallet/NetworkSelector.js +1 -1
  118. package/dist/esm/react/web/ui/ConnectWallet/NetworkSelector.js.map +1 -1
  119. package/dist/esm/react/web/ui/ConnectWallet/locale/en.js +11 -0
  120. package/dist/esm/react/web/ui/ConnectWallet/locale/en.js.map +1 -1
  121. package/dist/esm/react/web/ui/ConnectWallet/locale/es.js +11 -0
  122. package/dist/esm/react/web/ui/ConnectWallet/locale/es.js.map +1 -1
  123. package/dist/esm/react/web/ui/ConnectWallet/locale/getConnectLocale.js +3 -0
  124. package/dist/esm/react/web/ui/ConnectWallet/locale/getConnectLocale.js.map +1 -1
  125. package/dist/esm/react/web/ui/ConnectWallet/locale/ja.js +11 -0
  126. package/dist/esm/react/web/ui/ConnectWallet/locale/ja.js.map +1 -1
  127. package/dist/esm/react/web/ui/ConnectWallet/locale/tl.js +11 -0
  128. package/dist/esm/react/web/ui/ConnectWallet/locale/tl.js.map +1 -1
  129. package/dist/esm/react/web/ui/ConnectWallet/locale/vi.js +110 -0
  130. package/dist/esm/react/web/ui/ConnectWallet/locale/vi.js.map +1 -0
  131. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.js.map +1 -1
  132. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.js +1 -1
  133. package/dist/esm/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.js.map +1 -1
  134. package/dist/esm/react/web/ui/ConnectWallet/screens/ManageWalletScreen.js +3 -3
  135. package/dist/esm/react/web/ui/ConnectWallet/screens/ManageWalletScreen.js.map +1 -1
  136. package/dist/esm/react/web/ui/ConnectWallet/screens/TokenSelector.js +0 -1
  137. package/dist/esm/react/web/ui/ConnectWallet/screens/TokenSelector.js.map +1 -1
  138. package/dist/esm/react/web/ui/ConnectWallet/screens/ViewFunds.js +4 -3
  139. package/dist/esm/react/web/ui/ConnectWallet/screens/ViewFunds.js.map +1 -1
  140. package/dist/esm/react/web/ui/ConnectWallet/screens/ViewNFTs.js +2 -1
  141. package/dist/esm/react/web/ui/ConnectWallet/screens/ViewNFTs.js.map +1 -1
  142. package/dist/esm/react/web/ui/ConnectWallet/screens/ViewTokens.js +2 -1
  143. package/dist/esm/react/web/ui/ConnectWallet/screens/ViewTokens.js.map +1 -1
  144. package/dist/esm/react/web/ui/components/ChainIcon.js +0 -1
  145. package/dist/esm/react/web/ui/components/ChainIcon.js.map +1 -1
  146. package/dist/esm/react/web/ui/components/Img.js +0 -1
  147. package/dist/esm/react/web/ui/components/Img.js.map +1 -1
  148. package/dist/esm/react/web/ui/components/TokenIcon.js +0 -1
  149. package/dist/esm/react/web/ui/components/TokenIcon.js.map +1 -1
  150. package/dist/esm/react/web/ui/components/WalletImage.js +0 -1
  151. package/dist/esm/react/web/ui/components/WalletImage.js.map +1 -1
  152. package/dist/esm/react/web/wallets/injected/locale/getInjectedWalletLocale.js +2 -0
  153. package/dist/esm/react/web/wallets/injected/locale/getInjectedWalletLocale.js.map +1 -1
  154. package/dist/esm/react/web/wallets/injected/locale/vi.js +25 -0
  155. package/dist/esm/react/web/wallets/injected/locale/vi.js.map +1 -0
  156. package/dist/esm/react/web/wallets/local/locale/getLocalWalletLocale.js +2 -0
  157. package/dist/esm/react/web/wallets/local/locale/getLocalWalletLocale.js.map +1 -1
  158. package/dist/esm/react/web/wallets/local/locale/vi.js +42 -0
  159. package/dist/esm/react/web/wallets/local/locale/vi.js.map +1 -0
  160. package/dist/esm/react/web/wallets/shared/locale/getConnectLocale.js +2 -0
  161. package/dist/esm/react/web/wallets/shared/locale/getConnectLocale.js.map +1 -1
  162. package/dist/esm/react/web/wallets/shared/locale/vi.js +52 -0
  163. package/dist/esm/react/web/wallets/shared/locale/vi.js.map +1 -0
  164. package/dist/esm/react/web/wallets/smartWallet/locale/getSmartWalletLocale.js +2 -0
  165. package/dist/esm/react/web/wallets/smartWallet/locale/getSmartWalletLocale.js.map +1 -1
  166. package/dist/esm/react/web/wallets/smartWallet/locale/vi.js +11 -0
  167. package/dist/esm/react/web/wallets/smartWallet/locale/vi.js.map +1 -0
  168. package/dist/esm/react/web/wallets/walletConnect/locale.js +4 -0
  169. package/dist/esm/react/web/wallets/walletConnect/locale.js.map +1 -1
  170. package/dist/esm/transaction/extract-error.js +12 -13
  171. package/dist/esm/transaction/extract-error.js.map +1 -1
  172. package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc1155.js +34 -0
  173. package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc1155.js.map +1 -1
  174. package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc20.js +35 -1
  175. package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc20.js.map +1 -1
  176. package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc721.js +34 -0
  177. package/dist/esm/utils/extensions/airdrop/fetch-proofs-erc721.js.map +1 -1
  178. package/dist/esm/version.js +1 -1
  179. package/dist/esm/wallets/coinbase/coinbaseMobileSDK.js +13 -1
  180. package/dist/esm/wallets/coinbase/coinbaseMobileSDK.js.map +1 -1
  181. package/dist/esm/wallets/in-app/web/lib/in-app-account.js +12 -8
  182. package/dist/esm/wallets/in-app/web/lib/in-app-account.js.map +1 -1
  183. package/dist/types/exports/extensions/airdrop.d.ts +3 -0
  184. package/dist/types/exports/extensions/airdrop.d.ts.map +1 -1
  185. package/dist/types/exports/thirdweb.d.ts +1 -0
  186. package/dist/types/exports/thirdweb.d.ts.map +1 -1
  187. package/dist/types/exports/utils.d.ts +1 -0
  188. package/dist/types/exports/utils.d.ts.map +1 -1
  189. package/dist/types/react/core/hooks/others/useWalletBalance.d.ts +10 -2
  190. package/dist/types/react/core/hooks/others/useWalletBalance.d.ts.map +1 -1
  191. package/dist/types/react/core/hooks/transaction/transaction-button-utils.d.ts +6 -0
  192. package/dist/types/react/core/hooks/transaction/transaction-button-utils.d.ts.map +1 -1
  193. package/dist/types/react/core/utils/wallet.d.ts +3 -3
  194. package/dist/types/react/core/utils/wallet.d.ts.map +1 -1
  195. package/dist/types/react/native/ui/components/TokenIcon.d.ts.map +1 -1
  196. package/dist/types/react/native/ui/connect/ConnectButton.d.ts.map +1 -1
  197. package/dist/types/react/native/ui/connect/ConnectModal.d.ts +4 -0
  198. package/dist/types/react/native/ui/connect/ConnectModal.d.ts.map +1 -1
  199. package/dist/types/react/native/ui/connect/ConnectedModal.d.ts.map +1 -1
  200. package/dist/types/react/native/ui/connect/WalletLoadingThumbnail.d.ts +2 -1
  201. package/dist/types/react/native/ui/connect/WalletLoadingThumbnail.d.ts.map +1 -1
  202. package/dist/types/react/web/ui/ConnectWallet/Details.d.ts.map +1 -1
  203. package/dist/types/react/web/ui/ConnectWallet/NetworkSelector.d.ts.map +1 -1
  204. package/dist/types/react/web/ui/ConnectWallet/locale/en.d.ts.map +1 -1
  205. package/dist/types/react/web/ui/ConnectWallet/locale/es.d.ts.map +1 -1
  206. package/dist/types/react/web/ui/ConnectWallet/locale/getConnectLocale.d.ts.map +1 -1
  207. package/dist/types/react/web/ui/ConnectWallet/locale/ja.d.ts.map +1 -1
  208. package/dist/types/react/web/ui/ConnectWallet/locale/tl.d.ts.map +1 -1
  209. package/dist/types/react/web/ui/ConnectWallet/locale/types.d.ts +11 -0
  210. package/dist/types/react/web/ui/ConnectWallet/locale/types.d.ts.map +1 -1
  211. package/dist/types/react/web/ui/ConnectWallet/locale/vi.d.ts +4 -0
  212. package/dist/types/react/web/ui/ConnectWallet/locale/vi.d.ts.map +1 -0
  213. package/dist/types/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.d.ts.map +1 -1
  214. package/dist/types/react/web/ui/ConnectWallet/screens/ManageWalletScreen.d.ts.map +1 -1
  215. package/dist/types/react/web/ui/ConnectWallet/screens/TokenSelector.d.ts.map +1 -1
  216. package/dist/types/react/web/ui/ConnectWallet/screens/ViewFunds.d.ts +2 -0
  217. package/dist/types/react/web/ui/ConnectWallet/screens/ViewFunds.d.ts.map +1 -1
  218. package/dist/types/react/web/ui/ConnectWallet/screens/ViewNFTs.d.ts +2 -0
  219. package/dist/types/react/web/ui/ConnectWallet/screens/ViewNFTs.d.ts.map +1 -1
  220. package/dist/types/react/web/ui/ConnectWallet/screens/ViewTokens.d.ts +2 -0
  221. package/dist/types/react/web/ui/ConnectWallet/screens/ViewTokens.d.ts.map +1 -1
  222. package/dist/types/react/web/ui/components/ChainIcon.d.ts.map +1 -1
  223. package/dist/types/react/web/ui/components/Img.d.ts.map +1 -1
  224. package/dist/types/react/web/ui/components/TokenIcon.d.ts.map +1 -1
  225. package/dist/types/react/web/ui/components/WalletImage.d.ts.map +1 -1
  226. package/dist/types/react/web/ui/types.d.ts +1 -1
  227. package/dist/types/react/web/ui/types.d.ts.map +1 -1
  228. package/dist/types/react/web/wallets/injected/locale/getInjectedWalletLocale.d.ts.map +1 -1
  229. package/dist/types/react/web/wallets/injected/locale/vi.d.ts +7 -0
  230. package/dist/types/react/web/wallets/injected/locale/vi.d.ts.map +1 -0
  231. package/dist/types/react/web/wallets/local/locale/getLocalWalletLocale.d.ts.map +1 -1
  232. package/dist/types/react/web/wallets/local/locale/vi.d.ts +4 -0
  233. package/dist/types/react/web/wallets/local/locale/vi.d.ts.map +1 -0
  234. package/dist/types/react/web/wallets/shared/locale/getConnectLocale.d.ts.map +1 -1
  235. package/dist/types/react/web/wallets/shared/locale/vi.d.ts +53 -0
  236. package/dist/types/react/web/wallets/shared/locale/vi.d.ts.map +1 -0
  237. package/dist/types/react/web/wallets/smartWallet/locale/getSmartWalletLocale.d.ts.map +1 -1
  238. package/dist/types/react/web/wallets/smartWallet/locale/vi.d.ts +4 -0
  239. package/dist/types/react/web/wallets/smartWallet/locale/vi.d.ts.map +1 -0
  240. package/dist/types/react/web/wallets/walletConnect/locale.d.ts.map +1 -1
  241. package/dist/types/utils/extensions/airdrop/fetch-proofs-erc1155.d.ts.map +1 -1
  242. package/dist/types/utils/extensions/airdrop/fetch-proofs-erc20.d.ts +1 -1
  243. package/dist/types/utils/extensions/airdrop/fetch-proofs-erc20.d.ts.map +1 -1
  244. package/dist/types/utils/extensions/airdrop/fetch-proofs-erc721.d.ts.map +1 -1
  245. package/dist/types/version.d.ts +1 -1
  246. package/dist/types/wallets/coinbase/coinbaseMobileSDK.d.ts.map +1 -1
  247. package/dist/types/wallets/in-app/web/lib/in-app-account.d.ts.map +1 -1
  248. package/package.json +1 -1
  249. package/src/exports/extensions/airdrop.ts +3 -0
  250. package/src/exports/thirdweb.ts +5 -0
  251. package/src/exports/utils.ts +8 -0
  252. package/src/extensions/airdrop/write/claimERC20.ts +2 -2
  253. package/src/react/core/hooks/others/useWalletBalance.ts +30 -6
  254. package/src/react/core/hooks/transaction/transaction-button-utils.ts +7 -0
  255. package/src/react/core/utils/wallet.ts +10 -2
  256. package/src/react/native/ui/components/TokenIcon.tsx +0 -2
  257. package/src/react/native/ui/connect/ConnectButton.tsx +16 -4
  258. package/src/react/native/ui/connect/ConnectModal.tsx +181 -19
  259. package/src/react/native/ui/connect/ConnectedModal.tsx +3 -0
  260. package/src/react/native/ui/connect/WalletLoadingThumbnail.tsx +18 -13
  261. package/src/react/web/ui/ConnectWallet/Details.tsx +8 -2
  262. package/src/react/web/ui/ConnectWallet/NetworkSelector.tsx +1 -2
  263. package/src/react/web/ui/ConnectWallet/locale/en.ts +11 -0
  264. package/src/react/web/ui/ConnectWallet/locale/es.ts +11 -0
  265. package/src/react/web/ui/ConnectWallet/locale/getConnectLocale.ts +3 -0
  266. package/src/react/web/ui/ConnectWallet/locale/ja.ts +11 -0
  267. package/src/react/web/ui/ConnectWallet/locale/tl.ts +11 -0
  268. package/src/react/web/ui/ConnectWallet/locale/types.ts +11 -0
  269. package/src/react/web/ui/ConnectWallet/locale/vi.ts +114 -0
  270. package/src/react/web/ui/ConnectWallet/screens/Buy/BuyScreen.tsx +0 -2
  271. package/src/react/web/ui/ConnectWallet/screens/Buy/tx-history/BuyTxHistory.tsx +1 -1
  272. package/src/react/web/ui/ConnectWallet/screens/ManageWalletScreen.tsx +10 -3
  273. package/src/react/web/ui/ConnectWallet/screens/TokenSelector.tsx +0 -1
  274. package/src/react/web/ui/ConnectWallet/screens/ViewFunds.tsx +9 -3
  275. package/src/react/web/ui/ConnectWallet/screens/ViewNFTs.tsx +8 -1
  276. package/src/react/web/ui/ConnectWallet/screens/ViewTokens.tsx +7 -1
  277. package/src/react/web/ui/components/ChainIcon.tsx +0 -1
  278. package/src/react/web/ui/components/Img.tsx +0 -2
  279. package/src/react/web/ui/components/TokenIcon.tsx +0 -2
  280. package/src/react/web/ui/components/WalletImage.tsx +0 -2
  281. package/src/react/web/ui/types.ts +1 -1
  282. package/src/react/web/wallets/injected/locale/getInjectedWalletLocale.ts +2 -0
  283. package/src/react/web/wallets/injected/locale/vi.ts +27 -0
  284. package/src/react/web/wallets/local/locale/getLocalWalletLocale.ts +2 -0
  285. package/src/react/web/wallets/local/locale/vi.ts +48 -0
  286. package/src/react/web/wallets/shared/locale/getConnectLocale.ts +2 -0
  287. package/src/react/web/wallets/shared/locale/vi.ts +56 -0
  288. package/src/react/web/wallets/smartWallet/locale/getSmartWalletLocale.ts +2 -0
  289. package/src/react/web/wallets/smartWallet/locale/vi.ts +13 -0
  290. package/src/react/web/wallets/walletConnect/locale.ts +4 -0
  291. package/src/transaction/extract-error.ts +9 -9
  292. package/src/utils/extensions/airdrop/fetch-proofs-erc1155.ts +34 -0
  293. package/src/utils/extensions/airdrop/fetch-proofs-erc20.ts +35 -1
  294. package/src/utils/extensions/airdrop/fetch-proofs-erc721.ts +34 -0
  295. package/src/version.ts +1 -1
  296. package/src/wallets/coinbase/coinbaseMobileSDK.ts +17 -1
  297. package/src/wallets/in-app/web/lib/in-app-account.ts +12 -8
@@ -4,7 +4,7 @@ import {
4
4
  } from "../../../constants/addresses.js";
5
5
  import type { BaseTransactionOptions } from "../../../transaction/types.js";
6
6
  import type { Address } from "../../../utils/address.js";
7
- import { fetchProofsrERC20 } from "../../../utils/extensions/airdrop/fetch-proofs-erc20.js";
7
+ import { fetchProofsERC20 } from "../../../utils/extensions/airdrop/fetch-proofs-erc20.js";
8
8
  import { tokenMerkleRoot } from "../__generated__/Airdrop/read/tokenMerkleRoot.js";
9
9
  import { claimERC20 as generatedClaimERC20 } from "../__generated__/Airdrop/write/claimERC20.js";
10
10
 
@@ -67,7 +67,7 @@ export function claimERC20(options: BaseTransactionOptions<ClaimERC20Params>) {
67
67
  return await getDecimals({ contract: tokenContract });
68
68
  })();
69
69
 
70
- const merkleProof = await fetchProofsrERC20({
70
+ const merkleProof = await fetchProofsERC20({
71
71
  contract: options.contract,
72
72
  recipient: options.recipient,
73
73
  merkleRoot,
@@ -1,10 +1,26 @@
1
- import { queryOptions, useQuery } from "@tanstack/react-query";
1
+ import {
2
+ type UseQueryOptions,
3
+ type UseQueryResult,
4
+ useQuery,
5
+ } from "@tanstack/react-query";
6
+ import type { Chain } from "../../../../chains/types.js";
7
+ import type { Prettify } from "../../../../utils/type-utils.js";
2
8
  import {
3
9
  type GetWalletBalanceOptions,
10
+ type GetWalletBalanceResult,
4
11
  getWalletBalance,
5
12
  } from "../../../../wallets/utils/getWalletBalance.js";
6
13
 
7
- // NOTE: Do not use useConnectUI here - because this hook is also used outside of Connect UI context
14
+ export type UseWalletBalanceOptions = Prettify<
15
+ Omit<GetWalletBalanceOptions, "address" | "chain"> & {
16
+ address: string | undefined;
17
+ chain: Chain | undefined;
18
+ }
19
+ >;
20
+ export type UseWalletBalanceQueryOptions = Omit<
21
+ UseQueryOptions<GetWalletBalanceResult>,
22
+ "queryFn" | "queryKey" | "enabled"
23
+ >;
8
24
 
9
25
  /**
10
26
  * Fetch the balance of a wallet for a specific token.
@@ -24,9 +40,13 @@ import {
24
40
  * ```
25
41
  * @wallet
26
42
  */
27
- export function useWalletBalance(options: Partial<GetWalletBalanceOptions>) {
43
+ export function useWalletBalance(
44
+ options: UseWalletBalanceOptions,
45
+ queryOptions?: UseWalletBalanceQueryOptions,
46
+ ): UseQueryResult<GetWalletBalanceResult> {
28
47
  const { chain, address, tokenAddress, client } = options;
29
- const query = queryOptions({
48
+ return useQuery({
49
+ ...queryOptions,
30
50
  queryKey: [
31
51
  "walletBalance",
32
52
  chain?.id || -1,
@@ -43,9 +63,13 @@ export function useWalletBalance(options: Partial<GetWalletBalanceOptions>) {
43
63
  if (!address) {
44
64
  throw new Error("address is required");
45
65
  }
46
- return getWalletBalance({ chain, client, address, tokenAddress });
66
+ return getWalletBalance({
67
+ chain,
68
+ client,
69
+ address,
70
+ tokenAddress,
71
+ });
47
72
  },
48
73
  enabled: !!chain && !!client && !!address,
49
74
  });
50
- return useQuery(query);
51
75
  }
@@ -100,6 +100,13 @@ export type TransactionButtonProps = {
100
100
  * The theme to use for the button
101
101
  */
102
102
  theme?: "dark" | "light" | Theme;
103
+
104
+ /**
105
+ * Set the type attribute of the button element.
106
+ *
107
+ * [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLButtonElement/type)
108
+ */
109
+ type?: HTMLButtonElement["type"];
103
110
  };
104
111
 
105
112
  export const useTransactionButtonMutation = (
@@ -72,15 +72,19 @@ export function useConnectedWalletDetails(
72
72
  * Returns the wallet info for the provided wallet id.
73
73
  * @wallet
74
74
  */
75
- export function useWalletInfo(id: WalletId) {
75
+ export function useWalletInfo(id: WalletId | undefined) {
76
76
  return useQuery<WalletInfo>({
77
77
  queryKey: ["wallet-info", id],
78
78
  queryFn: () => {
79
+ if (!id) {
80
+ throw new Error("Wallet id is required");
81
+ }
79
82
  return getWalletInfo(id, false);
80
83
  },
81
84
  retry: false,
82
85
  refetchOnWindowFocus: false,
83
86
  refetchOnMount: false,
87
+ enabled: !!id,
84
88
  });
85
89
  }
86
90
 
@@ -88,14 +92,18 @@ export function useWalletInfo(id: WalletId) {
88
92
  * Returns the wallet image for the provided wallet id.
89
93
  * @wallet
90
94
  */
91
- export function useWalletImage(id: WalletId) {
95
+ export function useWalletImage(id: WalletId | undefined) {
92
96
  return useQuery({
93
97
  queryKey: ["wallet-image", id],
94
98
  queryFn: () => {
99
+ if (!id) {
100
+ throw new Error("Wallet id is required");
101
+ }
95
102
  return getWalletInfo(id, true);
96
103
  },
97
104
  retry: false,
98
105
  refetchOnWindowFocus: false,
99
106
  refetchOnMount: false,
107
+ enabled: !!id,
100
108
  });
101
109
  }
@@ -7,8 +7,6 @@ import { genericTokenIcon } from "../../../core/utils/socialIcons.js";
7
7
  import { ChainIcon } from "./ChainIcon.js";
8
8
  import { RNImage } from "./RNImage.js";
9
9
 
10
- // Note: Must not use useConnectUI here
11
-
12
10
  /**
13
11
  * @internal
14
12
  */
@@ -10,6 +10,7 @@ import {
10
10
  View,
11
11
  } from "react-native";
12
12
  import { parseTheme } from "../../../core/design-system/CustomThemeProvider.js";
13
+ import { useSiweAuth } from "../../../core/hooks/auth/useSiweAuth.js";
13
14
  import type { ConnectButtonProps } from "../../../core/hooks/connection/ConnectButtonProps.js";
14
15
  import { useActiveAccount } from "../../hooks/wallets/useActiveAccount.js";
15
16
  import { useActiveWallet } from "../../hooks/wallets/useActiveWallet.js";
@@ -43,6 +44,7 @@ export function ConnectButton(props: ConnectButtonProps) {
43
44
  const wallet = useActiveWallet();
44
45
  const account = useActiveAccount();
45
46
  const status = useActiveWalletConnectionStatus();
47
+ const siweAuth = useSiweAuth(wallet, props.auth);
46
48
  useAutoConnect(props);
47
49
 
48
50
  const fadeAnim = useRef(new Animated.Value(0)); // For background opacity
@@ -84,10 +86,14 @@ export function ConnectButton(props: ConnectButtonProps) {
84
86
  slideAnim.current.setValue(screenHeight);
85
87
  });
86
88
  }, []);
89
+ const needsAuth = siweAuth.requiresAuth && !siweAuth.isLoggedIn;
90
+ const isConnected = wallet && account;
91
+ const isConnectedAndNotAuth = isConnected && needsAuth;
92
+ const isConnectedAndAuth = isConnected && !needsAuth;
87
93
 
88
94
  return (
89
95
  <View>
90
- {wallet && account ? (
96
+ {isConnectedAndAuth ? (
91
97
  <ConnectedButton
92
98
  openModal={() => openModal()}
93
99
  onClose={closeModal}
@@ -97,7 +103,10 @@ export function ConnectButton(props: ConnectButtonProps) {
97
103
  />
98
104
  ) : (
99
105
  <ThemedButton theme={theme} onPress={() => openModal()}>
100
- {status === "connecting" ? (
106
+ {status === "connecting" ||
107
+ siweAuth.isLoggingIn ||
108
+ siweAuth.isLoading ||
109
+ siweAuth.isLoggingOut ? (
101
110
  <>
102
111
  <ThemedSpinner color={theme.colors.primaryButtonText} />
103
112
  </>
@@ -107,7 +116,9 @@ export function ConnectButton(props: ConnectButtonProps) {
107
116
  type="defaultSemiBold"
108
117
  style={{ color: theme.colors.primaryButtonText }}
109
118
  >
110
- {props.connectButton?.label || "Connect Wallet"}
119
+ {isConnectedAndNotAuth
120
+ ? props.signInButton?.label || "Sign In"
121
+ : props.connectButton?.label || "Connect Wallet"}
111
122
  </ThemedText>
112
123
  )}
113
124
  </ThemedButton>
@@ -129,7 +140,7 @@ export function ConnectButton(props: ConnectButtonProps) {
129
140
  >
130
141
  <Pressable style={styles.dismissArea} onPress={closeModal} />
131
142
  <View style={styles.bottomSheetContainer}>
132
- {wallet && account ? (
143
+ {isConnectedAndAuth ? (
133
144
  <ConnectedModal
134
145
  {...props}
135
146
  theme={theme}
@@ -144,6 +155,7 @@ export function ConnectButton(props: ConnectButtonProps) {
144
155
  theme={theme}
145
156
  onClose={closeModal}
146
157
  containerType="modal"
158
+ siweAuth={siweAuth}
147
159
  />
148
160
  )}
149
161
  </View>
@@ -6,11 +6,13 @@ import type { InAppWalletAuth } from "../../../../wallets/in-app/core/wallet/typ
6
6
  import type { Wallet } from "../../../../wallets/interfaces/wallet.js";
7
7
  import { parseTheme } from "../../../core/design-system/CustomThemeProvider.js";
8
8
  import type { Theme } from "../../../core/design-system/index.js";
9
+ import { useSiweAuth } from "../../../core/hooks/auth/useSiweAuth.js";
9
10
  import type { ConnectButtonProps } from "../../../core/hooks/connection/ConnectButtonProps.js";
10
11
  import type { ConnectEmbedProps } from "../../../core/hooks/connection/ConnectEmbedProps.js";
11
12
  import { useWalletInfo } from "../../../core/utils/wallet.js";
12
13
  import { radius, spacing } from "../../design-system/index.js";
13
14
  import { useActiveWallet } from "../../hooks/wallets/useActiveWallet.js";
15
+ import { useDisconnect } from "../../hooks/wallets/useDisconnect.js";
14
16
  import { connectionManager } from "../../index.js";
15
17
  import { getDefaultWallets } from "../../wallets/defaultWallets.js";
16
18
  import { type ContainerType, Header } from "../components/Header.js";
@@ -19,7 +21,7 @@ import {
19
21
  WalletImage,
20
22
  getAuthProviderImage,
21
23
  } from "../components/WalletImage.js";
22
- import { ThemedButtonWithIcon } from "../components/button.js";
24
+ import { ThemedButton, ThemedButtonWithIcon } from "../components/button.js";
23
25
  import { Spacer } from "../components/spacer.js";
24
26
  import { ThemedText } from "../components/text.js";
25
27
  import { ThemedView } from "../components/view.js";
@@ -34,7 +36,8 @@ export type ModalState =
34
36
  | { screen: "connecting"; wallet: Wallet; authMethod?: InAppWalletAuth }
35
37
  | { screen: "error"; error: string }
36
38
  | { screen: "otp"; auth: MultiStepAuthProviderType; wallet: Wallet<"inApp"> }
37
- | { screen: "external_wallets" };
39
+ | { screen: "external_wallets" }
40
+ | { screen: "auth" };
38
41
 
39
42
  /**
40
43
  * A component that allows the user to connect their wallet.
@@ -57,12 +60,20 @@ export type ModalState =
57
60
  export function ConnectEmbed(props: ConnectEmbedProps) {
58
61
  const theme = parseTheme(props.theme);
59
62
  const wallet = useActiveWallet();
63
+ const siweAuth = useSiweAuth(wallet, props.auth);
64
+ const needsAuth = siweAuth.requiresAuth && !siweAuth.isLoggedIn;
65
+ const isConnected = wallet && !needsAuth;
60
66
  const adaptedProps = {
61
67
  ...props,
62
68
  connectModal: { ...props },
63
69
  } as ConnectButtonProps;
64
- return wallet ? null : (
65
- <ConnectModal {...adaptedProps} theme={theme} containerType="embed" />
70
+ return isConnected ? null : (
71
+ <ConnectModal
72
+ {...adaptedProps}
73
+ theme={theme}
74
+ containerType="embed"
75
+ siweAuth={siweAuth}
76
+ />
66
77
  );
67
78
  }
68
79
 
@@ -71,6 +82,7 @@ export function ConnectModal(
71
82
  theme: Theme;
72
83
  onClose?: () => void;
73
84
  containerType: ContainerType;
85
+ siweAuth: ReturnType<typeof useSiweAuth>;
74
86
  },
75
87
  ) {
76
88
  const {
@@ -80,8 +92,20 @@ export function ConnectModal(
80
92
  accountAbstraction,
81
93
  onConnect,
82
94
  onClose,
95
+ siweAuth,
83
96
  } = props;
84
- const [modalState, setModalState] = useState<ModalState>({ screen: "base" });
97
+ const wallet = useActiveWallet();
98
+ const needsAuth = wallet && siweAuth.requiresAuth && !siweAuth.isLoggedIn;
99
+ const [modalState, setModalState] = useState<ModalState>(
100
+ needsAuth ? { screen: "auth" } : { screen: "base" },
101
+ );
102
+ const wallets = props.wallets || getDefaultWallets(props);
103
+ const inAppWallet = wallets.find((wallet) => wallet.id === "inApp") as
104
+ | Wallet<"inApp">
105
+ | undefined;
106
+ const externalWallets = wallets.filter((wallet) => wallet.id !== "inApp");
107
+ const showBranding = props.connectModal?.showThirdwebBranding !== false;
108
+
85
109
  const connector = useCallback(
86
110
  async (args: {
87
111
  wallet: Wallet;
@@ -100,22 +124,30 @@ export function ConnectModal(
100
124
  accountAbstraction,
101
125
  onConnect,
102
126
  });
103
- onClose?.();
127
+ if (siweAuth.requiresAuth && !siweAuth.isLoggedIn) {
128
+ // if in-app wallet, signin headlessly
129
+ // TODO (rn) handle signless smart wallets as well
130
+ if (w.id === "inApp") {
131
+ await siweAuth.doLogin();
132
+ onClose?.();
133
+ } else {
134
+ setModalState({
135
+ screen: "auth",
136
+ });
137
+ }
138
+ } else {
139
+ onClose?.();
140
+ }
104
141
  } catch (error) {
105
142
  setModalState({
106
143
  screen: "error",
107
- error: (error as Error)?.message || "unknown error",
144
+ error: (error as Error)?.message || "Unknown error",
108
145
  });
109
146
  }
110
147
  },
111
- [client, accountAbstraction, onConnect, onClose],
148
+ [client, accountAbstraction, onConnect, onClose, siweAuth],
112
149
  );
113
- const wallets = props.wallets || getDefaultWallets(props);
114
- const inAppWallet = wallets.find((wallet) => wallet.id === "inApp") as
115
- | Wallet<"inApp">
116
- | undefined;
117
- const externalWallets = wallets.filter((wallet) => wallet.id !== "inApp");
118
- const showBranding = props.connectModal?.showThirdwebBranding !== false;
150
+
119
151
  let content: JSX.Element;
120
152
 
121
153
  switch (modalState.screen) {
@@ -192,7 +224,7 @@ export function ConnectModal(
192
224
  ) : (
193
225
  <Spacer size="lg" />
194
226
  )}
195
- <LoadingView
227
+ <WalletLoadingView
196
228
  theme={theme}
197
229
  wallet={modalState.wallet}
198
230
  authProvider={modalState.authMethod}
@@ -206,6 +238,37 @@ export function ConnectModal(
206
238
  );
207
239
  break;
208
240
  }
241
+ case "auth": {
242
+ content = (
243
+ <>
244
+ <Header
245
+ theme={theme}
246
+ onClose={props.onClose}
247
+ containerType={containerType}
248
+ onBack={props.onClose}
249
+ title={props.connectModal?.title || "Sign in"}
250
+ />
251
+ {containerType === "modal" ? (
252
+ <View style={{ flex: 1 }} />
253
+ ) : (
254
+ <Spacer size="lg" />
255
+ )}
256
+ <SignInView
257
+ theme={theme}
258
+ siweAuth={siweAuth}
259
+ onSignIn={() => props.onClose?.()}
260
+ onError={(error) => setModalState({ screen: "error", error })}
261
+ onDisconnect={() => setModalState({ screen: "base" })}
262
+ />
263
+ {containerType === "modal" ? (
264
+ <View style={{ flex: 1 }} />
265
+ ) : (
266
+ <Spacer size="md" />
267
+ )}
268
+ </>
269
+ );
270
+ break;
271
+ }
209
272
  case "error": {
210
273
  content = (
211
274
  <>
@@ -319,11 +382,15 @@ export function ConnectModal(
319
382
  );
320
383
  }
321
384
 
322
- function LoadingView({
385
+ function WalletLoadingView({
323
386
  theme,
324
387
  wallet,
325
388
  authProvider,
326
- }: { theme: Theme; wallet: Wallet; authProvider?: InAppWalletAuth }) {
389
+ }: {
390
+ theme: Theme;
391
+ wallet: Wallet;
392
+ authProvider?: InAppWalletAuth;
393
+ }) {
327
394
  const walletInfo = useWalletInfo(wallet.id);
328
395
  return (
329
396
  <View
@@ -335,7 +402,7 @@ function LoadingView({
335
402
  paddingVertical: spacing.xl,
336
403
  }}
337
404
  >
338
- <WalletLoadingThumbnail theme={theme} imageSize={100}>
405
+ <WalletLoadingThumbnail theme={theme} imageSize={100} animate={true}>
339
406
  {authProvider ? (
340
407
  <View
341
408
  style={{
@@ -363,13 +430,108 @@ function LoadingView({
363
430
  <Spacer size="sm" />
364
431
  <ThemedText theme={theme} type="subtext">
365
432
  {authProvider
366
- ? `Sign into your ${capitalizeFirstLetter(authProvider)} account`
433
+ ? `Signing into your ${capitalizeFirstLetter(authProvider)} account`
367
434
  : `Accept the connection request in ${walletInfo.data?.name}`}
368
435
  </ThemedText>
369
436
  </View>
370
437
  );
371
438
  }
372
439
 
440
+ function SignInView({
441
+ theme,
442
+ siweAuth,
443
+ onSignIn,
444
+ onError,
445
+ onDisconnect,
446
+ }: {
447
+ theme: Theme;
448
+ siweAuth: ReturnType<typeof useSiweAuth>;
449
+ onSignIn: () => void;
450
+ onError: (error: string) => void;
451
+ onDisconnect: () => void;
452
+ }) {
453
+ const wallet = useActiveWallet();
454
+ const walletInfo = useWalletInfo(wallet?.id);
455
+ const { disconnect } = useDisconnect();
456
+ const isSigningIn = siweAuth.isLoggingIn || siweAuth.isLoading;
457
+ return (
458
+ wallet && (
459
+ <View
460
+ style={{
461
+ flexDirection: "column",
462
+ flex: 1,
463
+ alignItems: "center",
464
+ justifyContent: "center",
465
+ padding: spacing.xl,
466
+ }}
467
+ >
468
+ <WalletLoadingThumbnail
469
+ theme={theme}
470
+ imageSize={100}
471
+ animate={isSigningIn}
472
+ >
473
+ <WalletImage theme={theme} size={90} wallet={wallet} />
474
+ </WalletLoadingThumbnail>
475
+ <Spacer size="xl" />
476
+ <ThemedText theme={theme} type="subtitle">
477
+ {"Complete sign in"}
478
+ </ThemedText>
479
+ <Spacer size="xs" />
480
+ <ThemedText theme={theme} type="subtext">
481
+ Sign login request in {walletInfo.data?.name} to continue
482
+ </ThemedText>
483
+ <Spacer size="xl" />
484
+ <ThemedButton
485
+ theme={theme}
486
+ variant="accent"
487
+ disabled={isSigningIn}
488
+ style={{ width: "100%" }}
489
+ onPress={async () => {
490
+ try {
491
+ await siweAuth.doLogin();
492
+ onSignIn();
493
+ } catch (e) {
494
+ onError((e as Error)?.message || "Unknown error");
495
+ }
496
+ }}
497
+ >
498
+ <ThemedText
499
+ theme={theme}
500
+ type="defaultSemiBold"
501
+ style={{
502
+ color: theme.colors.accentButtonText,
503
+ }}
504
+ >
505
+ Sign Login Request
506
+ </ThemedText>
507
+ </ThemedButton>
508
+ <Spacer size="md" />
509
+ <ThemedButton
510
+ theme={theme}
511
+ variant="secondary"
512
+ disabled={isSigningIn}
513
+ style={{ width: "100%" }}
514
+ onPress={async () => {
515
+ disconnect(wallet);
516
+ siweAuth.doLogout();
517
+ onDisconnect();
518
+ }}
519
+ >
520
+ <ThemedText
521
+ theme={theme}
522
+ type="defaultSemiBold"
523
+ style={{
524
+ color: theme.colors.accentButtonText,
525
+ }}
526
+ >
527
+ Disconnect
528
+ </ThemedText>
529
+ </ThemedButton>
530
+ </View>
531
+ )
532
+ );
533
+ }
534
+
373
535
  function OrDivider({ theme }: { theme: Theme }) {
374
536
  return (
375
537
  <View
@@ -5,6 +5,7 @@ import { getContract } from "../../../../contract/contract.js";
5
5
  import { isContractDeployed } from "../../../../utils/bytecode/is-contract-deployed.js";
6
6
  import type { Account, Wallet } from "../../../../wallets/interfaces/wallet.js";
7
7
  import type { Theme } from "../../../core/design-system/index.js";
8
+ import { useSiweAuth } from "../../../core/hooks/auth/useSiweAuth.js";
8
9
  import type { ConnectButtonProps } from "../../../core/hooks/connection/ConnectButtonProps.js";
9
10
  import { useChainName } from "../../../core/hooks/others/useChainQuery.js";
10
11
  import { hasSmartAccount } from "../../../core/utils/isSmartWallet.js";
@@ -290,12 +291,14 @@ const ViewFunds = (props: ConnectedModalPropsInner) => {
290
291
  const DisconnectWallet = (props: ConnectedModalProps) => {
291
292
  const { wallet, theme, onClose } = props;
292
293
  const { disconnect } = useDisconnect();
294
+ const siweAuth = useSiweAuth(wallet, props.auth);
293
295
  return (
294
296
  <TouchableOpacity
295
297
  style={styles.walletMenuRow}
296
298
  onPress={() => {
297
299
  onClose?.();
298
300
  disconnect(wallet);
301
+ siweAuth.doLogout();
299
302
  }}
300
303
  >
301
304
  <RNImage
@@ -14,6 +14,7 @@ interface Props {
14
14
  children?: React.ReactNode;
15
15
  imageSize: number;
16
16
  showError?: boolean;
17
+ animate: boolean;
17
18
  }
18
19
 
19
20
  function WalletLoadingThumbnail({
@@ -21,10 +22,12 @@ function WalletLoadingThumbnail({
21
22
  children,
22
23
  showError,
23
24
  imageSize,
25
+ animate,
24
26
  }: Props) {
25
27
  const spinValue = useRef(new Animated.Value(0));
26
28
 
27
29
  useEffect(() => {
30
+ if (!animate) return;
28
31
  const animation = Animated.timing(spinValue.current, {
29
32
  toValue: 1,
30
33
  duration: 1150,
@@ -38,7 +41,7 @@ function WalletLoadingThumbnail({
38
41
  return () => {
39
42
  loop.stop();
40
43
  };
41
- }, []);
44
+ }, [animate]);
42
45
 
43
46
  const spin = spinValue.current.interpolate({
44
47
  inputRange: [0, 1],
@@ -53,18 +56,20 @@ function WalletLoadingThumbnail({
53
56
  viewBox={`0 0 ${imageSize + PADDING} ${imageSize + PADDING}`}
54
57
  style={styles.loader}
55
58
  >
56
- <AnimatedRect
57
- x="2"
58
- y="2"
59
- width={imageSize + INTERNAL_PADDING}
60
- height={imageSize + INTERNAL_PADDING}
61
- rx={15}
62
- stroke={showError ? "transparent" : theme.colors.accentButtonBg}
63
- strokeWidth={3}
64
- fill="transparent"
65
- strokeDasharray={"100 300"}
66
- strokeDashoffset={spin}
67
- />
59
+ {animate && (
60
+ <AnimatedRect
61
+ x="2"
62
+ y="2"
63
+ width={imageSize + INTERNAL_PADDING}
64
+ height={imageSize + INTERNAL_PADDING}
65
+ rx={15}
66
+ stroke={showError ? "transparent" : theme.colors.accentButtonBg}
67
+ strokeWidth={3}
68
+ fill="transparent"
69
+ strokeDasharray={"100 300"}
70
+ strokeDashoffset={spin}
71
+ />
72
+ )}
68
73
  </Svg>
69
74
  {showError && (
70
75
  <View
@@ -536,7 +536,9 @@ function DetailsModal(props: {
536
536
  >
537
537
  <CoinsIcon size={iconSize.md} />
538
538
  <Text color="primaryText">
539
- {props.supportedNFTs ? "View Assets" : "View Funds"}
539
+ {props.supportedNFTs
540
+ ? locale.viewFunds.viewAssets
541
+ : locale.viewFunds.title}
540
542
  </Text>
541
543
  </MenuButton>
542
544
 
@@ -550,7 +552,7 @@ function DetailsModal(props: {
550
552
  }}
551
553
  >
552
554
  <OutlineWalletIcon size={iconSize.md} />
553
- <Text color="primaryText">Manage Wallet</Text>
555
+ <Text color="primaryText">{props.locale.manageWallet.title}</Text>
554
556
  </MenuButton>
555
557
 
556
558
  {/* Switch to Personal Wallet */}
@@ -702,6 +704,7 @@ function DetailsModal(props: {
702
704
  }}
703
705
  setScreen={setScreen}
704
706
  client={client}
707
+ connectLocale={locale}
705
708
  />
706
709
  );
707
710
  } else {
@@ -713,6 +716,7 @@ function DetailsModal(props: {
713
716
  setScreen("main");
714
717
  }}
715
718
  client={client}
719
+ connectLocale={locale}
716
720
  />
717
721
  );
718
722
  }
@@ -725,6 +729,7 @@ function DetailsModal(props: {
725
729
  setScreen("main");
726
730
  }}
727
731
  client={client}
732
+ connectLocale={locale}
728
733
  />
729
734
  );
730
735
  } else if (screen === "view-tokens") {
@@ -735,6 +740,7 @@ function DetailsModal(props: {
735
740
  setScreen("main");
736
741
  }}
737
742
  client={client}
743
+ connectLocale={locale}
738
744
  />
739
745
  );
740
746
  } else if (screen === "private-key") {
@@ -330,8 +330,6 @@ export function NetworkSelectorContent(props: NetworkSelectorContentProps) {
330
330
  chains: [c],
331
331
  });
332
332
  }
333
-
334
- return filteredChainSectionsValue;
335
333
  }
336
334
 
337
335
  return filteredChainSectionsValue;
@@ -464,6 +462,7 @@ export function NetworkSelectorContent(props: NetworkSelectorContentProps) {
464
462
  variant="link"
465
463
  onClick={() => {
466
464
  onCustomClick();
465
+ props.closeModal();
467
466
  }}
468
467
  style={{
469
468
  display: "flex",