@dynamic-labs/sdk-react-core 0.17.0-RC.3 → 0.17.0-RC.30

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 (674) hide show
  1. package/CHANGELOG.md +312 -0
  2. package/package.cjs +9 -10
  3. package/package.js +9 -10
  4. package/package.json +17 -14
  5. package/src/index.cjs +32 -4
  6. package/src/index.d.ts +6 -2
  7. package/src/index.js +20 -3
  8. package/src/lib/Main.cjs +22 -9
  9. package/src/lib/Main.js +21 -8
  10. package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.cjs +12 -2
  11. package/src/lib/components/Accordion/components/AccordionItem/AccordionItem.js +12 -2
  12. package/src/lib/components/Alert/Alert.cjs +29 -0
  13. package/src/lib/components/Alert/Alert.js +25 -0
  14. package/src/lib/components/Alert/Alert.types.d.ts +4 -1
  15. package/src/lib/components/AnimatePresence/AnimatePresence.cjs +12 -2
  16. package/src/lib/components/AnimatePresence/AnimatePresence.js +12 -2
  17. package/src/lib/components/AppOriginTile/AppOriginTile.types.d.ts +1 -1
  18. package/src/lib/components/AuthProviderIcon/AuthProviderIcon.cjs +66 -0
  19. package/src/lib/components/AuthProviderIcon/AuthProviderIcon.d.ts +10 -0
  20. package/src/lib/components/AuthProviderIcon/AuthProviderIcon.js +62 -0
  21. package/src/lib/components/AuthProviderIcon/index.d.ts +1 -0
  22. package/src/lib/components/ChainCard/ChainCard.d.ts +7 -0
  23. package/src/lib/components/Checkbox/Checkbox.cjs +3 -1
  24. package/src/lib/components/Checkbox/Checkbox.js +3 -1
  25. package/src/lib/components/Chip/Chip.cjs +13 -0
  26. package/src/lib/components/Chip/Chip.d.ts +7 -0
  27. package/src/lib/components/Chip/Chip.js +9 -0
  28. package/src/lib/components/Chip/index.d.ts +1 -0
  29. package/src/lib/components/Divider/Divider.cjs +17 -4
  30. package/src/lib/components/Divider/Divider.d.ts +6 -2
  31. package/src/lib/components/Divider/Divider.js +17 -4
  32. package/src/lib/components/ErrorContainer/ErrorContainer.cjs +5 -3
  33. package/src/lib/components/ErrorContainer/ErrorContainer.d.ts +3 -1
  34. package/src/lib/components/ErrorContainer/ErrorContainer.js +5 -3
  35. package/src/lib/components/FormFieldLabel/FormFieldLabel.cjs +10 -0
  36. package/src/lib/components/FormFieldLabel/FormFieldLabel.d.ts +8 -0
  37. package/src/lib/components/FormFieldLabel/FormFieldLabel.js +6 -0
  38. package/src/lib/components/FormFieldLabel/index.d.ts +1 -0
  39. package/src/lib/components/IconWithSpinner/IconWithSpinner.cjs +5 -1
  40. package/src/lib/components/IconWithSpinner/IconWithSpinner.js +5 -1
  41. package/src/lib/components/IconWithSpinner/Indicator/Indicator.cjs +4 -1
  42. package/src/lib/components/IconWithSpinner/Indicator/Indicator.js +4 -1
  43. package/src/lib/components/IconWithSpinner/Spinner/Spinner.cjs +4 -0
  44. package/src/lib/components/IconWithSpinner/Spinner/Spinner.js +4 -0
  45. package/src/lib/components/IconWithStatus/IconWithStatus.cjs +11 -5
  46. package/src/lib/components/IconWithStatus/IconWithStatus.d.ts +2 -1
  47. package/src/lib/components/IconWithStatus/IconWithStatus.js +11 -5
  48. package/src/lib/components/Input/Input.cjs +13 -6
  49. package/src/lib/components/Input/Input.js +13 -6
  50. package/src/lib/components/Input/Input.types.d.ts +4 -0
  51. package/src/lib/components/LogoutButton/LogoutButton.cjs +3 -1
  52. package/src/lib/components/LogoutButton/LogoutButton.js +3 -1
  53. package/src/lib/components/NetworkPicker/NetworkPicker.cjs +9 -3
  54. package/src/lib/components/NetworkPicker/NetworkPicker.d.ts +3 -2
  55. package/src/lib/components/NetworkPicker/NetworkPicker.js +9 -3
  56. package/src/lib/components/NetworkPicker/components/ActionList/ActionList.cjs +12 -2
  57. package/src/lib/components/NetworkPicker/components/ActionList/ActionList.js +12 -2
  58. package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.cjs +18 -8
  59. package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.d.ts +2 -2
  60. package/src/lib/components/NetworkPicker/components/EvmNetworkControl/EvmNetworkControl.js +18 -8
  61. package/src/lib/components/NetworkPicker/components/Network/Network.cjs +14 -4
  62. package/src/lib/components/NetworkPicker/components/Network/Network.js +14 -4
  63. package/src/lib/components/NetworkPicker/components/NetworkAction/NetworkAction.d.ts +4 -4
  64. package/src/lib/components/NetworkPicker/components/NetworkControl/NetworkControl.d.ts +2 -2
  65. package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.cjs +13 -3
  66. package/src/lib/components/NetworkPicker/components/NonNetworkSwitchingSupportedControl/NonNetworkSwitchingSupportedControl.js +13 -3
  67. package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.cjs +3 -1
  68. package/src/lib/components/NetworkPicker/components/UnsupportedNetwork/UnsupportedNetwork.js +3 -1
  69. package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +19 -8
  70. package/src/lib/components/OTPVerificationView/OTPVerificationView.js +19 -8
  71. package/src/lib/components/OverlayCard/OverlayCard.cjs +12 -2
  72. package/src/lib/components/OverlayCard/OverlayCard.js +12 -2
  73. package/src/lib/components/Popper/Popper/Popper.cjs +54 -0
  74. package/src/lib/components/Popper/Popper/Popper.d.ts +12 -0
  75. package/src/lib/components/Popper/Popper/Popper.js +50 -0
  76. package/src/lib/components/Popper/Popper/index.d.ts +1 -0
  77. package/src/lib/components/Popper/Popper.types.d.ts +6 -0
  78. package/src/lib/components/Popper/PopperContent/PopperContent.cjs +18 -0
  79. package/src/lib/components/Popper/PopperContent/PopperContent.d.ts +9 -0
  80. package/src/lib/components/Popper/PopperContent/PopperContent.js +14 -0
  81. package/src/lib/components/Popper/PopperContent/index.d.ts +1 -0
  82. package/src/lib/components/Popper/PopperContext/PopperContext.cjs +26 -0
  83. package/src/lib/components/Popper/PopperContext/PopperContext.d.ts +8 -0
  84. package/src/lib/components/Popper/PopperContext/PopperContext.js +20 -0
  85. package/src/lib/components/Popper/PopperContext/index.d.ts +1 -0
  86. package/src/lib/components/Popper/index.d.ts +2 -0
  87. package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.cjs +14 -0
  88. package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.d.ts +2 -0
  89. package/src/lib/components/Popper/utils/getChildPosition/getChildPosition.js +10 -0
  90. package/src/lib/components/Popper/utils/getChildPosition/index.d.ts +1 -0
  91. package/src/lib/components/Popper/utils/index.d.ts +3 -0
  92. package/src/lib/components/Popper/utils/isScrollable/index.d.ts +1 -0
  93. package/src/lib/components/Popper/utils/isScrollable/isScrollable.cjs +16 -0
  94. package/src/lib/components/Popper/utils/isScrollable/isScrollable.d.ts +1 -0
  95. package/src/lib/components/Popper/utils/isScrollable/isScrollable.js +12 -0
  96. package/src/lib/components/Popper/utils/watchToScrollInHierarchy/index.d.ts +1 -0
  97. package/src/lib/components/Popper/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.cjs +24 -0
  98. package/src/lib/components/Popper/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.d.ts +1 -0
  99. package/src/lib/components/Popper/utils/watchToScrollInHierarchy/watchToScrollInHierarchy.js +20 -0
  100. package/src/lib/components/Portal/Portal.cjs +12 -3
  101. package/src/lib/components/Portal/Portal.js +12 -3
  102. package/src/lib/components/Select/Select.cjs +3 -1
  103. package/src/lib/components/Select/Select.js +3 -1
  104. package/src/lib/components/SelectNetworkButton/SelectNetworkButton.cjs +13 -0
  105. package/src/lib/components/SelectNetworkButton/SelectNetworkButton.d.ts +8 -0
  106. package/src/lib/components/SelectNetworkButton/SelectNetworkButton.js +9 -0
  107. package/src/lib/components/SelectWalletChainLayout/SelectWalletChainLayout.d.ts +8 -0
  108. package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +61 -0
  109. package/src/lib/components/SendBalanceForm/SendBalanceForm.d.ts +11 -0
  110. package/src/lib/components/SendBalanceForm/SendBalanceForm.js +57 -0
  111. package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.cjs +50 -0
  112. package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.d.ts +19 -0
  113. package/src/lib/components/SendBalancePageLayout/SendBalancePageLayout.js +46 -0
  114. package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.cjs +25 -0
  115. package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.d.ts +8 -0
  116. package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/TokenBalanceCard.js +21 -0
  117. package/src/lib/components/SendBalancePageLayout/components/TokenBalanceCard/index.d.ts +1 -0
  118. package/src/lib/components/SendBalancePageLayout/components/index.d.ts +1 -0
  119. package/src/lib/components/SendBalancePageLayout/index.d.ts +2 -0
  120. package/src/lib/components/ShadowDOM/utils.cjs +3 -1
  121. package/src/lib/components/ShadowDOM/utils.js +3 -1
  122. package/src/lib/components/Spinner/spinner.cjs +3 -1
  123. package/src/lib/components/Spinner/spinner.js +3 -1
  124. package/src/lib/components/Toolkit/Toolkit.cjs +4 -1
  125. package/src/lib/components/Toolkit/Toolkit.js +4 -1
  126. package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.cjs +3 -1
  127. package/src/lib/components/Toolkit/components/LoginWithEmailViewDisplayPriorityOrderSwitch.js +3 -1
  128. package/src/lib/components/Tooltip/Tooltip.cjs +12 -2
  129. package/src/lib/components/Tooltip/Tooltip.js +12 -2
  130. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +40 -0
  131. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.d.ts +17 -0
  132. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +36 -0
  133. package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.cjs +11 -0
  134. package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.d.ts +12 -0
  135. package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/TransactionRow.js +7 -0
  136. package/src/lib/components/TransactionConfirmationPageLayout/components/TransactionRow/index.d.ts +1 -0
  137. package/src/lib/components/TransactionConfirmationPageLayout/components/index.d.ts +1 -0
  138. package/src/lib/components/TransactionConfirmationPageLayout/index.d.ts +2 -0
  139. package/src/lib/components/TransactionOriginDestination/TransactionOriginDestination.d.ts +11 -0
  140. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +56 -0
  141. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.d.ts +12 -0
  142. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +52 -0
  143. package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs +12 -2
  144. package/src/lib/components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js +12 -2
  145. package/src/lib/components/UserAddress/UserAddress.cjs +7 -7
  146. package/src/lib/components/UserAddress/UserAddress.js +8 -8
  147. package/src/lib/components/UserProfile/UserProfile.cjs +16 -8
  148. package/src/lib/components/UserProfile/UserProfile.js +12 -4
  149. package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.cjs +14 -4
  150. package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.d.ts +1 -0
  151. package/src/lib/components/UserProfile/parts/UserProfileField/UserProfileField.js +14 -4
  152. package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs +5 -3
  153. package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.d.ts +2 -0
  154. package/src/lib/components/UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js +5 -3
  155. package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.cjs +14 -4
  156. package/src/lib/components/UserProfile/parts/UserProfileSection/UserProfileSection.js +14 -4
  157. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.cjs +32 -13
  158. package/src/lib/components/UserProfile/parts/UserProfileSocialAccount/UserProfileSocialAccount.js +32 -13
  159. package/src/lib/components/index.d.ts +5 -0
  160. package/src/lib/context/AccessDeniedContext/AccessDeniedContext.cjs +30 -0
  161. package/src/lib/context/AccessDeniedContext/AccessDeniedContext.d.ts +13 -0
  162. package/src/lib/context/AccessDeniedContext/AccessDeniedContext.js +24 -0
  163. package/src/lib/context/AccessDeniedContext/index.d.ts +1 -0
  164. package/src/lib/context/DynamicContext/DynamicContext.cjs +83 -32
  165. package/src/lib/context/DynamicContext/DynamicContext.d.ts +20 -11
  166. package/src/lib/context/DynamicContext/DynamicContext.js +78 -27
  167. package/src/lib/context/DynamicContext/helpers.cjs +3 -1
  168. package/src/lib/context/DynamicContext/helpers.js +3 -1
  169. package/src/lib/context/DynamicContext/hooks/useDisplayOrderState/useDisplayOrderState.cjs +3 -1
  170. package/src/lib/context/DynamicContext/hooks/useDisplayOrderState/useDisplayOrderState.js +3 -1
  171. package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.cjs +4 -0
  172. package/src/lib/context/DynamicContext/hooks/useEmailLoginState/useEmailLoginState.js +4 -0
  173. package/src/lib/context/DynamicContext/hooks/useNameService/index.d.ts +1 -0
  174. package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.cjs +84 -0
  175. package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.d.ts +11 -0
  176. package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.js +80 -0
  177. package/src/lib/context/DynamicContext/hooks/useNameService/useNameService.types.d.ts +4 -0
  178. package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/index.d.ts +1 -0
  179. package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.cjs +27 -0
  180. package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.d.ts +14 -0
  181. package/src/lib/context/DynamicContext/hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.js +23 -0
  182. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs +12 -2
  183. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerAuthFlowCallbacks.js +12 -2
  184. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.cjs +4 -1
  185. package/src/lib/context/DynamicContext/useCustomerCallbacks/useCustomerCallbacks.js +4 -1
  186. package/src/lib/context/DynamicContext/useDynamicContext.cjs +2 -1
  187. package/src/lib/context/DynamicContext/useDynamicContext.d.ts +1 -1
  188. package/src/lib/context/DynamicContext/useDynamicContext.js +2 -1
  189. package/src/lib/context/DynamicContext/validators.cjs +3 -1
  190. package/src/lib/context/DynamicContext/validators.js +3 -1
  191. package/src/lib/context/FundingContext/FundingContext.cjs +69 -0
  192. package/src/lib/context/FundingContext/FundingContext.d.ts +14 -0
  193. package/src/lib/context/FundingContext/FundingContext.js +63 -0
  194. package/src/lib/context/FundingContext/index.d.ts +1 -0
  195. package/src/lib/context/MockContext/MockContext.cjs +4 -1
  196. package/src/lib/context/MockContext/MockContext.js +4 -1
  197. package/src/lib/context/QrCodeContext/QrCodeContext.cjs +12 -2
  198. package/src/lib/context/QrCodeContext/QrCodeContext.js +12 -2
  199. package/src/lib/context/SendBalanceContext/SendBalanceContext.cjs +73 -0
  200. package/src/lib/context/SendBalanceContext/SendBalanceContext.d.ts +4 -0
  201. package/src/lib/context/SendBalanceContext/SendBalanceContext.errors.cjs +11 -0
  202. package/src/lib/context/SendBalanceContext/SendBalanceContext.errors.d.ts +3 -0
  203. package/src/lib/context/SendBalanceContext/SendBalanceContext.errors.js +6 -0
  204. package/src/lib/context/SendBalanceContext/SendBalanceContext.js +68 -0
  205. package/src/lib/context/SendBalanceContext/SendBalanceContext.types.d.ts +9 -0
  206. package/src/lib/context/SendBalanceContext/index.d.ts +1 -0
  207. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.cjs +109 -22
  208. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.d.ts +4 -2
  209. package/src/lib/context/SocialRedirectContext/SocialRedirectContext.js +109 -22
  210. package/src/lib/context/ThemeContext/themesData.cjs +21 -19
  211. package/src/lib/context/ThemeContext/themesData.d.ts +3 -3
  212. package/src/lib/context/ThemeContext/themesData.js +21 -19
  213. package/src/lib/context/ViewContext/ViewContext.cjs +21 -12
  214. package/src/lib/context/ViewContext/ViewContext.d.ts +10 -8
  215. package/src/lib/context/ViewContext/ViewContext.js +22 -13
  216. package/src/lib/data/api.cjs +38 -19
  217. package/src/lib/data/api.d.ts +10 -3
  218. package/src/lib/data/api.js +23 -5
  219. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.cjs +14 -4
  220. package/src/lib/layout/DynamicAuthLayout/DynamicAuthLayout.js +14 -4
  221. package/src/lib/layout/DynamicAuthLayout/Footer/Footer.cjs +13 -3
  222. package/src/lib/layout/DynamicAuthLayout/Footer/Footer.js +13 -3
  223. package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.cjs +13 -3
  224. package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/Item/Item.js +13 -3
  225. package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.cjs +14 -4
  226. package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletExtensionOrAppContinueButton/WalletExtensionOrAppContinueButton.js +13 -3
  227. package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletListFooterContent.cjs +14 -5
  228. package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletListFooterContent/WalletListFooterContent.js +12 -3
  229. package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.cjs +16 -6
  230. package/src/lib/layout/DynamicAuthLayout/FooterContent/WalletMoreInfoContent/WalletMoreInfoContent.js +16 -6
  231. package/src/lib/layout/DynamicAuthLayout/Header/header.cjs +23 -10
  232. package/src/lib/layout/DynamicAuthLayout/Header/header.js +23 -10
  233. package/src/lib/main.global.cjs +1 -1
  234. package/src/lib/main.global.js +1 -1
  235. package/src/lib/modals/SendBalanceModal/SendBalanceModal.cjs +66 -0
  236. package/src/lib/modals/SendBalanceModal/SendBalanceModal.d.ts +10 -0
  237. package/src/lib/modals/SendBalanceModal/SendBalanceModal.js +62 -0
  238. package/src/lib/modals/SendBalanceModal/index.d.ts +1 -0
  239. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +20 -10
  240. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +20 -10
  241. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +35 -99
  242. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +37 -101
  243. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.types.d.ts +0 -4
  244. package/src/lib/modals/index.d.ts +1 -0
  245. package/src/lib/shared/assets/add.cjs +8 -9
  246. package/src/lib/shared/assets/add.js +8 -9
  247. package/src/lib/shared/assets/index.d.ts +1 -0
  248. package/src/lib/shared/assets/send.cjs +56 -0
  249. package/src/lib/shared/assets/send.js +32 -0
  250. package/src/lib/shared/types/index.d.ts +14 -4
  251. package/src/lib/shared/utils/functions/ceil/ceil.cjs +10 -0
  252. package/src/lib/shared/utils/functions/ceil/ceil.d.ts +1 -0
  253. package/src/lib/shared/utils/functions/ceil/ceil.js +6 -0
  254. package/src/lib/shared/utils/functions/ceil/index.d.ts +1 -0
  255. package/src/lib/shared/utils/functions/chain/getChainDisplayName.cjs +2 -2
  256. package/src/lib/shared/utils/functions/chain/getChainDisplayName.js +1 -1
  257. package/src/lib/shared/utils/functions/chain/getChainIcon.cjs +2 -2
  258. package/src/lib/shared/utils/functions/chain/getChainIcon.js +1 -1
  259. package/src/lib/shared/utils/functions/formatBigNumber/formatBigNumber.cjs +21 -0
  260. package/src/lib/shared/utils/functions/formatBigNumber/formatBigNumber.d.ts +2 -0
  261. package/src/lib/shared/utils/functions/formatBigNumber/formatBigNumber.js +17 -0
  262. package/src/lib/shared/utils/functions/formatBigNumber/index.d.ts +1 -0
  263. package/src/lib/shared/utils/functions/getWalletListItemLabel/getWalletListItemLabel.cjs +5 -10
  264. package/src/lib/shared/utils/functions/getWalletListItemLabel/getWalletListItemLabel.js +3 -8
  265. package/src/lib/shared/utils/functions/index.d.ts +3 -0
  266. package/src/lib/shared/utils/functions/shortenEmail/shortenEmail.cjs +27 -0
  267. package/src/lib/shared/utils/functions/shortenEmail/shortenEmail.d.ts +6 -0
  268. package/src/lib/shared/utils/functions/shortenEmail/shortenEmail.js +23 -0
  269. package/src/lib/shared/utils/functions/trimEnd/index.d.ts +1 -0
  270. package/src/lib/shared/utils/functions/trimEnd/trimEnd.cjs +13 -0
  271. package/src/lib/shared/utils/functions/trimEnd/trimEnd.d.ts +1 -0
  272. package/src/lib/shared/utils/functions/trimEnd/trimEnd.js +9 -0
  273. package/src/lib/shared/utils/hooks/index.d.ts +1 -0
  274. package/src/lib/shared/utils/hooks/useLocalStorage/useLocalStorage.cjs +3 -1
  275. package/src/lib/shared/utils/hooks/useLocalStorage/useLocalStorage.js +3 -1
  276. package/src/lib/styles/index.shadow.cjs +1 -1
  277. package/src/lib/styles/index.shadow.js +1 -1
  278. package/src/lib/utils/constants/localStorage.cjs +3 -1
  279. package/src/lib/utils/constants/localStorage.d.ts +1 -0
  280. package/src/lib/utils/constants/localStorage.js +3 -2
  281. package/src/lib/utils/functions/generateMessages/index.cjs +4 -3
  282. package/src/lib/utils/functions/generateMessages/index.js +2 -1
  283. package/src/lib/utils/functions/getAppOrigin/getAppOrigin.cjs +12 -0
  284. package/src/lib/utils/functions/getAppOrigin/getAppOrigin.d.ts +1 -0
  285. package/src/lib/utils/functions/getAppOrigin/getAppOrigin.js +8 -0
  286. package/src/lib/utils/functions/getAppOrigin/index.d.ts +1 -0
  287. package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.cjs +3 -1
  288. package/src/lib/utils/functions/getDynamicLayoutData/getDynamicLayoutData.js +3 -1
  289. package/src/lib/utils/functions/getEnabledKYC/index.cjs +5 -0
  290. package/src/lib/utils/functions/getEnabledKYC/index.d.ts +5 -0
  291. package/src/lib/utils/functions/getEnabledKYC/index.js +5 -0
  292. package/src/lib/utils/functions/getNetwork/getNetwork.cjs +1 -6
  293. package/src/lib/utils/functions/getNetwork/getNetwork.d.ts +1 -1
  294. package/src/lib/utils/functions/getNetwork/getNetwork.js +1 -6
  295. package/src/lib/utils/functions/getReferencedAccount/getReferencedAccount.cjs +29 -0
  296. package/src/lib/utils/functions/getReferencedAccount/getReferencedAccount.d.ts +7 -0
  297. package/src/lib/utils/functions/getReferencedAccount/getReferencedAccount.js +25 -0
  298. package/src/lib/utils/functions/getReferencedAccount/index.d.ts +1 -0
  299. package/src/lib/utils/functions/getUserProfileFields/getUserProfileFields.cjs +78 -0
  300. package/src/lib/utils/functions/getUserProfileFields/getUserProfileFields.d.ts +29 -0
  301. package/src/lib/utils/functions/getUserProfileFields/getUserProfileFields.js +72 -0
  302. package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.cjs +2 -0
  303. package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.d.ts +1 -0
  304. package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.js +2 -0
  305. package/src/lib/utils/functions/getWalletProvider/getWalletProvider.cjs +2 -2
  306. package/src/lib/utils/functions/getWalletProvider/getWalletProvider.js +1 -1
  307. package/src/lib/utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.cjs +1 -1
  308. package/src/lib/utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.d.ts +1 -2
  309. package/src/lib/utils/functions/getWalletVerifiedCredential/getWalletVerifiedCredential.js +1 -1
  310. package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.cjs +6 -3
  311. package/src/lib/utils/functions/handleUnlinkHelper/handleUnlinkHelper.js +4 -1
  312. package/src/lib/utils/functions/hasWalletGroupFlag/hasWalletGroupFlag.d.ts +1 -0
  313. package/src/lib/utils/functions/index.d.ts +3 -0
  314. package/src/lib/utils/functions/isNetworkUnsupported/index.d.ts +1 -0
  315. package/src/lib/utils/functions/isNetworkUnsupported/isNetworkUnsupported.cjs +12 -0
  316. package/src/lib/utils/functions/isNetworkUnsupported/isNetworkUnsupported.d.ts +2 -0
  317. package/src/lib/utils/functions/isNetworkUnsupported/isNetworkUnsupported.js +8 -0
  318. package/src/lib/utils/functions/isProgrammableNetworkSwitchSupported/isProgrammableNetworkSwitchSupported.cjs +16 -1
  319. package/src/lib/utils/functions/isProgrammableNetworkSwitchSupported/isProgrammableNetworkSwitchSupported.d.ts +6 -0
  320. package/src/lib/utils/functions/isProgrammableNetworkSwitchSupported/isProgrammableNetworkSwitchSupported.js +16 -1
  321. package/src/lib/utils/functions/isSameWalletName/isSameWalletName.cjs +2 -2
  322. package/src/lib/utils/functions/isSameWalletName/isSameWalletName.js +1 -1
  323. package/src/lib/utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.cjs +3 -3
  324. package/src/lib/utils/functions/isSelectedWalletAlreadyConnected/isSelectedWalletAlreadyConnected.js +1 -1
  325. package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.cjs +6 -1
  326. package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.d.ts +1 -1
  327. package/src/lib/utils/functions/isSupportedNetwork/isSupportedNetwork.js +6 -1
  328. package/src/lib/utils/functions/isWalletConnected/isWalletConnected.cjs +2 -2
  329. package/src/lib/utils/functions/isWalletConnected/isWalletConnected.js +1 -1
  330. package/src/lib/utils/functions/isWalletLinked/index.d.ts +1 -0
  331. package/src/lib/utils/functions/isWalletLinked/isWalletLinked.cjs +15 -0
  332. package/src/lib/utils/functions/isWalletLinked/isWalletLinked.d.ts +2 -0
  333. package/src/lib/utils/functions/isWalletLinked/isWalletLinked.js +11 -0
  334. package/src/lib/utils/functions/parseWalletLinks/parseWalletLinks.cjs +6 -3
  335. package/src/lib/utils/functions/parseWalletLinks/parseWalletLinks.d.ts +2 -0
  336. package/src/lib/utils/functions/parseWalletLinks/parseWalletLinks.js +4 -1
  337. package/src/lib/utils/functions/requiresTwoStepAuthentication/requiresTwoStepAuthentication.cjs +2 -2
  338. package/src/lib/utils/functions/requiresTwoStepAuthentication/requiresTwoStepAuthentication.js +1 -1
  339. package/src/lib/utils/functions/walletListBuilder/walletListBuilder.cjs +6 -7
  340. package/src/lib/utils/functions/walletListBuilder/walletListBuilder.js +1 -2
  341. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +7 -5
  342. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +4 -2
  343. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.cjs +3 -1
  344. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSignSplitSteps/useConnectAndSignSplitSteps.js +3 -1
  345. package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.cjs +4 -0
  346. package/src/lib/utils/hooks/authenticationHooks/useEmailVerificationRequest/useEmailVerificationRequest.js +4 -0
  347. package/src/lib/utils/hooks/multiWallet/index.d.ts +1 -0
  348. package/src/lib/utils/hooks/multiWallet/useMultiWalletWidgetState/useMultiWalletWidgetState.cjs +0 -2
  349. package/src/lib/utils/hooks/multiWallet/useMultiWalletWidgetState/useMultiWalletWidgetState.js +0 -2
  350. package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +67 -8
  351. package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.d.ts +10 -3
  352. package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +68 -9
  353. package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.cjs +5 -1
  354. package/src/lib/utils/hooks/multiWallet/useVerifyOnAwaitingSignature/useVerifyOnAwaitingSignature.js +5 -1
  355. package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.cjs +7 -3
  356. package/src/lib/utils/hooks/useAuthenticateConnectedUser/useAuthenticateConnectedUser.js +5 -1
  357. package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.cjs +2 -2
  358. package/src/lib/utils/hooks/useClearWalletConnectSessions/useClearWalletConnectSessions.js +1 -1
  359. package/src/lib/utils/hooks/useConfirmationModal/useConfirmationModal.cjs +6 -1
  360. package/src/lib/utils/hooks/useConfirmationModal/useConfirmationModal.js +6 -1
  361. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +6 -3
  362. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +1 -1
  363. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +4 -1
  364. package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.cjs +3 -1
  365. package/src/lib/utils/hooks/useConnectWithEmail/useConnectWithEmail.js +3 -1
  366. package/src/lib/utils/hooks/useConnectedAccountWallet/index.d.ts +1 -0
  367. package/src/lib/utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.cjs +30 -0
  368. package/src/lib/utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.d.ts +2 -0
  369. package/src/lib/utils/hooks/useConnectedAccountWallet/useConnectedAccountWallet.js +26 -0
  370. package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.cjs +4 -1
  371. package/src/lib/utils/hooks/useCreateUserProfileByJWTCallback/useCreateUserProfileByJWTCallback.js +4 -1
  372. package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.cjs +53 -31
  373. package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.d.ts +5 -5
  374. package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.js +53 -31
  375. package/src/lib/utils/hooks/useFetchNonce/useFetchNonce.cjs +4 -2
  376. package/src/lib/utils/hooks/useFetchNonce/useFetchNonce.js +3 -1
  377. package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.cjs +5 -2
  378. package/src/lib/utils/hooks/useFetchProjectSettings/useFetchProjectSettings.js +4 -1
  379. package/src/lib/utils/hooks/useFetchWalletsForChainsMap/useFetchWalletsForChainsMap.cjs +3 -1
  380. package/src/lib/utils/hooks/useFetchWalletsForChainsMap/useFetchWalletsForChainsMap.js +3 -1
  381. package/src/lib/utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.cjs +25 -2
  382. package/src/lib/utils/hooks/useHandleUnlinkWallet/useHandleUnlinkWallet.js +25 -2
  383. package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.cjs +16 -6
  384. package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.d.ts +5 -0
  385. package/src/lib/utils/hooks/useKYCFlag/useKYCFlag.js +16 -6
  386. package/src/lib/utils/hooks/useMultiWalletFlag/useMultiWalletFlag.cjs +3 -1
  387. package/src/lib/utils/hooks/useMultiWalletFlag/useMultiWalletFlag.js +3 -1
  388. package/src/lib/utils/hooks/useMutation/useMutation.cjs +4 -4
  389. package/src/lib/utils/hooks/useMutation/useMutation.js +1 -1
  390. package/src/lib/utils/hooks/usePrevious/usePrevious.cjs +0 -1
  391. package/src/lib/utils/hooks/usePrevious/usePrevious.d.ts +1 -1
  392. package/src/lib/utils/hooks/usePrevious/usePrevious.js +0 -1
  393. package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.cjs +8 -5
  394. package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.d.ts +2 -2
  395. package/src/lib/utils/hooks/useRpcProviders/useRpcProviders.js +10 -7
  396. package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.cjs +7 -0
  397. package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.d.ts +7 -0
  398. package/src/lib/utils/hooks/useUpdateUserProfileByJWTCallback/useUpdateUserProfileByJWTCallback.js +7 -0
  399. package/src/lib/utils/hooks/useUserDataForm/useUserDataForm.cjs +6 -4
  400. package/src/lib/utils/hooks/useUserDataForm/useUserDataForm.js +5 -3
  401. package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs +4 -3
  402. package/src/lib/utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js +4 -3
  403. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +30 -20
  404. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.d.ts +1 -1
  405. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +26 -16
  406. package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.cjs +37 -0
  407. package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.d.ts +8 -0
  408. package/src/lib/utils/hooks/useWalletConnectors/reconnectSocialWallet.js +33 -0
  409. package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.cjs +54 -75
  410. package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.d.ts +2 -1
  411. package/src/lib/utils/hooks/useWalletConnectors/useWalletConnectors.js +53 -74
  412. package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.cjs +55 -0
  413. package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.d.ts +8 -0
  414. package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/createLinkedWalletsFromWalletOptions.js +51 -0
  415. package/src/lib/utils/hooks/useWalletConnectors/utils/createLinkedWalletsFromWalletOptions/index.d.ts +1 -0
  416. package/src/lib/utils/hooks/useWalletConnectors/utils/index.d.ts +2 -0
  417. package/src/lib/utils/hooks/useWalletConnectors/utils/primaryWalletIdValidator/index.d.ts +1 -0
  418. package/src/lib/utils/hooks/useWalletConnectors/utils/primaryWalletIdValidator/primaryWalletIdValidator.cjs +7 -0
  419. package/src/lib/utils/hooks/useWalletConnectors/utils/primaryWalletIdValidator/primaryWalletIdValidator.d.ts +1 -0
  420. package/src/lib/utils/hooks/useWalletConnectors/utils/primaryWalletIdValidator/primaryWalletIdValidator.js +3 -0
  421. package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.cjs +92 -55
  422. package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +6 -4
  423. package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.js +91 -54
  424. package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.cjs +17 -15
  425. package/src/lib/utils/hooks/useWalletItemActions/useWalletItemActions.js +15 -13
  426. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +50 -14
  427. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.d.ts +1 -1
  428. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +50 -14
  429. package/src/lib/utils/hooks/useWallets/useWallets.cjs +28 -34
  430. package/src/lib/utils/hooks/useWallets/useWallets.d.ts +6 -6
  431. package/src/lib/utils/hooks/useWallets/useWallets.js +29 -35
  432. package/src/lib/utils/hooks/useWalletsConnectionState/index.d.ts +1 -0
  433. package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.cjs +42 -0
  434. package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.d.ts +11 -0
  435. package/src/lib/utils/hooks/useWalletsConnectionState/useWalletsConnectionState.js +38 -0
  436. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +13 -4
  437. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +13 -4
  438. package/src/lib/views/CollectUserDataView/CollectUserDataView.cjs +19 -9
  439. package/src/lib/views/CollectUserDataView/CollectUserDataView.js +19 -9
  440. package/src/lib/views/CollectUserDataView/{UserDataForm/UserDataForm.cjs → OnboardingUserDataForm/OnboardingUserDataForm.cjs} +22 -11
  441. package/src/lib/views/CollectUserDataView/{UserDataForm/UserDataForm.d.ts → OnboardingUserDataForm/OnboardingUserDataForm.d.ts} +1 -1
  442. package/src/lib/views/CollectUserDataView/{UserDataForm/UserDataForm.js → OnboardingUserDataForm/OnboardingUserDataForm.js} +22 -11
  443. package/src/lib/views/CollectUserDataView/OnboardingUserDataForm/index.d.ts +1 -0
  444. package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +14 -5
  445. package/src/lib/views/CollectUserDataView/UserDataFields/index.js +14 -5
  446. package/src/lib/views/CollectUserDataView/fieldsConfig.cjs +5 -3
  447. package/src/lib/views/CollectUserDataView/fieldsConfig.js +5 -3
  448. package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.cjs +15 -5
  449. package/src/lib/views/CollectUserDataViewLoginWithEmail/CollectUserDataViewLoginWithEmail.js +15 -5
  450. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.cjs +16 -6
  451. package/src/lib/views/EmailConfirmationWaitingView/EmailConfirmationWaitingView.js +15 -5
  452. package/src/lib/views/EmailUpdate/EmailUpdate.cjs +14 -4
  453. package/src/lib/views/EmailUpdate/EmailUpdate.js +14 -4
  454. package/src/lib/views/EmailVerification/EmailVerification.cjs +24 -11
  455. package/src/lib/views/EmailVerification/EmailVerification.js +23 -10
  456. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +13 -3
  457. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +12 -2
  458. package/src/lib/views/LoginWithEmailView/LoginWithEmailView.cjs +14 -7
  459. package/src/lib/views/LoginWithEmailView/LoginWithEmailView.js +14 -7
  460. package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.cjs +13 -3
  461. package/src/lib/views/LoginWithEmailView/components/ListItemButton/ListItemButton.js +13 -3
  462. package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.cjs +14 -7
  463. package/src/lib/views/LoginWithEmailView/components/LoginWithEmailForm/LoginWithEmailForm.js +14 -7
  464. package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.cjs +26 -10
  465. package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +26 -10
  466. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +38 -10
  467. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +38 -10
  468. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +15 -5
  469. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +15 -5
  470. package/src/lib/views/NoAccess/NoAccess.cjs +27 -30
  471. package/src/lib/views/NoAccess/NoAccess.js +28 -31
  472. package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +12 -3
  473. package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +12 -3
  474. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +13 -3
  475. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +13 -3
  476. package/src/lib/views/PendingConnectView/PendingConnectView.cjs +15 -6
  477. package/src/lib/views/PendingConnectView/PendingConnectView.js +14 -5
  478. package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +16 -7
  479. package/src/lib/views/PendingSignatureView/PendingSignatureView.js +16 -7
  480. package/src/lib/views/QrCodeView/QRCode.cjs +2 -2
  481. package/src/lib/views/QrCodeView/QRCode.js +1 -1
  482. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +14 -4
  483. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +13 -3
  484. package/src/lib/views/QrCodeView/QrCodeView.cjs +13 -4
  485. package/src/lib/views/QrCodeView/QrCodeView.js +13 -4
  486. package/src/lib/views/SendBalanceView/SendBalanceView.cjs +116 -0
  487. package/src/lib/views/SendBalanceView/SendBalanceView.d.ts +13 -0
  488. package/src/lib/views/SendBalanceView/SendBalanceView.js +112 -0
  489. package/src/lib/views/SendBalanceView/index.d.ts +1 -0
  490. package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +17 -12
  491. package/src/lib/views/SocialRedirectView/SocialRedirectView.js +17 -12
  492. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +60 -0
  493. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.d.ts +2 -0
  494. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +56 -0
  495. package/src/lib/views/SocialWrongAccountView/index.d.ts +1 -0
  496. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +94 -0
  497. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.d.ts +14 -0
  498. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +90 -0
  499. package/src/lib/{modals/TransactionConfirmationModal → views/TransactionConfirmationView}/helpers/transactionErrorMessage.cjs +7 -1
  500. package/src/lib/{modals/TransactionConfirmationModal → views/TransactionConfirmationView}/helpers/transactionErrorMessage.d.ts +1 -0
  501. package/src/lib/views/TransactionConfirmationView/helpers/transactionErrorMessage.js +18 -0
  502. package/src/lib/views/TransactionConfirmationView/hooks/index.d.ts +1 -0
  503. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/index.d.ts +1 -0
  504. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.cjs +91 -0
  505. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.d.ts +18 -0
  506. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.js +87 -0
  507. package/src/lib/views/TransactionConfirmationView/index.d.ts +2 -0
  508. package/src/lib/views/WalletList/SearchInstead/SearchInstead.cjs +13 -3
  509. package/src/lib/views/WalletList/SearchInstead/SearchInstead.js +13 -3
  510. package/src/lib/views/WalletList/WalletList.cjs +6 -3
  511. package/src/lib/views/WalletList/WalletList.js +6 -3
  512. package/src/lib/views/WalletList/WalletListItem/WalletListItem.cjs +12 -3
  513. package/src/lib/views/WalletList/WalletListItem/WalletListItem.js +12 -3
  514. package/src/lib/views/WalletList/data.cjs +10 -7
  515. package/src/lib/views/WalletList/data.d.ts +3 -3
  516. package/src/lib/views/WalletList/data.js +10 -7
  517. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +14 -5
  518. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +14 -5
  519. package/src/lib/views/WalletUsedView/WalletUsedView.cjs +15 -6
  520. package/src/lib/views/WalletUsedView/WalletUsedView.js +13 -4
  521. package/src/lib/views/viewToComponentMap.cjs +2 -0
  522. package/src/lib/views/viewToComponentMap.js +2 -0
  523. package/src/lib/widgets/DynamicWidget/DynamicWidget.cjs +13 -3
  524. package/src/lib/widgets/DynamicWidget/DynamicWidget.js +13 -3
  525. package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.cjs +20 -10
  526. package/src/lib/widgets/DynamicWidget/components/AccountControl/AccountControl.js +20 -10
  527. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +79 -0
  528. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.d.ts +2 -0
  529. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +75 -0
  530. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/index.d.ts +1 -0
  531. package/src/lib/widgets/DynamicWidget/components/Balance/Balance.cjs +14 -4
  532. package/src/lib/widgets/DynamicWidget/components/Balance/Balance.d.ts +1 -1
  533. package/src/lib/widgets/DynamicWidget/components/Balance/Balance.js +14 -4
  534. package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.cjs +18 -30
  535. package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.d.ts +6 -2
  536. package/src/lib/widgets/DynamicWidget/components/DotsMenu/DotsMenu.js +19 -31
  537. package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.cjs +17 -6
  538. package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.js +17 -6
  539. package/src/lib/widgets/DynamicWidget/components/DotsMenuDropdown/DotsMenuDropdown.types.d.ts +3 -2
  540. package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.cjs +1 -1
  541. package/src/lib/widgets/DynamicWidget/components/DynamicNav/DynamicNav.js +1 -1
  542. package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.cjs +18 -5
  543. package/src/lib/widgets/DynamicWidget/components/DynamicUserProfile/DynamicUserProfile.js +17 -4
  544. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +14 -4
  545. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.d.ts +5 -2
  546. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +14 -4
  547. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +48 -26
  548. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.d.ts +5 -2
  549. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +50 -28
  550. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetPrompts/DynamicWidgetPrompts.cjs +18 -8
  551. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetPrompts/DynamicWidgetPrompts.js +18 -8
  552. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.cjs +13 -3
  553. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetSwitcher/DynamicWidgetSwitcher.js +13 -3
  554. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.cjs +13 -3
  555. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetDropdown/DynamicWidgetDropdown.js +13 -3
  556. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.cjs +16 -6
  557. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetVariants/variants/DynamicWidgetModal/DynamicWidgetModal.js +16 -6
  558. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/DynamicWidgetViews.cjs +2 -0
  559. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/DynamicWidgetViews.js +2 -0
  560. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.cjs +16 -8
  561. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetWallets/DynamicWidgetWallets.js +16 -8
  562. package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.cjs +14 -4
  563. package/src/lib/widgets/DynamicWidget/components/EmailConnectorPendingSignModalContent/EmailConnectorPendingSignModalContent.js +14 -4
  564. package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +25 -4
  565. package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +25 -4
  566. package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +13 -3
  567. package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +13 -3
  568. package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.cjs +14 -4
  569. package/src/lib/widgets/DynamicWidget/components/SingleWalletButtons/SingleWalletButtons.js +14 -4
  570. package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.cjs +37 -21
  571. package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.d.ts +2 -3
  572. package/src/lib/widgets/DynamicWidget/components/Wallet/Wallet.js +37 -21
  573. package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.cjs +4 -0
  574. package/src/lib/widgets/DynamicWidget/components/WalletIconWithStatus/WalletIconWithStatus.js +4 -0
  575. package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.cjs +42 -6
  576. package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.d.ts +2 -1
  577. package/src/lib/widgets/DynamicWidget/components/WidgetPortal/WidgetPortal.js +43 -7
  578. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.cjs +14 -12
  579. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.d.ts +1 -5
  580. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.js +15 -13
  581. package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.cjs +4 -0
  582. package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.d.ts +1 -1
  583. package/src/lib/widgets/DynamicWidget/hooks/useFetchBalance/useFetchBalance.js +4 -0
  584. package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.cjs +3 -3
  585. package/src/lib/widgets/DynamicWidget/hooks/useFetchChain/useFetchChain.js +2 -2
  586. package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.cjs +2 -2
  587. package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.d.ts +1 -1
  588. package/src/lib/widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.js +1 -1
  589. package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/index.d.ts +1 -0
  590. package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.cjs +22 -0
  591. package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.d.ts +2 -0
  592. package/src/lib/widgets/DynamicWidget/hooks/useFetchNameService/useFetchNameService.js +18 -0
  593. package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.cjs +46 -0
  594. package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.d.ts +13 -0
  595. package/src/lib/widgets/DynamicWidget/prompts/DefaultPromptModal/DefaultPromptModal.js +42 -0
  596. package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.cjs +14 -4
  597. package/src/lib/widgets/DynamicWidget/prompts/DetectedNewWalletModal/DetectedNewWalletModal.js +14 -4
  598. package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.cjs +60 -0
  599. package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.d.ts +2 -0
  600. package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/NoQrNotInstalledModalView.js +56 -0
  601. package/src/lib/widgets/DynamicWidget/prompts/NoQrNotInstalledModalView/index.d.ts +1 -0
  602. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.cjs +17 -36
  603. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/PendingAccountSwitchModal.js +18 -37
  604. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.cjs +44 -0
  605. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.d.ts +7 -0
  606. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/SwitchAccountView.js +40 -0
  607. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchAccountView/index.d.ts +1 -0
  608. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.cjs +70 -0
  609. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.d.ts +8 -0
  610. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/SwitchOrUseActiveAccountView.js +66 -0
  611. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchModal/SwitchOrUseActiveAccountView/index.d.ts +1 -0
  612. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.cjs +60 -0
  613. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.d.ts +2 -0
  614. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/PendingAccountSwitchToLinkModal.js +56 -0
  615. package/src/lib/widgets/DynamicWidget/prompts/PendingAccountSwitchToLinkModal/index.d.ts +1 -0
  616. package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.cjs +63 -0
  617. package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.d.ts +2 -0
  618. package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/PendingConnectionModal.js +59 -0
  619. package/src/lib/widgets/DynamicWidget/prompts/PendingConnectionModal/index.d.ts +1 -0
  620. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +67 -0
  621. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.d.ts +2 -0
  622. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +63 -0
  623. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.cjs +5 -33
  624. package/src/lib/widgets/DynamicWidget/prompts/PendingSignModal/PendingSignModal.js +3 -31
  625. package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.cjs +16 -9
  626. package/src/lib/widgets/DynamicWidget/prompts/PrimaryNotConnectedModal/PrimaryNotConnectedModal.js +17 -10
  627. package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.cjs +14 -4
  628. package/src/lib/widgets/DynamicWidget/prompts/QrCodeModalView/QrCodeModalView.js +14 -4
  629. package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.cjs +17 -9
  630. package/src/lib/widgets/DynamicWidget/prompts/UnlinkWalletPopUp/UnlinkWalletPopUp.js +17 -9
  631. package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.cjs +21 -9
  632. package/src/lib/widgets/DynamicWidget/views/EditProfileView/EditProfileView.js +20 -8
  633. package/src/lib/widgets/DynamicWidget/views/IndexView/IndexView.cjs +14 -4
  634. package/src/lib/widgets/DynamicWidget/views/IndexView/IndexView.js +14 -4
  635. package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.cjs +19 -9
  636. package/src/lib/widgets/DynamicWidget/views/ProfileView/ProfileView.js +19 -9
  637. package/src/lib/widgets/DynamicWidget/views/SendBalanceWidgetView/SendBalanceWidgetView.cjs +15 -0
  638. package/src/lib/widgets/DynamicWidget/views/SendBalanceWidgetView/SendBalanceWidgetView.d.ts +2 -0
  639. package/src/lib/widgets/DynamicWidget/views/SendBalanceWidgetView/SendBalanceWidgetView.js +11 -0
  640. package/src/lib/widgets/DynamicWidget/views/SendBalanceWidgetView/index.d.ts +1 -0
  641. package/src/lib/widgets/DynamicWidget/views/index.d.ts +1 -0
  642. package/src/lib/widgets/FundingWidget/FundingWidget.cjs +10 -0
  643. package/src/lib/widgets/FundingWidget/FundingWidget.d.ts +2 -0
  644. package/src/lib/widgets/FundingWidget/FundingWidget.js +6 -0
  645. package/src/lib/widgets/FundingWidget/index.d.ts +1 -0
  646. package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.cjs +63 -0
  647. package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.d.ts +5 -0
  648. package/src/lib/widgets/FundingWidget/views/FundWalletView/FundWalletView.js +58 -0
  649. package/src/lib/widgets/FundingWidget/views/FundWalletView/index.d.ts +1 -0
  650. package/src/lib/widgets/index.d.ts +1 -0
  651. package/src/polyfills.cjs +11 -0
  652. package/src/polyfills.d.ts +1 -0
  653. package/src/polyfills.js +9 -0
  654. package/src/shim/process.cjs +238 -0
  655. package/src/shim/process.d.ts +34 -0
  656. package/src/shim/process.js +234 -0
  657. package/src/lib/modals/TransactionConfirmationModal/helpers/transactionErrorMessage.js +0 -12
  658. package/src/lib/utils/hooks/useWallets/utils/getMagicLinkApiKeyFromProviders/getMagicLinkApiKeyFromProviders.cjs +0 -12
  659. package/src/lib/utils/hooks/useWallets/utils/getMagicLinkApiKeyFromProviders/getMagicLinkApiKeyFromProviders.d.ts +0 -2
  660. package/src/lib/utils/hooks/useWallets/utils/getMagicLinkApiKeyFromProviders/getMagicLinkApiKeyFromProviders.js +0 -8
  661. package/src/lib/utils/hooks/useWallets/utils/getMagicLinkApiKeyFromProviders/index.d.ts +0 -1
  662. package/src/lib/utils/hooks/useWallets/utils/index.d.ts +0 -1
  663. package/src/lib/views/CollectUserDataView/UserDataForm/index.d.ts +0 -1
  664. package/src/lib/widgets/DynamicWidget/components/DefaultPendingSignModalContent/DefaultPendingSignModalContent.cjs +0 -43
  665. package/src/lib/widgets/DynamicWidget/components/DefaultPendingSignModalContent/DefaultPendingSignModalContent.d.ts +0 -2
  666. package/src/lib/widgets/DynamicWidget/components/DefaultPendingSignModalContent/DefaultPendingSignModalContent.js +0 -39
  667. package/src/lib/widgets/DynamicWidget/components/DefaultPendingSignModalContent/DefaultPendingSignModalContent.types.d.ts +0 -7
  668. package/src/lib/widgets/DynamicWidget/components/DotsMenuWrapper/DotsMenuWrapper.cjs +0 -64
  669. package/src/lib/widgets/DynamicWidget/components/DotsMenuWrapper/DotsMenuWrapper.js +0 -60
  670. package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.cjs +0 -55
  671. package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.d.ts +0 -6
  672. package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/DetectedKnownSecondaryWalletModal.js +0 -51
  673. package/src/lib/widgets/DynamicWidget/prompts/DetectedKnownSecondaryWalletModal/index.d.ts +0 -1
  674. /package/src/lib/widgets/DynamicWidget/{components → prompts/PendingSignModal}/DefaultPendingSignModalContent/index.d.ts +0 -0
@@ -2,128 +2,64 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var _tslib = require('../../../../_virtual/_tslib.cjs');
6
5
  var jsxRuntime = require('react/jsx-runtime');
7
6
  var React = require('react');
8
- var ethers = require('ethers');
9
- var multiWallet = require('@dynamic-labs/multi-wallet');
10
- var Typography = require('../../components/Typography/Typography.cjs');
11
7
  require('@dynamic-labs/sdk-api');
12
8
  require('../../shared/logger.cjs');
13
- var getChainIcon = require('../../shared/utils/functions/chain/getChainIcon.cjs');
14
- var shortenWalletAddress = require('../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.cjs');
15
- require('../../utils/constants/colors.cjs');
16
- var usePreventPageScroll = require('../../shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.cjs');
17
9
  require('@dynamic-labs/iconic');
10
+ require('@dynamic-labs/wallet-connector-core');
18
11
  require('../../context/ViewContext/ViewContext.cjs');
19
- var close = require('../../shared/assets/close.cjs');
20
- var signCircle = require('../../shared/assets/sign-circle.cjs');
12
+ require('@dynamic-labs/utils');
13
+ require('../../utils/constants/colors.cjs');
14
+ require('ethers');
15
+ var usePreventPageScroll = require('../../shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.cjs');
21
16
  var index = require('../../shared/consts/index.cjs');
22
- var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
17
+ require('../../context/DynamicContext/DynamicContext.cjs');
18
+ require('@dynamic-labs/multi-wallet');
23
19
  require('../../components/ShadowDOM/ShadowDOM.cjs');
24
20
  require('../../context/ThemeContext/ThemeContext.cjs');
25
- var Icon = require('../../components/Icon/Icon.cjs');
26
21
  var Portal = require('../../components/Portal/Portal.cjs');
27
22
  require('react-dom');
28
23
  require('../../config/ApiEndpoint.cjs');
24
+ require('@dynamic-labs/rpc-providers');
29
25
  require('../../context/ErrorContext/ErrorContext.cjs');
30
- var useFetchCurrency = require('../../widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.cjs');
31
- var transactionErrorMessage = require('./helpers/transactionErrorMessage.cjs');
32
- require('../../context/MockContext/MockContext.cjs');
33
- require('../../context/CaptchaContext/CaptchaContext.cjs');
34
- var usePromise = require('../../utils/hooks/usePromise/usePromise.cjs');
35
- var useMutation = require('../../utils/hooks/useMutation/useMutation.cjs');
36
- require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
37
- var Button = require('../../components/Button/Button.cjs');
38
- var IconButton = require('../../components/IconButton/IconButton.cjs');
39
- var ModalHeader = require('../../components/ModalHeader/ModalHeader.cjs');
40
- var PoweredByDynamic = require('../../components/PoweredByDynamic/PoweredByDynamic.cjs');
41
- var IconWithSpinner = require('../../components/IconWithSpinner/IconWithSpinner.cjs');
42
- var AppOriginTile = require('../../components/AppOriginTile/AppOriginTile.cjs');
43
- var AnimatePresence = require('../../components/AnimatePresence/AnimatePresence.cjs');
44
- var ErrorContainer = require('../../components/ErrorContainer/ErrorContainer.cjs');
26
+ require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
27
+ var TransactionConfirmationView = require('../../views/TransactionConfirmationView/TransactionConfirmationView.cjs');
28
+ require('../../components/IconButton/IconButton.cjs');
29
+ require('@dynamic-labs/wallet-book');
45
30
  require('../../components/Transition/ZoomTransition/ZoomTransition.cjs');
46
31
  require('../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
47
32
  require('../../components/Transition/OpacityTransition/OpacityTransition.cjs');
48
- var VerticalDrawerTransition = require('../../components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.cjs');
33
+ require('../../components/Alert/Alert.cjs');
34
+ require('../../context/MockContext/MockContext.cjs');
35
+ require('../../context/CaptchaContext/CaptchaContext.cjs');
36
+ require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
37
+ require('../../components/Popper/Popper/Popper.cjs');
38
+ require('../../components/Popper/PopperContext/PopperContext.cjs');
39
+ require('formik');
40
+ require('yup');
49
41
 
50
- const digitsLimitSub = 1e8;
51
- const TransactionConfirmationModal = ({ title, appOrigin, handler, onReject, onTransactionResponseSuccess, appLogoUrl, appName, transaction, buttonText = 'Send', provider, }) => {
42
+ const TransactionConfirmationModal = ({ title, handler, onReject, onTransactionResponseSuccess, transaction, provider, }) => {
52
43
  usePreventPageScroll.usePreventPageScroll(true);
53
- const { primaryWallet } = useInternalDynamicContext.useInternalDynamicContext();
54
- const didConfirmRef = React.useRef(false);
55
44
  const [show, setShow] = React.useState(true);
56
- const { from, to, value } = transaction;
57
- if (!primaryWallet) {
58
- throw new multiWallet.DynamicError('Primary wallet is not available, transaction cannot be displayed');
59
- }
60
- const [currencySymbol] = useFetchCurrency.useFetchCurrency(primaryWallet.connector);
61
- const { isLoading, mutate: sendTransaction, data: transactionResponse, error: transactionError, } = useMutation.useMutation(() => handler(transaction), {
62
- onSuccess: () => {
63
- didConfirmRef.current = true;
64
- setShow(false);
65
- },
66
- });
67
- const handleOnReject = React.useCallback(() => {
68
- didConfirmRef.current = false;
45
+ const errorRef = React.useRef(null);
46
+ const transactionResponseRef = React.useRef(null);
47
+ const closeModal = React.useCallback(() => {
69
48
  setShow(false);
70
49
  }, [setShow]);
71
50
  const handleOnModalUnmount = React.useCallback(() => {
72
- if (transactionResponse) {
73
- return onTransactionResponseSuccess(transactionResponse);
74
- }
75
- onReject(transactionError || new Error('user rejected transaction'));
76
- }, [
77
- transactionResponse,
78
- transactionError,
79
- onTransactionResponseSuccess,
80
- onReject,
81
- ]);
82
- const { data: effectiveValue, isLoading: isEffectiveValueLoading } = usePromise.usePromise(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
83
- const val = yield value;
84
- return val ? ethers.ethers.BigNumber.from(val) : undefined;
85
- }));
86
- const { data: effectiveGasPrice, isLoading: isEffectiveGasPriceLoading } = usePromise.usePromise(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
87
- const gasPrice = yield provider.getGasPrice();
88
- const estimatedGas = yield provider.estimateGas(transaction);
89
- return gasPrice && estimatedGas
90
- ? ethers.ethers.BigNumber.from(gasPrice).mul(estimatedGas)
91
- : undefined;
92
- }));
93
- const { data: effectiveToAddress, isLoading: isEffectiveToAddressLoading } = usePromise.usePromise(() => to);
94
- const { data: effectiveFromAddress, isLoading: isEffectiveFromAddressLoading, } = usePromise.usePromise(() => from);
95
- const total = React.useMemo(() => {
96
- if (effectiveGasPrice !== undefined && effectiveValue !== undefined) {
97
- return effectiveGasPrice.add(effectiveValue);
98
- }
99
- return effectiveValue || effectiveGasPrice;
100
- }, [effectiveGasPrice, effectiveValue]);
101
- const isLoadingTransaction = React.useMemo(() => isEffectiveValueLoading ||
102
- isEffectiveGasPriceLoading ||
103
- isEffectiveToAddressLoading ||
104
- isEffectiveFromAddressLoading, [
105
- isEffectiveValueLoading,
106
- isEffectiveGasPriceLoading,
107
- isEffectiveToAddressLoading,
108
- isEffectiveFromAddressLoading,
109
- ]);
110
- const ChainIcon = getChainIcon.getChainIcon('evm');
111
- const formatValue = (value, sub) => {
112
- if (!sub) {
113
- return ethers.ethers.utils.formatEther(value);
51
+ if (transactionResponseRef.current) {
52
+ return onTransactionResponseSuccess(transactionResponseRef.current);
114
53
  }
115
- return ethers.ethers.utils.formatEther(value.sub(value.mod(sub)));
116
- };
117
- const closeButton = (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ type: 'button', onClick: handleOnReject, "data-testid": 'close', disabled: isLoading }, { children: jsxRuntime.jsx(close.ReactComponent, {}) })));
118
- return (jsxRuntime.jsx(Portal.Portal, Object.assign({ handleClose: handleOnReject, isShown: show, zIndex: index.authModalZIndex, withBackdrop: true, elementId: 'dynamic-send-transaction', transitionEvents: {
54
+ onReject(errorRef.current || new Error('user rejected transaction'));
55
+ }, [onTransactionResponseSuccess, onReject]);
56
+ return (jsxRuntime.jsx(Portal.Portal, Object.assign({ handleClose: closeModal, isShown: show, zIndex: index.authModalZIndex, withBackdrop: true, elementId: 'dynamic-send-transaction', transitionEvents: {
119
57
  onUnmount: handleOnModalUnmount,
120
- } }, { children: jsxRuntime.jsxs("div", Object.assign({ className: 'transaction-confirmation' }, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, Object.assign({ trailing: closeButton, alignContent: 'bottom' }, { children: jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: (props) => (jsxRuntime.jsx(Icon.Icon, Object.assign({ color: 'brand-primary' }, { children: jsxRuntime.jsx(signCircle.ReactComponent, Object.assign({}, props)) }))), iconSize: 64, isSpinning: true }) })), jsxRuntime.jsxs("div", Object.assign({ className: 'transaction-confirmation__body' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'title', color: 'primary', className: 'transaction-confirmation__title' }, { children: title })), jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}) }, { children: transactionError && (jsxRuntime.jsx("div", Object.assign({ className: 'transaction-confirmation__error' }, { children: jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: transactionErrorMessage.transactionErrorMessage(transactionError) }) }))) })), jsxRuntime.jsxs("div", Object.assign({ className: 'transaction-confirmation__content' }, { children: [jsxRuntime.jsx("div", Object.assign({ className: 'transaction-confirmation__app-origin-tile' }, { children: jsxRuntime.jsx(AppOriginTile.AppOriginTile, { appLogoUrl: appLogoUrl, appName: appName, appOrigin: appOrigin }) })), jsxRuntime.jsxs("div", Object.assign({ className: 'transaction-confirmation__transaction-info' }, { children: [jsxRuntime.jsxs("div", Object.assign({ className: 'transaction-confirmation__transaction-row' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ color: 'secondary', variant: 'body_normal', weight: 'regular', className: 'transaction-confirmation__transaction-row__title' }, { children: "From (You)" })), isEffectiveFromAddressLoading && jsxRuntime.jsx(CoinCell, { children: "--" }), !isEffectiveFromAddressLoading && effectiveFromAddress && (jsxRuntime.jsx(CoinCell, { children: shortenWalletAddress.shortenWalletAddress(effectiveFromAddress, 4, 4) })), !isEffectiveFromAddressLoading && !effectiveFromAddress && (jsxRuntime.jsx(CoinCell, Object.assign({ color: 'secondary', weight: 'regular' }, { children: "N/A" })))] })), jsxRuntime.jsxs("div", Object.assign({ className: 'transaction-confirmation__transaction-row' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ color: 'secondary', variant: 'body_normal', weight: 'regular', className: 'transaction-confirmation__transaction-row__title' }, { children: "To" })), isEffectiveToAddressLoading && jsxRuntime.jsx(CoinCell, { children: "--" }), !isEffectiveToAddressLoading && !effectiveToAddress && (jsxRuntime.jsx(CoinCell, Object.assign({ color: 'secondary', weight: 'regular' }, { children: "N/A" }))), !isEffectiveToAddressLoading && effectiveToAddress && (jsxRuntime.jsx(CoinCell, { children: shortenWalletAddress.shortenWalletAddress(effectiveToAddress, 4, 4) }))] })), jsxRuntime.jsxs("div", Object.assign({ className: 'transaction-confirmation__transaction-row' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ color: 'secondary', variant: 'body_normal', weight: 'regular', className: 'transaction-confirmation__transaction-row__title' }, { children: "Amount" })), isEffectiveValueLoading && (jsxRuntime.jsx(CoinCell, Object.assign({ symbol: currencySymbol, icon: jsxRuntime.jsx(ChainIcon, {}) }, { children: "--" }))), !isEffectiveValueLoading && effectiveValue && (jsxRuntime.jsx(CoinCell, Object.assign({ symbol: currencySymbol, icon: jsxRuntime.jsx(ChainIcon, {}), dataTestId: 'transaction-amount', title: formatValue(effectiveValue) }, { children: formatValue(effectiveValue, digitsLimitSub) }))), !isEffectiveValueLoading && !effectiveValue && (jsxRuntime.jsx(CoinCell, Object.assign({ color: 'secondary', weight: 'regular' }, { children: "N/A" })))] })), jsxRuntime.jsxs("div", Object.assign({ className: 'transaction-confirmation__transaction-row' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ color: 'secondary', variant: 'body_normal', weight: 'regular', className: 'transaction-confirmation__transaction-row__title' }, { children: "Gas (estimated)" })), isEffectiveGasPriceLoading && jsxRuntime.jsx(CoinCell, { children: "--" }), !isEffectiveGasPriceLoading && !effectiveGasPrice && (jsxRuntime.jsx(CoinCell, Object.assign({ color: 'secondary', weight: 'regular' }, { children: "N/A" }))), !isEffectiveGasPriceLoading && effectiveGasPrice && (jsxRuntime.jsx(CoinCell, Object.assign({ symbol: currencySymbol, icon: jsxRuntime.jsx(ChainIcon, {}), dataTestId: 'transaction-gas-free', title: formatValue(effectiveGasPrice) }, { children: formatValue(effectiveGasPrice, digitsLimitSub) })))] })), jsxRuntime.jsxs("div", Object.assign({ className: 'transaction-confirmation__transaction-row' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ color: 'secondary', variant: 'body_normal', weight: 'regular', className: 'transaction-confirmation__transaction-row__title' }, { children: "Total" })), total && (jsxRuntime.jsx(CoinCell, Object.assign({ symbol: currencySymbol, icon: jsxRuntime.jsx(ChainIcon, {}), dataTestId: 'transaction-total', title: formatValue(total) }, { children: formatValue(total, digitsLimitSub) }))), !total && (jsxRuntime.jsx(CoinCell, Object.assign({ color: 'secondary', weight: 'regular' }, { children: "N/A" })))] }))] }))] })), jsxRuntime.jsxs("div", Object.assign({ className: 'transaction-confirmation__actions' }, { children: [jsxRuntime.jsx(Button.Button, Object.assign({ buttonVariant: 'secondary', onClick: handleOnReject, expanded: true, buttonPadding: 'large', buttonRounded: 'default', disabled: isLoading }, { children: "Cancel" })), jsxRuntime.jsx(Button.Button, Object.assign({ buttonVariant: 'primary', buttonPadding: 'large', onClick: () => sendTransaction(), expanded: true, buttonRounded: 'default', loading: isLoading, disabled: isLoadingTransaction }, { children: buttonText }))] })), jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, {})] }))] })) })));
121
- };
122
- const CoinCell = ({ children, symbol, icon, color = 'primary', weight = 'medium', dataTestId, title, }) => (jsxRuntime.jsxs("div", Object.assign({ "data-testid": dataTestId, style: {
123
- alignItems: 'center',
124
- display: 'flex',
125
- gap: '0.25rem',
126
- minWidth: 0,
127
- } }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ title: title, color: color, variant: 'body_normal', weight: weight, truncate: true }, { children: children })), symbol && (jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'span', color: 'secondary', weight: 'regular' }, { children: symbol }))), icon && jsxRuntime.jsx(Icon.Icon, Object.assign({ size: 'small' }, { children: icon }))] })));
58
+ } }, { children: jsxRuntime.jsx("div", Object.assign({ className: 'transaction-confirmation' }, { children: jsxRuntime.jsx(TransactionConfirmationView.TransactionConfirmationView, { provider: provider, transaction: transaction, title: title, mutation: () => handler(transaction), onClickClose: closeModal, onError: (error) => (errorRef.current = error), displayPoweredByDynamicFooter: true, onSuccess: (transactionResponse) => {
59
+ errorRef.current = null;
60
+ transactionResponseRef.current = transactionResponse;
61
+ closeModal();
62
+ } }) })) })));
63
+ };
128
64
 
129
65
  exports.TransactionConfirmationModal = TransactionConfirmationModal;
@@ -1,125 +1,61 @@
1
- import { __awaiter } from '../../../../_virtual/_tslib.js';
2
- import { jsx, jsxs } from 'react/jsx-runtime';
3
- import { useRef, useState, useCallback, useMemo } from 'react';
4
- import { ethers } from 'ethers';
5
- import { DynamicError } from '@dynamic-labs/multi-wallet';
6
- import { Typography } from '../../components/Typography/Typography.js';
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { useState, useRef, useCallback } from 'react';
7
3
  import '@dynamic-labs/sdk-api';
8
4
  import '../../shared/logger.js';
9
- import { getChainIcon } from '../../shared/utils/functions/chain/getChainIcon.js';
10
- import { shortenWalletAddress } from '../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.js';
11
- import '../../utils/constants/colors.js';
12
- import { usePreventPageScroll } from '../../shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.js';
13
5
  import '@dynamic-labs/iconic';
6
+ import '@dynamic-labs/wallet-connector-core';
14
7
  import '../../context/ViewContext/ViewContext.js';
15
- import { ReactComponent as SvgClose } from '../../shared/assets/close.js';
16
- import { ReactComponent as SvgSignCircle } from '../../shared/assets/sign-circle.js';
8
+ import '@dynamic-labs/utils';
9
+ import '../../utils/constants/colors.js';
10
+ import 'ethers';
11
+ import { usePreventPageScroll } from '../../shared/utils/hooks/usePreventPageScroll/usePreventPageScroll.js';
17
12
  import { authModalZIndex } from '../../shared/consts/index.js';
18
- import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
13
+ import '../../context/DynamicContext/DynamicContext.js';
14
+ import '@dynamic-labs/multi-wallet';
19
15
  import '../../components/ShadowDOM/ShadowDOM.js';
20
16
  import '../../context/ThemeContext/ThemeContext.js';
21
- import { Icon } from '../../components/Icon/Icon.js';
22
17
  import { Portal } from '../../components/Portal/Portal.js';
23
18
  import 'react-dom';
24
19
  import '../../config/ApiEndpoint.js';
20
+ import '@dynamic-labs/rpc-providers';
25
21
  import '../../context/ErrorContext/ErrorContext.js';
26
- import { useFetchCurrency } from '../../widgets/DynamicWidget/hooks/useFetchCurrency/useFetchCurrency.js';
27
- import { transactionErrorMessage } from './helpers/transactionErrorMessage.js';
28
- import '../../context/MockContext/MockContext.js';
29
- import '../../context/CaptchaContext/CaptchaContext.js';
30
- import { usePromise } from '../../utils/hooks/usePromise/usePromise.js';
31
- import { useMutation } from '../../utils/hooks/useMutation/useMutation.js';
32
- import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
33
- import { Button } from '../../components/Button/Button.js';
34
- import { IconButton } from '../../components/IconButton/IconButton.js';
35
- import { ModalHeader } from '../../components/ModalHeader/ModalHeader.js';
36
- import { PoweredByDynamic } from '../../components/PoweredByDynamic/PoweredByDynamic.js';
37
- import { IconWithSpinner } from '../../components/IconWithSpinner/IconWithSpinner.js';
38
- import { AppOriginTile } from '../../components/AppOriginTile/AppOriginTile.js';
39
- import { AnimatePresence } from '../../components/AnimatePresence/AnimatePresence.js';
40
- import { ErrorContainer } from '../../components/ErrorContainer/ErrorContainer.js';
22
+ import '../../context/AccessDeniedContext/AccessDeniedContext.js';
23
+ import { TransactionConfirmationView } from '../../views/TransactionConfirmationView/TransactionConfirmationView.js';
24
+ import '../../components/IconButton/IconButton.js';
25
+ import '@dynamic-labs/wallet-book';
41
26
  import '../../components/Transition/ZoomTransition/ZoomTransition.js';
42
27
  import '../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
43
28
  import '../../components/Transition/OpacityTransition/OpacityTransition.js';
44
- import { VerticalDrawerTransition } from '../../components/Transition/VerticalDrawerTransition/VerticalDrawerTransition.js';
29
+ import '../../components/Alert/Alert.js';
30
+ import '../../context/MockContext/MockContext.js';
31
+ import '../../context/CaptchaContext/CaptchaContext.js';
32
+ import '../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.js';
33
+ import '../../components/Popper/Popper/Popper.js';
34
+ import '../../components/Popper/PopperContext/PopperContext.js';
35
+ import 'formik';
36
+ import 'yup';
45
37
 
46
- const digitsLimitSub = 1e8;
47
- const TransactionConfirmationModal = ({ title, appOrigin, handler, onReject, onTransactionResponseSuccess, appLogoUrl, appName, transaction, buttonText = 'Send', provider, }) => {
38
+ const TransactionConfirmationModal = ({ title, handler, onReject, onTransactionResponseSuccess, transaction, provider, }) => {
48
39
  usePreventPageScroll(true);
49
- const { primaryWallet } = useInternalDynamicContext();
50
- const didConfirmRef = useRef(false);
51
40
  const [show, setShow] = useState(true);
52
- const { from, to, value } = transaction;
53
- if (!primaryWallet) {
54
- throw new DynamicError('Primary wallet is not available, transaction cannot be displayed');
55
- }
56
- const [currencySymbol] = useFetchCurrency(primaryWallet.connector);
57
- const { isLoading, mutate: sendTransaction, data: transactionResponse, error: transactionError, } = useMutation(() => handler(transaction), {
58
- onSuccess: () => {
59
- didConfirmRef.current = true;
60
- setShow(false);
61
- },
62
- });
63
- const handleOnReject = useCallback(() => {
64
- didConfirmRef.current = false;
41
+ const errorRef = useRef(null);
42
+ const transactionResponseRef = useRef(null);
43
+ const closeModal = useCallback(() => {
65
44
  setShow(false);
66
45
  }, [setShow]);
67
46
  const handleOnModalUnmount = useCallback(() => {
68
- if (transactionResponse) {
69
- return onTransactionResponseSuccess(transactionResponse);
70
- }
71
- onReject(transactionError || new Error('user rejected transaction'));
72
- }, [
73
- transactionResponse,
74
- transactionError,
75
- onTransactionResponseSuccess,
76
- onReject,
77
- ]);
78
- const { data: effectiveValue, isLoading: isEffectiveValueLoading } = usePromise(() => __awaiter(void 0, void 0, void 0, function* () {
79
- const val = yield value;
80
- return val ? ethers.BigNumber.from(val) : undefined;
81
- }));
82
- const { data: effectiveGasPrice, isLoading: isEffectiveGasPriceLoading } = usePromise(() => __awaiter(void 0, void 0, void 0, function* () {
83
- const gasPrice = yield provider.getGasPrice();
84
- const estimatedGas = yield provider.estimateGas(transaction);
85
- return gasPrice && estimatedGas
86
- ? ethers.BigNumber.from(gasPrice).mul(estimatedGas)
87
- : undefined;
88
- }));
89
- const { data: effectiveToAddress, isLoading: isEffectiveToAddressLoading } = usePromise(() => to);
90
- const { data: effectiveFromAddress, isLoading: isEffectiveFromAddressLoading, } = usePromise(() => from);
91
- const total = useMemo(() => {
92
- if (effectiveGasPrice !== undefined && effectiveValue !== undefined) {
93
- return effectiveGasPrice.add(effectiveValue);
94
- }
95
- return effectiveValue || effectiveGasPrice;
96
- }, [effectiveGasPrice, effectiveValue]);
97
- const isLoadingTransaction = useMemo(() => isEffectiveValueLoading ||
98
- isEffectiveGasPriceLoading ||
99
- isEffectiveToAddressLoading ||
100
- isEffectiveFromAddressLoading, [
101
- isEffectiveValueLoading,
102
- isEffectiveGasPriceLoading,
103
- isEffectiveToAddressLoading,
104
- isEffectiveFromAddressLoading,
105
- ]);
106
- const ChainIcon = getChainIcon('evm');
107
- const formatValue = (value, sub) => {
108
- if (!sub) {
109
- return ethers.utils.formatEther(value);
47
+ if (transactionResponseRef.current) {
48
+ return onTransactionResponseSuccess(transactionResponseRef.current);
110
49
  }
111
- return ethers.utils.formatEther(value.sub(value.mod(sub)));
112
- };
113
- const closeButton = (jsx(IconButton, Object.assign({ type: 'button', onClick: handleOnReject, "data-testid": 'close', disabled: isLoading }, { children: jsx(SvgClose, {}) })));
114
- return (jsx(Portal, Object.assign({ handleClose: handleOnReject, isShown: show, zIndex: authModalZIndex, withBackdrop: true, elementId: 'dynamic-send-transaction', transitionEvents: {
50
+ onReject(errorRef.current || new Error('user rejected transaction'));
51
+ }, [onTransactionResponseSuccess, onReject]);
52
+ return (jsx(Portal, Object.assign({ handleClose: closeModal, isShown: show, zIndex: authModalZIndex, withBackdrop: true, elementId: 'dynamic-send-transaction', transitionEvents: {
115
53
  onUnmount: handleOnModalUnmount,
116
- } }, { children: jsxs("div", Object.assign({ className: 'transaction-confirmation' }, { children: [jsx(ModalHeader, Object.assign({ trailing: closeButton, alignContent: 'bottom' }, { children: jsx(IconWithSpinner, { Icon: (props) => (jsx(Icon, Object.assign({ color: 'brand-primary' }, { children: jsx(SvgSignCircle, Object.assign({}, props)) }))), iconSize: 64, isSpinning: true }) })), jsxs("div", Object.assign({ className: 'transaction-confirmation__body' }, { children: [jsx(Typography, Object.assign({ variant: 'title', color: 'primary', className: 'transaction-confirmation__title' }, { children: title })), jsx(AnimatePresence, Object.assign({ animationComponent: jsx(VerticalDrawerTransition, {}) }, { children: transactionError && (jsx("div", Object.assign({ className: 'transaction-confirmation__error' }, { children: jsx(ErrorContainer, { children: transactionErrorMessage(transactionError) }) }))) })), jsxs("div", Object.assign({ className: 'transaction-confirmation__content' }, { children: [jsx("div", Object.assign({ className: 'transaction-confirmation__app-origin-tile' }, { children: jsx(AppOriginTile, { appLogoUrl: appLogoUrl, appName: appName, appOrigin: appOrigin }) })), jsxs("div", Object.assign({ className: 'transaction-confirmation__transaction-info' }, { children: [jsxs("div", Object.assign({ className: 'transaction-confirmation__transaction-row' }, { children: [jsx(Typography, Object.assign({ color: 'secondary', variant: 'body_normal', weight: 'regular', className: 'transaction-confirmation__transaction-row__title' }, { children: "From (You)" })), isEffectiveFromAddressLoading && jsx(CoinCell, { children: "--" }), !isEffectiveFromAddressLoading && effectiveFromAddress && (jsx(CoinCell, { children: shortenWalletAddress(effectiveFromAddress, 4, 4) })), !isEffectiveFromAddressLoading && !effectiveFromAddress && (jsx(CoinCell, Object.assign({ color: 'secondary', weight: 'regular' }, { children: "N/A" })))] })), jsxs("div", Object.assign({ className: 'transaction-confirmation__transaction-row' }, { children: [jsx(Typography, Object.assign({ color: 'secondary', variant: 'body_normal', weight: 'regular', className: 'transaction-confirmation__transaction-row__title' }, { children: "To" })), isEffectiveToAddressLoading && jsx(CoinCell, { children: "--" }), !isEffectiveToAddressLoading && !effectiveToAddress && (jsx(CoinCell, Object.assign({ color: 'secondary', weight: 'regular' }, { children: "N/A" }))), !isEffectiveToAddressLoading && effectiveToAddress && (jsx(CoinCell, { children: shortenWalletAddress(effectiveToAddress, 4, 4) }))] })), jsxs("div", Object.assign({ className: 'transaction-confirmation__transaction-row' }, { children: [jsx(Typography, Object.assign({ color: 'secondary', variant: 'body_normal', weight: 'regular', className: 'transaction-confirmation__transaction-row__title' }, { children: "Amount" })), isEffectiveValueLoading && (jsx(CoinCell, Object.assign({ symbol: currencySymbol, icon: jsx(ChainIcon, {}) }, { children: "--" }))), !isEffectiveValueLoading && effectiveValue && (jsx(CoinCell, Object.assign({ symbol: currencySymbol, icon: jsx(ChainIcon, {}), dataTestId: 'transaction-amount', title: formatValue(effectiveValue) }, { children: formatValue(effectiveValue, digitsLimitSub) }))), !isEffectiveValueLoading && !effectiveValue && (jsx(CoinCell, Object.assign({ color: 'secondary', weight: 'regular' }, { children: "N/A" })))] })), jsxs("div", Object.assign({ className: 'transaction-confirmation__transaction-row' }, { children: [jsx(Typography, Object.assign({ color: 'secondary', variant: 'body_normal', weight: 'regular', className: 'transaction-confirmation__transaction-row__title' }, { children: "Gas (estimated)" })), isEffectiveGasPriceLoading && jsx(CoinCell, { children: "--" }), !isEffectiveGasPriceLoading && !effectiveGasPrice && (jsx(CoinCell, Object.assign({ color: 'secondary', weight: 'regular' }, { children: "N/A" }))), !isEffectiveGasPriceLoading && effectiveGasPrice && (jsx(CoinCell, Object.assign({ symbol: currencySymbol, icon: jsx(ChainIcon, {}), dataTestId: 'transaction-gas-free', title: formatValue(effectiveGasPrice) }, { children: formatValue(effectiveGasPrice, digitsLimitSub) })))] })), jsxs("div", Object.assign({ className: 'transaction-confirmation__transaction-row' }, { children: [jsx(Typography, Object.assign({ color: 'secondary', variant: 'body_normal', weight: 'regular', className: 'transaction-confirmation__transaction-row__title' }, { children: "Total" })), total && (jsx(CoinCell, Object.assign({ symbol: currencySymbol, icon: jsx(ChainIcon, {}), dataTestId: 'transaction-total', title: formatValue(total) }, { children: formatValue(total, digitsLimitSub) }))), !total && (jsx(CoinCell, Object.assign({ color: 'secondary', weight: 'regular' }, { children: "N/A" })))] }))] }))] })), jsxs("div", Object.assign({ className: 'transaction-confirmation__actions' }, { children: [jsx(Button, Object.assign({ buttonVariant: 'secondary', onClick: handleOnReject, expanded: true, buttonPadding: 'large', buttonRounded: 'default', disabled: isLoading }, { children: "Cancel" })), jsx(Button, Object.assign({ buttonVariant: 'primary', buttonPadding: 'large', onClick: () => sendTransaction(), expanded: true, buttonRounded: 'default', loading: isLoading, disabled: isLoadingTransaction }, { children: buttonText }))] })), jsx(PoweredByDynamic, {})] }))] })) })));
117
- };
118
- const CoinCell = ({ children, symbol, icon, color = 'primary', weight = 'medium', dataTestId, title, }) => (jsxs("div", Object.assign({ "data-testid": dataTestId, style: {
119
- alignItems: 'center',
120
- display: 'flex',
121
- gap: '0.25rem',
122
- minWidth: 0,
123
- } }, { children: [jsx(Typography, Object.assign({ title: title, color: color, variant: 'body_normal', weight: weight, truncate: true }, { children: children })), symbol && (jsx(Typography, Object.assign({ as: 'span', color: 'secondary', weight: 'regular' }, { children: symbol }))), icon && jsx(Icon, Object.assign({ size: 'small' }, { children: icon }))] })));
54
+ } }, { children: jsx("div", Object.assign({ className: 'transaction-confirmation' }, { children: jsx(TransactionConfirmationView, { provider: provider, transaction: transaction, title: title, mutation: () => handler(transaction), onClickClose: closeModal, onError: (error) => (errorRef.current = error), displayPoweredByDynamicFooter: true, onSuccess: (transactionResponse) => {
55
+ errorRef.current = null;
56
+ transactionResponseRef.current = transactionResponse;
57
+ closeModal();
58
+ } }) })) })));
59
+ };
124
60
 
125
61
  export { TransactionConfirmationModal };
@@ -1,10 +1,6 @@
1
1
  import { FC, ReactNode } from 'react';
2
2
  import { ethers } from 'ethers';
3
3
  export type TransactionConfirmationModalProps = {
4
- appLogoUrl?: string;
5
- appName?: string;
6
- appOrigin: string;
7
- buttonText?: ReactNode;
8
4
  handler: (transaction: ethers.utils.Deferrable<ethers.providers.TransactionRequest>) => Promise<ethers.providers.TransactionResponse>;
9
5
  onReject: (error: unknown) => void;
10
6
  onTransactionResponseSuccess: (transactionResponse: ethers.providers.TransactionResponse) => void;
@@ -1,2 +1,3 @@
1
1
  export * from './SignMessageConfirmationModal';
2
2
  export * from './TransactionConfirmationModal';
3
+ export * from './SendBalanceModal';
@@ -34,21 +34,20 @@ var SvgAdd = function SvgAdd(_ref) {
34
34
  titleId = _ref.titleId,
35
35
  props = _objectWithoutProperties(_ref, _excluded);
36
36
  return /*#__PURE__*/React__namespace.createElement("svg", _extends({
37
- width: 10,
38
- height: 10,
39
- viewBox: "0 0 10 10",
37
+ width: 16,
38
+ height: 16,
39
+ viewBox: "0 0 16 16",
40
40
  fill: "none",
41
41
  xmlns: "http://www.w3.org/2000/svg",
42
42
  "aria-labelledby": titleId
43
43
  }, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
44
44
  id: titleId
45
45
  }, title) : null, _path || (_path = /*#__PURE__*/React__namespace.createElement("path", {
46
- d: "M5 1v4m0 0v4m0-4h4M5 5H1",
47
- stroke: "currentColor",
48
- strokeOpacity: 0.65,
49
- strokeWidth: 2,
50
- strokeLinecap: "round",
51
- strokeLinejoin: "round"
46
+ fillRule: "evenodd",
47
+ clipRule: "evenodd",
48
+ d: "M8 2c.368 0 .667.298.667.667v4.666h4.666a.667.667 0 1 1 0 1.334H8.667v4.666a.667.667 0 1 1-1.334 0V8.667H2.667a.667.667 0 0 1 0-1.334h4.666V2.667C7.333 2.298 7.632 2 8 2Z",
49
+ fill: "currentColor",
50
+ fillOpacity: 0.4
52
51
  })));
53
52
  };
54
53
 
@@ -10,21 +10,20 @@ var SvgAdd = function SvgAdd(_ref) {
10
10
  titleId = _ref.titleId,
11
11
  props = _objectWithoutProperties(_ref, _excluded);
12
12
  return /*#__PURE__*/React.createElement("svg", _extends({
13
- width: 10,
14
- height: 10,
15
- viewBox: "0 0 10 10",
13
+ width: 16,
14
+ height: 16,
15
+ viewBox: "0 0 16 16",
16
16
  fill: "none",
17
17
  xmlns: "http://www.w3.org/2000/svg",
18
18
  "aria-labelledby": titleId
19
19
  }, props), title ? /*#__PURE__*/React.createElement("title", {
20
20
  id: titleId
21
21
  }, title) : null, _path || (_path = /*#__PURE__*/React.createElement("path", {
22
- d: "M5 1v4m0 0v4m0-4h4M5 5H1",
23
- stroke: "currentColor",
24
- strokeOpacity: 0.65,
25
- strokeWidth: 2,
26
- strokeLinecap: "round",
27
- strokeLinejoin: "round"
22
+ fillRule: "evenodd",
23
+ clipRule: "evenodd",
24
+ d: "M8 2c.368 0 .667.298.667.667v4.666h4.666a.667.667 0 1 1 0 1.334H8.667v4.666a.667.667 0 1 1-1.334 0V8.667H2.667a.667.667 0 0 1 0-1.334h4.666V2.667C7.333 2.298 7.632 2 8 2Z",
25
+ fill: "currentColor",
26
+ fillOpacity: 0.4
28
27
  })));
29
28
  };
30
29
 
@@ -31,3 +31,4 @@ export { ReactComponent as PencilIcon } from './pencil.svg';
31
31
  export { ReactComponent as TooltipArrow } from './tooltip-arrow.svg';
32
32
  export { ReactComponent as SwitchHorizontalIcon } from './switch-horizontal.svg';
33
33
  export { ReactComponent as DotsHorizontalIcon } from './dots-horizontal.svg';
34
+ export { ReactComponent as SendIcon } from './send.svg';
@@ -0,0 +1,56 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React = require('react');
6
+
7
+ function _interopNamespace(e) {
8
+ if (e && e.__esModule) return e;
9
+ var n = Object.create(null);
10
+ if (e) {
11
+ Object.keys(e).forEach(function (k) {
12
+ if (k !== 'default') {
13
+ var d = Object.getOwnPropertyDescriptor(e, k);
14
+ Object.defineProperty(n, k, d.get ? d : {
15
+ enumerable: true,
16
+ get: function () { return e[k]; }
17
+ });
18
+ }
19
+ });
20
+ }
21
+ n["default"] = e;
22
+ return Object.freeze(n);
23
+ }
24
+
25
+ var React__namespace = /*#__PURE__*/_interopNamespace(React);
26
+
27
+ var _g;
28
+ var _excluded = ["title", "titleId"];
29
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
30
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
31
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
32
+ var SvgSend = function SvgSend(_ref) {
33
+ var title = _ref.title,
34
+ titleId = _ref.titleId,
35
+ props = _objectWithoutProperties(_ref, _excluded);
36
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends({
37
+ width: 24,
38
+ height: 24,
39
+ viewBox: "0 0 24 24",
40
+ fill: "none",
41
+ xmlns: "http://www.w3.org/2000/svg",
42
+ "aria-labelledby": titleId
43
+ }, props), title ? /*#__PURE__*/React__namespace.createElement("title", {
44
+ id: titleId
45
+ }, title) : null, _g || (_g = /*#__PURE__*/React__namespace.createElement("g", {
46
+ clipPath: "url(#send_svg__clip0_6894_96)"
47
+ }, /*#__PURE__*/React__namespace.createElement("path", {
48
+ fillRule: "evenodd",
49
+ clipRule: "evenodd",
50
+ d: "m3.846 9.3.03-.01 14.64-5.728c.199-.078.399-.156.567-.205.156-.046.465-.126.794-.02.374.123.664.413.786.787.107.33.027.638-.019.794-.049.168-.127.368-.205.567L14.702 20.15c-.08.204-.16.408-.239.568-.073.147-.226.436-.537.614a1.277 1.277 0 0 1-1.136.072c-.323-.137-.496-.405-.58-.542-.09-.149-.184-.342-.278-.535l-2.693-5.52-5.546-2.724-.027-.014c-.193-.094-.385-.189-.533-.28-.137-.082-.403-.256-.54-.578a1.277 1.277 0 0 1 .074-1.136c.178-.31.466-.463.612-.536.16-.079.363-.158.567-.238Zm.972 1.425 4.88 2.396 2.912-2.913a.848.848 0 0 1 1.2-.017.848.848 0 0 1-.017 1.2l-2.898 2.898 2.384 4.888 5.433-13.888-13.894 5.436Z",
51
+ fill: "currentColor",
52
+ fillOpacity: 0.4
53
+ }))));
54
+ };
55
+
56
+ exports.ReactComponent = SvgSend;
@@ -0,0 +1,32 @@
1
+ import * as React from 'react';
2
+
3
+ var _g;
4
+ var _excluded = ["title", "titleId"];
5
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
6
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
7
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
8
+ var SvgSend = function SvgSend(_ref) {
9
+ var title = _ref.title,
10
+ titleId = _ref.titleId,
11
+ props = _objectWithoutProperties(_ref, _excluded);
12
+ return /*#__PURE__*/React.createElement("svg", _extends({
13
+ width: 24,
14
+ height: 24,
15
+ viewBox: "0 0 24 24",
16
+ fill: "none",
17
+ xmlns: "http://www.w3.org/2000/svg",
18
+ "aria-labelledby": titleId
19
+ }, props), title ? /*#__PURE__*/React.createElement("title", {
20
+ id: titleId
21
+ }, title) : null, _g || (_g = /*#__PURE__*/React.createElement("g", {
22
+ clipPath: "url(#send_svg__clip0_6894_96)"
23
+ }, /*#__PURE__*/React.createElement("path", {
24
+ fillRule: "evenodd",
25
+ clipRule: "evenodd",
26
+ d: "m3.846 9.3.03-.01 14.64-5.728c.199-.078.399-.156.567-.205.156-.046.465-.126.794-.02.374.123.664.413.786.787.107.33.027.638-.019.794-.049.168-.127.368-.205.567L14.702 20.15c-.08.204-.16.408-.239.568-.073.147-.226.436-.537.614a1.277 1.277 0 0 1-1.136.072c-.323-.137-.496-.405-.58-.542-.09-.149-.184-.342-.278-.535l-2.693-5.52-5.546-2.724-.027-.014c-.193-.094-.385-.189-.533-.28-.137-.082-.403-.256-.54-.578a1.277 1.277 0 0 1 .074-1.136c.178-.31.466-.463.612-.536.16-.079.363-.158.567-.238Zm.972 1.425 4.88 2.396 2.912-2.913a.848.848 0 0 1 1.2-.017.848.848 0 0 1-.017 1.2l-2.898 2.898 2.384 4.888 5.433-13.888-13.894 5.436Z",
27
+ fill: "currentColor",
28
+ fillOpacity: 0.4
29
+ }))));
30
+ };
31
+
32
+ export { SvgSend as ReactComponent };
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
- import type { NetworkConfigurationMap, EvmRpcProvider, SolanaRpcProvider } from '@dynamic-labs/multi-wallet';
2
+ import type { EvmRpcProvider, SolanaRpcProvider } from '@dynamic-labs/rpc-providers';
3
3
  import type { FetchPublicAddressOpts, WalletConnector } from '@dynamic-labs/wallet-connector-core';
4
- import { WalletProviderEnum, ProjectSettings, UserFields, NameServiceData, JwtVerifiedCredential } from '@dynamic-labs/sdk-api';
4
+ import { WalletProviderEnum, ProjectSettings, UserFields, NameServiceData, JwtVerifiedCredential, OauthProviderRequest } from '@dynamic-labs/sdk-api';
5
+ import { NetworkConfigurationMap } from '@dynamic-labs/types';
5
6
  export type BrowserName = 'brave' | 'chrome' | 'edge' | 'firefox' | 'safari';
6
7
  export type Wallet = {
7
8
  address: string;
@@ -10,6 +11,11 @@ export type Wallet = {
10
11
  connector: WalletConnector;
11
12
  id: string;
12
13
  };
14
+ export type WalletAction = 'select' | 'unlink';
15
+ export type WalletWithAction = {
16
+ action: WalletAction;
17
+ wallet: Wallet;
18
+ };
13
19
  export type UserProfile = UserFields & {
14
20
  chain?: string;
15
21
  ens?: NameServiceData;
@@ -26,7 +32,7 @@ export type UserProfile = UserFields & {
26
32
  export type Icon = React.FunctionComponent<React.SVGProps<SVGSVGElement> & {
27
33
  title?: string | undefined;
28
34
  }>;
29
- export type WalletNamesUnion = 'Coinbase Wallet' | 'Coinbase Wallet (Solana)' | 'MetaMask' | 'Phantom' | 'Phantom (EVM)' | 'Phantom (Ledger)' | 'Venly' | 'Rainbow' | 'Solflare' | 'Glow' | 'Slope' | 'Blocto (Flow)' | 'Blocto (EVM)' | 'Blocto (App)' | 'Brave Wallet (EVM)' | 'Brave Wallet (Solana)' | 'Braavos' | 'Argent X' | 'Dapper' | 'Opera Wallet' | 'Injected Wallet' | 'Exodus Wallet (EVM)' | 'Exodus Wallet (Solana)' | 'Fortmatic' | 'ZenGo' | 'Lilico';
35
+ export type WalletNamesUnion = 'Coinbase Wallet' | 'Coinbase Wallet (Solana)' | 'MetaMask' | 'Phantom' | 'Phantom (EVM)' | 'Phantom (Ledger)' | 'Venly' | 'Rainbow' | 'Solflare' | 'Glow' | 'Slope' | 'Blocto (Flow)' | 'Blocto (EVM)' | 'Blocto (App)' | 'Brave Wallet (EVM)' | 'Brave Wallet (Solana)' | 'Braavos' | 'Argent X' | 'Dapper' | 'Opera Wallet' | 'Injected Wallet' | 'Exodus Wallet (EVM)' | 'Exodus Wallet (Solana)' | 'ZenGo' | 'Lilico';
30
36
  export type ChainNamesUnion = 'Solana' | 'Ethereum' | 'Flow' | 'EVM' | 'Algorand' | 'Starknet' | 'Cosmos' | 'Axelar' | 'Osmosis';
31
37
  export interface WalletOption {
32
38
  isInstalledOnBrowser: boolean;
@@ -54,6 +60,7 @@ export interface VerifyProps {
54
60
  export interface VerifyCallbackArgs {
55
61
  captchaToken?: string;
56
62
  fetchPublicAddressOpts?: FetchPublicAddressOpts;
63
+ oauth?: OauthProviderRequest;
57
64
  publicWalletAddress: string;
58
65
  walletConnector: WalletConnector;
59
66
  }
@@ -68,6 +75,8 @@ export interface VerifyWallet {
68
75
  captchaToken?: string;
69
76
  chain: string;
70
77
  messageToSign: string;
78
+ network: string | number | undefined;
79
+ oauth?: OauthProviderRequest;
71
80
  publicWalletAddress: string;
72
81
  signedMessage: string;
73
82
  skipEmptyAccountCheck?: boolean;
@@ -87,7 +96,7 @@ export type OnConnectSuccess = (params: {
87
96
  walletConnector: WalletConnector | undefined;
88
97
  }) => void;
89
98
  export type OnUserProfileUpdate = (user: UserProfile) => void;
90
- export type MultiWalletWidgetState = 'idle' | 'awaiting_account_switch' | 'awaiting_connection' | 'awaiting_signature' | 'detected_known_secondary_wallet' | 'detected_new_wallet';
99
+ export type MultiWalletWidgetState = 'idle' | 'awaiting_account_switch' | 'awaiting_connection' | 'awaiting_signature' | 'detected_new_wallet';
91
100
  export type AccountSwitchState = 'idle' | 'linking_new_wallet' | 'switching_primary' | 'primary_not_connected';
92
101
  export type AwaitingSignatureState = 'idle' | 'linking_new_wallet' | 'transferring_wallet';
93
102
  export type LocalStorageNonce = {
@@ -99,6 +108,7 @@ export type LocalStorageNetworks = {
99
108
  configurations: NetworkConfigurationMap;
100
109
  environmentId?: string;
101
110
  expiry: number;
111
+ version: number;
102
112
  };
103
113
  export type LocalStorageSettings = {
104
114
  environmentId?: string;
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const ceil = (value, precision = 0) => {
6
+ const multiplier = Math.pow(10, precision);
7
+ return Math.ceil(value * multiplier) / multiplier;
8
+ };
9
+
10
+ exports.ceil = ceil;
@@ -0,0 +1 @@
1
+ export declare const ceil: (value: number, precision?: number) => number;
@@ -0,0 +1,6 @@
1
+ const ceil = (value, precision = 0) => {
2
+ const multiplier = Math.pow(10, precision);
3
+ return Math.ceil(value * multiplier) / multiplier;
4
+ };
5
+
6
+ export { ceil };