@dynamic-labs/sdk-react-core 0.18.0-beta.31 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/package.cjs +2 -2
  3. package/package.js +2 -2
  4. package/package.json +9 -9
  5. package/src/lib/Main.cjs +5 -0
  6. package/src/lib/Main.js +5 -0
  7. package/src/lib/components/Button/Button.cjs +10 -7
  8. package/src/lib/components/Button/Button.js +10 -7
  9. package/src/lib/components/DynamicConnectButton/components/ConnectButton.cjs +1 -1
  10. package/src/lib/components/DynamicConnectButton/components/ConnectButton.js +1 -1
  11. package/src/lib/components/ErrorContainer/ErrorContainer.d.ts +1 -1
  12. package/src/lib/components/ListTile/ListTile.cjs +1 -1
  13. package/src/lib/components/ListTile/ListTile.js +1 -1
  14. package/src/lib/components/ListTile/ListTile.types.d.ts +1 -0
  15. package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +5 -3
  16. package/src/lib/components/OTPVerificationView/OTPVerificationView.d.ts +1 -0
  17. package/src/lib/components/OTPVerificationView/OTPVerificationView.js +5 -3
  18. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +3 -1
  19. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +3 -1
  20. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +2 -2
  21. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +2 -2
  22. package/src/lib/context/DynamicContext/DynamicContext.cjs +7 -2
  23. package/src/lib/context/DynamicContext/DynamicContext.js +8 -3
  24. package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/useVerificationInProgress.cjs +13 -3
  25. package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/useVerificationInProgress.js +13 -3
  26. package/src/lib/context/DynamicContext/types/index.d.ts +2 -2
  27. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +10 -2
  28. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +10 -2
  29. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.types.d.ts +2 -0
  30. package/src/lib/styles/index.shadow.cjs +1 -1
  31. package/src/lib/styles/index.shadow.js +1 -1
  32. package/src/lib/utils/constants/errors.cjs +7 -0
  33. package/src/lib/utils/constants/errors.d.ts +1 -0
  34. package/src/lib/utils/constants/errors.js +3 -0
  35. package/src/lib/utils/constants/index.d.ts +1 -1
  36. package/src/lib/utils/constants/localStorage.cjs +3 -1
  37. package/src/lib/utils/constants/localStorage.d.ts +1 -0
  38. package/src/lib/utils/constants/localStorage.js +3 -2
  39. package/src/lib/utils/functions/getUserProfileFields/getUserProfileFields.cjs +14 -2
  40. package/src/lib/utils/functions/getUserProfileFields/getUserProfileFields.d.ts +3 -2
  41. package/src/lib/utils/functions/getUserProfileFields/getUserProfileFields.js +14 -2
  42. package/src/lib/utils/functions/index.d.ts +1 -0
  43. package/src/lib/utils/functions/isMagicConnector/index.d.ts +1 -0
  44. package/src/lib/utils/functions/isMagicConnector/isMagicConnector.cjs +10 -0
  45. package/src/lib/utils/functions/isMagicConnector/isMagicConnector.d.ts +2 -0
  46. package/src/lib/utils/functions/isMagicConnector/isMagicConnector.js +6 -0
  47. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +2 -2
  48. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.d.ts +2 -1
  49. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +2 -2
  50. package/src/lib/utils/hooks/index.d.ts +2 -0
  51. package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.cjs +19 -3
  52. package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.d.ts +1 -2
  53. package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.js +20 -4
  54. package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +11 -9
  55. package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.d.ts +1 -1
  56. package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +11 -9
  57. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +1 -1
  58. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +1 -1
  59. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +2 -2
  60. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +1 -1
  61. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +2 -2
  62. package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.cjs +2 -7
  63. package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.js +2 -7
  64. package/src/lib/utils/hooks/useFetchNetworkConfigurations/utils/index.d.ts +1 -0
  65. package/src/lib/utils/hooks/useFetchNetworkConfigurations/utils/mergeCustomerEvmNetworksWithServerNetworks/index.d.ts +1 -0
  66. package/src/lib/utils/hooks/useFetchNetworkConfigurations/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.cjs +16 -0
  67. package/src/lib/utils/hooks/useFetchNetworkConfigurations/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.d.ts +2 -0
  68. package/src/lib/utils/hooks/useFetchNetworkConfigurations/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.js +12 -0
  69. package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +22 -4
  70. package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +22 -4
  71. package/src/lib/utils/hooks/useTransactionEstimatedGas/index.d.ts +1 -0
  72. package/src/lib/utils/hooks/useTransactionEstimatedGas/useTransactionEstimatedGas.cjs +61 -0
  73. package/src/lib/utils/hooks/useTransactionEstimatedGas/useTransactionEstimatedGas.d.ts +20 -0
  74. package/src/lib/utils/hooks/useTransactionEstimatedGas/useTransactionEstimatedGas.js +57 -0
  75. package/src/lib/utils/hooks/useTransactionWithGasPrice/index.d.ts +1 -0
  76. package/src/lib/utils/hooks/useTransactionWithGasPrice/useTransactionWithGasPrice.cjs +47 -0
  77. package/src/lib/utils/hooks/useTransactionWithGasPrice/useTransactionWithGasPrice.d.ts +32 -0
  78. package/src/lib/utils/hooks/useTransactionWithGasPrice/useTransactionWithGasPrice.js +43 -0
  79. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +1 -0
  80. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +1 -0
  81. package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +1 -1
  82. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +2 -2
  83. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.d.ts +5 -1
  84. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +2 -2
  85. package/src/lib/utils/hooks/useWallets/useWallets.d.ts +2 -2
  86. package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +4 -0
  87. package/src/lib/views/CollectUserDataView/UserDataFields/index.js +4 -0
  88. package/src/lib/views/EmailUpdate/EmailUpdate.cjs +13 -4
  89. package/src/lib/views/EmailUpdate/EmailUpdate.js +13 -4
  90. package/src/lib/views/EmailVerification/EmailVerification.cjs +6 -1
  91. package/src/lib/views/EmailVerification/EmailVerification.js +7 -2
  92. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +3 -2
  93. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +3 -2
  94. package/src/lib/views/LoginWithEmailView/components/LoginWithEmailWalletList/LoginWithEmailWalletList.cjs +4 -1
  95. package/src/lib/views/LoginWithEmailView/components/LoginWithEmailWalletList/LoginWithEmailWalletList.js +4 -1
  96. package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.cjs +1 -1
  97. package/src/lib/views/LoginWithEmailView/components/SocialSignIn/SocialSignIn.js +1 -1
  98. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +9 -1
  99. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +9 -1
  100. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +1 -0
  101. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +1 -0
  102. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +1 -0
  103. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +1 -0
  104. package/src/lib/views/SendBalanceView/SendBalanceView.cjs +11 -16
  105. package/src/lib/views/SendBalanceView/SendBalanceView.js +11 -16
  106. package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.cjs +66 -0
  107. package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.d.ts +8 -0
  108. package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.js +62 -0
  109. package/src/lib/views/SendBalanceView/components/TransactionStage/index.d.ts +1 -0
  110. package/src/lib/views/SendBalanceView/components/index.d.ts +1 -0
  111. package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +1 -2
  112. package/src/lib/views/SocialRedirectView/SocialRedirectView.js +1 -2
  113. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +22 -4
  114. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +22 -4
  115. package/src/lib/views/TransactionConfirmationView/hooks/index.d.ts +2 -1
  116. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/index.d.ts +1 -0
  117. package/src/lib/views/TransactionConfirmationView/hooks/{useTransactionData/useTransactionData.cjs → useTransactionGas/useTransactionGas.cjs} +17 -42
  118. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.d.ts +11 -0
  119. package/src/lib/views/TransactionConfirmationView/hooks/{useTransactionData/useTransactionData.js → useTransactionGas/useTransactionGas.js} +18 -43
  120. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionTotal/index.d.ts +1 -0
  121. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionTotal/useTransactionTotal.cjs +14 -0
  122. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionTotal/useTransactionTotal.d.ts +7 -0
  123. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionTotal/useTransactionTotal.js +10 -0
  124. package/src/lib/views/WalletList/WalletList.cjs +4 -1
  125. package/src/lib/views/WalletList/WalletList.js +4 -1
  126. package/src/lib/views/WalletLockedView/WalletLockedView.cjs +20 -4
  127. package/src/lib/views/WalletLockedView/WalletLockedView.js +20 -4
  128. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/index.d.ts +0 -1
  129. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.d.ts +0 -18
package/CHANGELOG.md CHANGED
@@ -1,4 +1,40 @@
1
1
 
2
+ ## [0.18.0](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.0-beta.32...v0.18.0) (2023-08-13)
3
+
4
+
5
+ ### Features
6
+
7
+ * add in OKX wallet integration ([#2871](https://github.com/dynamic-labs/DynamicAuth/issues/2871)) ([#2927](https://github.com/dynamic-labs/DynamicAuth/issues/2927)) ([f6d06bc](https://github.com/dynamic-labs/DynamicAuth/commit/f6d06bc75ee0e53c9d972f5fab1f4de11818bd82))
8
+ * update wallet locked view ([#2923](https://github.com/dynamic-labs/DynamicAuth/issues/2923)) ([3cc03ee](https://github.com/dynamic-labs/DynamicAuth/commit/3cc03ee5913434d99386fc89d4d26d5d3fb3ca19))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * account already exist message not displaying automatically ([#2896](https://github.com/dynamic-labs/DynamicAuth/issues/2896)) ([#2906](https://github.com/dynamic-labs/DynamicAuth/issues/2906)) ([5e7478a](https://github.com/dynamic-labs/DynamicAuth/commit/5e7478acd864451a7cf7e8e62845cca7ef5439c6))
14
+ * don't let user update email if it's tied to an embedded wallet ([#2903](https://github.com/dynamic-labs/DynamicAuth/issues/2903)) ([33c52b5](https://github.com/dynamic-labs/DynamicAuth/commit/33c52b50a880a34b4161a700b8b1805c9b01527d)), closes [#2883](https://github.com/dynamic-labs/DynamicAuth/issues/2883)
15
+ * **GVTY-195:** issues with mergeUserAccountsView ([#2945](https://github.com/dynamic-labs/DynamicAuth/issues/2945)) ([2c6265e](https://github.com/dynamic-labs/DynamicAuth/commit/2c6265e3e709edb9ff1af6e6c139b85418e46d76))
16
+ * **Magic:** improve gas estimate for transactions ([#2947](https://github.com/dynamic-labs/DynamicAuth/issues/2947)) ([ad35a72](https://github.com/dynamic-labs/DynamicAuth/commit/ad35a722df6abd54b98ea491661ff4ec3e602621))
17
+ * missing enable isVerificationInProgress ([#2926](https://github.com/dynamic-labs/DynamicAuth/issues/2926)) ([98f54fd](https://github.com/dynamic-labs/DynamicAuth/commit/98f54fd1345713dfaf0ef837502dfaca3709d633))
18
+ * **networks:** merge custom network after API networks ([#2949](https://github.com/dynamic-labs/DynamicAuth/issues/2949)) ([ab22303](https://github.com/dynamic-labs/DynamicAuth/commit/ab22303294123c2a914a65f0d2c15481740647bb))
19
+ * onBeforeConnectSuccessConfirmation is being called multiple time ([#2965](https://github.com/dynamic-labs/DynamicAuth/issues/2965)) ([a276968](https://github.com/dynamic-labs/DynamicAuth/commit/a2769689bc82350dfb8123e1fe8a4e92a60b262c))
20
+ * **QNTM-249:** broken email update when user is authenticated ([#2932](https://github.com/dynamic-labs/DynamicAuth/issues/2932)) ([db33ba1](https://github.com/dynamic-labs/DynamicAuth/commit/db33ba14c317469958ce314a3822b706e20b07d0))
21
+ * reformat social sign-in text ([#2956](https://github.com/dynamic-labs/DynamicAuth/issues/2956)) ([#2961](https://github.com/dynamic-labs/DynamicAuth/issues/2961)) ([f8d2222](https://github.com/dynamic-labs/DynamicAuth/commit/f8d2222d102f5335f95ec917cbb63bf9b55eff0b))
22
+ * **transaction:** improve gas estimate in transaction confirmation ([#2938](https://github.com/dynamic-labs/DynamicAuth/issues/2938)) ([02d0f46](https://github.com/dynamic-labs/DynamicAuth/commit/02d0f46127e94e83b4decbaaf6a45dbae135c89d))
23
+ * useSyncPrimaryWallet overrides views with "wallet-locked-view" ([#2921](https://github.com/dynamic-labs/DynamicAuth/issues/2921)) ([aa8c369](https://github.com/dynamic-labs/DynamicAuth/commit/aa8c369d2a713eb57ecc99b16a6b62d465789370))
24
+ * **wallet-list:** update key to distinguish wallet and wallet group ([#2922](https://github.com/dynamic-labs/DynamicAuth/issues/2922)) ([f40c07c](https://github.com/dynamic-labs/DynamicAuth/commit/f40c07c65915775e99a1dbb8d07bb23824a92915)), closes [#2909](https://github.com/dynamic-labs/DynamicAuth/issues/2909)
25
+
26
+ ## [0.18.0-beta.32](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.0-beta.31...v0.18.0-beta.32) (2023-08-09)
27
+
28
+
29
+ ### Features
30
+
31
+ * disable social buttons after provider is selected ([#2875](https://github.com/dynamic-labs/DynamicAuth/issues/2875)) ([#2881](https://github.com/dynamic-labs/DynamicAuth/issues/2881)) ([8a20409](https://github.com/dynamic-labs/DynamicAuth/commit/8a204095a322872caf6255db40bc10d29047e9a4))
32
+
33
+
34
+ ### Bug Fixes
35
+
36
+ * css variables are being ignored for ConnectButton component ([#2884](https://github.com/dynamic-labs/DynamicAuth/issues/2884)) ([979557e](https://github.com/dynamic-labs/DynamicAuth/commit/979557edf2da81c2681c57e8431a5bf0ed235433))
37
+
2
38
  ## [0.18.0-beta.31](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.0-beta.30...v0.18.0-beta.31) (2023-08-08)
3
39
 
4
40
 
package/package.cjs CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = "0.18.0-beta.31";
5
+ var version = "0.18.0";
6
6
  var dependencies = {
7
7
  "react-focus-lock": "2.9.2",
8
8
  "@dynamic-labs/iconic": "0.1.23",
9
- "@dynamic-labs/sdk-api": "0.0.255",
9
+ "@dynamic-labs/sdk-api": "0.0.256",
10
10
  "@hcaptcha/react-hcaptcha": "1.4.4",
11
11
  "country-list": "2.3.0",
12
12
  yup: "0.32.11",
package/package.js CHANGED
@@ -1,8 +1,8 @@
1
- var version = "0.18.0-beta.31";
1
+ var version = "0.18.0";
2
2
  var dependencies = {
3
3
  "react-focus-lock": "2.9.2",
4
4
  "@dynamic-labs/iconic": "0.1.23",
5
- "@dynamic-labs/sdk-api": "0.0.255",
5
+ "@dynamic-labs/sdk-api": "0.0.256",
6
6
  "@hcaptcha/react-hcaptcha": "1.4.4",
7
7
  "country-list": "2.3.0",
8
8
  yup: "0.32.11",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "0.18.0-beta.31",
3
+ "version": "0.18.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -9,20 +9,20 @@
9
9
  "dependencies": {
10
10
  "react-focus-lock": "2.9.2",
11
11
  "@dynamic-labs/iconic": "0.1.23",
12
- "@dynamic-labs/sdk-api": "0.0.255",
12
+ "@dynamic-labs/sdk-api": "0.0.256",
13
13
  "@hcaptcha/react-hcaptcha": "1.4.4",
14
14
  "country-list": "2.3.0",
15
15
  "yup": "0.32.11",
16
16
  "formik": "2.2.9",
17
17
  "qrcode": "1.5.1",
18
18
  "ethers": "5.7.2",
19
- "@dynamic-labs/logger": "0.18.0-beta.31",
20
- "@dynamic-labs/multi-wallet": "0.18.0-beta.31",
21
- "@dynamic-labs/rpc-providers": "0.18.0-beta.31",
22
- "@dynamic-labs/types": "0.18.0-beta.31",
23
- "@dynamic-labs/utils": "0.18.0-beta.31",
24
- "@dynamic-labs/wallet-book": "0.18.0-beta.31",
25
- "@dynamic-labs/wallet-connector-core": "0.18.0-beta.31",
19
+ "@dynamic-labs/logger": "0.18.0",
20
+ "@dynamic-labs/multi-wallet": "0.18.0",
21
+ "@dynamic-labs/rpc-providers": "0.18.0",
22
+ "@dynamic-labs/types": "0.18.0",
23
+ "@dynamic-labs/utils": "0.18.0",
24
+ "@dynamic-labs/wallet-book": "0.18.0",
25
+ "@dynamic-labs/wallet-connector-core": "0.18.0",
26
26
  "eventemitter3": "5.0.1"
27
27
  },
28
28
  "devDependencies": {
package/src/lib/Main.cjs CHANGED
@@ -54,6 +54,9 @@ var isSelectedWalletAlreadyConnected = require('./utils/functions/isSelectedWall
54
54
  var viewToComponentMap = require('./views/viewToComponentMap.cjs');
55
55
  require('./main.global.cjs');
56
56
 
57
+ const viewsToDisableCloseOnOverlayClick = [
58
+ 'email-wallet-otp-verification-view',
59
+ ];
57
60
  const Main = () => {
58
61
  const { selectedWalletConnector, linkedWallets, isProjectSettingsLoading, projectSettings, setShowAuthFlow, showAuthFlow, wallets, clearStatesOnBackClick, user, unlinkConnectedWallet, authMode, connectedWallets, } = useInternalDynamicContext.useInternalDynamicContext();
59
62
  const { view, goToInitialView } = ViewContext.useViewContext();
@@ -61,6 +64,8 @@ const Main = () => {
61
64
  const { setExistentAccountData } = AccountExistsContext.useAccountExistsContext();
62
65
  usePreventPageScroll.usePreventPageScroll(showAuthFlow);
63
66
  const handleClose = () => {
67
+ if (viewsToDisableCloseOnOverlayClick.includes(view))
68
+ return;
64
69
  setShowAuthFlow(false);
65
70
  setDeniedAddress('');
66
71
  setDeniedOauthProvider(undefined);
package/src/lib/Main.js CHANGED
@@ -50,6 +50,9 @@ import { isSelectedWalletAlreadyConnected } from './utils/functions/isSelectedWa
50
50
  import { viewToComponentMap } from './views/viewToComponentMap.js';
51
51
  import './main.global.js';
52
52
 
53
+ const viewsToDisableCloseOnOverlayClick = [
54
+ 'email-wallet-otp-verification-view',
55
+ ];
53
56
  const Main = () => {
54
57
  const { selectedWalletConnector, linkedWallets, isProjectSettingsLoading, projectSettings, setShowAuthFlow, showAuthFlow, wallets, clearStatesOnBackClick, user, unlinkConnectedWallet, authMode, connectedWallets, } = useInternalDynamicContext();
55
58
  const { view, goToInitialView } = useViewContext();
@@ -57,6 +60,8 @@ const Main = () => {
57
60
  const { setExistentAccountData } = useAccountExistsContext();
58
61
  usePreventPageScroll(showAuthFlow);
59
62
  const handleClose = () => {
63
+ if (viewsToDisableCloseOnOverlayClick.includes(view))
64
+ return;
60
65
  setShowAuthFlow(false);
61
66
  setDeniedAddress('');
62
67
  setDeniedOauthProvider(undefined);
@@ -36,12 +36,15 @@ const Button = ({ buttonClassName = '', buttonPadding = 'medium', buttonVariant
36
36
  }, buttonPadding ? buttonPaddingClassNameMap[buttonPadding] : '', buttonVariant ? buttonVariantClassNameMap[buttonVariant] : '', buttonRounded ? buttonRoundedClassNameMap[buttonRounded] : '', buttonClassName);
37
37
  const handleClick = (e) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
38
38
  if (onClick) {
39
- setInternalButtonLoading(true);
40
- try {
41
- yield onClick(e);
42
- }
43
- finally {
44
- setInternalButtonLoading(false);
39
+ const onClickResult = onClick(e);
40
+ if (onClickResult instanceof Promise) {
41
+ setInternalButtonLoading(true);
42
+ try {
43
+ yield onClickResult;
44
+ }
45
+ finally {
46
+ setInternalButtonLoading(false);
47
+ }
45
48
  }
46
49
  }
47
50
  if (feedback) {
@@ -52,7 +55,7 @@ const Button = ({ buttonClassName = '', buttonPadding = 'medium', buttonVariant
52
55
  }
53
56
  });
54
57
  const buttonContent = (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [startSlot && jsxRuntime.jsx("div", Object.assign({ className: 'button__start-slot' }, { children: startSlot })), (feedback || children) && (jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'button_primary', color: 'primary', as: 'span' }, typographyProps, { children: isFeedbackVisible && feedback ? feedback : children }))), endSlot && jsxRuntime.jsx("div", Object.assign({ className: 'button__end-slot' }, { children: endSlot }))] }));
55
- return (jsxRuntime.jsxs("button", Object.assign({ type: type, onClick: handleClick, className: buttonEffectiveClassName, disabled: disabled || internalButtonLoading || loading, "data-testid": dataTestId }, { children: [(internalButtonLoading || loading) && (jsxRuntime.jsx("div", Object.assign({ className: 'button__spinner-container' }, { children: jsxRuntime.jsx(spinner.Spinner, { className: 'button__spinner' }) }))), buttonContent] })));
58
+ return (jsxRuntime.jsxs("button", Object.assign({ type: type, onClick: handleClick, className: buttonEffectiveClassName, disabled: disabled || internalButtonLoading || loading, "data-testid": dataTestId }, { children: [(internalButtonLoading || loading) && (jsxRuntime.jsx("div", Object.assign({ className: 'button__spinner-container', "data-testid": 'button__spinner' }, { children: jsxRuntime.jsx(spinner.Spinner, { className: 'button__spinner' }) }))), buttonContent] })));
56
59
  };
57
60
 
58
61
  exports.Button = Button;
@@ -32,12 +32,15 @@ const Button = ({ buttonClassName = '', buttonPadding = 'medium', buttonVariant
32
32
  }, buttonPadding ? buttonPaddingClassNameMap[buttonPadding] : '', buttonVariant ? buttonVariantClassNameMap[buttonVariant] : '', buttonRounded ? buttonRoundedClassNameMap[buttonRounded] : '', buttonClassName);
33
33
  const handleClick = (e) => __awaiter(void 0, void 0, void 0, function* () {
34
34
  if (onClick) {
35
- setInternalButtonLoading(true);
36
- try {
37
- yield onClick(e);
38
- }
39
- finally {
40
- setInternalButtonLoading(false);
35
+ const onClickResult = onClick(e);
36
+ if (onClickResult instanceof Promise) {
37
+ setInternalButtonLoading(true);
38
+ try {
39
+ yield onClickResult;
40
+ }
41
+ finally {
42
+ setInternalButtonLoading(false);
43
+ }
41
44
  }
42
45
  }
43
46
  if (feedback) {
@@ -48,7 +51,7 @@ const Button = ({ buttonClassName = '', buttonPadding = 'medium', buttonVariant
48
51
  }
49
52
  });
50
53
  const buttonContent = (jsxs(Fragment, { children: [startSlot && jsx("div", Object.assign({ className: 'button__start-slot' }, { children: startSlot })), (feedback || children) && (jsx(Typography, Object.assign({ variant: 'button_primary', color: 'primary', as: 'span' }, typographyProps, { children: isFeedbackVisible && feedback ? feedback : children }))), endSlot && jsx("div", Object.assign({ className: 'button__end-slot' }, { children: endSlot }))] }));
51
- return (jsxs("button", Object.assign({ type: type, onClick: handleClick, className: buttonEffectiveClassName, disabled: disabled || internalButtonLoading || loading, "data-testid": dataTestId }, { children: [(internalButtonLoading || loading) && (jsx("div", Object.assign({ className: 'button__spinner-container' }, { children: jsx(Spinner, { className: 'button__spinner' }) }))), buttonContent] })));
54
+ return (jsxs("button", Object.assign({ type: type, onClick: handleClick, className: buttonEffectiveClassName, disabled: disabled || internalButtonLoading || loading, "data-testid": dataTestId }, { children: [(internalButtonLoading || loading) && (jsx("div", Object.assign({ className: 'button__spinner-container', "data-testid": 'button__spinner' }, { children: jsx(Spinner, { className: 'button__spinner' }) }))), buttonContent] })));
52
55
  };
53
56
 
54
57
  export { Button };
@@ -6,6 +6,6 @@ var jsxRuntime = require('react/jsx-runtime');
6
6
  var Button = require('../../Button/Button.cjs');
7
7
  var classNames = require('../../../utils/functions/classNames/classNames.cjs');
8
8
 
9
- const ConnectButton = ({ buttonClassName, buttonContainerClassName, onClick, isActive, isLoading, children, }) => (jsxRuntime.jsx("div", Object.assign({ className: buttonContainerClassName }, { children: jsxRuntime.jsx(Button.Button, Object.assign({ dataTestId: 'ConnectButton', onClick: onClick, buttonClassName: classNames.classNames('connect-button', buttonClassName), loading: isLoading && isActive, disabled: isLoading && isActive, buttonVariant: 'primary', buttonPadding: 'large', buttonRounded: 'default' }, { children: children })) })));
9
+ const ConnectButton = ({ buttonClassName, buttonContainerClassName, onClick, isActive, isLoading, children, }) => (jsxRuntime.jsx("div", Object.assign({ className: buttonContainerClassName }, { children: jsxRuntime.jsx(Button.Button, Object.assign({ dataTestId: 'ConnectButton', onClick: onClick, buttonClassName: classNames.classNames('connect-button', buttonClassName), loading: isLoading && isActive, disabled: isLoading && isActive, buttonVariant: 'primary', buttonPadding: 'large' }, { children: children })) })));
10
10
 
11
11
  exports.ConnectButton = ConnectButton;
@@ -2,6 +2,6 @@ import { jsx } from 'react/jsx-runtime';
2
2
  import { Button } from '../../Button/Button.js';
3
3
  import { classNames } from '../../../utils/functions/classNames/classNames.js';
4
4
 
5
- const ConnectButton = ({ buttonClassName, buttonContainerClassName, onClick, isActive, isLoading, children, }) => (jsx("div", Object.assign({ className: buttonContainerClassName }, { children: jsx(Button, Object.assign({ dataTestId: 'ConnectButton', onClick: onClick, buttonClassName: classNames('connect-button', buttonClassName), loading: isLoading && isActive, disabled: isLoading && isActive, buttonVariant: 'primary', buttonPadding: 'large', buttonRounded: 'default' }, { children: children })) })));
5
+ const ConnectButton = ({ buttonClassName, buttonContainerClassName, onClick, isActive, isLoading, children, }) => (jsx("div", Object.assign({ className: buttonContainerClassName }, { children: jsx(Button, Object.assign({ dataTestId: 'ConnectButton', onClick: onClick, buttonClassName: classNames('connect-button', buttonClassName), loading: isLoading && isActive, disabled: isLoading && isActive, buttonVariant: 'primary', buttonPadding: 'large' }, { children: children })) })));
6
6
 
7
7
  export { ConnectButton };
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- type Variant = 'error' | 'info';
2
+ type Variant = 'error' | 'info' | 'success';
3
3
  type Props = {
4
4
  children: ReactNode;
5
5
  className?: string;
@@ -6,6 +6,6 @@ var jsxRuntime = require('react/jsx-runtime');
6
6
  var classNames = require('../../utils/functions/classNames/classNames.cjs');
7
7
  var Typography = require('../Typography/Typography.cjs');
8
8
 
9
- const ListTile = ({ children, onClick, leading, trailing, style, className = '', dataTestId, }) => (jsxRuntime.jsxs("button", Object.assign({ "data-testid": dataTestId, type: 'button', className: classNames.classNames(className, 'list-tile'), onClick: onClick, style: style }, { children: [leading, jsxRuntime.jsx("div", Object.assign({ className: 'list-tile__children' }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'body_normal', color: 'primary', as: 'span' }, { children: children })) })), trailing] })));
9
+ const ListTile = ({ children, onClick, leading, disabled = false, trailing, style, className = '', dataTestId, }) => (jsxRuntime.jsxs("button", Object.assign({ "data-testid": dataTestId, type: 'button', className: classNames.classNames(className, 'list-tile'), onClick: onClick, style: style, disabled: disabled }, { children: [leading, jsxRuntime.jsx("div", Object.assign({ className: 'list-tile__children' }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'body_normal', color: 'primary', as: 'span' }, { children: children })) })), trailing] })));
10
10
 
11
11
  exports.ListTile = ListTile;
@@ -2,6 +2,6 @@ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { classNames } from '../../utils/functions/classNames/classNames.js';
3
3
  import { Typography } from '../Typography/Typography.js';
4
4
 
5
- const ListTile = ({ children, onClick, leading, trailing, style, className = '', dataTestId, }) => (jsxs("button", Object.assign({ "data-testid": dataTestId, type: 'button', className: classNames(className, 'list-tile'), onClick: onClick, style: style }, { children: [leading, jsx("div", Object.assign({ className: 'list-tile__children' }, { children: jsx(Typography, Object.assign({ weight: 'medium', variant: 'body_normal', color: 'primary', as: 'span' }, { children: children })) })), trailing] })));
5
+ const ListTile = ({ children, onClick, leading, disabled = false, trailing, style, className = '', dataTestId, }) => (jsxs("button", Object.assign({ "data-testid": dataTestId, type: 'button', className: classNames(className, 'list-tile'), onClick: onClick, style: style, disabled: disabled }, { children: [leading, jsx("div", Object.assign({ className: 'list-tile__children' }, { children: jsx(Typography, Object.assign({ weight: 'medium', variant: 'body_normal', color: 'primary', as: 'span' }, { children: children })) })), trailing] })));
6
6
 
7
7
  export { ListTile };
@@ -4,6 +4,7 @@ export type ListTileProps = {
4
4
  dataTestId?: string;
5
5
  leading?: ReactNode;
6
6
  onClick?: MouseEventHandler<HTMLButtonElement>;
7
+ disabled?: boolean;
7
8
  style?: CSSProperties;
8
9
  trailing?: ReactNode;
9
10
  };
@@ -10,6 +10,7 @@ require('@dynamic-labs/sdk-api');
10
10
  require('../../shared/logger.cjs');
11
11
  require('@dynamic-labs/wallet-connector-core');
12
12
  require('../../context/ViewContext/ViewContext.cjs');
13
+ var close = require('../../shared/assets/close.cjs');
13
14
  var chevronLeft = require('../../shared/assets/chevron-left.cjs');
14
15
  var check = require('../../shared/assets/check.cjs');
15
16
  var pencilAltIcon = require('../../shared/assets/pencil-alt-icon.cjs');
@@ -54,9 +55,10 @@ require('yup');
54
55
  require('../InlineWidget/InlineWidget.cjs');
55
56
  require('../MenuList/Dropdown/Dropdown.cjs');
56
57
 
57
- const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, displayPoweredByDynamic = false, }) => {
58
- const backButton = (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ type: 'button', onClick: onClickBack, "data-testid": 'back-button' }, { children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) })));
59
- return (jsxRuntime.jsxs("div", Object.assign({ className: 'otp-verification-view' }, { children: [jsxRuntime.jsx(ModalHeaderBanner.ModalHeaderBanner, { type: 'error', message: error === null || error === void 0 ? void 0 : error.message }), jsxRuntime.jsx(ModalHeader.ModalHeader, Object.assign({ alignContent: 'bottom', leading: onClickBack && backButton }, { children: jsxRuntime.jsxs("div", Object.assign({ className: 'otp-verification-view__status-header' }, { children: [isValid && (jsxRuntime.jsx(IconWithStatus.IconWithStatus, { Icon: iconic.SignInWithEmailIcon, iconSize: 50, InnerIcon: check.ReactComponent })), !isValid && (jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: iconic.SignInWithEmailIcon, iconSize: 80, isSpinning: isLoading }))] })) })), jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'otp-verification-view__title' }, { children: isValid ? 'Verification code confirmed' : 'Confirm verification code' })), jsxRuntime.jsxs("div", Object.assign({ className: 'otp-verification-view__body' }, { children: [isValid && (jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "Hang tight while we get things ready for you" }))), !isValid && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "We\u2019ve sent a verification code to" })), jsxRuntime.jsxs("div", Object.assign({ className: 'otp-verification-view__email-container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'bold', color: 'secondary' }, { children: shortenEmail.shortenEmail(email) })), onClickEditEmail && (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ onClick: onClickEditEmail, "data-testid": 'otp-verification-view__edit-button' }, { children: jsxRuntime.jsx(Icon.Icon, Object.assign({ color: 'text-tertiary' }, { children: jsxRuntime.jsx(pencilAltIcon.ReactComponent, {}) })) })))] }))] }))] })), jsxRuntime.jsx(PinField.PinField, { initialValue: Array(6).join('.').split('.'), isLoading: isLoading, handleComplete: onPinComplete, isValidated: isValid, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: onPinChange }), jsxRuntime.jsx("div", Object.assign({ className: 'otp-verification-view__footer' }, { children: displayPoweredByDynamic && jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, {}) }))] })));
58
+ const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, onClickClose, displayPoweredByDynamic = false, }) => {
59
+ const backButton = onClickBack && (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ type: 'button', onClick: onClickBack, "data-testid": 'back-button' }, { children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) })));
60
+ const closeButton = (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ onClick: onClickClose, type: 'button', "data-testid": 'close-button' }, { children: jsxRuntime.jsx(close.ReactComponent, {}) })));
61
+ return (jsxRuntime.jsxs("div", Object.assign({ className: 'otp-verification-view' }, { children: [jsxRuntime.jsx(ModalHeaderBanner.ModalHeaderBanner, { type: 'error', message: error === null || error === void 0 ? void 0 : error.message }), jsxRuntime.jsx(ModalHeader.ModalHeader, Object.assign({ alignContent: 'bottom', leading: onClickBack && backButton, trailing: onClickClose && closeButton }, { children: jsxRuntime.jsxs("div", Object.assign({ className: 'otp-verification-view__status-header' }, { children: [isValid && (jsxRuntime.jsx(IconWithStatus.IconWithStatus, { Icon: iconic.SignInWithEmailIcon, iconSize: 50, InnerIcon: check.ReactComponent })), !isValid && (jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: iconic.SignInWithEmailIcon, iconSize: 80, isSpinning: isLoading }))] })) })), jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'otp-verification-view__title' }, { children: isValid ? 'Verification code confirmed' : 'Confirm verification code' })), jsxRuntime.jsxs("div", Object.assign({ className: 'otp-verification-view__body' }, { children: [isValid && (jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "Hang tight while we get things ready for you" }))), !isValid && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "We\u2019ve sent a verification code to" })), jsxRuntime.jsxs("div", Object.assign({ className: 'otp-verification-view__email-container' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_normal', weight: 'bold', color: 'secondary' }, { children: shortenEmail.shortenEmail(email) })), onClickEditEmail && (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ onClick: onClickEditEmail, "data-testid": 'otp-verification-view__edit-button' }, { children: jsxRuntime.jsx(Icon.Icon, Object.assign({ color: 'text-tertiary' }, { children: jsxRuntime.jsx(pencilAltIcon.ReactComponent, {}) })) })))] }))] }))] })), jsxRuntime.jsx(PinField.PinField, { initialValue: Array(6).join('.').split('.'), isLoading: isLoading, handleComplete: onPinComplete, isValidated: isValid, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: onPinChange }), jsxRuntime.jsx("div", Object.assign({ className: 'otp-verification-view__footer' }, { children: displayPoweredByDynamic && jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, {}) }))] })));
60
62
  };
61
63
 
62
64
  exports.OTPVerificationView = OTPVerificationView;
@@ -6,6 +6,7 @@ type OtpVerificationLayoutProps = {
6
6
  isLoading: boolean;
7
7
  isValid: boolean;
8
8
  onClickBack?: MouseEventHandler<HTMLButtonElement>;
9
+ onClickClose?: MouseEventHandler<HTMLButtonElement>;
9
10
  onClickEditEmail?: MouseEventHandler<HTMLButtonElement>;
10
11
  onPinChange?: (value: string) => void;
11
12
  onPinComplete: (value: string) => void;
@@ -6,6 +6,7 @@ import '@dynamic-labs/sdk-api';
6
6
  import '../../shared/logger.js';
7
7
  import '@dynamic-labs/wallet-connector-core';
8
8
  import '../../context/ViewContext/ViewContext.js';
9
+ import { ReactComponent as SvgClose } from '../../shared/assets/close.js';
9
10
  import { ReactComponent as SvgChevronLeft } from '../../shared/assets/chevron-left.js';
10
11
  import { ReactComponent as SvgCheck } from '../../shared/assets/check.js';
11
12
  import { ReactComponent as SvgPencilAltIcon } from '../../shared/assets/pencil-alt-icon.js';
@@ -50,9 +51,10 @@ import 'yup';
50
51
  import '../InlineWidget/InlineWidget.js';
51
52
  import '../MenuList/Dropdown/Dropdown.js';
52
53
 
53
- const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, displayPoweredByDynamic = false, }) => {
54
- const backButton = (jsx(IconButton, Object.assign({ type: 'button', onClick: onClickBack, "data-testid": 'back-button' }, { children: jsx(SvgChevronLeft, {}) })));
55
- return (jsxs("div", Object.assign({ className: 'otp-verification-view' }, { children: [jsx(ModalHeaderBanner, { type: 'error', message: error === null || error === void 0 ? void 0 : error.message }), jsx(ModalHeader, Object.assign({ alignContent: 'bottom', leading: onClickBack && backButton }, { children: jsxs("div", Object.assign({ className: 'otp-verification-view__status-header' }, { children: [isValid && (jsx(IconWithStatus, { Icon: SignInWithEmailIcon, iconSize: 50, InnerIcon: SvgCheck })), !isValid && (jsx(IconWithSpinner, { Icon: SignInWithEmailIcon, iconSize: 80, isSpinning: isLoading }))] })) })), jsx(Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'otp-verification-view__title' }, { children: isValid ? 'Verification code confirmed' : 'Confirm verification code' })), jsxs("div", Object.assign({ className: 'otp-verification-view__body' }, { children: [isValid && (jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "Hang tight while we get things ready for you" }))), !isValid && (jsxs(Fragment, { children: [jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "We\u2019ve sent a verification code to" })), jsxs("div", Object.assign({ className: 'otp-verification-view__email-container' }, { children: [jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'bold', color: 'secondary' }, { children: shortenEmail(email) })), onClickEditEmail && (jsx(IconButton, Object.assign({ onClick: onClickEditEmail, "data-testid": 'otp-verification-view__edit-button' }, { children: jsx(Icon, Object.assign({ color: 'text-tertiary' }, { children: jsx(SvgPencilAltIcon, {}) })) })))] }))] }))] })), jsx(PinField, { initialValue: Array(6).join('.').split('.'), isLoading: isLoading, handleComplete: onPinComplete, isValidated: isValid, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: onPinChange }), jsx("div", Object.assign({ className: 'otp-verification-view__footer' }, { children: displayPoweredByDynamic && jsx(PoweredByDynamic, {}) }))] })));
54
+ const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, onClickClose, displayPoweredByDynamic = false, }) => {
55
+ const backButton = onClickBack && (jsx(IconButton, Object.assign({ type: 'button', onClick: onClickBack, "data-testid": 'back-button' }, { children: jsx(SvgChevronLeft, {}) })));
56
+ const closeButton = (jsx(IconButton, Object.assign({ onClick: onClickClose, type: 'button', "data-testid": 'close-button' }, { children: jsx(SvgClose, {}) })));
57
+ return (jsxs("div", Object.assign({ className: 'otp-verification-view' }, { children: [jsx(ModalHeaderBanner, { type: 'error', message: error === null || error === void 0 ? void 0 : error.message }), jsx(ModalHeader, Object.assign({ alignContent: 'bottom', leading: onClickBack && backButton, trailing: onClickClose && closeButton }, { children: jsxs("div", Object.assign({ className: 'otp-verification-view__status-header' }, { children: [isValid && (jsx(IconWithStatus, { Icon: SignInWithEmailIcon, iconSize: 50, InnerIcon: SvgCheck })), !isValid && (jsx(IconWithSpinner, { Icon: SignInWithEmailIcon, iconSize: 80, isSpinning: isLoading }))] })) })), jsx(Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'otp-verification-view__title' }, { children: isValid ? 'Verification code confirmed' : 'Confirm verification code' })), jsxs("div", Object.assign({ className: 'otp-verification-view__body' }, { children: [isValid && (jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "Hang tight while we get things ready for you" }))), !isValid && (jsxs(Fragment, { children: [jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'regular', color: 'secondary' }, { children: "We\u2019ve sent a verification code to" })), jsxs("div", Object.assign({ className: 'otp-verification-view__email-container' }, { children: [jsx(Typography, Object.assign({ variant: 'body_normal', weight: 'bold', color: 'secondary' }, { children: shortenEmail(email) })), onClickEditEmail && (jsx(IconButton, Object.assign({ onClick: onClickEditEmail, "data-testid": 'otp-verification-view__edit-button' }, { children: jsx(Icon, Object.assign({ color: 'text-tertiary' }, { children: jsx(SvgPencilAltIcon, {}) })) })))] }))] }))] })), jsx(PinField, { initialValue: Array(6).join('.').split('.'), isLoading: isLoading, handleComplete: onPinComplete, isValidated: isValid, inputMode: 'numeric', pattern: '[0-9]*', hasError: Boolean(error), onChange: onPinChange }), jsx("div", Object.assign({ className: 'otp-verification-view__footer' }, { children: displayPoweredByDynamic && jsx(PoweredByDynamic, {}) }))] })));
56
58
  };
57
59
 
58
60
  export { OTPVerificationView };
@@ -36,7 +36,9 @@ var PoweredByDynamic = require('../PoweredByDynamic/PoweredByDynamic.cjs');
36
36
  const TransactionConfirmationPageLayout = ({ onClickClose, isLoading, onClickBack, title, error, appOrigin, appLogoUrl, appName, onClickSend, disableSendButton, displayPoweredByDynamicFooter = false, warningMessage, children, }) => {
37
37
  const closeButton = onClickClose && (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ type: 'button', onClick: onClickClose, "data-testid": 'close', disabled: isLoading }, { children: jsxRuntime.jsx(close.ReactComponent, {}) })));
38
38
  const backButton = onClickBack && (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ type: 'button', onClick: onClickBack, "data-testid": 'back-button' }, { children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) })));
39
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, Object.assign({ trailing: closeButton, leading: backButton, 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: error && (jsxRuntime.jsx("div", Object.assign({ className: 'transaction-confirmation__error' }, { children: jsxRuntime.jsx(Alert.Alert, Object.assign({ icon: 'error', variant: 'error' }, { children: error })) }))) })), 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.jsx("div", Object.assign({ className: 'transaction-confirmation__rows' }, { children: children }))] })), jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}) }, { children: warningMessage && (jsxRuntime.jsx("div", Object.assign({ className: 'transaction-confirmation__warning' }, { children: jsxRuntime.jsx(Alert.Alert, Object.assign({ icon: 'error', variant: 'warning', contentDataTestId: 'warning_content' }, { children: warningMessage })) }))) })), jsxRuntime.jsxs("div", Object.assign({ className: 'transaction-confirmation__actions' }, { children: [onClickClose && (jsxRuntime.jsx(Button.Button, Object.assign({ buttonVariant: 'secondary', onClick: onClickClose, expanded: true, buttonPadding: 'large', buttonRounded: 'default', disabled: isLoading }, { children: "Cancel" }))), jsxRuntime.jsx(Button.Button, Object.assign({ buttonVariant: 'primary', buttonPadding: 'large', onClick: onClickSend, expanded: true, buttonRounded: 'default', loading: isLoading, disabled: disableSendButton }, { children: "Send" }))] })), displayPoweredByDynamicFooter && (jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'transaction-confirmation__footer' }))] }))] }));
39
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, Object.assign({ trailing: closeButton, leading: backButton, 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: error && (jsxRuntime.jsx("div", Object.assign({ className: 'transaction-confirmation__error' }, { children: jsxRuntime.jsx(Alert.Alert, Object.assign({ icon: 'error', variant: 'error' }, { children: error })) }))) })), 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.jsx("div", Object.assign({ className: 'transaction-confirmation__rows' }, { children: children }))] })), jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}) }, { children: warningMessage && (jsxRuntime.jsx("div", Object.assign({ className: 'transaction-confirmation__warning' }, { children: jsxRuntime.jsx(Alert.Alert, Object.assign({ icon: 'error', variant: 'warning', contentDataTestId: 'warning_content' }, { children: warningMessage })) }))) })), jsxRuntime.jsxs("div", Object.assign({ className: 'transaction-confirmation__actions' }, { children: [onClickClose && (jsxRuntime.jsx(Button.Button, Object.assign({ buttonVariant: 'secondary', onClick: onClickClose, expanded: true, buttonPadding: 'large', buttonRounded: 'default', disabled: isLoading }, { children: "Cancel" }))), jsxRuntime.jsx(Button.Button, Object.assign({ buttonVariant: 'primary', buttonPadding: 'large', onClick: (event) => {
40
+ onClickSend === null || onClickSend === void 0 ? void 0 : onClickSend(event);
41
+ }, expanded: true, buttonRounded: 'default', loading: isLoading, disabled: disableSendButton }, { children: "Send" }))] })), displayPoweredByDynamicFooter && (jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'transaction-confirmation__footer' }))] }))] }));
40
42
  };
41
43
 
42
44
  exports.TransactionConfirmationPageLayout = TransactionConfirmationPageLayout;
@@ -32,7 +32,9 @@ import { PoweredByDynamic } from '../PoweredByDynamic/PoweredByDynamic.js';
32
32
  const TransactionConfirmationPageLayout = ({ onClickClose, isLoading, onClickBack, title, error, appOrigin, appLogoUrl, appName, onClickSend, disableSendButton, displayPoweredByDynamicFooter = false, warningMessage, children, }) => {
33
33
  const closeButton = onClickClose && (jsx(IconButton, Object.assign({ type: 'button', onClick: onClickClose, "data-testid": 'close', disabled: isLoading }, { children: jsx(SvgClose, {}) })));
34
34
  const backButton = onClickBack && (jsx(IconButton, Object.assign({ type: 'button', onClick: onClickBack, "data-testid": 'back-button' }, { children: jsx(SvgChevronLeft, {}) })));
35
- return (jsxs(Fragment, { children: [jsx(ModalHeader, Object.assign({ trailing: closeButton, leading: backButton, 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: error && (jsx("div", Object.assign({ className: 'transaction-confirmation__error' }, { children: jsx(Alert, Object.assign({ icon: 'error', variant: 'error' }, { children: error })) }))) })), 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 }) })), jsx("div", Object.assign({ className: 'transaction-confirmation__rows' }, { children: children }))] })), jsx(AnimatePresence, Object.assign({ animationComponent: jsx(VerticalDrawerTransition, {}) }, { children: warningMessage && (jsx("div", Object.assign({ className: 'transaction-confirmation__warning' }, { children: jsx(Alert, Object.assign({ icon: 'error', variant: 'warning', contentDataTestId: 'warning_content' }, { children: warningMessage })) }))) })), jsxs("div", Object.assign({ className: 'transaction-confirmation__actions' }, { children: [onClickClose && (jsx(Button, Object.assign({ buttonVariant: 'secondary', onClick: onClickClose, expanded: true, buttonPadding: 'large', buttonRounded: 'default', disabled: isLoading }, { children: "Cancel" }))), jsx(Button, Object.assign({ buttonVariant: 'primary', buttonPadding: 'large', onClick: onClickSend, expanded: true, buttonRounded: 'default', loading: isLoading, disabled: disableSendButton }, { children: "Send" }))] })), displayPoweredByDynamicFooter && (jsx(PoweredByDynamic, { classNameRoot: 'transaction-confirmation__footer' }))] }))] }));
35
+ return (jsxs(Fragment, { children: [jsx(ModalHeader, Object.assign({ trailing: closeButton, leading: backButton, 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: error && (jsx("div", Object.assign({ className: 'transaction-confirmation__error' }, { children: jsx(Alert, Object.assign({ icon: 'error', variant: 'error' }, { children: error })) }))) })), 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 }) })), jsx("div", Object.assign({ className: 'transaction-confirmation__rows' }, { children: children }))] })), jsx(AnimatePresence, Object.assign({ animationComponent: jsx(VerticalDrawerTransition, {}) }, { children: warningMessage && (jsx("div", Object.assign({ className: 'transaction-confirmation__warning' }, { children: jsx(Alert, Object.assign({ icon: 'error', variant: 'warning', contentDataTestId: 'warning_content' }, { children: warningMessage })) }))) })), jsxs("div", Object.assign({ className: 'transaction-confirmation__actions' }, { children: [onClickClose && (jsx(Button, Object.assign({ buttonVariant: 'secondary', onClick: onClickClose, expanded: true, buttonPadding: 'large', buttonRounded: 'default', disabled: isLoading }, { children: "Cancel" }))), jsx(Button, Object.assign({ buttonVariant: 'primary', buttonPadding: 'large', onClick: (event) => {
36
+ onClickSend === null || onClickSend === void 0 ? void 0 : onClickSend(event);
37
+ }, expanded: true, buttonRounded: 'default', loading: isLoading, disabled: disableSendButton }, { children: "Send" }))] })), displayPoweredByDynamicFooter && (jsx(PoweredByDynamic, { classNameRoot: 'transaction-confirmation__footer' }))] }))] }));
36
38
  };
37
39
 
38
40
  export { TransactionConfirmationPageLayout };
@@ -54,8 +54,8 @@ var TransactionRow = require('../TransactionConfirmationPageLayout/components/Tr
54
54
 
55
55
  const TransactionStatusLayout = ({ destinationAddress, amount, networkName, networkCurrency, NetworkIcon, onDone, displayPoweredByDynamicFooter = true, onClickClose, }) => {
56
56
  const closeButton = onClickClose && (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ type: 'button', onClick: onClickClose, "data-testid": 'close' }, { children: jsxRuntime.jsx(close.ReactComponent, {}) })));
57
- const networkIcon = (jsxRuntime.jsx("div", Object.assign({ className: 'transaction-status-layout__network-icon' }, { children: NetworkIcon })));
58
- return (jsxRuntime.jsxs("div", Object.assign({ className: 'transaction-status-layout' }, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, Object.assign({ trailing: closeButton, alignContent: 'bottom' }, { children: jsxRuntime.jsx(IconWithStatus.IconWithStatus, { containerClassName: 'transaction-status-layout__status-icon', iconSize: 50, Icon: signCircle.ReactComponent, InnerIcon: check.ReactComponent }) })), jsxRuntime.jsxs("div", Object.assign({ className: 'transaction-status-layout__body' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'transaction-status-layout__title' }, { children: "Transaction successfully sent" })), jsxRuntime.jsx("div", Object.assign({ className: 'transaction-status-layout__content' }, { children: jsxRuntime.jsxs("div", Object.assign({ className: 'transaction-status-layout__rows' }, { children: [jsxRuntime.jsx(TransactionRow.TransactionRow, Object.assign({ label: 'Recipient' }, { children: shortenWalletAddress.shortenWalletAddress(destinationAddress, 3, 3) })), jsxRuntime.jsxs(TransactionRow.TransactionRow, Object.assign({ label: 'Network' }, { children: [networkIcon, jsxRuntime.jsx("span", Object.assign({ className: 'transaction-status-layout__network-name' }, { children: networkName }))] })), jsxRuntime.jsxs(TransactionRow.TransactionRow, Object.assign({ label: 'Total amount' }, { children: [amount, jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'span', color: 'secondary', className: 'transaction-status-layout__network-currency' }, { children: networkCurrency }))] }))] })) })), jsxRuntime.jsx("div", Object.assign({ className: 'transaction-status-layout__actions' }, { children: jsxRuntime.jsx(Button.Button, Object.assign({ buttonVariant: 'primary', buttonPadding: 'large', expanded: true, buttonRounded: 'default', onClick: onDone }, { children: "Continue" })) })), displayPoweredByDynamicFooter && (jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'transaction-status-layout__footer' }))] }))] })));
57
+ const networkIcon = (jsxRuntime.jsx("span", Object.assign({ className: 'transaction-status-layout__network-icon' }, { children: NetworkIcon })));
58
+ return (jsxRuntime.jsxs("div", Object.assign({ className: 'transaction-status-layout' }, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, Object.assign({ trailing: closeButton, alignContent: 'bottom' }, { children: jsxRuntime.jsx(IconWithStatus.IconWithStatus, { containerClassName: 'transaction-status-layout__status-icon', iconSize: 50, Icon: signCircle.ReactComponent, InnerIcon: check.ReactComponent }) })), jsxRuntime.jsxs("div", Object.assign({ className: 'transaction-status-layout__body' }, { children: [jsxRuntime.jsx(Typography.Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'transaction-status-layout__title' }, { children: "Transaction successfully sent" })), jsxRuntime.jsx("div", Object.assign({ className: 'transaction-status-layout__content' }, { children: jsxRuntime.jsxs("div", Object.assign({ className: 'transaction-status-layout__rows' }, { children: [jsxRuntime.jsx(TransactionRow.TransactionRow, Object.assign({ label: 'Recipient' }, { children: shortenWalletAddress.shortenWalletAddress(destinationAddress, 3, 3) })), jsxRuntime.jsxs(TransactionRow.TransactionRow, Object.assign({ label: 'Network' }, { children: [networkIcon, jsxRuntime.jsx("span", Object.assign({ className: 'transaction-status-layout__network-name' }, { children: networkName }))] })), jsxRuntime.jsxs(TransactionRow.TransactionRow, Object.assign({ label: 'Total amount' }, { children: [amount, jsxRuntime.jsx(Typography.Typography, Object.assign({ as: 'span', color: 'secondary', className: 'transaction-status-layout__network-currency' }, { children: networkCurrency }))] }))] })) })), jsxRuntime.jsx("div", Object.assign({ className: 'transaction-status-layout__actions' }, { children: jsxRuntime.jsx(Button.Button, Object.assign({ buttonVariant: 'primary', buttonPadding: 'large', expanded: true, buttonRounded: 'default', onClick: onDone, loading: false }, { children: "Continue" })) })), displayPoweredByDynamicFooter && (jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'transaction-status-layout__footer' }))] }))] })));
59
59
  };
60
60
 
61
61
  exports.TransactionStatusLayout = TransactionStatusLayout;
@@ -50,8 +50,8 @@ import { TransactionRow } from '../TransactionConfirmationPageLayout/components/
50
50
 
51
51
  const TransactionStatusLayout = ({ destinationAddress, amount, networkName, networkCurrency, NetworkIcon, onDone, displayPoweredByDynamicFooter = true, onClickClose, }) => {
52
52
  const closeButton = onClickClose && (jsx(IconButton, Object.assign({ type: 'button', onClick: onClickClose, "data-testid": 'close' }, { children: jsx(SvgClose, {}) })));
53
- const networkIcon = (jsx("div", Object.assign({ className: 'transaction-status-layout__network-icon' }, { children: NetworkIcon })));
54
- return (jsxs("div", Object.assign({ className: 'transaction-status-layout' }, { children: [jsx(ModalHeader, Object.assign({ trailing: closeButton, alignContent: 'bottom' }, { children: jsx(IconWithStatus, { containerClassName: 'transaction-status-layout__status-icon', iconSize: 50, Icon: SvgSignCircle, InnerIcon: SvgCheck }) })), jsxs("div", Object.assign({ className: 'transaction-status-layout__body' }, { children: [jsx(Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'transaction-status-layout__title' }, { children: "Transaction successfully sent" })), jsx("div", Object.assign({ className: 'transaction-status-layout__content' }, { children: jsxs("div", Object.assign({ className: 'transaction-status-layout__rows' }, { children: [jsx(TransactionRow, Object.assign({ label: 'Recipient' }, { children: shortenWalletAddress(destinationAddress, 3, 3) })), jsxs(TransactionRow, Object.assign({ label: 'Network' }, { children: [networkIcon, jsx("span", Object.assign({ className: 'transaction-status-layout__network-name' }, { children: networkName }))] })), jsxs(TransactionRow, Object.assign({ label: 'Total amount' }, { children: [amount, jsx(Typography, Object.assign({ as: 'span', color: 'secondary', className: 'transaction-status-layout__network-currency' }, { children: networkCurrency }))] }))] })) })), jsx("div", Object.assign({ className: 'transaction-status-layout__actions' }, { children: jsx(Button, Object.assign({ buttonVariant: 'primary', buttonPadding: 'large', expanded: true, buttonRounded: 'default', onClick: onDone }, { children: "Continue" })) })), displayPoweredByDynamicFooter && (jsx(PoweredByDynamic, { classNameRoot: 'transaction-status-layout__footer' }))] }))] })));
53
+ const networkIcon = (jsx("span", Object.assign({ className: 'transaction-status-layout__network-icon' }, { children: NetworkIcon })));
54
+ return (jsxs("div", Object.assign({ className: 'transaction-status-layout' }, { children: [jsx(ModalHeader, Object.assign({ trailing: closeButton, alignContent: 'bottom' }, { children: jsx(IconWithStatus, { containerClassName: 'transaction-status-layout__status-icon', iconSize: 50, Icon: SvgSignCircle, InnerIcon: SvgCheck }) })), jsxs("div", Object.assign({ className: 'transaction-status-layout__body' }, { children: [jsx(Typography, Object.assign({ weight: 'medium', variant: 'title', color: 'primary', className: 'transaction-status-layout__title' }, { children: "Transaction successfully sent" })), jsx("div", Object.assign({ className: 'transaction-status-layout__content' }, { children: jsxs("div", Object.assign({ className: 'transaction-status-layout__rows' }, { children: [jsx(TransactionRow, Object.assign({ label: 'Recipient' }, { children: shortenWalletAddress(destinationAddress, 3, 3) })), jsxs(TransactionRow, Object.assign({ label: 'Network' }, { children: [networkIcon, jsx("span", Object.assign({ className: 'transaction-status-layout__network-name' }, { children: networkName }))] })), jsxs(TransactionRow, Object.assign({ label: 'Total amount' }, { children: [amount, jsx(Typography, Object.assign({ as: 'span', color: 'secondary', className: 'transaction-status-layout__network-currency' }, { children: networkCurrency }))] }))] })) })), jsx("div", Object.assign({ className: 'transaction-status-layout__actions' }, { children: jsx(Button, Object.assign({ buttonVariant: 'primary', buttonPadding: 'large', expanded: true, buttonRounded: 'default', onClick: onDone, loading: false }, { children: "Continue" })) })), displayPoweredByDynamicFooter && (jsx(PoweredByDynamic, { classNameRoot: 'transaction-status-layout__footer' }))] }))] })));
55
55
  };
56
56
 
57
57
  export { TransactionStatusLayout };
@@ -250,6 +250,9 @@ const DynamicContextProvider = ({ children, theme, settings, }) => {
250
250
  setWalletsToConnectByChain(walletsByChain);
251
251
  setShowBridgeWidget(false);
252
252
  localStorage.LocalStorage.removeFromLS(localStorage$1.WALLET_PICKER_SEARCH_KEY);
253
+ if (!toolkitEnabled) {
254
+ localStorage.LocalStorage.removeFromLS(localStorage$1.IS_MULTI_WALLET_ENABLED);
255
+ }
253
256
  const jwt = getAuthToken.getAuthToken();
254
257
  if (jwt && user) {
255
258
  // do not await this async call - just fire and forget
@@ -261,7 +264,8 @@ const DynamicContextProvider = ({ children, theme, settings, }) => {
261
264
  yield ((_j = connectedWallet === null || connectedWallet === void 0 ? void 0 : connectedWallet.connector) === null || _j === void 0 ? void 0 : _j.endSession());
262
265
  // Necessary when user logs out in user data collection view
263
266
  // Dont require flag to be set though
264
- setIsVerificationInProgress(false, false);
267
+ if (isVerificationInProgress)
268
+ setIsVerificationInProgress(false);
265
269
  setLegacyIsVerifying(false);
266
270
  setAuthMode(initialAuthenticationMode);
267
271
  setShowAuthFlow(false);
@@ -367,7 +371,8 @@ const DynamicContextProvider = ({ children, theme, settings, }) => {
367
371
  const clearStatesOnBackClick = React.useCallback(() => _tslib.__awaiter(void 0, void 0, void 0, function* () {
368
372
  setDesktopUri('');
369
373
  // Clear verification flag but dont require it to be set
370
- setIsVerificationInProgress(false, false);
374
+ if (isVerificationInProgress)
375
+ setIsVerificationInProgress(false);
371
376
  setLegacyIsVerifying(false);
372
377
  if (!user) {
373
378
  clearAllWalletConnectSessions();
@@ -10,7 +10,7 @@ import { Toolkit } from '../../components/Toolkit/Toolkit.js';
10
10
  import { decodeJwt } from '../../shared/utils/functions/decodeJwt/decodeJwt.js';
11
11
  import { ViewContextProvider } from '../ViewContext/ViewContext.js';
12
12
  import { logger } from '../../shared/logger.js';
13
- import { IS_FULLY_CONNECTED, AUTH_TOKEN, AUTH_USER, AUTH_MODE, WALLET_PICKER_SEARCH_KEY } from '../../utils/constants/localStorage.js';
13
+ import { IS_FULLY_CONNECTED, AUTH_TOKEN, AUTH_USER, AUTH_MODE, WALLET_PICKER_SEARCH_KEY, IS_MULTI_WALLET_ENABLED } from '../../utils/constants/localStorage.js';
14
14
  import '../../utils/constants/colors.js';
15
15
  import { DEFAULT_NUMBER_OF_WALLETS_TO_SHOW } from '../../utils/constants/values.js';
16
16
  import { LocalStorage } from '../../shared/utils/classes/storage/localStorage.js';
@@ -246,6 +246,9 @@ const DynamicContextProvider = ({ children, theme, settings, }) => {
246
246
  setWalletsToConnectByChain(walletsByChain);
247
247
  setShowBridgeWidget(false);
248
248
  LocalStorage.removeFromLS(WALLET_PICKER_SEARCH_KEY);
249
+ if (!toolkitEnabled) {
250
+ LocalStorage.removeFromLS(IS_MULTI_WALLET_ENABLED);
251
+ }
249
252
  const jwt = getAuthToken();
250
253
  if (jwt && user) {
251
254
  // do not await this async call - just fire and forget
@@ -257,7 +260,8 @@ const DynamicContextProvider = ({ children, theme, settings, }) => {
257
260
  yield ((_j = connectedWallet === null || connectedWallet === void 0 ? void 0 : connectedWallet.connector) === null || _j === void 0 ? void 0 : _j.endSession());
258
261
  // Necessary when user logs out in user data collection view
259
262
  // Dont require flag to be set though
260
- setIsVerificationInProgress(false, false);
263
+ if (isVerificationInProgress)
264
+ setIsVerificationInProgress(false);
261
265
  setLegacyIsVerifying(false);
262
266
  setAuthMode(initialAuthenticationMode);
263
267
  setShowAuthFlow(false);
@@ -363,7 +367,8 @@ const DynamicContextProvider = ({ children, theme, settings, }) => {
363
367
  const clearStatesOnBackClick = useCallback(() => __awaiter(void 0, void 0, void 0, function* () {
364
368
  setDesktopUri('');
365
369
  // Clear verification flag but dont require it to be set
366
- setIsVerificationInProgress(false, false);
370
+ if (isVerificationInProgress)
371
+ setIsVerificationInProgress(false);
367
372
  setLegacyIsVerifying(false);
368
373
  if (!user) {
369
374
  clearAllWalletConnectSessions();
@@ -22,10 +22,20 @@ const useVerificationInProgress = () => {
22
22
  // because when modal is closed manually, the flag will be false at the moment of onAuthModalClose.
23
23
  // If it was closed due to a verification process, it will be true.
24
24
  const [isVerificationInProgress, _setIsVerificationInProgress] = React.useState(false);
25
- const setIsVerificationInProgress = (newValue, checkWasSetOnDisable = true) => {
26
- if (checkWasSetOnDisable && !newValue && !isVerificationInProgress)
25
+ // Detects whether the flag is being set to false when it was already false
26
+ const detectRedundantDisable = (newValue, oldValue) => {
27
+ if (!newValue && !oldValue)
27
28
  logger.logger.debug('The "isVerificationInProgress" flag had not been previously enabled at the time of being disabled. Please ensure to set it to true whenever any kind of verification process is started');
28
- _setIsVerificationInProgress(newValue);
29
+ };
30
+ // eslint-disable-next-line multiline-comment-style
31
+ /** Setter for isVerificationInProgress that also logs a debug message if
32
+ * it is set to false without having been set to true before */
33
+ const setIsVerificationInProgress = (newValue) => {
34
+ // Calls original setter with a callback. This prevents accessing an outdated value of isVerificationInProgress
35
+ _setIsVerificationInProgress((oldValue) => {
36
+ detectRedundantDisable(newValue, oldValue);
37
+ return newValue;
38
+ });
29
39
  };
30
40
  return [isVerificationInProgress, setIsVerificationInProgress];
31
41
  };
@@ -18,10 +18,20 @@ const useVerificationInProgress = () => {
18
18
  // because when modal is closed manually, the flag will be false at the moment of onAuthModalClose.
19
19
  // If it was closed due to a verification process, it will be true.
20
20
  const [isVerificationInProgress, _setIsVerificationInProgress] = useState(false);
21
- const setIsVerificationInProgress = (newValue, checkWasSetOnDisable = true) => {
22
- if (checkWasSetOnDisable && !newValue && !isVerificationInProgress)
21
+ // Detects whether the flag is being set to false when it was already false
22
+ const detectRedundantDisable = (newValue, oldValue) => {
23
+ if (!newValue && !oldValue)
23
24
  logger.debug('The "isVerificationInProgress" flag had not been previously enabled at the time of being disabled. Please ensure to set it to true whenever any kind of verification process is started');
24
- _setIsVerificationInProgress(newValue);
25
+ };
26
+ // eslint-disable-next-line multiline-comment-style
27
+ /** Setter for isVerificationInProgress that also logs a debug message if
28
+ * it is set to false without having been set to true before */
29
+ const setIsVerificationInProgress = (newValue) => {
30
+ // Calls original setter with a callback. This prevents accessing an outdated value of isVerificationInProgress
31
+ _setIsVerificationInProgress((oldValue) => {
32
+ detectRedundantDisable(newValue, oldValue);
33
+ return newValue;
34
+ });
25
35
  };
26
36
  return [isVerificationInProgress, setIsVerificationInProgress];
27
37
  };
@@ -29,7 +29,7 @@ export interface IDynamicContext {
29
29
  setBridgeChainToConnect: Dispatch<SetStateAction<Chain | undefined>>;
30
30
  clearStatesOnBackClick: () => void;
31
31
  computeConnectedStateForWallets: () => Promise<void>;
32
- connectWallet: (walletConnector: WalletConnector, fetchPublicAddressOpts?: FetchPublicAddressOpts) => Promise<string | undefined>;
32
+ connectWallet: (walletConnector: WalletConnector, fetchPublicAddressOpts?: FetchPublicAddressOpts, shouldCallCallback?: boolean) => Promise<string | undefined>;
33
33
  connectedWallet: Wallet | null;
34
34
  connectedWallets: Wallet[];
35
35
  linkedWallets: Wallet[];
@@ -126,7 +126,7 @@ export interface IDynamicContext {
126
126
  user: UserProfile | undefined;
127
127
  unlinkConnectedWallet: (walletId: string) => void;
128
128
  walletConnector: WalletConnector | null;
129
- walletUiUtils: WalletUiUtils;
129
+ walletUiUtils: WalletUiUtils<WalletConnector>;
130
130
  wallets: WalletOption[];
131
131
  walletsFilter?: (options: WalletOption[]) => WalletOption[];
132
132
  removeConnectedWalletsInfo: () => void;