@xyo-network/react-connected-accounts 2.81.9 → 2.82.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (510) hide show
  1. package/dist/browser/classes/index.d.cts +1 -1
  2. package/dist/browser/classes/index.d.mts +1 -1
  3. package/dist/browser/classes/index.d.ts +1 -1
  4. package/dist/browser/components/ConnectedAccountsFlexbox.d.cts +2 -1
  5. package/dist/browser/components/ConnectedAccountsFlexbox.d.cts.map +1 -1
  6. package/dist/browser/components/ConnectedAccountsFlexbox.d.mts +2 -1
  7. package/dist/browser/components/ConnectedAccountsFlexbox.d.mts.map +1 -1
  8. package/dist/browser/components/ConnectedAccountsFlexbox.d.ts +2 -1
  9. package/dist/browser/components/ConnectedAccountsFlexbox.d.ts.map +1 -1
  10. package/dist/browser/components/index.d.cts +2 -2
  11. package/dist/browser/components/index.d.cts.map +1 -1
  12. package/dist/browser/components/index.d.mts +2 -2
  13. package/dist/browser/components/index.d.mts.map +1 -1
  14. package/dist/browser/components/index.d.ts +2 -2
  15. package/dist/browser/components/index.d.ts.map +1 -1
  16. package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.cts +1 -0
  17. package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.cts.map +1 -1
  18. package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.mts +1 -0
  19. package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.mts.map +1 -1
  20. package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.ts +1 -0
  21. package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.ts.map +1 -1
  22. package/dist/browser/components/wallet/dialogs/connect/Dialog.d.cts +2 -1
  23. package/dist/browser/components/wallet/dialogs/connect/Dialog.d.cts.map +1 -1
  24. package/dist/browser/components/wallet/dialogs/connect/Dialog.d.mts +2 -1
  25. package/dist/browser/components/wallet/dialogs/connect/Dialog.d.mts.map +1 -1
  26. package/dist/browser/components/wallet/dialogs/connect/Dialog.d.ts +2 -1
  27. package/dist/browser/components/wallet/dialogs/connect/Dialog.d.ts.map +1 -1
  28. package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts +1 -0
  29. package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts.map +1 -1
  30. package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts +1 -0
  31. package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts.map +1 -1
  32. package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts +1 -0
  33. package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts.map +1 -1
  34. package/dist/browser/components/wallet/dialogs/connect/Permissions.d.cts +1 -0
  35. package/dist/browser/components/wallet/dialogs/connect/Permissions.d.cts.map +1 -1
  36. package/dist/browser/components/wallet/dialogs/connect/Permissions.d.mts +1 -0
  37. package/dist/browser/components/wallet/dialogs/connect/Permissions.d.mts.map +1 -1
  38. package/dist/browser/components/wallet/dialogs/connect/Permissions.d.ts +1 -0
  39. package/dist/browser/components/wallet/dialogs/connect/Permissions.d.ts.map +1 -1
  40. package/dist/browser/components/wallet/dialogs/connect/index.d.cts +2 -2
  41. package/dist/browser/components/wallet/dialogs/connect/index.d.cts.map +1 -1
  42. package/dist/browser/components/wallet/dialogs/connect/index.d.mts +2 -2
  43. package/dist/browser/components/wallet/dialogs/connect/index.d.mts.map +1 -1
  44. package/dist/browser/components/wallet/dialogs/connect/index.d.ts +2 -2
  45. package/dist/browser/components/wallet/dialogs/connect/index.d.ts.map +1 -1
  46. package/dist/browser/components/wallet/dialogs/index.d.cts +2 -2
  47. package/dist/browser/components/wallet/dialogs/index.d.mts +2 -2
  48. package/dist/browser/components/wallet/dialogs/index.d.ts +2 -2
  49. package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.cts +2 -1
  50. package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.cts.map +1 -1
  51. package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.mts +2 -1
  52. package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.mts.map +1 -1
  53. package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.ts +2 -1
  54. package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.ts.map +1 -1
  55. package/dist/browser/components/wallet/dialogs/revoke/index.d.cts +1 -1
  56. package/dist/browser/components/wallet/dialogs/revoke/index.d.cts.map +1 -1
  57. package/dist/browser/components/wallet/dialogs/revoke/index.d.mts +1 -1
  58. package/dist/browser/components/wallet/dialogs/revoke/index.d.mts.map +1 -1
  59. package/dist/browser/components/wallet/dialogs/revoke/index.d.ts +1 -1
  60. package/dist/browser/components/wallet/dialogs/revoke/index.d.ts.map +1 -1
  61. package/dist/browser/components/wallet/index.d.cts +2 -2
  62. package/dist/browser/components/wallet/index.d.mts +2 -2
  63. package/dist/browser/components/wallet/index.d.ts +2 -2
  64. package/dist/browser/components/wallet/lib/index.d.cts +2 -2
  65. package/dist/browser/components/wallet/lib/index.d.mts +2 -2
  66. package/dist/browser/components/wallet/lib/index.d.ts +2 -2
  67. package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.cts +1 -0
  68. package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.cts.map +1 -1
  69. package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.mts +1 -0
  70. package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.mts.map +1 -1
  71. package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.ts +1 -0
  72. package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.ts.map +1 -1
  73. package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.cts +2 -1
  74. package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.cts.map +1 -1
  75. package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.mts +2 -1
  76. package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.mts.map +1 -1
  77. package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.ts +2 -1
  78. package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.ts.map +1 -1
  79. package/dist/browser/components/wallet/table/cells/Accounts.d.cts +2 -1
  80. package/dist/browser/components/wallet/table/cells/Accounts.d.cts.map +1 -1
  81. package/dist/browser/components/wallet/table/cells/Accounts.d.mts +2 -1
  82. package/dist/browser/components/wallet/table/cells/Accounts.d.mts.map +1 -1
  83. package/dist/browser/components/wallet/table/cells/Accounts.d.ts +2 -1
  84. package/dist/browser/components/wallet/table/cells/Accounts.d.ts.map +1 -1
  85. package/dist/browser/components/wallet/table/cells/Actions.d.cts +2 -1
  86. package/dist/browser/components/wallet/table/cells/Actions.d.cts.map +1 -1
  87. package/dist/browser/components/wallet/table/cells/Actions.d.mts +2 -1
  88. package/dist/browser/components/wallet/table/cells/Actions.d.mts.map +1 -1
  89. package/dist/browser/components/wallet/table/cells/Actions.d.ts +2 -1
  90. package/dist/browser/components/wallet/table/cells/Actions.d.ts.map +1 -1
  91. package/dist/browser/components/wallet/table/cells/Cells.d.cts +1 -1
  92. package/dist/browser/components/wallet/table/cells/Cells.d.mts +1 -1
  93. package/dist/browser/components/wallet/table/cells/Cells.d.ts +1 -1
  94. package/dist/browser/components/wallet/table/cells/ChainName.d.cts +2 -1
  95. package/dist/browser/components/wallet/table/cells/ChainName.d.cts.map +1 -1
  96. package/dist/browser/components/wallet/table/cells/ChainName.d.mts +2 -1
  97. package/dist/browser/components/wallet/table/cells/ChainName.d.mts.map +1 -1
  98. package/dist/browser/components/wallet/table/cells/ChainName.d.ts +2 -1
  99. package/dist/browser/components/wallet/table/cells/ChainName.d.ts.map +1 -1
  100. package/dist/browser/components/wallet/table/cells/State.d.cts +2 -1
  101. package/dist/browser/components/wallet/table/cells/State.d.cts.map +1 -1
  102. package/dist/browser/components/wallet/table/cells/State.d.mts +2 -1
  103. package/dist/browser/components/wallet/table/cells/State.d.mts.map +1 -1
  104. package/dist/browser/components/wallet/table/cells/State.d.ts +2 -1
  105. package/dist/browser/components/wallet/table/cells/State.d.ts.map +1 -1
  106. package/dist/browser/components/wallet/table/cells/Wallet.d.cts +2 -1
  107. package/dist/browser/components/wallet/table/cells/Wallet.d.cts.map +1 -1
  108. package/dist/browser/components/wallet/table/cells/Wallet.d.mts +2 -1
  109. package/dist/browser/components/wallet/table/cells/Wallet.d.mts.map +1 -1
  110. package/dist/browser/components/wallet/table/cells/Wallet.d.ts +2 -1
  111. package/dist/browser/components/wallet/table/cells/Wallet.d.ts.map +1 -1
  112. package/dist/browser/components/wallet/table/cells/index.d.cts +6 -6
  113. package/dist/browser/components/wallet/table/cells/index.d.cts.map +1 -1
  114. package/dist/browser/components/wallet/table/cells/index.d.mts +6 -6
  115. package/dist/browser/components/wallet/table/cells/index.d.mts.map +1 -1
  116. package/dist/browser/components/wallet/table/cells/index.d.ts +6 -6
  117. package/dist/browser/components/wallet/table/cells/index.d.ts.map +1 -1
  118. package/dist/browser/components/wallet/table/cells/lib/index.d.cts +1 -1
  119. package/dist/browser/components/wallet/table/cells/lib/index.d.cts.map +1 -1
  120. package/dist/browser/components/wallet/table/cells/lib/index.d.mts +1 -1
  121. package/dist/browser/components/wallet/table/cells/lib/index.d.mts.map +1 -1
  122. package/dist/browser/components/wallet/table/cells/lib/index.d.ts +1 -1
  123. package/dist/browser/components/wallet/table/cells/lib/index.d.ts.map +1 -1
  124. package/dist/browser/components/wallet/table/hooks/index.d.cts +1 -1
  125. package/dist/browser/components/wallet/table/hooks/index.d.cts.map +1 -1
  126. package/dist/browser/components/wallet/table/hooks/index.d.mts +1 -1
  127. package/dist/browser/components/wallet/table/hooks/index.d.mts.map +1 -1
  128. package/dist/browser/components/wallet/table/hooks/index.d.ts +1 -1
  129. package/dist/browser/components/wallet/table/hooks/index.d.ts.map +1 -1
  130. package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.cts +1 -1
  131. package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.mts +1 -1
  132. package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.ts +1 -1
  133. package/dist/browser/components/wallet/table/index.d.cts +4 -4
  134. package/dist/browser/components/wallet/table/index.d.cts.map +1 -1
  135. package/dist/browser/components/wallet/table/index.d.mts +4 -4
  136. package/dist/browser/components/wallet/table/index.d.mts.map +1 -1
  137. package/dist/browser/components/wallet/table/index.d.ts +4 -4
  138. package/dist/browser/components/wallet/table/index.d.ts.map +1 -1
  139. package/dist/browser/hooks/index.d.cts +2 -2
  140. package/dist/browser/hooks/index.d.cts.map +1 -1
  141. package/dist/browser/hooks/index.d.mts +2 -2
  142. package/dist/browser/hooks/index.d.mts.map +1 -1
  143. package/dist/browser/hooks/index.d.ts +2 -2
  144. package/dist/browser/hooks/index.d.ts.map +1 -1
  145. package/dist/browser/hooks/useDetectWallets.d.cts.map +1 -1
  146. package/dist/browser/hooks/useDetectWallets.d.mts.map +1 -1
  147. package/dist/browser/hooks/useDetectWallets.d.ts.map +1 -1
  148. package/dist/browser/hooks/useEnabledWallets.d.cts +1 -1
  149. package/dist/browser/hooks/useEnabledWallets.d.mts +1 -1
  150. package/dist/browser/hooks/useEnabledWallets.d.ts +1 -1
  151. package/dist/browser/index.cjs +339 -260
  152. package/dist/browser/index.cjs.map +1 -1
  153. package/dist/browser/index.d.cts +3 -3
  154. package/dist/browser/index.d.mts +3 -3
  155. package/dist/browser/index.d.ts +3 -3
  156. package/dist/browser/index.mjs +623 -0
  157. package/dist/browser/index.mjs.map +1 -0
  158. package/dist/neutral/classes/index.d.cts +1 -1
  159. package/dist/neutral/classes/index.d.mts +1 -1
  160. package/dist/neutral/classes/index.d.ts +1 -1
  161. package/dist/neutral/components/ConnectedAccountsFlexbox.d.cts +2 -1
  162. package/dist/neutral/components/ConnectedAccountsFlexbox.d.cts.map +1 -1
  163. package/dist/neutral/components/ConnectedAccountsFlexbox.d.mts +2 -1
  164. package/dist/neutral/components/ConnectedAccountsFlexbox.d.mts.map +1 -1
  165. package/dist/neutral/components/ConnectedAccountsFlexbox.d.ts +2 -1
  166. package/dist/neutral/components/ConnectedAccountsFlexbox.d.ts.map +1 -1
  167. package/dist/neutral/components/index.d.cts +2 -2
  168. package/dist/neutral/components/index.d.cts.map +1 -1
  169. package/dist/neutral/components/index.d.mts +2 -2
  170. package/dist/neutral/components/index.d.mts.map +1 -1
  171. package/dist/neutral/components/index.d.ts +2 -2
  172. package/dist/neutral/components/index.d.ts.map +1 -1
  173. package/dist/neutral/components/wallet/dialogs/connect/CheckboxFormControl.d.cts +1 -0
  174. package/dist/neutral/components/wallet/dialogs/connect/CheckboxFormControl.d.cts.map +1 -1
  175. package/dist/neutral/components/wallet/dialogs/connect/CheckboxFormControl.d.mts +1 -0
  176. package/dist/neutral/components/wallet/dialogs/connect/CheckboxFormControl.d.mts.map +1 -1
  177. package/dist/neutral/components/wallet/dialogs/connect/CheckboxFormControl.d.ts +1 -0
  178. package/dist/neutral/components/wallet/dialogs/connect/CheckboxFormControl.d.ts.map +1 -1
  179. package/dist/neutral/components/wallet/dialogs/connect/Dialog.d.cts +2 -1
  180. package/dist/neutral/components/wallet/dialogs/connect/Dialog.d.cts.map +1 -1
  181. package/dist/neutral/components/wallet/dialogs/connect/Dialog.d.mts +2 -1
  182. package/dist/neutral/components/wallet/dialogs/connect/Dialog.d.mts.map +1 -1
  183. package/dist/neutral/components/wallet/dialogs/connect/Dialog.d.ts +2 -1
  184. package/dist/neutral/components/wallet/dialogs/connect/Dialog.d.ts.map +1 -1
  185. package/dist/neutral/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts +1 -0
  186. package/dist/neutral/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts.map +1 -1
  187. package/dist/neutral/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts +1 -0
  188. package/dist/neutral/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts.map +1 -1
  189. package/dist/neutral/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts +1 -0
  190. package/dist/neutral/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts.map +1 -1
  191. package/dist/neutral/components/wallet/dialogs/connect/Permissions.d.cts +1 -0
  192. package/dist/neutral/components/wallet/dialogs/connect/Permissions.d.cts.map +1 -1
  193. package/dist/neutral/components/wallet/dialogs/connect/Permissions.d.mts +1 -0
  194. package/dist/neutral/components/wallet/dialogs/connect/Permissions.d.mts.map +1 -1
  195. package/dist/neutral/components/wallet/dialogs/connect/Permissions.d.ts +1 -0
  196. package/dist/neutral/components/wallet/dialogs/connect/Permissions.d.ts.map +1 -1
  197. package/dist/neutral/components/wallet/dialogs/connect/index.d.cts +2 -2
  198. package/dist/neutral/components/wallet/dialogs/connect/index.d.cts.map +1 -1
  199. package/dist/neutral/components/wallet/dialogs/connect/index.d.mts +2 -2
  200. package/dist/neutral/components/wallet/dialogs/connect/index.d.mts.map +1 -1
  201. package/dist/neutral/components/wallet/dialogs/connect/index.d.ts +2 -2
  202. package/dist/neutral/components/wallet/dialogs/connect/index.d.ts.map +1 -1
  203. package/dist/neutral/components/wallet/dialogs/index.d.cts +2 -2
  204. package/dist/neutral/components/wallet/dialogs/index.d.mts +2 -2
  205. package/dist/neutral/components/wallet/dialogs/index.d.ts +2 -2
  206. package/dist/neutral/components/wallet/dialogs/revoke/Dialog.d.cts +2 -1
  207. package/dist/neutral/components/wallet/dialogs/revoke/Dialog.d.cts.map +1 -1
  208. package/dist/neutral/components/wallet/dialogs/revoke/Dialog.d.mts +2 -1
  209. package/dist/neutral/components/wallet/dialogs/revoke/Dialog.d.mts.map +1 -1
  210. package/dist/neutral/components/wallet/dialogs/revoke/Dialog.d.ts +2 -1
  211. package/dist/neutral/components/wallet/dialogs/revoke/Dialog.d.ts.map +1 -1
  212. package/dist/neutral/components/wallet/dialogs/revoke/index.d.cts +1 -1
  213. package/dist/neutral/components/wallet/dialogs/revoke/index.d.cts.map +1 -1
  214. package/dist/neutral/components/wallet/dialogs/revoke/index.d.mts +1 -1
  215. package/dist/neutral/components/wallet/dialogs/revoke/index.d.mts.map +1 -1
  216. package/dist/neutral/components/wallet/dialogs/revoke/index.d.ts +1 -1
  217. package/dist/neutral/components/wallet/dialogs/revoke/index.d.ts.map +1 -1
  218. package/dist/neutral/components/wallet/index.d.cts +2 -2
  219. package/dist/neutral/components/wallet/index.d.mts +2 -2
  220. package/dist/neutral/components/wallet/index.d.ts +2 -2
  221. package/dist/neutral/components/wallet/lib/index.d.cts +2 -2
  222. package/dist/neutral/components/wallet/lib/index.d.mts +2 -2
  223. package/dist/neutral/components/wallet/lib/index.d.ts +2 -2
  224. package/dist/neutral/components/wallet/table/ConnectedWalletsTable.d.cts +1 -0
  225. package/dist/neutral/components/wallet/table/ConnectedWalletsTable.d.cts.map +1 -1
  226. package/dist/neutral/components/wallet/table/ConnectedWalletsTable.d.mts +1 -0
  227. package/dist/neutral/components/wallet/table/ConnectedWalletsTable.d.mts.map +1 -1
  228. package/dist/neutral/components/wallet/table/ConnectedWalletsTable.d.ts +1 -0
  229. package/dist/neutral/components/wallet/table/ConnectedWalletsTable.d.ts.map +1 -1
  230. package/dist/neutral/components/wallet/table/ConnectedWalletsTableRow.d.cts +2 -1
  231. package/dist/neutral/components/wallet/table/ConnectedWalletsTableRow.d.cts.map +1 -1
  232. package/dist/neutral/components/wallet/table/ConnectedWalletsTableRow.d.mts +2 -1
  233. package/dist/neutral/components/wallet/table/ConnectedWalletsTableRow.d.mts.map +1 -1
  234. package/dist/neutral/components/wallet/table/ConnectedWalletsTableRow.d.ts +2 -1
  235. package/dist/neutral/components/wallet/table/ConnectedWalletsTableRow.d.ts.map +1 -1
  236. package/dist/neutral/components/wallet/table/cells/Accounts.d.cts +2 -1
  237. package/dist/neutral/components/wallet/table/cells/Accounts.d.cts.map +1 -1
  238. package/dist/neutral/components/wallet/table/cells/Accounts.d.mts +2 -1
  239. package/dist/neutral/components/wallet/table/cells/Accounts.d.mts.map +1 -1
  240. package/dist/neutral/components/wallet/table/cells/Accounts.d.ts +2 -1
  241. package/dist/neutral/components/wallet/table/cells/Accounts.d.ts.map +1 -1
  242. package/dist/neutral/components/wallet/table/cells/Actions.d.cts +2 -1
  243. package/dist/neutral/components/wallet/table/cells/Actions.d.cts.map +1 -1
  244. package/dist/neutral/components/wallet/table/cells/Actions.d.mts +2 -1
  245. package/dist/neutral/components/wallet/table/cells/Actions.d.mts.map +1 -1
  246. package/dist/neutral/components/wallet/table/cells/Actions.d.ts +2 -1
  247. package/dist/neutral/components/wallet/table/cells/Actions.d.ts.map +1 -1
  248. package/dist/neutral/components/wallet/table/cells/Cells.d.cts +1 -1
  249. package/dist/neutral/components/wallet/table/cells/Cells.d.mts +1 -1
  250. package/dist/neutral/components/wallet/table/cells/Cells.d.ts +1 -1
  251. package/dist/neutral/components/wallet/table/cells/ChainName.d.cts +2 -1
  252. package/dist/neutral/components/wallet/table/cells/ChainName.d.cts.map +1 -1
  253. package/dist/neutral/components/wallet/table/cells/ChainName.d.mts +2 -1
  254. package/dist/neutral/components/wallet/table/cells/ChainName.d.mts.map +1 -1
  255. package/dist/neutral/components/wallet/table/cells/ChainName.d.ts +2 -1
  256. package/dist/neutral/components/wallet/table/cells/ChainName.d.ts.map +1 -1
  257. package/dist/neutral/components/wallet/table/cells/State.d.cts +2 -1
  258. package/dist/neutral/components/wallet/table/cells/State.d.cts.map +1 -1
  259. package/dist/neutral/components/wallet/table/cells/State.d.mts +2 -1
  260. package/dist/neutral/components/wallet/table/cells/State.d.mts.map +1 -1
  261. package/dist/neutral/components/wallet/table/cells/State.d.ts +2 -1
  262. package/dist/neutral/components/wallet/table/cells/State.d.ts.map +1 -1
  263. package/dist/neutral/components/wallet/table/cells/Wallet.d.cts +2 -1
  264. package/dist/neutral/components/wallet/table/cells/Wallet.d.cts.map +1 -1
  265. package/dist/neutral/components/wallet/table/cells/Wallet.d.mts +2 -1
  266. package/dist/neutral/components/wallet/table/cells/Wallet.d.mts.map +1 -1
  267. package/dist/neutral/components/wallet/table/cells/Wallet.d.ts +2 -1
  268. package/dist/neutral/components/wallet/table/cells/Wallet.d.ts.map +1 -1
  269. package/dist/neutral/components/wallet/table/cells/index.d.cts +6 -6
  270. package/dist/neutral/components/wallet/table/cells/index.d.cts.map +1 -1
  271. package/dist/neutral/components/wallet/table/cells/index.d.mts +6 -6
  272. package/dist/neutral/components/wallet/table/cells/index.d.mts.map +1 -1
  273. package/dist/neutral/components/wallet/table/cells/index.d.ts +6 -6
  274. package/dist/neutral/components/wallet/table/cells/index.d.ts.map +1 -1
  275. package/dist/neutral/components/wallet/table/cells/lib/index.d.cts +1 -1
  276. package/dist/neutral/components/wallet/table/cells/lib/index.d.cts.map +1 -1
  277. package/dist/neutral/components/wallet/table/cells/lib/index.d.mts +1 -1
  278. package/dist/neutral/components/wallet/table/cells/lib/index.d.mts.map +1 -1
  279. package/dist/neutral/components/wallet/table/cells/lib/index.d.ts +1 -1
  280. package/dist/neutral/components/wallet/table/cells/lib/index.d.ts.map +1 -1
  281. package/dist/neutral/components/wallet/table/hooks/index.d.cts +1 -1
  282. package/dist/neutral/components/wallet/table/hooks/index.d.cts.map +1 -1
  283. package/dist/neutral/components/wallet/table/hooks/index.d.mts +1 -1
  284. package/dist/neutral/components/wallet/table/hooks/index.d.mts.map +1 -1
  285. package/dist/neutral/components/wallet/table/hooks/index.d.ts +1 -1
  286. package/dist/neutral/components/wallet/table/hooks/index.d.ts.map +1 -1
  287. package/dist/neutral/components/wallet/table/hooks/useActiveProviderDialogState.d.cts +1 -1
  288. package/dist/neutral/components/wallet/table/hooks/useActiveProviderDialogState.d.mts +1 -1
  289. package/dist/neutral/components/wallet/table/hooks/useActiveProviderDialogState.d.ts +1 -1
  290. package/dist/neutral/components/wallet/table/index.d.cts +4 -4
  291. package/dist/neutral/components/wallet/table/index.d.cts.map +1 -1
  292. package/dist/neutral/components/wallet/table/index.d.mts +4 -4
  293. package/dist/neutral/components/wallet/table/index.d.mts.map +1 -1
  294. package/dist/neutral/components/wallet/table/index.d.ts +4 -4
  295. package/dist/neutral/components/wallet/table/index.d.ts.map +1 -1
  296. package/dist/neutral/hooks/index.d.cts +2 -2
  297. package/dist/neutral/hooks/index.d.cts.map +1 -1
  298. package/dist/neutral/hooks/index.d.mts +2 -2
  299. package/dist/neutral/hooks/index.d.mts.map +1 -1
  300. package/dist/neutral/hooks/index.d.ts +2 -2
  301. package/dist/neutral/hooks/index.d.ts.map +1 -1
  302. package/dist/neutral/hooks/useDetectWallets.d.cts.map +1 -1
  303. package/dist/neutral/hooks/useDetectWallets.d.mts.map +1 -1
  304. package/dist/neutral/hooks/useDetectWallets.d.ts.map +1 -1
  305. package/dist/neutral/hooks/useEnabledWallets.d.cts +1 -1
  306. package/dist/neutral/hooks/useEnabledWallets.d.mts +1 -1
  307. package/dist/neutral/hooks/useEnabledWallets.d.ts +1 -1
  308. package/dist/neutral/index.cjs +339 -260
  309. package/dist/neutral/index.cjs.map +1 -1
  310. package/dist/neutral/index.d.cts +3 -3
  311. package/dist/neutral/index.d.mts +3 -3
  312. package/dist/neutral/index.d.ts +3 -3
  313. package/dist/neutral/index.mjs +623 -0
  314. package/dist/neutral/index.mjs.map +1 -0
  315. package/dist/node/classes/index.d.cts +1 -1
  316. package/dist/node/classes/index.d.mts +1 -1
  317. package/dist/node/classes/index.d.ts +1 -1
  318. package/dist/node/components/ConnectedAccountsFlexbox.d.cts +2 -1
  319. package/dist/node/components/ConnectedAccountsFlexbox.d.cts.map +1 -1
  320. package/dist/node/components/ConnectedAccountsFlexbox.d.mts +2 -1
  321. package/dist/node/components/ConnectedAccountsFlexbox.d.mts.map +1 -1
  322. package/dist/node/components/ConnectedAccountsFlexbox.d.ts +2 -1
  323. package/dist/node/components/ConnectedAccountsFlexbox.d.ts.map +1 -1
  324. package/dist/node/components/index.d.cts +2 -2
  325. package/dist/node/components/index.d.cts.map +1 -1
  326. package/dist/node/components/index.d.mts +2 -2
  327. package/dist/node/components/index.d.mts.map +1 -1
  328. package/dist/node/components/index.d.ts +2 -2
  329. package/dist/node/components/index.d.ts.map +1 -1
  330. package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.cts +1 -0
  331. package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.cts.map +1 -1
  332. package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.mts +1 -0
  333. package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.mts.map +1 -1
  334. package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.ts +1 -0
  335. package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.ts.map +1 -1
  336. package/dist/node/components/wallet/dialogs/connect/Dialog.d.cts +2 -1
  337. package/dist/node/components/wallet/dialogs/connect/Dialog.d.cts.map +1 -1
  338. package/dist/node/components/wallet/dialogs/connect/Dialog.d.mts +2 -1
  339. package/dist/node/components/wallet/dialogs/connect/Dialog.d.mts.map +1 -1
  340. package/dist/node/components/wallet/dialogs/connect/Dialog.d.ts +2 -1
  341. package/dist/node/components/wallet/dialogs/connect/Dialog.d.ts.map +1 -1
  342. package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts +1 -0
  343. package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts.map +1 -1
  344. package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts +1 -0
  345. package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts.map +1 -1
  346. package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts +1 -0
  347. package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts.map +1 -1
  348. package/dist/node/components/wallet/dialogs/connect/Permissions.d.cts +1 -0
  349. package/dist/node/components/wallet/dialogs/connect/Permissions.d.cts.map +1 -1
  350. package/dist/node/components/wallet/dialogs/connect/Permissions.d.mts +1 -0
  351. package/dist/node/components/wallet/dialogs/connect/Permissions.d.mts.map +1 -1
  352. package/dist/node/components/wallet/dialogs/connect/Permissions.d.ts +1 -0
  353. package/dist/node/components/wallet/dialogs/connect/Permissions.d.ts.map +1 -1
  354. package/dist/node/components/wallet/dialogs/connect/index.d.cts +2 -2
  355. package/dist/node/components/wallet/dialogs/connect/index.d.cts.map +1 -1
  356. package/dist/node/components/wallet/dialogs/connect/index.d.mts +2 -2
  357. package/dist/node/components/wallet/dialogs/connect/index.d.mts.map +1 -1
  358. package/dist/node/components/wallet/dialogs/connect/index.d.ts +2 -2
  359. package/dist/node/components/wallet/dialogs/connect/index.d.ts.map +1 -1
  360. package/dist/node/components/wallet/dialogs/index.d.cts +2 -2
  361. package/dist/node/components/wallet/dialogs/index.d.mts +2 -2
  362. package/dist/node/components/wallet/dialogs/index.d.ts +2 -2
  363. package/dist/node/components/wallet/dialogs/revoke/Dialog.d.cts +2 -1
  364. package/dist/node/components/wallet/dialogs/revoke/Dialog.d.cts.map +1 -1
  365. package/dist/node/components/wallet/dialogs/revoke/Dialog.d.mts +2 -1
  366. package/dist/node/components/wallet/dialogs/revoke/Dialog.d.mts.map +1 -1
  367. package/dist/node/components/wallet/dialogs/revoke/Dialog.d.ts +2 -1
  368. package/dist/node/components/wallet/dialogs/revoke/Dialog.d.ts.map +1 -1
  369. package/dist/node/components/wallet/dialogs/revoke/index.d.cts +1 -1
  370. package/dist/node/components/wallet/dialogs/revoke/index.d.cts.map +1 -1
  371. package/dist/node/components/wallet/dialogs/revoke/index.d.mts +1 -1
  372. package/dist/node/components/wallet/dialogs/revoke/index.d.mts.map +1 -1
  373. package/dist/node/components/wallet/dialogs/revoke/index.d.ts +1 -1
  374. package/dist/node/components/wallet/dialogs/revoke/index.d.ts.map +1 -1
  375. package/dist/node/components/wallet/index.d.cts +2 -2
  376. package/dist/node/components/wallet/index.d.mts +2 -2
  377. package/dist/node/components/wallet/index.d.ts +2 -2
  378. package/dist/node/components/wallet/lib/index.d.cts +2 -2
  379. package/dist/node/components/wallet/lib/index.d.mts +2 -2
  380. package/dist/node/components/wallet/lib/index.d.ts +2 -2
  381. package/dist/node/components/wallet/table/ConnectedWalletsTable.d.cts +1 -0
  382. package/dist/node/components/wallet/table/ConnectedWalletsTable.d.cts.map +1 -1
  383. package/dist/node/components/wallet/table/ConnectedWalletsTable.d.mts +1 -0
  384. package/dist/node/components/wallet/table/ConnectedWalletsTable.d.mts.map +1 -1
  385. package/dist/node/components/wallet/table/ConnectedWalletsTable.d.ts +1 -0
  386. package/dist/node/components/wallet/table/ConnectedWalletsTable.d.ts.map +1 -1
  387. package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.cts +2 -1
  388. package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.cts.map +1 -1
  389. package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.mts +2 -1
  390. package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.mts.map +1 -1
  391. package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.ts +2 -1
  392. package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.ts.map +1 -1
  393. package/dist/node/components/wallet/table/cells/Accounts.d.cts +2 -1
  394. package/dist/node/components/wallet/table/cells/Accounts.d.cts.map +1 -1
  395. package/dist/node/components/wallet/table/cells/Accounts.d.mts +2 -1
  396. package/dist/node/components/wallet/table/cells/Accounts.d.mts.map +1 -1
  397. package/dist/node/components/wallet/table/cells/Accounts.d.ts +2 -1
  398. package/dist/node/components/wallet/table/cells/Accounts.d.ts.map +1 -1
  399. package/dist/node/components/wallet/table/cells/Actions.d.cts +2 -1
  400. package/dist/node/components/wallet/table/cells/Actions.d.cts.map +1 -1
  401. package/dist/node/components/wallet/table/cells/Actions.d.mts +2 -1
  402. package/dist/node/components/wallet/table/cells/Actions.d.mts.map +1 -1
  403. package/dist/node/components/wallet/table/cells/Actions.d.ts +2 -1
  404. package/dist/node/components/wallet/table/cells/Actions.d.ts.map +1 -1
  405. package/dist/node/components/wallet/table/cells/Cells.d.cts +1 -1
  406. package/dist/node/components/wallet/table/cells/Cells.d.mts +1 -1
  407. package/dist/node/components/wallet/table/cells/Cells.d.ts +1 -1
  408. package/dist/node/components/wallet/table/cells/ChainName.d.cts +2 -1
  409. package/dist/node/components/wallet/table/cells/ChainName.d.cts.map +1 -1
  410. package/dist/node/components/wallet/table/cells/ChainName.d.mts +2 -1
  411. package/dist/node/components/wallet/table/cells/ChainName.d.mts.map +1 -1
  412. package/dist/node/components/wallet/table/cells/ChainName.d.ts +2 -1
  413. package/dist/node/components/wallet/table/cells/ChainName.d.ts.map +1 -1
  414. package/dist/node/components/wallet/table/cells/State.d.cts +2 -1
  415. package/dist/node/components/wallet/table/cells/State.d.cts.map +1 -1
  416. package/dist/node/components/wallet/table/cells/State.d.mts +2 -1
  417. package/dist/node/components/wallet/table/cells/State.d.mts.map +1 -1
  418. package/dist/node/components/wallet/table/cells/State.d.ts +2 -1
  419. package/dist/node/components/wallet/table/cells/State.d.ts.map +1 -1
  420. package/dist/node/components/wallet/table/cells/Wallet.d.cts +2 -1
  421. package/dist/node/components/wallet/table/cells/Wallet.d.cts.map +1 -1
  422. package/dist/node/components/wallet/table/cells/Wallet.d.mts +2 -1
  423. package/dist/node/components/wallet/table/cells/Wallet.d.mts.map +1 -1
  424. package/dist/node/components/wallet/table/cells/Wallet.d.ts +2 -1
  425. package/dist/node/components/wallet/table/cells/Wallet.d.ts.map +1 -1
  426. package/dist/node/components/wallet/table/cells/index.d.cts +6 -6
  427. package/dist/node/components/wallet/table/cells/index.d.cts.map +1 -1
  428. package/dist/node/components/wallet/table/cells/index.d.mts +6 -6
  429. package/dist/node/components/wallet/table/cells/index.d.mts.map +1 -1
  430. package/dist/node/components/wallet/table/cells/index.d.ts +6 -6
  431. package/dist/node/components/wallet/table/cells/index.d.ts.map +1 -1
  432. package/dist/node/components/wallet/table/cells/lib/index.d.cts +1 -1
  433. package/dist/node/components/wallet/table/cells/lib/index.d.cts.map +1 -1
  434. package/dist/node/components/wallet/table/cells/lib/index.d.mts +1 -1
  435. package/dist/node/components/wallet/table/cells/lib/index.d.mts.map +1 -1
  436. package/dist/node/components/wallet/table/cells/lib/index.d.ts +1 -1
  437. package/dist/node/components/wallet/table/cells/lib/index.d.ts.map +1 -1
  438. package/dist/node/components/wallet/table/hooks/index.d.cts +1 -1
  439. package/dist/node/components/wallet/table/hooks/index.d.cts.map +1 -1
  440. package/dist/node/components/wallet/table/hooks/index.d.mts +1 -1
  441. package/dist/node/components/wallet/table/hooks/index.d.mts.map +1 -1
  442. package/dist/node/components/wallet/table/hooks/index.d.ts +1 -1
  443. package/dist/node/components/wallet/table/hooks/index.d.ts.map +1 -1
  444. package/dist/node/components/wallet/table/hooks/useActiveProviderDialogState.d.cts +1 -1
  445. package/dist/node/components/wallet/table/hooks/useActiveProviderDialogState.d.mts +1 -1
  446. package/dist/node/components/wallet/table/hooks/useActiveProviderDialogState.d.ts +1 -1
  447. package/dist/node/components/wallet/table/index.d.cts +4 -4
  448. package/dist/node/components/wallet/table/index.d.cts.map +1 -1
  449. package/dist/node/components/wallet/table/index.d.mts +4 -4
  450. package/dist/node/components/wallet/table/index.d.mts.map +1 -1
  451. package/dist/node/components/wallet/table/index.d.ts +4 -4
  452. package/dist/node/components/wallet/table/index.d.ts.map +1 -1
  453. package/dist/node/hooks/index.d.cts +2 -2
  454. package/dist/node/hooks/index.d.cts.map +1 -1
  455. package/dist/node/hooks/index.d.mts +2 -2
  456. package/dist/node/hooks/index.d.mts.map +1 -1
  457. package/dist/node/hooks/index.d.ts +2 -2
  458. package/dist/node/hooks/index.d.ts.map +1 -1
  459. package/dist/node/hooks/useDetectWallets.d.cts.map +1 -1
  460. package/dist/node/hooks/useDetectWallets.d.mts.map +1 -1
  461. package/dist/node/hooks/useDetectWallets.d.ts.map +1 -1
  462. package/dist/node/hooks/useEnabledWallets.d.cts +1 -1
  463. package/dist/node/hooks/useEnabledWallets.d.mts +1 -1
  464. package/dist/node/hooks/useEnabledWallets.d.ts +1 -1
  465. package/dist/node/index.cjs +346 -268
  466. package/dist/node/index.cjs.map +1 -1
  467. package/dist/node/index.d.cts +3 -3
  468. package/dist/node/index.d.mts +3 -3
  469. package/dist/node/index.d.ts +3 -3
  470. package/dist/node/index.mjs +633 -0
  471. package/dist/node/index.mjs.map +1 -0
  472. package/package.json +11 -11
  473. package/src/classes/EnabledWallets.ts +1 -1
  474. package/src/classes/index.ts +1 -1
  475. package/src/components/ConnectedAccountsFlexbox.stories.tsx +2 -4
  476. package/src/components/ConnectedAccountsFlexbox.tsx +13 -9
  477. package/src/components/index.ts +2 -2
  478. package/src/components/wallet/dialogs/connect/CheckboxFormControl.tsx +1 -0
  479. package/src/components/wallet/dialogs/connect/Dialog.tsx +5 -4
  480. package/src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx +4 -3
  481. package/src/components/wallet/dialogs/connect/Permissions.tsx +3 -1
  482. package/src/components/wallet/dialogs/connect/index.ts +2 -2
  483. package/src/components/wallet/dialogs/index.ts +2 -2
  484. package/src/components/wallet/dialogs/revoke/Dialog.tsx +13 -4
  485. package/src/components/wallet/dialogs/revoke/index.ts +1 -1
  486. package/src/components/wallet/index.ts +2 -2
  487. package/src/components/wallet/lib/index.ts +2 -2
  488. package/src/components/wallet/table/ConnectedWalletsTable.tsx +6 -6
  489. package/src/components/wallet/table/ConnectedWalletsTableRow.tsx +3 -3
  490. package/src/components/wallet/table/cells/Accounts.tsx +2 -1
  491. package/src/components/wallet/table/cells/Actions.tsx +21 -15
  492. package/src/components/wallet/table/cells/Cells.tsx +6 -6
  493. package/src/components/wallet/table/cells/ChainName.tsx +2 -1
  494. package/src/components/wallet/table/cells/State.tsx +4 -3
  495. package/src/components/wallet/table/cells/Wallet.tsx +2 -1
  496. package/src/components/wallet/table/cells/index.ts +6 -6
  497. package/src/components/wallet/table/cells/lib/index.ts +1 -1
  498. package/src/components/wallet/table/hooks/index.ts +1 -1
  499. package/src/components/wallet/table/hooks/useActiveProviderDialogState.tsx +1 -1
  500. package/src/components/wallet/table/index.ts +4 -4
  501. package/src/hooks/index.ts +2 -2
  502. package/src/hooks/useDetectWallets.tsx +2 -1
  503. package/src/hooks/useEnabledWallets.tsx +1 -1
  504. package/src/index.ts +3 -3
  505. package/dist/browser/index.js +0 -542
  506. package/dist/browser/index.js.map +0 -1
  507. package/dist/neutral/index.js +0 -542
  508. package/dist/neutral/index.js.map +0 -1
  509. package/dist/node/index.js +0 -553
  510. package/dist/node/index.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/classes/EnabledWallets.ts","../../src/components/ConnectedAccountsFlexbox.tsx","../../src/hooks/useDetectWallets.tsx","../../src/hooks/useEnabledWallets.tsx","../../src/components/wallet/dialogs/connect/CheckboxFormControl.tsx","../../src/components/wallet/dialogs/connect/Dialog.tsx","../../src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx","../../src/img/index.ts","../../src/components/wallet/dialogs/connect/Permissions.tsx","../../src/components/wallet/dialogs/revoke/Dialog.tsx","../../src/components/wallet/table/cells/Accounts.tsx","../../src/components/wallet/table/cells/Actions.tsx","../../src/components/wallet/table/cells/ChainName.tsx","../../src/components/wallet/table/cells/State.tsx","../../src/components/wallet/table/cells/Wallet.tsx","../../src/components/wallet/table/cells/Cells.tsx","../../src/components/wallet/table/ConnectedWalletsTable.tsx","../../src/components/wallet/lib/TableHeadData.ts","../../src/components/wallet/table/ConnectedWalletsTableRow.tsx","../../src/components/wallet/table/hooks/useActiveProviderDialogState.tsx"],"sourcesContent":["import { DiscoveredWallets, EIP6963Connector } from '@xylabs/react-crypto'\n\nconst DEFAULT_LOCAL_STORAGE_KEY = 'XYO|EnabledWallets'\n\n/**\n * State for storing wallets and their enabled/disabled status by name\n */\nexport interface EnabledEthWalletsState {\n [rdns: string]: {\n enabled: boolean\n wallet: EIP6963Connector\n }\n}\n\n/**\n * State for storing only enabled/disabled status of a wallet by name\n */\nexport interface EnabledWalletsSavedState {\n [rdns: string]: boolean\n}\n\nexport type WalletListener = () => void\n\nexport class EnabledEthWalletConnections {\n // control whether or not enabled/disabled preferences are persisted (i.e. in localStorage)\n persistPreferences = true\n\n // Map of wallet names and their enabled/disabled state\n private enabledWallets: EnabledWalletsSavedState = {}\n\n // Map of wallet names, their enabled/disabled state, and their wallet class\n private ethWalletsState: EnabledEthWalletsState = {}\n\n // list of listeners that want to be notified on wallet changes\n private listeners: WalletListener[] = []\n\n // key to use in localStorage when persisting preferences\n private localStorageKey = DEFAULT_LOCAL_STORAGE_KEY\n\n constructor(localStorageKey = DEFAULT_LOCAL_STORAGE_KEY) {\n this.localStorageKey = localStorageKey\n this.reviveSettings()\n }\n\n get wallets() {\n return this.ethWalletsState\n }\n\n disableWallet(rdns: string) {\n this.toggleEnabledWallet(rdns, false)\n }\n\n enableWallet(rdns: string) {\n this.toggleEnabledWallet(rdns, true)\n }\n\n /**\n * Given a new set of wallets, set their enabled state based off previous preferences\n */\n resetWallets(wallets: DiscoveredWallets) {\n const newWallets: EnabledEthWalletsState = {}\n\n const addWallet = ([walletName, wallet]: [string, EIP6963Connector]) => {\n newWallets[walletName] = {\n // preserve the existing enabled state\n enabled: walletName in this.enabledWallets ? this.enabledWallets[walletName] : true,\n wallet,\n }\n }\n\n // eslint-disable-next-line unicorn/no-array-for-each\n Object.entries(wallets).forEach(addWallet.bind(this))\n this.ethWalletsState = newWallets\n this.emitChange()\n }\n\n subscribe(listener: WalletListener) {\n this.listeners = [...this.listeners, listener]\n return () => {\n this.listeners = this.listeners.filter((existingListener) => existingListener !== listener)\n }\n }\n\n toggleEnabledWallet(rdns: string, enabled: boolean) {\n if (rdns && this.ethWalletsState[rdns]) {\n this.ethWalletsState[rdns].enabled = enabled\n this.ethWalletsState = { ...this.ethWalletsState }\n this.emitChange()\n }\n }\n\n private emitChange() {\n for (const listener of this.listeners) {\n listener()\n }\n\n this.persistSettings()\n }\n\n private isPersistance(method: () => void) {\n if (this.persistPreferences) {\n method()\n }\n }\n\n private persistSettings() {\n this.isPersistance(() => {\n // convert wallet enabled selections into serializable state\n // eslint-disable-next-line unicorn/no-array-reduce\n const enabledWallets = Object.entries(this.ethWalletsState).reduce((acc, [rdns, { enabled }]) => {\n acc[rdns] = enabled\n return acc\n }, {} as EnabledWalletsSavedState)\n\n localStorage.setItem(this.localStorageKey, JSON.stringify(enabledWallets))\n })\n }\n\n private reviveSettings() {\n this.isPersistance(() => {\n const existingEntries = localStorage.getItem(this.localStorageKey)\n try {\n const entries = existingEntries ? JSON.parse(existingEntries) : {}\n this.enabledWallets = entries\n } catch (e) {\n console.warn(`Error parsing saved enabled wallet entries: ${(e as Error).message}`)\n }\n })\n }\n}\n","import { Typography, useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'\nimport { forwardRef } from 'react'\n\nimport { useDetectedWallets } from '../hooks/index.js'\nimport { ConnectedWalletsTable } from './wallet/index.js'\n\nexport interface ConnectedAccountsFlexboxProps extends FlexBoxProps {\n ignoreConnectDialog?: boolean\n // A callback that is invoked when the option to ignore the dialog is checked\n onIgnoreConnectDialog?: (checked: boolean) => void\n}\n\nexport const ConnectedAccountsFlexbox = forwardRef<HTMLDivElement, ConnectedAccountsFlexboxProps>(\n ({ ignoreConnectDialog, onIgnoreConnectDialog, ...props }, ref) => {\n const theme = useTheme()\n\n const { totalConnectedAccounts, sortedWallets } = useDetectedWallets()\n\n return (\n <FlexCol alignItems=\"stretch\" justifyContent=\"start\" gap={2} ref={ref} {...props}>\n <FlexCol alignItems=\"start\">\n <Typography variant={'h2'} sx={{ mb: 0.5 }}>\n Detected Web3 Wallets\n </Typography>\n {totalConnectedAccounts ?\n <Typography variant={'subtitle1'} color={theme.palette.secondary.main} sx={{ opacity: 0.5 }}>\n Total Connected Accounts: {totalConnectedAccounts}\n </Typography>\n : null}\n </FlexCol>\n <ConnectedWalletsTable wallets={sortedWallets} ignoreConnectDialog={ignoreConnectDialog} onIgnoreConnectDialog={onIgnoreConnectDialog} />\n </FlexCol>\n )\n },\n)\n\nConnectedAccountsFlexbox.displayName = 'ConnectedAccountsFlexbox'\n","import { AccountsChangedEventName, DiscoveredWallets, EIP6963Connector, useWalletDiscovery } from '@xylabs/react-crypto'\nimport { useEffect, useMemo, useState } from 'react'\n\nconst sortWallets = (wallets: DiscoveredWallets) =>\n // eslint-disable-next-line unicorn/no-array-reduce\n Object.values(wallets).reduce((acc, wallet) => {\n wallet.allowedAccounts.length > 0 ? acc.unshift(wallet) : acc.push(wallet)\n return acc\n }, [] as EIP6963Connector[])\n\nexport const useDetectedWallets = () => {\n const wallets = useWalletDiscovery()\n const [refresh, setRefresh] = useState(0)\n const [sortedWallets, setSortedWallets] = useState<EIP6963Connector[]>([])\n\n useEffect(() => {\n setSortedWallets(sortWallets(wallets))\n }, [wallets, refresh])\n\n /**\n * Rely on custom events from the wallet base class to know when accounts are changed.\n * This approach prevents the need to loop through all wallets and set up individual listeners.\n */\n useEffect(() => {\n const listener: (event: CustomEventInit) => void = () => {\n setRefresh((refresh) => refresh + 1)\n }\n window.addEventListener(AccountsChangedEventName, listener)\n\n return () => {\n window.removeEventListener(AccountsChangedEventName, listener)\n }\n }, [wallets])\n\n const totalConnectedAccounts = useMemo(\n () => Object.values(sortedWallets).reduce((acc, wallet) => acc + wallet.allowedAccounts.length, 0),\n [sortedWallets],\n )\n\n return { sortedWallets, totalConnectedAccounts }\n}\n","import { useWalletDiscovery } from '@xylabs/react-crypto'\nimport { useMemo, useSyncExternalStore } from 'react'\n\nimport { EnabledEthWalletConnections, EnabledEthWalletsState, EnabledWalletsSavedState } from '../classes/index.js'\n\nlet enabledEthWallets: EnabledEthWalletConnections | undefined\n\n/**\n * Takes the discovered wallets and tracks their enabled state globally\n */\nexport const useEnabledWalletsInner = (enabledWalletsRdns?: EnabledWalletsSavedState) => {\n const discoveredWallets = useWalletDiscovery()\n\n // when we discover new wallets, build their enabled state\n const wallets = useMemo(() => {\n if (enabledEthWallets === undefined) enabledEthWallets = new EnabledEthWalletConnections()\n enabledEthWallets.resetWallets(discoveredWallets)\n for (const [rdns, enabled] of Object.entries(enabledWalletsRdns ?? {})) enabledEthWallets?.toggleEnabledWallet(rdns, enabled)\n return enabledEthWallets\n }, [discoveredWallets, enabledWalletsRdns])\n\n return useSyncExternalStore(wallets.subscribe.bind(wallets), () => wallets.wallets)\n}\n\n/**\n * Expose an interface for enabling and disabling wallets\n */\nexport const useEnabledWallets = (enabledWalletsRdns?: EnabledWalletsSavedState) => {\n const wallets = useEnabledWalletsInner(enabledWalletsRdns)\n const enabledWallets = useMemo(\n () =>\n // eslint-disable-next-line unicorn/no-array-reduce\n Object.entries(wallets).reduce((acc, [walletName, wallet]) => {\n if (wallet.enabled) acc[walletName] = wallet\n return acc\n }, {} as EnabledEthWalletsState),\n [wallets],\n )\n\n return {\n disableWallet: enabledEthWallets?.disableWallet.bind(enabledEthWallets),\n enableWallet: enabledEthWallets?.enableWallet.bind(enabledEthWallets),\n enabledWallets,\n wallets,\n }\n}\n","import { Checkbox, FormControl, FormControlProps, FormLabel } from '@mui/material'\n\nexport interface CheckboxFormControlProps extends FormControlProps {\n onCheckChanged?: (checked: boolean) => void\n}\n\nexport const CheckboxFormControl: React.FC<CheckboxFormControlProps> = ({ onCheckChanged, ...props }) => {\n return (\n <FormControl {...props}>\n <FormLabel>\n <Checkbox onChange={(_, checked) => onCheckChanged?.(checked)} />\n Do not show this again.\n </FormLabel>\n </FormControl>\n )\n}\n","import { Button, Dialog, DialogActions, DialogContent, DialogProps, DialogTitle } from '@mui/material'\n\nimport { ActiveProvider } from '../../lib/index.js'\nimport { CheckboxFormControl } from './CheckboxFormControl.js'\nimport { LinkedProvidersFlexbox } from './LinkedProvidersFlexbox.js'\nimport { WalletPermissionsFlexbox } from './Permissions.js'\n\nexport interface ConnectWalletDialogProps extends DialogProps {\n activeProvider?: ActiveProvider\n onIgnoreConnectDialog?: (checked: boolean) => void\n}\n\nexport const ConnectWalletDialog: React.FC<ConnectWalletDialogProps> = ({ activeProvider, onIgnoreConnectDialog, ...props }) => {\n const { icon, providerName } = activeProvider ?? {}\n\n const onConnect = async () => {\n try {\n await activeProvider?.connectWallet?.()\n props.onClose?.({}, 'escapeKeyDown')\n } catch (e) {\n console.warn(`Error connecting to wallet: ${(e as Error).message}`)\n }\n }\n\n return (\n <Dialog PaperProps={{ sx: { display: 'flex', gap: 4 } }} {...props}>\n <DialogTitle sx={{ textAlign: 'center' }}>XYO Wants To Access The Blockchain on Your Behalf</DialogTitle>\n <DialogContent sx={{ display: 'flex', flexDirection: 'column', gap: 4 }}>\n <LinkedProvidersFlexbox icon={icon} providerName={providerName} />\n <WalletPermissionsFlexbox />\n <CheckboxFormControl onCheckChanged={onIgnoreConnectDialog} />\n </DialogContent>\n <DialogActions>\n <Button variant=\"outlined\" onClick={() => props.onClose?.({}, 'escapeKeyDown')}>\n Close\n </Button>\n <Button variant=\"contained\" onClick={onConnect}>\n Connect\n </Button>\n </DialogActions>\n </Dialog>\n )\n}\n","import { SyncAlt } from '@mui/icons-material'\nimport { Typography } from '@mui/material'\nimport { ConstrainedImage } from '@xylabs/react-crypto'\nimport { FlexBoxProps, FlexCol, FlexRow } from '@xylabs/react-flexbox'\n\nimport { xyoColorLogo } from '../../../../img/index.js'\n\nexport interface LinkedProvidersFlexboxProps extends FlexBoxProps {\n icon?: string\n providerName?: string\n}\n\nexport const LinkedProvidersFlexbox: React.FC<LinkedProvidersFlexboxProps> = ({ icon, providerName, ...props }) => {\n return (\n <FlexRow gap={4} justifyContent=\"space-evenly\" {...props}>\n <FlexCol gap={0.5}>\n <img alt=\"XYO Logo\" src={xyoColorLogo} style={{ height: '48px' }} />\n <Typography variant=\"subtitle1\">XYO App</Typography>\n </FlexCol>\n <SyncAlt fontSize={'large'} />\n <FlexCol gap={0.5}>\n <ConstrainedImage constrainedValue={'48px'} src={icon} alt={providerName} style={{ height: '48px', maxWidth: '48px' }} />\n <Typography variant=\"subtitle1\">{providerName}</Typography>\n </FlexCol>\n </FlexRow>\n )\n}\n","export { default as xyoColorLogo } from './xyo-color-logo.svg'\nexport { default as xyoColorLogoText } from './xyo-color-logo-text-only.svg'\n","import { Link, Typography } from '@mui/material'\nimport { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'\n\nexport interface WalletPermissionsFlexBoxProps extends FlexBoxProps {}\n\nexport const WalletPermissionsFlexbox: React.FC<WalletPermissionsFlexBoxProps> = (props) => {\n return (\n <FlexCol gap={4} {...props}>\n <Typography fontWeight=\"bold\" sx={{ textAlign: 'center' }}>\n This will allow XYO to:\n </Typography>\n <ul>\n <li>View your wallet account(s) and address(es)</li>\n <li>Read-only access to browse the public blockchain(s) you select</li>\n </ul>\n <Typography variant=\"subtitle1\" sx={{ textAlign: 'center' }}>\n You control what accounts to share and what blockchains to view. You can see or revoke access via your wallet&apos;s settings at anytime. View\n more on XYO&apos;s sovereign data philosophy{' '}\n <Link\n href=\"https://cointelegraph.com/innovation-circle/decentralization-and-sovereignty-debunking-our-approach-to-digital-sovereignty\"\n sx={{ fontWeight: 'bold' }}\n target=\"_blank\"\n >\n here\n </Link>\n .\n </Typography>\n </FlexCol>\n )\n}\n","import { Button, Dialog, DialogActions, DialogContent, DialogProps, DialogTitle, Typography } from '@mui/material'\nimport { ConstrainedImage } from '@xylabs/react-crypto'\nimport { FlexRow } from '@xylabs/react-flexbox'\n\nimport { ActiveProvider } from '../../lib/index.js'\n\nexport interface RevokeWalletConnectionDialogProps extends DialogProps {\n activeProvider?: ActiveProvider\n}\n\nexport const RevokeWalletConnectionDialog: React.FC<RevokeWalletConnectionDialogProps> = ({ activeProvider, ...props }) => {\n return (\n <Dialog {...props}>\n <FlexRow gap={2} justifyContent=\"start\" pl={2}>\n <ConstrainedImage src={activeProvider?.icon} constrainedValue={'24px'} />\n <DialogTitle sx={{ pl: 0 }}>Revoke {activeProvider?.providerName} Access</DialogTitle>\n </FlexRow>\n <DialogContent>\n <Typography>\n Revoking access to your wallet must be done from the wallet&apos;s browser extension. Wallets grant access to specific domains please\n consult {activeProvider?.providerName}&apos;s documentation on how to revoke access to this website:\n </Typography>\n <Typography>{window.location.origin}</Typography>\n </DialogContent>\n <DialogActions>\n <Button variant=\"contained\" onClick={() => props.onClose?.({}, 'escapeKeyDown')}>\n Close\n </Button>\n </DialogActions>\n </Dialog>\n )\n}\n","import { TableCell, Tooltip, Typography } from '@mui/material'\n\nimport { ConnectedWalletTableCellProps } from './lib/index.js'\n\nexport const ConnectedWalletsAccountsTableCell: React.FC<ConnectedWalletTableCellProps> = ({\n additionalAccounts,\n currentAccount,\n totalAccounts,\n tableCellProps,\n}) => {\n return (\n <TableCell {...tableCellProps}>\n <Tooltip\n sx={{ cursor: totalAccounts > 0 ? 'pointer' : 'auto' }}\n title={[...(currentAccount ?? []), ...(additionalAccounts ?? [])].map((address, index) => (\n <p key={index}>{address}</p>\n ))}\n >\n <Typography>{totalAccounts}</Typography>\n </Tooltip>\n </TableCell>\n )\n}\n","import { Check, InfoOutlined } from '@mui/icons-material'\nimport { Button, IconButton, TableCell, Typography } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\n\nimport { ConnectedWalletTableCellProps } from './lib/index.js'\n\nexport const ConnectedWalletsActionsTableCell: React.FC<ConnectedWalletTableCellProps> = ({ connected, onConnect, onRevoke, tableCellProps }) => {\n return (\n <TableCell {...tableCellProps}>\n <FlexRow gap={2} justifyContent=\"start\">\n {connected ?\n <Typography sx={{ display: 'inline-flex', gap: 0.5 }}>\n <Check />\n Connected\n </Typography>\n : <Button variant={'contained'} onClick={onConnect}>\n Connect\n </Button>\n }\n {connected ?\n <IconButton onClick={onRevoke}>\n <InfoOutlined />\n </IconButton>\n : null}\n </FlexRow>\n </TableCell>\n )\n}\n","import { TableCell } from '@mui/material'\n\nimport { ConnectedWalletTableCellProps } from './lib/index.js'\n\nexport const ConnectedWalletsChainNameTableCell: React.FC<ConnectedWalletTableCellProps> = ({ chainName, tableCellProps }) => {\n return <TableCell {...tableCellProps}>{chainName}</TableCell>\n}\n","import { Switch, TableCell } from '@mui/material'\nimport { ChangeEvent, useMemo } from 'react'\n\nimport { useEnabledWallets } from '../../../../hooks/index.js'\nimport { ConnectedWalletTableCellProps } from './lib/index.js'\n\nexport const ConnectedWalletState: React.FC<ConnectedWalletTableCellProps> = ({ connected, walletRdns, tableCellProps }) => {\n const { disableWallet, enableWallet, wallets } = useEnabledWallets()\n\n const enabled = useMemo(() => (walletRdns ? wallets[walletRdns].enabled : false), [wallets, walletRdns])\n\n const handleClick = (event: ChangeEvent<HTMLInputElement>) => {\n const checked = event.target?.checked\n if (walletRdns) {\n checked ? enableWallet?.(walletRdns) : disableWallet?.(walletRdns)\n }\n }\n return (\n <TableCell {...tableCellProps}>\n <Switch disabled={!connected} checked={connected && enabled} onChange={handleClick} />\n </TableCell>\n )\n}\n","import { TableCell, useTheme } from '@mui/material'\nimport { ConstrainedImage } from '@xylabs/react-crypto'\nimport { FlexRow } from '@xylabs/react-flexbox'\n\nimport { ConnectedWalletTableCellProps } from './lib/index.js'\n\nexport const ConnectedWalletsWalletTableCell: React.FC<ConnectedWalletTableCellProps> = ({ icon, walletName, tableCellProps }) => {\n const theme = useTheme()\n\n return (\n <TableCell {...tableCellProps}>\n <FlexRow gap={2} justifyContent=\"start\">\n <ConstrainedImage constrainedValue={theme.spacing(4)} src={icon} />\n {walletName}\n </FlexRow>\n </TableCell>\n )\n}\n","import { ComponentType } from 'react'\n\nimport { ConnectedWalletsAccountsTableCell } from './Accounts.js'\nimport { ConnectedWalletsActionsTableCell } from './Actions.js'\nimport { ConnectedWalletsChainNameTableCell } from './ChainName.js'\nimport { ConnectedWalletTableCellProps } from './lib/index.js'\nimport { ConnectedWalletState } from './State.js'\nimport { ConnectedWalletsWalletTableCell } from './Wallet.js'\n\nexport const ConnectedWalletTableCells: ComponentType<ConnectedWalletTableCellProps>[] = [\n ConnectedWalletsWalletTableCell,\n ConnectedWalletsChainNameTableCell,\n ConnectedWalletsAccountsTableCell,\n ConnectedWalletsActionsTableCell,\n ConnectedWalletState,\n]\n","import { Table, TableBody, TableCell, TableHead, TableProps, TableRow } from '@mui/material'\nimport { EIP6963Connector } from '@xylabs/react-crypto'\nimport { useState } from 'react'\n\nimport { ConnectWalletDialog, RevokeWalletConnectionDialog } from '../dialogs/index.js'\nimport { ActiveProvider, WalletsTableHeadCells } from '../lib/index.js'\nimport { WalletConnectionsTableRow } from './ConnectedWalletsTableRow.js'\nimport { useActiveProviderDialogState } from './hooks/index.js'\n\nexport interface ConnectedWalletsTableProps extends TableProps {\n ignoreConnectDialog?: boolean\n onIgnoreConnectDialog?: (checked: boolean) => void\n wallets?: EIP6963Connector[]\n}\n\nexport const ConnectedWalletsTable: React.FC<ConnectedWalletsTableProps> = ({ ignoreConnectDialog, onIgnoreConnectDialog, wallets, ...props }) => {\n const [activeProvider, setActiveProvider] = useState<ActiveProvider>()\n const [showConnect, onSetActiveProviderConnect, onConnectClose] = useActiveProviderDialogState(setActiveProvider)\n const [showRevoke, onSetActiveProviderRevoke, onRevokeClose] = useActiveProviderDialogState(setActiveProvider)\n\n return (\n <>\n <Table {...props}>\n <TableHead>\n <TableRow>\n {WalletsTableHeadCells.map(({ disablePadding, id, label, align, width }) => (\n <TableCell align={align} key={id} padding={disablePadding ? 'none' : 'normal'} width={width ?? 'auto'}>\n {label}\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {(wallets ?? []).map((wallet) => (\n <WalletConnectionsTableRow\n ignoreConnectDialog={ignoreConnectDialog}\n key={wallet.providerInfo?.rdns}\n onConnectClick={onSetActiveProviderConnect}\n onRevoke={onSetActiveProviderRevoke}\n wallet={wallet}\n />\n ))}\n </TableBody>\n </Table>\n <RevokeWalletConnectionDialog open={showRevoke} onClose={onRevokeClose} activeProvider={activeProvider} />\n <ConnectWalletDialog\n activeProvider={activeProvider}\n onClose={onConnectClose}\n open={showConnect}\n onIgnoreConnectDialog={onIgnoreConnectDialog}\n />\n </>\n )\n}\n","import { TableHeadCell } from '@xyo-network/react-table'\n\nexport const WalletsTableHeadCells: TableHeadCell[] = [\n {\n disablePadding: false,\n id: 'wallet',\n label: 'Wallet',\n numeric: false,\n showOnMobile: true,\n },\n {\n disablePadding: false,\n id: 'chain',\n label: 'Chain',\n numeric: false,\n showOnMobile: true,\n },\n {\n disablePadding: false,\n id: 'accounts',\n label: 'Accounts',\n numeric: true,\n showOnMobile: true,\n },\n {\n disablePadding: false,\n id: 'actions',\n label: 'Actions',\n numeric: false,\n showOnMobile: true,\n },\n {\n disablePadding: false,\n id: 'enabled',\n label: 'Enabled',\n numeric: false,\n showOnMobile: true,\n },\n]\n","import { TableRow, TableRowProps } from '@mui/material'\nimport { EthWalletConnectorBase, useEthWallet } from '@xylabs/react-crypto'\nimport { useCallback, useMemo } from 'react'\n\nimport { ActiveProvider } from '../lib/index.js'\nimport { ConnectedWalletTableCells } from './cells/index.js'\n\nexport interface WalletConnectionsTableRowProps extends TableRowProps {\n ignoreConnectDialog?: boolean\n onConnectClick?: (activeProvider: ActiveProvider) => void\n onRevoke?: (activeProvider: ActiveProvider) => void\n wallet: EthWalletConnectorBase\n}\n\nexport const WalletConnectionsTableRow: React.FC<WalletConnectionsTableRowProps> = ({\n ignoreConnectDialog,\n onConnectClick,\n onRevoke,\n wallet,\n ...props\n}) => {\n const { currentAccount: currentAccountFromWallet, additionalAccounts, chainName, connectWallet, providerInfo } = useEthWallet(wallet)\n\n const currentAccount = currentAccountFromWallet?.toString() ? [currentAccountFromWallet.toString()] : []\n const totalAccounts = (additionalAccounts?.length ?? 0) + (currentAccount?.length ?? 0)\n const connected = !!(currentAccount?.length ?? 0 > 0)\n const { icon, name, rdns } = useMemo(() => providerInfo ?? { icon: undefined, name: undefined, rdns: undefined }, [providerInfo])\n\n const activeProvider = useMemo<ActiveProvider>(\n () => ({\n connectWallet,\n icon,\n providerName: name,\n }),\n [connectWallet, icon, name],\n )\n\n const onRevokeLocal = useCallback(() => {\n onRevoke?.(activeProvider)\n }, [activeProvider, onRevoke])\n\n const onConnectLocal = useCallback(async () => {\n if (ignoreConnectDialog) {\n await connectWallet?.()\n } else {\n onConnectClick?.(activeProvider)\n }\n }, [activeProvider, connectWallet, ignoreConnectDialog, onConnectClick])\n\n return (\n <TableRow {...props}>\n {Object.values(ConnectedWalletTableCells).map((Cell, index) => (\n <Cell\n key={index}\n additionalAccounts={additionalAccounts}\n chainName={chainName}\n connected={connected}\n currentAccount={currentAccount}\n icon={icon}\n onConnect={onConnectLocal}\n onRevoke={onRevokeLocal}\n totalAccounts={totalAccounts}\n walletName={name}\n walletRdns={rdns}\n />\n ))}\n </TableRow>\n )\n}\n","import { Dispatch, SetStateAction, useState } from 'react'\n\nimport { ActiveProvider } from '../../lib/index.js'\n\nexport const useActiveProviderDialogState = (\n setActiveProvider: Dispatch<SetStateAction<ActiveProvider | undefined>>,\n): [boolean, (activeProvider: ActiveProvider) => void, () => void] => {\n const [show, setShow] = useState(false)\n const onSetActiveProvider = (activeProvider: ActiveProvider) => {\n setShow(true)\n setActiveProvider(activeProvider)\n }\n\n const onClose = () => {\n setShow(false)\n setActiveProvider({})\n }\n\n return [show, onSetActiveProvider, onClose]\n}\n"],"mappings":";AAEA,IAAM,4BAA4B;AAqB3B,IAAM,8BAAN,MAAkC;AAAA;AAAA,EAEvC,qBAAqB;AAAA;AAAA,EAGb,iBAA2C,CAAC;AAAA;AAAA,EAG5C,kBAA0C,CAAC;AAAA;AAAA,EAG3C,YAA8B,CAAC;AAAA;AAAA,EAG/B,kBAAkB;AAAA,EAE1B,YAAY,kBAAkB,2BAA2B;AACvD,SAAK,kBAAkB;AACvB,SAAK,eAAe;AAAA,EACtB;AAAA,EAEA,IAAI,UAAU;AACZ,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,cAAc,MAAc;AAC1B,SAAK,oBAAoB,MAAM,KAAK;AAAA,EACtC;AAAA,EAEA,aAAa,MAAc;AACzB,SAAK,oBAAoB,MAAM,IAAI;AAAA,EACrC;AAAA;AAAA;AAAA;AAAA,EAKA,aAAa,SAA4B;AACvC,UAAM,aAAqC,CAAC;AAE5C,UAAM,YAAY,CAAC,CAAC,YAAY,MAAM,MAAkC;AACtE,iBAAW,UAAU,IAAI;AAAA;AAAA,QAEvB,SAAS,cAAc,KAAK,iBAAiB,KAAK,eAAe,UAAU,IAAI;AAAA,QAC/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BAAAJ,MAAC,aACG,sBAAW,CAAC,GAAG,IAAI,CAAC,WACpB,gBAAAA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UAEA,gBAAgB;AAAA,UAChB,UAAU;AAAA,UACV;AAAA;AAAA,QAHK,OAAO,cAAc;AAAA,MAI5B,CACD,GACH;AAAA,OACF;AAAA,IACA,gBAAAA,MAAC,gCAA6B,MAAM,YAAY,SAAS,eAAe,gBAAgC;AAAA,IACxG,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,SAAS;AAAA,QACT,MAAM;AAAA,QACN;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;;;Af/BU,gBAAAK,OAIE,QAAAC,aAJF;AATH,IAAM,2BAA2B;AAAA,EACtC,CAAC,EAAE,qBAAqB,uBAAuB,GAAG,MAAM,GAAG,QAAQ;AACjE,UAAM,QAAQC,UAAS;AAEvB,UAAM,EAAE,wBAAwB,cAAc,IAAI,mBAAmB;AAErE,WACE,gBAAAD,MAACE,UAAA,EAAQ,YAAW,WAAU,gBAAe,SAAQ,KAAK,GAAG,KAAW,GAAG,OACzE;AAAA,sBAAAF,MAACE,UAAA,EAAQ,YAAW,SAClB;AAAA,wBAAAH,MAACI,aAAA,EAAW,SAAS,MAAM,IAAI,EAAE,IAAI,IAAI,GAAG,mCAE5C;AAAA,QACC,yBACC,gBAAAH,MAACG,aAAA,EAAW,SAAS,aAAa,OAAO,MAAM,QAAQ,UAAU,MAAM,IAAI,EAAE,SAAS,IAAI,GAAG;AAAA;AAAA,UAChE;AAAA,WAC7B,IACA;AAAA,SACJ;AAAA,MACA,gBAAAJ,MAAC,yBAAsB,SAAS,eAAe,qBAA0C,uBAA8C;AAAA,OACzI;AAAA,EAEJ;AACF;AAEA,yBAAyB,cAAc;","names":["Typography","useTheme","FlexCol","refresh","useWalletDiscovery","useMemo","useWalletDiscovery","useMemo","default","jsx","jsxs","default","Typography","FlexCol","jsx","jsxs","jsx","jsxs","Button","Dialog","DialogActions","DialogContent","DialogTitle","Typography","ConstrainedImage","FlexRow","jsx","jsxs","Typography","jsx","Button","TableCell","Typography","FlexRow","jsx","jsxs","TableCell","jsx","TableCell","useMemo","jsx","useMemo","TableCell","TableCell","ConstrainedImage","FlexRow","jsx","jsxs","TableCell","TableRow","useState","useMemo","jsx","useMemo","useState","jsx","jsxs","useState","TableRow","TableCell","jsx","jsxs","useTheme","FlexCol","Typography"]}
@@ -1,542 +0,0 @@
1
- // src/classes/EnabledWallets.ts
2
- var DEFAULT_LOCAL_STORAGE_KEY = "XYO|EnabledWallets";
3
- var EnabledEthWalletConnections = class {
4
- // control whether or not enabled/disabled preferences are persisted (i.e. in localStorage)
5
- persistPreferences = true;
6
- // Map of wallet names and their enabled/disabled state
7
- enabledWallets = {};
8
- // Map of wallet names, their enabled/disabled state, and their wallet class
9
- ethWalletsState = {};
10
- // list of listeners that want to be notified on wallet changes
11
- listeners = [];
12
- // key to use in localStorage when persisting preferences
13
- localStorageKey = DEFAULT_LOCAL_STORAGE_KEY;
14
- constructor(localStorageKey = DEFAULT_LOCAL_STORAGE_KEY) {
15
- this.localStorageKey = localStorageKey;
16
- this.reviveSettings();
17
- }
18
- get wallets() {
19
- return this.ethWalletsState;
20
- }
21
- disableWallet(rdns) {
22
- this.toggleEnabledWallet(rdns, false);
23
- }
24
- enableWallet(rdns) {
25
- this.toggleEnabledWallet(rdns, true);
26
- }
27
- /**
28
- * Given a new set of wallets, set their enabled state based off previous preferences
29
- */
30
- resetWallets(wallets) {
31
- const newWallets = {};
32
- const addWallet = ([walletName, wallet]) => {
33
- newWallets[walletName] = {
34
- // preserve the existing enabled state
35
- enabled: walletName in this.enabledWallets ? this.enabledWallets[walletName] : true,
36
- wallet
37
- };
38
- };
39
- Object.entries(wallets).forEach(addWallet.bind(this));
40
- this.ethWalletsState = newWallets;
41
- this.emitChange();
42
- }
43
- subscribe(listener) {
44
- this.listeners = [...this.listeners, listener];
45
- return () => {
46
- this.listeners = this.listeners.filter((existingListener) => existingListener !== listener);
47
- };
48
- }
49
- toggleEnabledWallet(rdns, enabled) {
50
- if (rdns && this.ethWalletsState[rdns]) {
51
- this.ethWalletsState[rdns].enabled = enabled;
52
- this.ethWalletsState = { ...this.ethWalletsState };
53
- this.emitChange();
54
- }
55
- }
56
- emitChange() {
57
- for (const listener of this.listeners) {
58
- listener();
59
- }
60
- this.persistSettings();
61
- }
62
- isPersistance(method) {
63
- if (this.persistPreferences) {
64
- method();
65
- }
66
- }
67
- persistSettings() {
68
- this.isPersistance(() => {
69
- const enabledWallets = Object.entries(this.ethWalletsState).reduce((acc, [rdns, { enabled }]) => {
70
- acc[rdns] = enabled;
71
- return acc;
72
- }, {});
73
- localStorage.setItem(this.localStorageKey, JSON.stringify(enabledWallets));
74
- });
75
- }
76
- reviveSettings() {
77
- this.isPersistance(() => {
78
- const existingEntries = localStorage.getItem(this.localStorageKey);
79
- try {
80
- const entries = existingEntries ? JSON.parse(existingEntries) : {};
81
- this.enabledWallets = entries;
82
- } catch (e) {
83
- console.warn(`Error parsing saved enabled wallet entries: ${e.message}`);
84
- }
85
- });
86
- }
87
- };
88
-
89
- // src/components/ConnectedAccountsFlexbox.tsx
90
- import { Typography as Typography6, useTheme as useTheme2 } from "@mui/material";
91
- import { FlexCol as FlexCol3 } from "@xylabs/react-flexbox";
92
- import { forwardRef } from "react";
93
-
94
- // src/hooks/useDetectWallets.tsx
95
- import { AccountsChangedEventName, useWalletDiscovery } from "@xylabs/react-crypto";
96
- import { useEffect, useMemo, useState } from "react";
97
- var sortWallets = (wallets) => (
98
- // eslint-disable-next-line unicorn/no-array-reduce
99
- Object.values(wallets).reduce((acc, wallet) => {
100
- wallet.allowedAccounts.length > 0 ? acc.unshift(wallet) : acc.push(wallet);
101
- return acc;
102
- }, [])
103
- );
104
- var useDetectedWallets = () => {
105
- const wallets = useWalletDiscovery();
106
- const [refresh, setRefresh] = useState(0);
107
- const [sortedWallets, setSortedWallets] = useState([]);
108
- useEffect(() => {
109
- setSortedWallets(sortWallets(wallets));
110
- }, [wallets, refresh]);
111
- useEffect(() => {
112
- const listener = () => {
113
- setRefresh((refresh2) => refresh2 + 1);
114
- };
115
- window.addEventListener(AccountsChangedEventName, listener);
116
- return () => {
117
- window.removeEventListener(AccountsChangedEventName, listener);
118
- };
119
- }, [wallets]);
120
- const totalConnectedAccounts = useMemo(
121
- () => Object.values(sortedWallets).reduce((acc, wallet) => acc + wallet.allowedAccounts.length, 0),
122
- [sortedWallets]
123
- );
124
- return { sortedWallets, totalConnectedAccounts };
125
- };
126
-
127
- // src/hooks/useEnabledWallets.tsx
128
- import { useWalletDiscovery as useWalletDiscovery2 } from "@xylabs/react-crypto";
129
- import { useMemo as useMemo2, useSyncExternalStore } from "react";
130
- var enabledEthWallets;
131
- var useEnabledWalletsInner = (enabledWalletsRdns) => {
132
- const discoveredWallets = useWalletDiscovery2();
133
- const wallets = useMemo2(() => {
134
- if (enabledEthWallets === void 0) enabledEthWallets = new EnabledEthWalletConnections();
135
- enabledEthWallets.resetWallets(discoveredWallets);
136
- for (const [rdns, enabled] of Object.entries(enabledWalletsRdns ?? {})) enabledEthWallets?.toggleEnabledWallet(rdns, enabled);
137
- return enabledEthWallets;
138
- }, [discoveredWallets, enabledWalletsRdns]);
139
- return useSyncExternalStore(wallets.subscribe.bind(wallets), () => wallets.wallets);
140
- };
141
- var useEnabledWallets = (enabledWalletsRdns) => {
142
- const wallets = useEnabledWalletsInner(enabledWalletsRdns);
143
- const enabledWallets = useMemo2(
144
- () => (
145
- // eslint-disable-next-line unicorn/no-array-reduce
146
- Object.entries(wallets).reduce((acc, [walletName, wallet]) => {
147
- if (wallet.enabled) acc[walletName] = wallet;
148
- return acc;
149
- }, {})
150
- ),
151
- [wallets]
152
- );
153
- return {
154
- disableWallet: enabledEthWallets?.disableWallet.bind(enabledEthWallets),
155
- enableWallet: enabledEthWallets?.enableWallet.bind(enabledEthWallets),
156
- enabledWallets,
157
- wallets
158
- };
159
- };
160
-
161
- // src/components/wallet/dialogs/connect/CheckboxFormControl.tsx
162
- import { Checkbox, FormControl, FormLabel } from "@mui/material";
163
- import { jsx, jsxs } from "react/jsx-runtime";
164
- var CheckboxFormControl = ({ onCheckChanged, ...props }) => {
165
- return /* @__PURE__ */ jsx(FormControl, { ...props, children: /* @__PURE__ */ jsxs(FormLabel, { children: [
166
- /* @__PURE__ */ jsx(Checkbox, { onChange: (_, checked) => onCheckChanged?.(checked) }),
167
- "Do not show this again."
168
- ] }) });
169
- };
170
-
171
- // src/components/wallet/dialogs/connect/Dialog.tsx
172
- import { Button, Dialog, DialogActions, DialogContent, DialogTitle } from "@mui/material";
173
-
174
- // src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx
175
- import { SyncAlt } from "@mui/icons-material";
176
- import { Typography } from "@mui/material";
177
- import { ConstrainedImage } from "@xylabs/react-crypto";
178
- import { FlexCol, FlexRow } from "@xylabs/react-flexbox";
179
-
180
- // src/img/index.ts
181
- import { default as default2 } from "./xyo-color-logo-LHR2SMEM.svg";
182
- import { default as default3 } from "./xyo-color-logo-text-only-QPAW5BSQ.svg";
183
-
184
- // src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx
185
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
186
- var LinkedProvidersFlexbox = ({ icon, providerName, ...props }) => {
187
- return /* @__PURE__ */ jsxs2(FlexRow, { gap: 4, justifyContent: "space-evenly", ...props, children: [
188
- /* @__PURE__ */ jsxs2(FlexCol, { gap: 0.5, children: [
189
- /* @__PURE__ */ jsx2("img", { alt: "XYO Logo", src: default2, style: { height: "48px" } }),
190
- /* @__PURE__ */ jsx2(Typography, { variant: "subtitle1", children: "XYO App" })
191
- ] }),
192
- /* @__PURE__ */ jsx2(SyncAlt, { fontSize: "large" }),
193
- /* @__PURE__ */ jsxs2(FlexCol, { gap: 0.5, children: [
194
- /* @__PURE__ */ jsx2(ConstrainedImage, { constrainedValue: "48px", src: icon, alt: providerName, style: { height: "48px", maxWidth: "48px" } }),
195
- /* @__PURE__ */ jsx2(Typography, { variant: "subtitle1", children: providerName })
196
- ] })
197
- ] });
198
- };
199
-
200
- // src/components/wallet/dialogs/connect/Permissions.tsx
201
- import { Link, Typography as Typography2 } from "@mui/material";
202
- import { FlexCol as FlexCol2 } from "@xylabs/react-flexbox";
203
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
204
- var WalletPermissionsFlexbox = (props) => {
205
- return /* @__PURE__ */ jsxs3(FlexCol2, { gap: 4, ...props, children: [
206
- /* @__PURE__ */ jsx3(Typography2, { fontWeight: "bold", sx: { textAlign: "center" }, children: "This will allow XYO to:" }),
207
- /* @__PURE__ */ jsxs3("ul", { children: [
208
- /* @__PURE__ */ jsx3("li", { children: "View your wallet account(s) and address(es)" }),
209
- /* @__PURE__ */ jsx3("li", { children: "Read-only access to browse the public blockchain(s) you select" })
210
- ] }),
211
- /* @__PURE__ */ jsxs3(Typography2, { variant: "subtitle1", sx: { textAlign: "center" }, children: [
212
- "You control what accounts to share and what blockchains to view. You can see or revoke access via your wallet's settings at anytime. View more on XYO's sovereign data philosophy",
213
- " ",
214
- /* @__PURE__ */ jsx3(
215
- Link,
216
- {
217
- href: "https://cointelegraph.com/innovation-circle/decentralization-and-sovereignty-debunking-our-approach-to-digital-sovereignty",
218
- sx: { fontWeight: "bold" },
219
- target: "_blank",
220
- children: "here"
221
- }
222
- ),
223
- "."
224
- ] })
225
- ] });
226
- };
227
-
228
- // src/components/wallet/dialogs/connect/Dialog.tsx
229
- import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
230
- var ConnectWalletDialog = ({ activeProvider, onIgnoreConnectDialog, ...props }) => {
231
- const { icon, providerName } = activeProvider ?? {};
232
- const onConnect = async () => {
233
- try {
234
- await activeProvider?.connectWallet?.();
235
- props.onClose?.({}, "escapeKeyDown");
236
- } catch (e) {
237
- console.warn(`Error connecting to wallet: ${e.message}`);
238
- }
239
- };
240
- return /* @__PURE__ */ jsxs4(Dialog, { PaperProps: { sx: { display: "flex", gap: 4 } }, ...props, children: [
241
- /* @__PURE__ */ jsx4(DialogTitle, { sx: { textAlign: "center" }, children: "XYO Wants To Access The Blockchain on Your Behalf" }),
242
- /* @__PURE__ */ jsxs4(DialogContent, { sx: { display: "flex", flexDirection: "column", gap: 4 }, children: [
243
- /* @__PURE__ */ jsx4(LinkedProvidersFlexbox, { icon, providerName }),
244
- /* @__PURE__ */ jsx4(WalletPermissionsFlexbox, {}),
245
- /* @__PURE__ */ jsx4(CheckboxFormControl, { onCheckChanged: onIgnoreConnectDialog })
246
- ] }),
247
- /* @__PURE__ */ jsxs4(DialogActions, { children: [
248
- /* @__PURE__ */ jsx4(Button, { variant: "outlined", onClick: () => props.onClose?.({}, "escapeKeyDown"), children: "Close" }),
249
- /* @__PURE__ */ jsx4(Button, { variant: "contained", onClick: onConnect, children: "Connect" })
250
- ] })
251
- ] });
252
- };
253
-
254
- // src/components/wallet/dialogs/revoke/Dialog.tsx
255
- import { Button as Button2, Dialog as Dialog2, DialogActions as DialogActions2, DialogContent as DialogContent2, DialogTitle as DialogTitle2, Typography as Typography3 } from "@mui/material";
256
- import { ConstrainedImage as ConstrainedImage2 } from "@xylabs/react-crypto";
257
- import { FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
258
- import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
259
- var RevokeWalletConnectionDialog = ({ activeProvider, ...props }) => {
260
- return /* @__PURE__ */ jsxs5(Dialog2, { ...props, children: [
261
- /* @__PURE__ */ jsxs5(FlexRow2, { gap: 2, justifyContent: "start", pl: 2, children: [
262
- /* @__PURE__ */ jsx5(ConstrainedImage2, { src: activeProvider?.icon, constrainedValue: "24px" }),
263
- /* @__PURE__ */ jsxs5(DialogTitle2, { sx: { pl: 0 }, children: [
264
- "Revoke ",
265
- activeProvider?.providerName,
266
- " Access"
267
- ] })
268
- ] }),
269
- /* @__PURE__ */ jsxs5(DialogContent2, { children: [
270
- /* @__PURE__ */ jsxs5(Typography3, { children: [
271
- "Revoking access to your wallet must be done from the wallet's browser extension. Wallets grant access to specific domains please consult ",
272
- activeProvider?.providerName,
273
- "'s documentation on how to revoke access to this website:"
274
- ] }),
275
- /* @__PURE__ */ jsx5(Typography3, { children: window.location.origin })
276
- ] }),
277
- /* @__PURE__ */ jsx5(DialogActions2, { children: /* @__PURE__ */ jsx5(Button2, { variant: "contained", onClick: () => props.onClose?.({}, "escapeKeyDown"), children: "Close" }) })
278
- ] });
279
- };
280
-
281
- // src/components/wallet/table/cells/Accounts.tsx
282
- import { TableCell, Tooltip, Typography as Typography4 } from "@mui/material";
283
- import { jsx as jsx6 } from "react/jsx-runtime";
284
- var ConnectedWalletsAccountsTableCell = ({
285
- additionalAccounts,
286
- currentAccount,
287
- totalAccounts,
288
- tableCellProps
289
- }) => {
290
- return /* @__PURE__ */ jsx6(TableCell, { ...tableCellProps, children: /* @__PURE__ */ jsx6(
291
- Tooltip,
292
- {
293
- sx: { cursor: totalAccounts > 0 ? "pointer" : "auto" },
294
- title: [...currentAccount ?? [], ...additionalAccounts ?? []].map((address, index) => /* @__PURE__ */ jsx6("p", { children: address }, index)),
295
- children: /* @__PURE__ */ jsx6(Typography4, { children: totalAccounts })
296
- }
297
- ) });
298
- };
299
-
300
- // src/components/wallet/table/cells/Actions.tsx
301
- import { Check, InfoOutlined } from "@mui/icons-material";
302
- import { Button as Button3, IconButton, TableCell as TableCell2, Typography as Typography5 } from "@mui/material";
303
- import { FlexRow as FlexRow3 } from "@xylabs/react-flexbox";
304
- import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
305
- var ConnectedWalletsActionsTableCell = ({ connected, onConnect, onRevoke, tableCellProps }) => {
306
- return /* @__PURE__ */ jsx7(TableCell2, { ...tableCellProps, children: /* @__PURE__ */ jsxs6(FlexRow3, { gap: 2, justifyContent: "start", children: [
307
- connected ? /* @__PURE__ */ jsxs6(Typography5, { sx: { display: "inline-flex", gap: 0.5 }, children: [
308
- /* @__PURE__ */ jsx7(Check, {}),
309
- "Connected"
310
- ] }) : /* @__PURE__ */ jsx7(Button3, { variant: "contained", onClick: onConnect, children: "Connect" }),
311
- connected ? /* @__PURE__ */ jsx7(IconButton, { onClick: onRevoke, children: /* @__PURE__ */ jsx7(InfoOutlined, {}) }) : null
312
- ] }) });
313
- };
314
-
315
- // src/components/wallet/table/cells/ChainName.tsx
316
- import { TableCell as TableCell3 } from "@mui/material";
317
- import { jsx as jsx8 } from "react/jsx-runtime";
318
- var ConnectedWalletsChainNameTableCell = ({ chainName, tableCellProps }) => {
319
- return /* @__PURE__ */ jsx8(TableCell3, { ...tableCellProps, children: chainName });
320
- };
321
-
322
- // src/components/wallet/table/cells/State.tsx
323
- import { Switch, TableCell as TableCell4 } from "@mui/material";
324
- import { useMemo as useMemo3 } from "react";
325
- import { jsx as jsx9 } from "react/jsx-runtime";
326
- var ConnectedWalletState = ({ connected, walletRdns, tableCellProps }) => {
327
- const { disableWallet, enableWallet, wallets } = useEnabledWallets();
328
- const enabled = useMemo3(() => walletRdns ? wallets[walletRdns].enabled : false, [wallets, walletRdns]);
329
- const handleClick = (event) => {
330
- const checked = event.target?.checked;
331
- if (walletRdns) {
332
- checked ? enableWallet?.(walletRdns) : disableWallet?.(walletRdns);
333
- }
334
- };
335
- return /* @__PURE__ */ jsx9(TableCell4, { ...tableCellProps, children: /* @__PURE__ */ jsx9(Switch, { disabled: !connected, checked: connected && enabled, onChange: handleClick }) });
336
- };
337
-
338
- // src/components/wallet/table/cells/Wallet.tsx
339
- import { TableCell as TableCell5, useTheme } from "@mui/material";
340
- import { ConstrainedImage as ConstrainedImage3 } from "@xylabs/react-crypto";
341
- import { FlexRow as FlexRow4 } from "@xylabs/react-flexbox";
342
- import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
343
- var ConnectedWalletsWalletTableCell = ({ icon, walletName, tableCellProps }) => {
344
- const theme = useTheme();
345
- return /* @__PURE__ */ jsx10(TableCell5, { ...tableCellProps, children: /* @__PURE__ */ jsxs7(FlexRow4, { gap: 2, justifyContent: "start", children: [
346
- /* @__PURE__ */ jsx10(ConstrainedImage3, { constrainedValue: theme.spacing(4), src: icon }),
347
- walletName
348
- ] }) });
349
- };
350
-
351
- // src/components/wallet/table/cells/Cells.tsx
352
- var ConnectedWalletTableCells = [
353
- ConnectedWalletsWalletTableCell,
354
- ConnectedWalletsChainNameTableCell,
355
- ConnectedWalletsAccountsTableCell,
356
- ConnectedWalletsActionsTableCell,
357
- ConnectedWalletState
358
- ];
359
-
360
- // src/components/wallet/table/ConnectedWalletsTable.tsx
361
- import { Table, TableBody, TableCell as TableCell6, TableHead, TableRow as TableRow2 } from "@mui/material";
362
- import { useState as useState3 } from "react";
363
-
364
- // src/components/wallet/lib/TableHeadData.ts
365
- var WalletsTableHeadCells = [
366
- {
367
- disablePadding: false,
368
- id: "wallet",
369
- label: "Wallet",
370
- numeric: false,
371
- showOnMobile: true
372
- },
373
- {
374
- disablePadding: false,
375
- id: "chain",
376
- label: "Chain",
377
- numeric: false,
378
- showOnMobile: true
379
- },
380
- {
381
- disablePadding: false,
382
- id: "accounts",
383
- label: "Accounts",
384
- numeric: true,
385
- showOnMobile: true
386
- },
387
- {
388
- disablePadding: false,
389
- id: "actions",
390
- label: "Actions",
391
- numeric: false,
392
- showOnMobile: true
393
- },
394
- {
395
- disablePadding: false,
396
- id: "enabled",
397
- label: "Enabled",
398
- numeric: false,
399
- showOnMobile: true
400
- }
401
- ];
402
-
403
- // src/components/wallet/table/ConnectedWalletsTableRow.tsx
404
- import { TableRow } from "@mui/material";
405
- import { useEthWallet } from "@xylabs/react-crypto";
406
- import { useCallback, useMemo as useMemo4 } from "react";
407
- import { jsx as jsx11 } from "react/jsx-runtime";
408
- var WalletConnectionsTableRow = ({
409
- ignoreConnectDialog,
410
- onConnectClick,
411
- onRevoke,
412
- wallet,
413
- ...props
414
- }) => {
415
- const { currentAccount: currentAccountFromWallet, additionalAccounts, chainName, connectWallet, providerInfo } = useEthWallet(wallet);
416
- const currentAccount = currentAccountFromWallet?.toString() ? [currentAccountFromWallet.toString()] : [];
417
- const totalAccounts = (additionalAccounts?.length ?? 0) + (currentAccount?.length ?? 0);
418
- const connected = !!(currentAccount?.length ?? 0 > 0);
419
- const { icon, name, rdns } = useMemo4(() => providerInfo ?? { icon: void 0, name: void 0, rdns: void 0 }, [providerInfo]);
420
- const activeProvider = useMemo4(
421
- () => ({
422
- connectWallet,
423
- icon,
424
- providerName: name
425
- }),
426
- [connectWallet, icon, name]
427
- );
428
- const onRevokeLocal = useCallback(() => {
429
- onRevoke?.(activeProvider);
430
- }, [activeProvider, onRevoke]);
431
- const onConnectLocal = useCallback(async () => {
432
- if (ignoreConnectDialog) {
433
- await connectWallet?.();
434
- } else {
435
- onConnectClick?.(activeProvider);
436
- }
437
- }, [activeProvider, connectWallet, ignoreConnectDialog, onConnectClick]);
438
- return /* @__PURE__ */ jsx11(TableRow, { ...props, children: Object.values(ConnectedWalletTableCells).map((Cell, index) => /* @__PURE__ */ jsx11(
439
- Cell,
440
- {
441
- additionalAccounts,
442
- chainName,
443
- connected,
444
- currentAccount,
445
- icon,
446
- onConnect: onConnectLocal,
447
- onRevoke: onRevokeLocal,
448
- totalAccounts,
449
- walletName: name,
450
- walletRdns: rdns
451
- },
452
- index
453
- )) });
454
- };
455
-
456
- // src/components/wallet/table/hooks/useActiveProviderDialogState.tsx
457
- import { useState as useState2 } from "react";
458
- var useActiveProviderDialogState = (setActiveProvider) => {
459
- const [show, setShow] = useState2(false);
460
- const onSetActiveProvider = (activeProvider) => {
461
- setShow(true);
462
- setActiveProvider(activeProvider);
463
- };
464
- const onClose = () => {
465
- setShow(false);
466
- setActiveProvider({});
467
- };
468
- return [show, onSetActiveProvider, onClose];
469
- };
470
-
471
- // src/components/wallet/table/ConnectedWalletsTable.tsx
472
- import { Fragment, jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
473
- var ConnectedWalletsTable = ({ ignoreConnectDialog, onIgnoreConnectDialog, wallets, ...props }) => {
474
- const [activeProvider, setActiveProvider] = useState3();
475
- const [showConnect, onSetActiveProviderConnect, onConnectClose] = useActiveProviderDialogState(setActiveProvider);
476
- const [showRevoke, onSetActiveProviderRevoke, onRevokeClose] = useActiveProviderDialogState(setActiveProvider);
477
- return /* @__PURE__ */ jsxs8(Fragment, { children: [
478
- /* @__PURE__ */ jsxs8(Table, { ...props, children: [
479
- /* @__PURE__ */ jsx12(TableHead, { children: /* @__PURE__ */ jsx12(TableRow2, { children: WalletsTableHeadCells.map(({ disablePadding, id, label, align, width }) => /* @__PURE__ */ jsx12(TableCell6, { align, padding: disablePadding ? "none" : "normal", width: width ?? "auto", children: label }, id)) }) }),
480
- /* @__PURE__ */ jsx12(TableBody, { children: (wallets ?? []).map((wallet) => /* @__PURE__ */ jsx12(
481
- WalletConnectionsTableRow,
482
- {
483
- ignoreConnectDialog,
484
- onConnectClick: onSetActiveProviderConnect,
485
- onRevoke: onSetActiveProviderRevoke,
486
- wallet
487
- },
488
- wallet.providerInfo?.rdns
489
- )) })
490
- ] }),
491
- /* @__PURE__ */ jsx12(RevokeWalletConnectionDialog, { open: showRevoke, onClose: onRevokeClose, activeProvider }),
492
- /* @__PURE__ */ jsx12(
493
- ConnectWalletDialog,
494
- {
495
- activeProvider,
496
- onClose: onConnectClose,
497
- open: showConnect,
498
- onIgnoreConnectDialog
499
- }
500
- )
501
- ] });
502
- };
503
-
504
- // src/components/ConnectedAccountsFlexbox.tsx
505
- import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
506
- var ConnectedAccountsFlexbox = forwardRef(
507
- ({ ignoreConnectDialog, onIgnoreConnectDialog, ...props }, ref) => {
508
- const theme = useTheme2();
509
- const { totalConnectedAccounts, sortedWallets } = useDetectedWallets();
510
- return /* @__PURE__ */ jsxs9(FlexCol3, { alignItems: "stretch", justifyContent: "start", gap: 2, ref, ...props, children: [
511
- /* @__PURE__ */ jsxs9(FlexCol3, { alignItems: "start", children: [
512
- /* @__PURE__ */ jsx13(Typography6, { variant: "h2", sx: { mb: 0.5 }, children: "Detected Web3 Wallets" }),
513
- totalConnectedAccounts ? /* @__PURE__ */ jsxs9(Typography6, { variant: "subtitle1", color: theme.palette.secondary.main, sx: { opacity: 0.5 }, children: [
514
- "Total Connected Accounts: ",
515
- totalConnectedAccounts
516
- ] }) : null
517
- ] }),
518
- /* @__PURE__ */ jsx13(ConnectedWalletsTable, { wallets: sortedWallets, ignoreConnectDialog, onIgnoreConnectDialog })
519
- ] });
520
- }
521
- );
522
- ConnectedAccountsFlexbox.displayName = "ConnectedAccountsFlexbox";
523
- export {
524
- CheckboxFormControl,
525
- ConnectWalletDialog,
526
- ConnectedAccountsFlexbox,
527
- ConnectedWalletState,
528
- ConnectedWalletTableCells,
529
- ConnectedWalletsAccountsTableCell,
530
- ConnectedWalletsActionsTableCell,
531
- ConnectedWalletsChainNameTableCell,
532
- ConnectedWalletsTable,
533
- ConnectedWalletsWalletTableCell,
534
- EnabledEthWalletConnections,
535
- RevokeWalletConnectionDialog,
536
- WalletConnectionsTableRow,
537
- useActiveProviderDialogState,
538
- useDetectedWallets,
539
- useEnabledWallets,
540
- useEnabledWalletsInner
541
- };
542
- //# sourceMappingURL=index.js.map