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

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 (128) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/package.cjs +2 -2
  3. package/package.js +2 -2
  4. package/package.json +9 -9
  5. package/src/lib/components/Button/Button.cjs +10 -7
  6. package/src/lib/components/Button/Button.js +10 -7
  7. package/src/lib/components/ErrorContainer/ErrorContainer.d.ts +1 -1
  8. package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.cjs +4 -2
  9. package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.d.ts +2 -1
  10. package/src/lib/components/ModalHeaderBanner/ModalHeaderBanner.js +4 -2
  11. package/src/lib/components/OTPVerificationView/OTPVerificationView.cjs +2 -2
  12. package/src/lib/components/OTPVerificationView/OTPVerificationView.d.ts +1 -0
  13. package/src/lib/components/OTPVerificationView/OTPVerificationView.js +2 -2
  14. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +3 -1
  15. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +3 -1
  16. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.cjs +2 -2
  17. package/src/lib/components/TransactionStatusLayout/TransactionStatusLayout.js +2 -2
  18. package/src/lib/components/Typography/Typography.cjs +1 -0
  19. package/src/lib/components/Typography/Typography.js +1 -0
  20. package/src/lib/components/Typography/Typography.types.d.ts +1 -1
  21. package/src/lib/context/DynamicContext/DynamicContext.cjs +7 -2
  22. package/src/lib/context/DynamicContext/DynamicContext.js +8 -3
  23. package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/useVerificationInProgress.cjs +13 -3
  24. package/src/lib/context/DynamicContext/hooks/useVerificationInProgress/useVerificationInProgress.js +13 -3
  25. package/src/lib/context/DynamicContext/types/index.d.ts +2 -2
  26. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.cjs +10 -2
  27. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.js +10 -2
  28. package/src/lib/modals/TransactionConfirmationModal/TransactionConfirmationModal.types.d.ts +2 -0
  29. package/src/lib/styles/index.shadow.cjs +1 -1
  30. package/src/lib/styles/index.shadow.js +1 -1
  31. package/src/lib/utils/constants/errors.cjs +7 -0
  32. package/src/lib/utils/constants/errors.d.ts +1 -0
  33. package/src/lib/utils/constants/errors.js +3 -0
  34. package/src/lib/utils/constants/index.d.ts +1 -1
  35. package/src/lib/utils/constants/localStorage.cjs +3 -1
  36. package/src/lib/utils/constants/localStorage.d.ts +1 -0
  37. package/src/lib/utils/constants/localStorage.js +3 -2
  38. package/src/lib/utils/functions/getUserProfileFields/getUserProfileFields.cjs +14 -2
  39. package/src/lib/utils/functions/getUserProfileFields/getUserProfileFields.d.ts +3 -2
  40. package/src/lib/utils/functions/getUserProfileFields/getUserProfileFields.js +14 -2
  41. package/src/lib/utils/functions/index.d.ts +1 -0
  42. package/src/lib/utils/functions/isMagicConnector/index.d.ts +1 -0
  43. package/src/lib/utils/functions/isMagicConnector/isMagicConnector.cjs +10 -0
  44. package/src/lib/utils/functions/isMagicConnector/isMagicConnector.d.ts +2 -0
  45. package/src/lib/utils/functions/isMagicConnector/isMagicConnector.js +6 -0
  46. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.cjs +2 -2
  47. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.d.ts +2 -1
  48. package/src/lib/utils/hooks/authenticationHooks/useConnectAndSign/useConnectAndSign.js +2 -2
  49. package/src/lib/utils/hooks/index.d.ts +2 -0
  50. package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.cjs +19 -3
  51. package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.d.ts +1 -2
  52. package/src/lib/utils/hooks/multiWallet/useMultiWallet/useMultiWallet.js +20 -4
  53. package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.cjs +11 -9
  54. package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.d.ts +1 -1
  55. package/src/lib/utils/hooks/multiWallet/useSyncPrimaryWallet/useSyncPrimaryWallet.js +11 -9
  56. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.cjs +1 -1
  57. package/src/lib/utils/hooks/useAuthLayoutChecks/useAuthLayoutChecks.js +1 -1
  58. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.cjs +2 -2
  59. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.d.ts +1 -1
  60. package/src/lib/utils/hooks/useConnectWallet/useConnectWallet.js +2 -2
  61. package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.cjs +2 -7
  62. package/src/lib/utils/hooks/useFetchNetworkConfigurations/useFetchNetworkConfigurations.js +2 -7
  63. package/src/lib/utils/hooks/useFetchNetworkConfigurations/utils/index.d.ts +1 -0
  64. package/src/lib/utils/hooks/useFetchNetworkConfigurations/utils/mergeCustomerEvmNetworksWithServerNetworks/index.d.ts +1 -0
  65. package/src/lib/utils/hooks/useFetchNetworkConfigurations/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.cjs +16 -0
  66. package/src/lib/utils/hooks/useFetchNetworkConfigurations/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.d.ts +2 -0
  67. package/src/lib/utils/hooks/useFetchNetworkConfigurations/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.js +12 -0
  68. package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.cjs +22 -4
  69. package/src/lib/utils/hooks/useSocialAccounts/useSocialAccounts.js +22 -4
  70. package/src/lib/utils/hooks/useTransactionEstimatedGas/index.d.ts +1 -0
  71. package/src/lib/utils/hooks/useTransactionEstimatedGas/useTransactionEstimatedGas.cjs +61 -0
  72. package/src/lib/utils/hooks/useTransactionEstimatedGas/useTransactionEstimatedGas.d.ts +20 -0
  73. package/src/lib/utils/hooks/useTransactionEstimatedGas/useTransactionEstimatedGas.js +57 -0
  74. package/src/lib/utils/hooks/useTransactionWithGasPrice/index.d.ts +1 -0
  75. package/src/lib/utils/hooks/useTransactionWithGasPrice/useTransactionWithGasPrice.cjs +47 -0
  76. package/src/lib/utils/hooks/useTransactionWithGasPrice/useTransactionWithGasPrice.d.ts +32 -0
  77. package/src/lib/utils/hooks/useTransactionWithGasPrice/useTransactionWithGasPrice.js +43 -0
  78. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.cjs +1 -0
  79. package/src/lib/utils/hooks/useVerifyWallet/useVerifyWallet.js +1 -0
  80. package/src/lib/utils/hooks/useWalletEventListeners/useWalletEventListeners.d.ts +1 -1
  81. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.cjs +2 -2
  82. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.d.ts +5 -1
  83. package/src/lib/utils/hooks/useWalletUiUtils/useWalletUiUtils.js +2 -2
  84. package/src/lib/utils/hooks/useWallets/useWallets.d.ts +2 -2
  85. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +9 -3
  86. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +9 -3
  87. package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +4 -0
  88. package/src/lib/views/CollectUserDataView/UserDataFields/index.js +4 -0
  89. package/src/lib/views/EmailUpdate/EmailUpdate.cjs +5 -2
  90. package/src/lib/views/EmailUpdate/EmailUpdate.js +5 -2
  91. package/src/lib/views/EmailVerification/EmailVerification.cjs +6 -1
  92. package/src/lib/views/EmailVerification/EmailVerification.js +7 -2
  93. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +1 -1
  94. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +1 -1
  95. package/src/lib/views/LoginWithEmailView/components/LoginWithEmailWalletList/LoginWithEmailWalletList.cjs +4 -1
  96. package/src/lib/views/LoginWithEmailView/components/LoginWithEmailWalletList/LoginWithEmailWalletList.js +4 -1
  97. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +4 -0
  98. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +4 -0
  99. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.cjs +1 -0
  100. package/src/lib/views/NetworkNotSupported/NetworkNotSupported.js +1 -0
  101. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.cjs +1 -0
  102. package/src/lib/views/NetworkNotSupportedSwitchManual/NetworkNotSupportedSwitchManual.js +1 -0
  103. package/src/lib/views/SendBalanceView/SendBalanceView.cjs +11 -16
  104. package/src/lib/views/SendBalanceView/SendBalanceView.js +11 -16
  105. package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.cjs +66 -0
  106. package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.d.ts +8 -0
  107. package/src/lib/views/SendBalanceView/components/TransactionStage/TransactionStage.js +62 -0
  108. package/src/lib/views/SendBalanceView/components/TransactionStage/index.d.ts +1 -0
  109. package/src/lib/views/SendBalanceView/components/index.d.ts +1 -0
  110. package/src/lib/views/SocialRedirectView/SocialRedirectView.cjs +1 -2
  111. package/src/lib/views/SocialRedirectView/SocialRedirectView.js +1 -2
  112. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +22 -4
  113. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +22 -4
  114. package/src/lib/views/TransactionConfirmationView/hooks/index.d.ts +2 -1
  115. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/index.d.ts +1 -0
  116. package/src/lib/views/TransactionConfirmationView/hooks/{useTransactionData/useTransactionData.cjs → useTransactionGas/useTransactionGas.cjs} +17 -42
  117. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionGas/useTransactionGas.d.ts +11 -0
  118. package/src/lib/views/TransactionConfirmationView/hooks/{useTransactionData/useTransactionData.js → useTransactionGas/useTransactionGas.js} +18 -43
  119. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionTotal/index.d.ts +1 -0
  120. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionTotal/useTransactionTotal.cjs +14 -0
  121. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionTotal/useTransactionTotal.d.ts +7 -0
  122. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionTotal/useTransactionTotal.js +10 -0
  123. package/src/lib/views/WalletList/WalletList.cjs +4 -1
  124. package/src/lib/views/WalletList/WalletList.js +4 -1
  125. package/src/lib/views/WalletLockedView/WalletLockedView.cjs +20 -4
  126. package/src/lib/views/WalletLockedView/WalletLockedView.js +20 -4
  127. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/index.d.ts +0 -1
  128. package/src/lib/views/TransactionConfirmationView/hooks/useTransactionData/useTransactionData.d.ts +0 -18
package/CHANGELOG.md CHANGED
@@ -1,4 +1,36 @@
1
1
 
2
+ ### [0.18.1](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.0...v0.18.1) (2023-08-15)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * captcha: complete sign in with magic and blocto ([#2967](https://github.com/dynamic-labs/DynamicAuth/issues/2967)) ([#2983](https://github.com/dynamic-labs/DynamicAuth/issues/2983)) ([495b9ad](https://github.com/dynamic-labs/DynamicAuth/commit/495b9adfed3bf131cceed3f8788caaa1443d8a1a))
8
+ * sync wagmi correctly in connect-only mode ([#2990](https://github.com/dynamic-labs/DynamicAuth/issues/2990)) ([#2994](https://github.com/dynamic-labs/DynamicAuth/issues/2994)) ([d4d6450](https://github.com/dynamic-labs/DynamicAuth/commit/d4d6450247246b81702fa8bed3cc0abdd51846f3))
9
+
10
+ ## [0.18.0](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.0-beta.32...v0.18.0) (2023-08-13)
11
+
12
+
13
+ ### Features
14
+
15
+ * 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))
16
+ * update wallet locked view ([#2923](https://github.com/dynamic-labs/DynamicAuth/issues/2923)) ([3cc03ee](https://github.com/dynamic-labs/DynamicAuth/commit/3cc03ee5913434d99386fc89d4d26d5d3fb3ca19))
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * fix issues with mergeUserAccountsView ([#2945](https://github.com/dynamic-labs/DynamicAuth/issues/2945)) ([2c6265e](https://github.com/dynamic-labs/DynamicAuth/commit/2c6265e3e709edb9ff1af6e6c139b85418e46d76))
22
+ * fix connecting with cool wallet ([#2949](https://github.com/dynamic-labs/DynamicAuth/issues/2949)) ([ab22303](https://github.com/dynamic-labs/DynamicAuth/commit/ab22303294123c2a914a65f0d2c15481740647bb))
23
+ * fix email update when user is authenticated ([#2932](https://github.com/dynamic-labs/DynamicAuth/issues/2932)) ([db33ba1](https://github.com/dynamic-labs/DynamicAuth/commit/db33ba14c317469958ce314a3822b706e20b07d0))
24
+ * fix gas estimate in transaction confirmation ([#2938](https://github.com/dynamic-labs/DynamicAuth/issues/2938)) ([02d0f46](https://github.com/dynamic-labs/DynamicAuth/commit/02d0f46127e94e83b4decbaaf6a45dbae135c89d))
25
+ * fix gas estimate for transactions ([#2947](https://github.com/dynamic-labs/DynamicAuth/issues/2947)) ([ad35a72](https://github.com/dynamic-labs/DynamicAuth/commit/ad35a722df6abd54b98ea491661ff4ec3e602621))
26
+ * fix 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)
27
+ * automatically display account already exist message ([#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))
28
+ * 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)
29
+ * fix isVerificationInProgress flag ([#2926](https://github.com/dynamic-labs/DynamicAuth/issues/2926)) ([98f54fd](https://github.com/dynamic-labs/DynamicAuth/commit/98f54fd1345713dfaf0ef837502dfaca3709d633))
30
+ * de-duplicate onBeforeConnectSuccessConfirmation callback invocations ([#2965](https://github.com/dynamic-labs/DynamicAuth/issues/2965)) ([a276968](https://github.com/dynamic-labs/DynamicAuth/commit/a2769689bc82350dfb8123e1fe8a4e92a60b262c))
31
+ * 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))
32
+ * stop overriding views ([#2921](https://github.com/dynamic-labs/DynamicAuth/issues/2921)) ([aa8c369](https://github.com/dynamic-labs/DynamicAuth/commit/aa8c369d2a713eb57ecc99b16a6b62d465789370))
33
+
2
34
  ## [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)
3
35
 
4
36
 
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.32";
5
+ var version = "0.18.1";
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.32";
1
+ var version = "0.18.1";
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.32",
3
+ "version": "0.18.1",
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.32",
20
- "@dynamic-labs/multi-wallet": "0.18.0-beta.32",
21
- "@dynamic-labs/rpc-providers": "0.18.0-beta.32",
22
- "@dynamic-labs/types": "0.18.0-beta.32",
23
- "@dynamic-labs/utils": "0.18.0-beta.32",
24
- "@dynamic-labs/wallet-book": "0.18.0-beta.32",
25
- "@dynamic-labs/wallet-connector-core": "0.18.0-beta.32",
19
+ "@dynamic-labs/logger": "0.18.1",
20
+ "@dynamic-labs/multi-wallet": "0.18.1",
21
+ "@dynamic-labs/rpc-providers": "0.18.1",
22
+ "@dynamic-labs/types": "0.18.1",
23
+ "@dynamic-labs/utils": "0.18.1",
24
+ "@dynamic-labs/wallet-book": "0.18.1",
25
+ "@dynamic-labs/wallet-connector-core": "0.18.1",
26
26
  "eventemitter3": "5.0.1"
27
27
  },
28
28
  "devDependencies": {
@@ -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 };
@@ -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;
@@ -13,9 +13,11 @@ var VerticalDrawerTransition = require('../Transition/VerticalDrawerTransition/V
13
13
 
14
14
  const typographyColor = {
15
15
  error: 'error-1',
16
+ success: 'green-1',
16
17
  };
17
- const ModalHeaderBanner = ({ message, type = 'error', }) => (jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, { style: { width: '100%' } }) }, { children: Boolean(message) && (jsxRuntime.jsx("div", Object.assign({ className: classNames.classNames('modal-header-banner', {
18
+ const ModalHeaderBanner = ({ message, type = 'error', disableTruncate = false, }) => (jsxRuntime.jsx(AnimatePresence.AnimatePresence, Object.assign({ animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, { style: { width: '100%' } }) }, { children: Boolean(message) && (jsxRuntime.jsx("div", Object.assign({ className: classNames.classNames('modal-header-banner', {
18
19
  'modal-header-banner__error': type === 'error',
19
- }) }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', color: typographyColor[type], truncate: true }, { children: message })) }))) })));
20
+ 'modal-header-banner__success': type === 'success',
21
+ }) }, { children: jsxRuntime.jsx(Typography.Typography, Object.assign({ variant: 'body_small', color: typographyColor[type], truncate: disableTruncate === false }, { children: message })) }))) })));
20
22
 
21
23
  exports.ModalHeaderBanner = ModalHeaderBanner;
@@ -1,8 +1,9 @@
1
1
  import { FC } from 'react';
2
- type ModalHeaderBannerType = 'error';
2
+ type ModalHeaderBannerType = 'error' | 'success';
3
3
  export type ModalHeaderBannerProps = {
4
4
  message?: string;
5
5
  type?: ModalHeaderBannerType;
6
+ disableTruncate?: boolean;
6
7
  };
7
8
  export declare const ModalHeaderBanner: FC<ModalHeaderBannerProps>;
8
9
  export {};
@@ -9,9 +9,11 @@ import { VerticalDrawerTransition } from '../Transition/VerticalDrawerTransition
9
9
 
10
10
  const typographyColor = {
11
11
  error: 'error-1',
12
+ success: 'green-1',
12
13
  };
13
- const ModalHeaderBanner = ({ message, type = 'error', }) => (jsx(AnimatePresence, Object.assign({ animationComponent: jsx(VerticalDrawerTransition, { style: { width: '100%' } }) }, { children: Boolean(message) && (jsx("div", Object.assign({ className: classNames('modal-header-banner', {
14
+ const ModalHeaderBanner = ({ message, type = 'error', disableTruncate = false, }) => (jsx(AnimatePresence, Object.assign({ animationComponent: jsx(VerticalDrawerTransition, { style: { width: '100%' } }) }, { children: Boolean(message) && (jsx("div", Object.assign({ className: classNames('modal-header-banner', {
14
15
  'modal-header-banner__error': type === 'error',
15
- }) }, { children: jsx(Typography, Object.assign({ variant: 'body_small', color: typographyColor[type], truncate: true }, { children: message })) }))) })));
16
+ 'modal-header-banner__success': type === 'success',
17
+ }) }, { children: jsx(Typography, Object.assign({ variant: 'body_small', color: typographyColor[type], truncate: disableTruncate === false }, { children: message })) }))) })));
16
18
 
17
19
  export { ModalHeaderBanner };
@@ -55,10 +55,10 @@ require('yup');
55
55
  require('../InlineWidget/InlineWidget.cjs');
56
56
  require('../MenuList/Dropdown/Dropdown.cjs');
57
57
 
58
- const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, onClickClose, displayPoweredByDynamic = false, }) => {
58
+ const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, onClickClose, displayPoweredByDynamic = false, successBannerText, }) => {
59
59
  const backButton = onClickBack && (jsxRuntime.jsx(IconButton.IconButton, Object.assign({ type: 'button', onClick: onClickBack, "data-testid": 'back-button' }, { children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) })));
60
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, {}) }))] })));
61
+ return (jsxRuntime.jsxs("div", Object.assign({ className: 'otp-verification-view' }, { children: [successBannerText && (jsxRuntime.jsx(ModalHeaderBanner.ModalHeaderBanner, { type: 'success', message: successBannerText, disableTruncate: true })), 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, {}) }))] })));
62
62
  };
63
63
 
64
64
  exports.OTPVerificationView = OTPVerificationView;
@@ -10,6 +10,7 @@ type OtpVerificationLayoutProps = {
10
10
  onClickEditEmail?: MouseEventHandler<HTMLButtonElement>;
11
11
  onPinChange?: (value: string) => void;
12
12
  onPinComplete: (value: string) => void;
13
+ successBannerText?: string;
13
14
  };
14
15
  export declare const OTPVerificationView: FC<OtpVerificationLayoutProps>;
15
16
  export {};
@@ -51,10 +51,10 @@ import 'yup';
51
51
  import '../InlineWidget/InlineWidget.js';
52
52
  import '../MenuList/Dropdown/Dropdown.js';
53
53
 
54
- const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, onClickClose, displayPoweredByDynamic = false, }) => {
54
+ const OTPVerificationView = ({ onClickBack, onClickEditEmail, isLoading, email, onPinComplete, isValid, error, onPinChange, onClickClose, displayPoweredByDynamic = false, successBannerText, }) => {
55
55
  const backButton = onClickBack && (jsx(IconButton, Object.assign({ type: 'button', onClick: onClickBack, "data-testid": 'back-button' }, { children: jsx(SvgChevronLeft, {}) })));
56
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, {}) }))] })));
57
+ return (jsxs("div", Object.assign({ className: 'otp-verification-view' }, { children: [successBannerText && (jsx(ModalHeaderBanner, { type: 'success', message: successBannerText, disableTruncate: true })), 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, {}) }))] })));
58
58
  };
59
59
 
60
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 };
@@ -29,6 +29,7 @@ const Typography = (_a) => {
29
29
  'brand-primary': 'typography--brand-primary',
30
30
  'error-1': 'typography--dynamic-error-1',
31
31
  'error-2': 'typography--dynamic-error-2',
32
+ 'green-1': 'typography--connection-green-1',
32
33
  link: 'typography--link',
33
34
  primary: 'typography--primary',
34
35
  secondary: 'typography--secondary',
@@ -25,6 +25,7 @@ const Typography = (_a) => {
25
25
  'brand-primary': 'typography--brand-primary',
26
26
  'error-1': 'typography--dynamic-error-1',
27
27
  'error-2': 'typography--dynamic-error-2',
28
+ 'green-1': 'typography--connection-green-1',
28
29
  link: 'typography--link',
29
30
  primary: 'typography--primary',
30
31
  secondary: 'typography--secondary',
@@ -1,7 +1,7 @@
1
1
  import { ComponentPropsWithoutRef, ElementType, ReactElement } from 'react';
2
2
  export type TypographyTag = ElementType;
3
3
  export type TypographyVariant = 'title' | 'body_normal' | 'body_small' | 'body_mini' | 'button_primary' | 'button_secondary' | 'button_tertiary' | 'numbers_big' | 'numbers_medium' | 'numbers_small';
4
- export type TypographyColor = 'primary' | 'secondary' | 'brand-primary' | 'tertiary' | 'link' | 'error-1' | 'error-2' | 'tooltip';
4
+ export type TypographyColor = 'primary' | 'secondary' | 'brand-primary' | 'tertiary' | 'link' | 'error-1' | 'error-2' | 'tooltip' | 'green-1';
5
5
  export type TypographyWeight = 'regular' | 'medium' | 'bold';
6
6
  export type TypographyTransform = 'uppercase';
7
7
  export type TypographyProps<TAG extends ElementType = 'p'> = {
@@ -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;
@@ -18,6 +18,7 @@ var usePreventPageScroll = require('../../shared/utils/hooks/usePreventPageScrol
18
18
  var index = require('../../shared/consts/index.cjs');
19
19
  require('../../context/DynamicContext/DynamicContext.cjs');
20
20
  require('@dynamic-labs/multi-wallet');
21
+ var isMagicConnector = require('../../utils/functions/isMagicConnector/isMagicConnector.cjs');
21
22
  require('../../components/ShadowDOM/ShadowDOM.cjs');
22
23
  require('../../context/ThemeContext/ThemeContext.cjs');
23
24
  var Portal = require('../../components/Portal/Portal.cjs');
@@ -37,6 +38,7 @@ require('../../components/Alert/Alert.cjs');
37
38
  require('../../context/MockContext/MockContext.cjs');
38
39
  require('../../context/CaptchaContext/CaptchaContext.cjs');
39
40
  require('../../utils/hooks/useUserUpdateRequest/useUserUpdateRequest.cjs');
41
+ var useTransactionWithGasPrice = require('../../utils/hooks/useTransactionWithGasPrice/useTransactionWithGasPrice.cjs');
40
42
  require('../../components/Popper/Popper/Popper.cjs');
41
43
  require('../../components/Popper/PopperContext/PopperContext.cjs');
42
44
  require('formik');
@@ -46,11 +48,17 @@ var ModalCard = require('../../components/ModalCard/ModalCard.cjs');
46
48
  require('../../components/InlineWidget/InlineWidget.cjs');
47
49
  require('../../components/MenuList/Dropdown/Dropdown.cjs');
48
50
 
49
- const TransactionConfirmationModal = ({ title, handler, onReject, onTransactionResponseSuccess, transaction, provider, }) => {
51
+ const TransactionConfirmationModal = ({ title, handler, onReject, onTransactionResponseSuccess, transaction, provider, walletConnector, }) => {
50
52
  usePreventPageScroll.usePreventPageScroll(true);
51
53
  const [show, setShow] = React.useState(true);
52
54
  const errorRef = React.useRef(null);
53
55
  const transactionResponseRef = React.useRef(null);
56
+ const transactionWithGasPrice = useTransactionWithGasPrice.useTransactionWithGasPrice({
57
+ enabled: isMagicConnector.isMagicConnector(walletConnector),
58
+ increasePercentage: 5,
59
+ provider,
60
+ transaction,
61
+ });
54
62
  const closeModal = React.useCallback(() => {
55
63
  setShow(false);
56
64
  }, [setShow]);
@@ -62,7 +70,7 @@ const TransactionConfirmationModal = ({ title, handler, onReject, onTransactionR
62
70
  }, [onTransactionResponseSuccess, onReject]);
63
71
  return (jsxRuntime.jsx(Portal.Portal, Object.assign({ handleClose: closeModal, isShown: show, zIndex: index.authModalZIndex, withBackdrop: true, elementId: 'dynamic-send-transaction', transitionEvents: {
64
72
  onUnmount: handleOnModalUnmount,
65
- } }, { children: jsxRuntime.jsx(Modal.Modal, { children: jsxRuntime.jsx(ModalCard.ModalCard, { 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) => {
73
+ } }, { children: jsxRuntime.jsx(Modal.Modal, { children: jsxRuntime.jsx(ModalCard.ModalCard, { children: jsxRuntime.jsx(TransactionConfirmationView.TransactionConfirmationView, { provider: provider, transaction: transactionWithGasPrice, title: title, mutation: () => handler(transactionWithGasPrice), onClickClose: closeModal, onError: (error) => (errorRef.current = error), displayPoweredByDynamicFooter: true, onSuccess: (transactionResponse) => {
66
74
  errorRef.current = null;
67
75
  transactionResponseRef.current = transactionResponse;
68
76
  closeModal();