@aurora-is-near/intents-swap-widget 3.14.0-redesign.2 → 3.14.0-redesign.7

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 (145) hide show
  1. package/dist/components/BlockingError.js +15 -9
  2. package/dist/components/BlockingError.js.map +1 -1
  3. package/dist/components/CloseButton.js +1 -1
  4. package/dist/components/CloseButton.js.map +1 -1
  5. package/dist/{config-Bmc4hOIl.js → config-Behl5hcc.js} +1179 -952
  6. package/dist/config-Behl5hcc.js.map +1 -0
  7. package/dist/config.d.ts +1 -0
  8. package/dist/config.js +4 -6
  9. package/dist/config.js.map +1 -1
  10. package/dist/errors.js +1 -1
  11. package/dist/ext/alchemy/index.js +1 -1
  12. package/dist/ext/index.js +1 -1
  13. package/dist/features/BalanceRpcLoader/TokenBalanceLoader.js +1 -1
  14. package/dist/features/BalanceRpcLoader/index.js +1 -1
  15. package/dist/features/BalanceRpcLoader/useTokenBalanceRpc.js +1 -1
  16. package/dist/features/ChainsDropdown/index.js +1 -1
  17. package/dist/features/DepositMethodSwitcher.js +26 -29
  18. package/dist/features/DepositMethodSwitcher.js.map +1 -1
  19. package/dist/features/ErrorBoundary.js +1 -1
  20. package/dist/features/ExternalDeposit.js +27 -28
  21. package/dist/features/ExternalDeposit.js.map +1 -1
  22. package/dist/features/SendAddress/index.js +1 -1
  23. package/dist/features/SendAddress/useNotification.js +1 -1
  24. package/dist/features/SubmitButton/index.js +1 -1
  25. package/dist/features/SuccessScreen/SummaryItem.js +2 -2
  26. package/dist/features/SuccessScreen/SummaryItem.js.map +1 -1
  27. package/dist/features/SuccessScreen/index.js +20 -20
  28. package/dist/features/SuccessScreen/index.js.map +1 -1
  29. package/dist/features/SwapDirectionSwitcher.js +1 -1
  30. package/dist/features/SwapQuote/SwapQuote.js +1 -1
  31. package/dist/features/SwapQuote/index.js +1 -1
  32. package/dist/features/TokenInput/TokenInput.js +1 -1
  33. package/dist/features/TokenInput/TokenInputEmpty.js +1 -1
  34. package/dist/features/TokenInput/TokenInputSource.js +1 -1
  35. package/dist/features/TokenInput/TokenInputTarget.js +1 -1
  36. package/dist/features/TokenInput/WalletBalance.js +1 -1
  37. package/dist/features/TokenInput/hooks/index.js +1 -1
  38. package/dist/features/TokenInput/hooks/useTokenInputBalance.js +1 -1
  39. package/dist/features/TokenInput/index.js +1 -1
  40. package/dist/features/TokensList/TokenItem.js +1 -1
  41. package/dist/features/TokensList/TokensList.js +1 -1
  42. package/dist/features/TokensList/index.js +1 -1
  43. package/dist/features/TokensModal.js +1 -1
  44. package/dist/features/WalletCompatibilityCheck/WalletCompatibilityModal.js +13 -191
  45. package/dist/features/WalletCompatibilityCheck/WalletCompatibilityModal.js.map +1 -1
  46. package/dist/features/WalletCompatibilityCheck/index.js +21 -26
  47. package/dist/features/WalletCompatibilityCheck/index.js.map +1 -1
  48. package/dist/features/index.js +1 -1
  49. package/dist/hooks/index.js +1 -1
  50. package/dist/hooks/useAllTokens.js +1 -1
  51. package/dist/hooks/useChains.js +1 -1
  52. package/dist/hooks/useCompatibilityCheck.js +1 -1
  53. package/dist/hooks/useDefaultToken.js +1 -1
  54. package/dist/hooks/useExternalDepositStatus/index.js +1 -1
  55. package/dist/hooks/useExternalDepositStatus/usePoaExternalDepositStatus.js +1 -1
  56. package/dist/hooks/useIntentsBalance.js +1 -1
  57. package/dist/hooks/useIsCompatibilityCheckRequired.d.ts +1 -1
  58. package/dist/hooks/useIsCompatibilityCheckRequired.js +2 -2
  59. package/dist/hooks/useIsCompatibilityCheckRequired.js.map +1 -1
  60. package/dist/hooks/useMakeDepositAddress.js +1 -1
  61. package/dist/hooks/useMakeIntentsTransfer.js +1 -1
  62. package/dist/hooks/useMakeNEARFtTransferCall.js +1 -1
  63. package/dist/hooks/useMakeQuote.js +1 -1
  64. package/dist/hooks/useMakeQuoteTransfer.js +1 -1
  65. package/dist/hooks/useMakeTransfer.js +1 -1
  66. package/dist/hooks/useMergedBalance.js +1 -1
  67. package/dist/hooks/useSwitchChain.js +1 -1
  68. package/dist/hooks/useTheme.js +1 -1
  69. package/dist/hooks/useToggleTheme.js +20 -17
  70. package/dist/hooks/useToggleTheme.js.map +1 -1
  71. package/dist/hooks/useTokenInputPair.js +1 -1
  72. package/dist/hooks/useTokens.js +1 -1
  73. package/dist/hooks/useTokensFiltered.js +1 -1
  74. package/dist/hooks/useTokensIntentsUnique.js +1 -1
  75. package/dist/index.js +1 -1
  76. package/dist/machine/computed/getIsDirectNearTokenWithdrawal.js +1 -1
  77. package/dist/machine/computed/getIsDirectNearTokenWithdrawal.js.map +1 -1
  78. package/dist/machine/computed/getIsDirectTokenOnNearDeposit.js +1 -1
  79. package/dist/machine/computed/getIsDirectTokenOnNearDeposit.js.map +1 -1
  80. package/dist/machine/computed/getIsDirectTokenOnNearTransfer.js +1 -1
  81. package/dist/machine/computed/getIsDirectTokenOnNearTransfer.js.map +1 -1
  82. package/dist/machine/effects/index.js +1 -1
  83. package/dist/machine/effects/useAlchemyBalanceEffect.js +1 -1
  84. package/dist/machine/effects/useBalancesUpdateEffect.js +1 -1
  85. package/dist/machine/effects/useMakeQuoteEffect.js +1 -1
  86. package/dist/machine/effects/useSelectedTokensEffect.js +1 -1
  87. package/dist/machine/effects/useSetTokenBalanceEffect.js +1 -1
  88. package/dist/machine/effects/useSetTokenIntentsTargetEffect.js +1 -1
  89. package/dist/machine/effects/useWalletConnEffect.js +1 -1
  90. package/dist/machine/events/index.js +1 -1
  91. package/dist/machine/events/tokenSelect.js +1 -1
  92. package/dist/machine/events/validateInputAndMoveTo.js +1 -1
  93. package/dist/machine/events/validateInputs.js +1 -1
  94. package/dist/machine/index.js +1 -1
  95. package/dist/machine/snap.js +1 -1
  96. package/dist/machine/subscriptions/checkers/isSendAddressAsConnected.js +1 -1
  97. package/dist/machine/subscriptions/index.js +1 -1
  98. package/dist/styles.css +1 -1
  99. package/dist/theme/ThemeProvider.js +7 -24
  100. package/dist/theme/ThemeProvider.js.map +1 -1
  101. package/dist/types/config.d.ts +1 -0
  102. package/dist/types/localisation.d.ts +1 -1
  103. package/dist/utils/intents/signers/near.js +1 -1
  104. package/dist/utils/intents/signers/privy.js +1 -1
  105. package/dist/utils/localstorage.js +41 -28
  106. package/dist/utils/localstorage.js.map +1 -1
  107. package/dist/utils/near/getNearNep141StorageBalance.js +1 -1
  108. package/dist/widgets/WidgetDeposit/WidgetDepositContent.js +11 -12
  109. package/dist/widgets/WidgetDeposit/WidgetDepositContent.js.map +1 -1
  110. package/dist/widgets/WidgetDeposit/WidgetDepositSkeleton.js +1 -1
  111. package/dist/widgets/WidgetSwap/WidgetSwapContent.js +27 -26
  112. package/dist/widgets/WidgetSwap/WidgetSwapContent.js.map +1 -1
  113. package/dist/widgets/WidgetSwap/WidgetSwapSkeleton.js +1 -1
  114. package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js +5 -6
  115. package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js.map +1 -1
  116. package/dist/widgets/WidgetWithdraw/WidgetWithdrawSkeleton.js +1 -1
  117. package/package.json +3 -2
  118. package/src/components/BlockingError.tsx +7 -4
  119. package/src/components/CloseButton.tsx +1 -1
  120. package/src/features/DepositMethodSwitcher.tsx +5 -17
  121. package/src/features/ExternalDeposit.tsx +8 -7
  122. package/src/features/SubmitButton/index.tsx +40 -0
  123. package/src/features/SuccessScreen/SummaryItem.tsx +2 -2
  124. package/src/features/SuccessScreen/index.tsx +5 -3
  125. package/src/features/SwapQuote/SwapQuote.tsx +1 -1
  126. package/src/features/WalletCompatibilityCheck/WalletCompatibilityModal.tsx +3 -0
  127. package/src/features/WalletCompatibilityCheck/index.tsx +4 -8
  128. package/src/hooks/useExternalDepositStatus/usePoaExternalDepositStatus.ts +2 -1
  129. package/src/hooks/useIsCompatibilityCheckRequired.ts +1 -1
  130. package/src/hooks/useToggleTheme.ts +11 -4
  131. package/src/machine/computed/getIsDirectNearTokenWithdrawal.ts +2 -1
  132. package/src/machine/computed/getIsDirectTokenOnNearDeposit.ts +2 -1
  133. package/src/machine/computed/getIsDirectTokenOnNearTransfer.ts +2 -1
  134. package/src/theme/ThemeProvider.tsx +33 -14
  135. package/src/types/config.ts +1 -0
  136. package/src/types/localisation.ts +4 -0
  137. package/src/utils/localstorage.ts +35 -10
  138. package/src/widgets/WidgetDeposit/WidgetDepositContent.tsx +3 -3
  139. package/src/widgets/WidgetSwap/WidgetSwapContent.tsx +5 -3
  140. package/src/widgets/WidgetWithdraw/WidgetWithdrawContent.tsx +3 -3
  141. package/dist/config-Bmc4hOIl.js.map +0 -1
  142. package/dist/features/SuccessScreen/CloseButton.d.ts +0 -5
  143. package/dist/features/SuccessScreen/CloseButton.js +0 -15
  144. package/dist/features/SuccessScreen/CloseButton.js.map +0 -1
  145. package/src/features/SuccessScreen/CloseButton.tsx +0 -14
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import { a7 as a } from "../../config-Bmc4hOIl.js";
3
+ import { a9 as a } from "../../config-Behl5hcc.js";
4
4
  import "../../utils/formatters/formatBigToHuman.js";
5
5
  export {
6
6
  a as TokenInputTarget
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "clsx";
3
- import { a2 as i } from "../../config-Bmc4hOIl.js";
3
+ import { a4 as i } from "../../config-Behl5hcc.js";
4
4
  import "../../components/Skeleton.js";
5
5
  import "../../components/TinyNumber.js";
6
6
  export {
@@ -1,4 +1,4 @@
1
- import { s as n } from "../../../config-Bmc4hOIl.js";
1
+ import { s as n } from "../../../config-Behl5hcc.js";
2
2
  export {
3
3
  n as useTokenInputBalance
4
4
  };
@@ -1,5 +1,5 @@
1
1
  import "react";
2
- import { s as t } from "../../../config-Bmc4hOIl.js";
2
+ import { s as t } from "../../../config-Behl5hcc.js";
3
3
  import "../../../utils/intents/getTokenBalanceKey.js";
4
4
  export {
5
5
  t as useTokenInputBalance
@@ -1,5 +1,5 @@
1
1
  import "react/jsx-runtime";
2
- import { p as n, T as r } from "../../config-Bmc4hOIl.js";
2
+ import { p as n, T as r } from "../../config-Behl5hcc.js";
3
3
  import "./TokenInputSkeleton.js";
4
4
  export {
5
5
  n as TokenInput,
@@ -1,6 +1,6 @@
1
1
  import "react/jsx-runtime";
2
2
  import "../../utils/cn.js";
3
- import { a8 as T, a9 as e } from "../../config-Bmc4hOIl.js";
3
+ import { aa as T, ab as e } from "../../config-Behl5hcc.js";
4
4
  import "../../components/TokenIcon.js";
5
5
  import "../../components/TinyNumber.js";
6
6
  import "../../utils/formatters/getUsdDisplayBalance.js";
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "virtua";
3
3
  import "react";
4
- import { ab as f } from "../../config-Bmc4hOIl.js";
4
+ import { ad as f } from "../../config-Behl5hcc.js";
5
5
  import "./TokensListPlaceholder.js";
6
6
  import "../../utils/cn.js";
7
7
  import "../../components/Hr.js";
@@ -1,4 +1,4 @@
1
- import { q as t } from "../../config-Bmc4hOIl.js";
1
+ import { q as t } from "../../config-Behl5hcc.js";
2
2
  import "./TokensListPlaceholder.js";
3
3
  export {
4
4
  t as TokensList
@@ -1,7 +1,7 @@
1
1
  import { jsxs as r, jsx as t, Fragment as _ } from "react/jsx-runtime";
2
2
  import { useState as m } from "react";
3
3
  import * as b from "lucide-react";
4
- import { b as g, y as N, d as T, q as j } from "../config-Bmc4hOIl.js";
4
+ import { b as g, y as N, d as T, q as j } from "../config-Behl5hcc.js";
5
5
  import { ChainsDropdown as I } from "./ChainsDropdown/index.js";
6
6
  import "@tanstack/react-query";
7
7
  import "@defuse-protocol/one-click-sdk-typescript";
@@ -1,202 +1,24 @@
1
- import { jsxs as a, jsx as l } from "react/jsx-runtime";
2
- import { ArmingCountdownFill as u, BeenhereFill as w, EncryptedFill as y, AccountBalanceWalletFill as f, CheckCircleFill as x, GppBadFill as g } from "@material-symbols-svg/react-rounded";
3
- import { useTimer as b } from "use-timer";
4
- import { useEffect as h } from "react";
5
- import { useTypedTranslation as m } from "../../localisation.js";
1
+ import "react/jsx-runtime";
2
+ import "@material-symbols-svg/react-rounded";
3
+ import "use-timer";
4
+ import "react";
5
+ import "../../localisation.js";
6
6
  import "../../constants/chains.js";
7
7
  import "viem";
8
8
  import "ethers";
9
- import { cn as N } from "../../utils/cn.js";
9
+ import "../../utils/cn.js";
10
10
  import "lucide-react";
11
- import { Card as p } from "../../components/Card.js";
12
- import { Button as r } from "../../components/Button.js";
11
+ import "../../components/Card.js";
12
+ import "../../components/Button.js";
13
13
  import "copy-text-to-clipboard";
14
14
  import "@headlessui/react";
15
15
  import "../../components/InputAmount.js";
16
16
  import "../../components/Notes.js";
17
- import "../../theme/ThemeProvider.js";
18
- import { CloseButton as d } from "../../components/CloseButton.js";
19
- const n = ({
20
- text: t,
21
- icon: e
22
- }) => /* @__PURE__ */ a("li", { className: "flex items-center gap-sw-md", children: [
23
- e && /* @__PURE__ */ l(e, { size: 20, className: "text-sw-gray-300" }),
24
- /* @__PURE__ */ l("span", { className: "text-sw-label-md text-sw-gray-50", children: t })
25
- ] }), c = ({
26
- label: t,
27
- icon: e,
28
- className: s
29
- }) => /* @__PURE__ */ a(
30
- "div",
31
- {
32
- className: N(
33
- "rounded-sw-lg flex align-center justify-center gap-sw-md w-full py-sw-2xl",
34
- s
35
- ),
36
- children: [
37
- e && /* @__PURE__ */ l(e, { size: 16 }),
38
- /* @__PURE__ */ l("span", { className: "text-sw-label-md", children: t })
39
- ]
40
- }
41
- ), C = ({ isSigned: t, isSigning: e, onMsg: s }) => {
42
- const { t: i } = m(), o = b({
43
- endTime: 0,
44
- autostart: !1,
45
- timerType: "DECREMENTAL",
46
- initialTime: 7
47
- });
48
- return h(() => {
49
- t ? o.start() : o.reset();
50
- }, [t]), /* @__PURE__ */ a(p, { className: "relative w-full gap-sw-2xl flex flex-col", children: [
51
- /* @__PURE__ */ l(
52
- d,
53
- {
54
- onClick: () => s({ type: "on_close" }),
55
- className: "absolute top-sw-2xl right-sw-2xl"
56
- }
57
- ),
58
- /* @__PURE__ */ l(u, { size: 48, className: "text-sw-status-warning" }),
59
- /* @__PURE__ */ a("header", { className: "flex flex-col gap-sw-lg", children: [
60
- /* @__PURE__ */ l("h1", { className: "text-sw-label-lg text-sw-gray-50", children: i(
61
- "walletCompatibility.modal.title.initial",
62
- "Verify your wallet to continue"
63
- ) }),
64
- /* @__PURE__ */ l("p", { className: "text-sw-body-md text-sw-gray-200", children: i(
65
- "walletCompatibility.modal.description.initial",
66
- "Please sign a message to verify your wallet. This confirms your wallet is compatible and lets us securely read your public key."
67
- ) })
68
- ] }),
69
- /* @__PURE__ */ a("ul", { className: "flex flex-col gap-sw-xl", children: [
70
- /* @__PURE__ */ l(
71
- n,
72
- {
73
- text: i(
74
- "walletCompatibility.modal.feature.secureTransactions",
75
- "Read-only signature – no gas required."
76
- ),
77
- icon: w
78
- }
79
- ),
80
- /* @__PURE__ */ l(
81
- n,
82
- {
83
- text: i(
84
- "walletCompatibility.modal.feature.fullAccess",
85
- "No access to your funds, no hidden permissions."
86
- ),
87
- icon: y
88
- }
89
- ),
90
- /* @__PURE__ */ l(
91
- n,
92
- {
93
- text: i(
94
- "walletCompatibility.modal.feature.fundProtection",
95
- "Only checks whether your wallet is supported."
96
- ),
97
- icon: f
98
- }
99
- )
100
- ] }),
101
- t ? /* @__PURE__ */ a("div", { className: "flex flex-col gap-sw-xl mt-sw-lg w-full", children: [
102
- /* @__PURE__ */ l(
103
- c,
104
- {
105
- label: i(
106
- "walletCompatibility.modal.button.verified",
107
- "Wallet verified"
108
- ),
109
- className: "bg-sw-status-success text-sw-gray-950",
110
- icon: x
111
- }
112
- ),
113
- o.status === "RUNNING" && /* @__PURE__ */ l(
114
- c,
115
- {
116
- className: "text-sw-gray-400",
117
- label: i("walletCompatibility.modal.button.closeTimer", {
118
- defaultValue: "Popup will close in {{count}} sec...",
119
- count: o.time
120
- })
121
- }
122
- )
123
- ] }) : /* @__PURE__ */ a("div", { className: "flex flex-col gap-sw-xl mt-sw-lg", children: [
124
- /* @__PURE__ */ l(
125
- r,
126
- {
127
- size: "lg",
128
- variant: "primary",
129
- onClick: () => s({ type: "on_check_compatibility" }),
130
- children: i("walletCompatibility.modal.button.verify", "Verify wallet")
131
- }
132
- ),
133
- /* @__PURE__ */ l(
134
- r,
135
- {
136
- size: "lg",
137
- variant: "outlined",
138
- state: e ? "loading" : "default",
139
- onClick: () => s({ type: "on_sign_out" }),
140
- children: e ? i(
141
- "walletCompatibility.modal.button.signing",
142
- "Sign with your wallet"
143
- ) : i("walletCompatibility.modal.button.signOut", "Sign out")
144
- }
145
- )
146
- ] })
147
- ] });
148
- }, v = ({ onMsg: t }) => {
149
- const { t: e } = m();
150
- return /* @__PURE__ */ a(p, { className: "relative w-full gap-sw-2xl flex flex-col", children: [
151
- /* @__PURE__ */ l(
152
- d,
153
- {
154
- onClick: () => t({ type: "on_close" }),
155
- className: "absolute top-sw-2xl right-sw-2xl"
156
- }
157
- ),
158
- /* @__PURE__ */ l(g, { size: 48, className: "text-sw-status-error" }),
159
- /* @__PURE__ */ a("header", { className: "flex flex-col gap-sw-lg", children: [
160
- /* @__PURE__ */ l("h1", { className: "text-sw-label-lg text-sw-gray-50", children: e(
161
- "walletCompatibility.modal.title.error",
162
- "Unable to verify wallet"
163
- ) }),
164
- /* @__PURE__ */ l("p", { className: "text-sw-body-md text-sw-gray-200", children: e(
165
- "walletCompatibility.modal.description.error",
166
- "We couldn’t complete the verification. It may have been interrupted or your wallet may not be compatible."
167
- ) }),
168
- /* @__PURE__ */ l("p", { className: "text-sw-body-md text-sw-gray-200", children: e(
169
- "walletCompatibility.modal.button.tryAgainDesc",
170
- "If the issue continues, please try another wallet."
171
- ) })
172
- ] }),
173
- /* @__PURE__ */ a("div", { className: "flex flex-col gap-sw-xl mt-sw-lg", children: [
174
- /* @__PURE__ */ l(
175
- r,
176
- {
177
- size: "lg",
178
- variant: "primary",
179
- onClick: () => t({ type: "on_try_again" }),
180
- children: e("walletCompatibility.modal.button.tryAgain", "Try again")
181
- }
182
- ),
183
- /* @__PURE__ */ l(
184
- r,
185
- {
186
- size: "lg",
187
- variant: "outlined",
188
- onClick: () => t({ type: "on_sign_out" }),
189
- children: e("walletCompatibility.modal.button.signOut", "Sign out")
190
- }
191
- )
192
- ] })
193
- ] });
194
- }, U = Object.assign(C, {
195
- Error: v
196
- });
17
+ import { ag as C, af as E, z as I } from "../../config-Behl5hcc.js";
18
+ import "../../components/CloseButton.js";
197
19
  export {
198
- v as ErrorView,
199
- C as Initial,
200
- U as WalletCompatibilityModal
20
+ C as ErrorView,
21
+ E as Initial,
22
+ I as WalletCompatibilityModal
201
23
  };
202
24
  //# sourceMappingURL=WalletCompatibilityModal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WalletCompatibilityModal.js","sources":["../../../src/features/WalletCompatibilityCheck/WalletCompatibilityModal.tsx"],"sourcesContent":["import {\n AccountBalanceWalletFill,\n ArmingCountdownFill,\n BeenhereFill,\n CheckCircleFill,\n EncryptedFill,\n GppBadFill,\n type MaterialSymbolsComponent,\n} from '@material-symbols-svg/react-rounded';\nimport { useTimer } from 'use-timer';\nimport { useEffect } from 'react';\n\nimport { useTypedTranslation } from '@/localisation';\n\nimport { cn } from '@/utils';\nimport { Button, Card, CloseButton } from '@/components';\n\ntype Msg = { type: 'on_close' | 'on_check_compatibility' | 'on_sign_out' };\ntype MsgError = { type: 'on_close' | 'on_try_again' | 'on_sign_out' };\n\ninterface Props {\n isSigned: boolean;\n isSigning: boolean;\n onMsg: (msg: Msg) => void;\n}\n\nconst ListItem = ({\n text,\n icon: Icon,\n}: {\n text: string;\n icon: MaterialSymbolsComponent;\n}) => (\n <li className=\"flex items-center gap-sw-md\">\n {Icon && <Icon size={20} className=\"text-sw-gray-300\" />}\n <span className=\"text-sw-label-md text-sw-gray-50\">{text}</span>\n </li>\n);\n\nconst FakeButton = ({\n label,\n icon: Icon,\n className,\n}: {\n label: string;\n icon?: MaterialSymbolsComponent;\n className?: string;\n}) => (\n <div\n className={cn(\n 'rounded-sw-lg flex align-center justify-center gap-sw-md w-full py-sw-2xl',\n className,\n )}>\n {Icon && <Icon size={16} />}\n <span className=\"text-sw-label-md\">{label}</span>\n </div>\n);\n\nexport const Initial = ({ isSigned, isSigning, onMsg }: Props) => {\n const { t } = useTypedTranslation();\n\n const showTimer = useTimer({\n endTime: 0,\n autostart: false,\n timerType: 'DECREMENTAL',\n initialTime: 7,\n });\n\n useEffect(() => {\n if (isSigned) {\n showTimer.start();\n } else {\n showTimer.reset();\n }\n }, [isSigned]);\n\n return (\n <Card className=\"relative w-full gap-sw-2xl flex flex-col\">\n <CloseButton\n onClick={() => onMsg({ type: 'on_close' })}\n className=\"absolute top-sw-2xl right-sw-2xl\"\n />\n <ArmingCountdownFill size={48} className=\"text-sw-status-warning\" />\n\n <header className=\"flex flex-col gap-sw-lg\">\n <h1 className=\"text-sw-label-lg text-sw-gray-50\">\n {t(\n 'walletCompatibility.modal.title.initial',\n 'Verify your wallet to continue',\n )}\n </h1>\n <p className=\"text-sw-body-md text-sw-gray-200\">\n {t(\n 'walletCompatibility.modal.description.initial',\n 'Please sign a message to verify your wallet. This confirms your wallet is compatible and lets us securely read your public key.',\n )}\n </p>\n </header>\n\n <ul className=\"flex flex-col gap-sw-xl\">\n <ListItem\n text={t(\n 'walletCompatibility.modal.feature.secureTransactions',\n 'Read-only signature – no gas required.',\n )}\n icon={BeenhereFill}\n />\n <ListItem\n text={t(\n 'walletCompatibility.modal.feature.fullAccess',\n 'No access to your funds, no hidden permissions.',\n )}\n icon={EncryptedFill}\n />\n <ListItem\n text={t(\n 'walletCompatibility.modal.feature.fundProtection',\n 'Only checks whether your wallet is supported.',\n )}\n icon={AccountBalanceWalletFill}\n />\n </ul>\n\n {isSigned ? (\n <div className=\"flex flex-col gap-sw-xl mt-sw-lg w-full\">\n <FakeButton\n label={t(\n 'walletCompatibility.modal.button.verified',\n 'Wallet verified',\n )}\n className=\"bg-sw-status-success text-sw-gray-950\"\n icon={CheckCircleFill}\n />\n {showTimer.status === 'RUNNING' && (\n <FakeButton\n className=\"text-sw-gray-400\"\n label={t('walletCompatibility.modal.button.closeTimer', {\n defaultValue: 'Popup will close in {{count}} sec...',\n count: showTimer.time,\n })}\n />\n )}\n </div>\n ) : (\n <div className=\"flex flex-col gap-sw-xl mt-sw-lg\">\n <Button\n size=\"lg\"\n variant=\"primary\"\n onClick={() => onMsg({ type: 'on_check_compatibility' })}>\n {t('walletCompatibility.modal.button.verify', 'Verify wallet')}\n </Button>\n <Button\n size=\"lg\"\n variant=\"outlined\"\n state={isSigning ? 'loading' : 'default'}\n onClick={() => onMsg({ type: 'on_sign_out' })}>\n {isSigning\n ? t(\n 'walletCompatibility.modal.button.signing',\n 'Sign with your wallet',\n )\n : t('walletCompatibility.modal.button.signOut', 'Sign out')}\n </Button>\n </div>\n )}\n </Card>\n );\n};\n\ninterface ErrorProps {\n onMsg: (msg: MsgError) => void;\n}\n\nexport const ErrorView = ({ onMsg }: ErrorProps) => {\n const { t } = useTypedTranslation();\n\n return (\n <Card className=\"relative w-full gap-sw-2xl flex flex-col\">\n <CloseButton\n onClick={() => onMsg({ type: 'on_close' })}\n className=\"absolute top-sw-2xl right-sw-2xl\"\n />\n <GppBadFill size={48} className=\"text-sw-status-error\" />\n\n <header className=\"flex flex-col gap-sw-lg\">\n <h1 className=\"text-sw-label-lg text-sw-gray-50\">\n {t(\n 'walletCompatibility.modal.title.error',\n 'Unable to verify wallet',\n )}\n </h1>\n <p className=\"text-sw-body-md text-sw-gray-200\">\n {t(\n 'walletCompatibility.modal.description.error',\n 'We couldn’t complete the verification. It may have been interrupted or your wallet may not be compatible.',\n )}\n </p>\n <p className=\"text-sw-body-md text-sw-gray-200\">\n {t(\n 'walletCompatibility.modal.button.tryAgainDesc',\n 'If the issue continues, please try another wallet.',\n )}\n </p>\n </header>\n\n <div className=\"flex flex-col gap-sw-xl mt-sw-lg\">\n <Button\n size=\"lg\"\n variant=\"primary\"\n onClick={() => onMsg({ type: 'on_try_again' })}>\n {t('walletCompatibility.modal.button.tryAgain', 'Try again')}\n </Button>\n <Button\n size=\"lg\"\n variant=\"outlined\"\n onClick={() => onMsg({ type: 'on_sign_out' })}>\n {t('walletCompatibility.modal.button.signOut', 'Sign out')}\n </Button>\n </div>\n </Card>\n );\n};\n\nexport const WalletCompatibilityModal = Object.assign(Initial, {\n Error: ErrorView,\n});\n"],"names":["ListItem","text","Icon","jsxs","jsx","FakeButton","label","className","cn","Initial","isSigned","isSigning","onMsg","t","useTypedTranslation","showTimer","useTimer","useEffect","Card","CloseButton","ArmingCountdownFill","BeenhereFill","EncryptedFill","AccountBalanceWalletFill","CheckCircleFill","Button","ErrorView","GppBadFill","WalletCompatibilityModal"],"mappings":"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"}
1
+ {"version":3,"file":"WalletCompatibilityModal.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
@@ -1,43 +1,40 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
2
  import { useState as r } from "react";
3
- import { WalletCompatibilityModal as n } from "./WalletCompatibilityModal.js";
4
- import { b } from "../../config-Bmc4hOIl.js";
3
+ import { b, z as n } from "../../config-Behl5hcc.js";
5
4
  import "ethers";
6
5
  import "../../machine/machine.js";
7
6
  import { notReachable as l } from "../../utils/notReachable.js";
8
7
  import { localStorageTyped as c } from "../../utils/localstorage.js";
9
- import { useCompatibilityCheck as h } from "../../hooks/useCompatibilityCheck.js";
10
- function I({ onMsg: t, providers: p }) {
11
- const [m, i] = r(!1), [f, y] = r(!1), {
12
- ctx: { walletAddress: o }
13
- } = b(), { handleSign: u, isSigning: _ } = h({
8
+ import { useCompatibilityCheck as _ } from "../../hooks/useCompatibilityCheck.js";
9
+ function E({ onMsg: a, providers: p }) {
10
+ const [f, i] = r(!1), [y, m] = r(!1), {
11
+ ctx: { walletAddress: t }
12
+ } = b(), { handleSign: d, isSigning: u } = _({
14
13
  providers: p,
15
- walletAddress: o
14
+ walletAddress: t
16
15
  });
17
- async function d() {
18
- if (!o)
16
+ async function h() {
17
+ if (!t)
19
18
  return;
20
- if (!await u()) {
19
+ if (!await d()) {
21
20
  i(!0);
22
21
  return;
23
22
  }
24
- const a = c.getItem("verifiedWallets");
25
- a.push(o), c.setItem("verifiedWallets", a), y(!0);
23
+ const o = c.getItem("verifiedWallets");
24
+ o.push(t), c.setItem("verifiedWallets", o), m(!0);
26
25
  }
27
- return m ? /* @__PURE__ */ s(
26
+ return f ? /* @__PURE__ */ s(
28
27
  n.Error,
29
28
  {
30
29
  onMsg: async (e) => {
31
30
  switch (e.type) {
32
31
  case "on_close":
33
- t({ type: "on_close" });
32
+ case "on_sign_out":
33
+ a({ type: e.type });
34
34
  break;
35
35
  case "on_try_again":
36
36
  i(!1);
37
37
  break;
38
- case "on_sign_out":
39
- t({ type: "on_sign_out" });
40
- break;
41
38
  default:
42
39
  l(e.type);
43
40
  }
@@ -46,18 +43,16 @@ function I({ onMsg: t, providers: p }) {
46
43
  ) : /* @__PURE__ */ s(
47
44
  n,
48
45
  {
49
- isSigned: f,
50
- isSigning: _,
46
+ isSigned: y,
47
+ isSigning: u,
51
48
  onMsg: async (e) => {
52
49
  switch (e.type) {
53
50
  case "on_close":
54
- t({ type: "on_close" });
51
+ case "on_sign_out":
52
+ a({ type: e.type });
55
53
  break;
56
54
  case "on_check_compatibility":
57
- await d();
58
- break;
59
- case "on_sign_out":
60
- t({ type: "on_sign_out" });
55
+ await h();
61
56
  break;
62
57
  default:
63
58
  l(e.type);
@@ -67,6 +62,6 @@ function I({ onMsg: t, providers: p }) {
67
62
  );
68
63
  }
69
64
  export {
70
- I as WalletCompatibilityCheck
65
+ E as WalletCompatibilityCheck
71
66
  };
72
67
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../src/features/WalletCompatibilityCheck/index.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport { WalletCompatibilityModal } from './WalletCompatibilityModal';\nimport { useUnsafeSnapshot } from '../../machine';\nimport { notReachable } from '@/utils/notReachable';\nimport { localStorageTyped } from '@/utils/localstorage';\nimport { useCompatibilityCheck } from '@/hooks/useCompatibilityCheck';\nimport type { IntentsTransferArgs } from '@/types';\n\ntype Msg = { type: 'on_sign_out' | 'on_close' };\n\ntype Props = {\n providers: IntentsTransferArgs['providers'];\n onMsg: (msg: Msg) => void;\n};\n\nexport function WalletCompatibilityCheck({ onMsg, providers }: Props) {\n const [hasError, setHasError] = useState(false);\n const [isSigned, setIsSigned] = useState(false);\n\n const {\n ctx: { walletAddress },\n } = useUnsafeSnapshot();\n\n const { handleSign, isSigning } = useCompatibilityCheck({\n providers,\n walletAddress,\n });\n\n async function handleCompatibilityCheck() {\n if (!walletAddress) {\n return;\n }\n\n const isValid = await handleSign();\n\n if (!isValid) {\n setHasError(true);\n\n return;\n }\n\n // no need to verify if a wallet is already verified, the modal won't show up\n const verifiedWallets = localStorageTyped.getItem('verifiedWallets');\n\n verifiedWallets.push(walletAddress);\n localStorageTyped.setItem('verifiedWallets', verifiedWallets);\n setIsSigned(true);\n }\n\n return hasError ? (\n <WalletCompatibilityModal.Error\n onMsg={async (msg) => {\n switch (msg.type) {\n case 'on_close':\n onMsg({ type: 'on_close' });\n break;\n case 'on_try_again':\n setHasError(false);\n break;\n case 'on_sign_out':\n onMsg({ type: 'on_sign_out' });\n break;\n default:\n notReachable(msg.type);\n }\n }}\n />\n ) : (\n <WalletCompatibilityModal\n isSigned={isSigned}\n isSigning={isSigning}\n onMsg={async (msg) => {\n switch (msg.type) {\n case 'on_close':\n onMsg({ type: 'on_close' });\n break;\n case 'on_check_compatibility':\n await handleCompatibilityCheck();\n break;\n case 'on_sign_out':\n onMsg({ type: 'on_sign_out' });\n break;\n default:\n notReachable(msg.type);\n }\n }}\n />\n );\n}\n"],"names":["WalletCompatibilityCheck","onMsg","providers","hasError","setHasError","useState","isSigned","setIsSigned","walletAddress","useUnsafeSnapshot","handleSign","isSigning","useCompatibilityCheck","handleCompatibilityCheck","verifiedWallets","localStorageTyped","jsx","WalletCompatibilityModal","msg","notReachable"],"mappings":";;;;;;;;;AAgBO,SAASA,EAAyB,EAAE,OAAAC,GAAO,WAAAC,KAAoB;AACpE,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAAS,EAAK,GACxC,CAACC,GAAUC,CAAW,IAAIF,EAAS,EAAK,GAExC;AAAA,IACJ,KAAK,EAAE,eAAAG,EAAA;AAAA,EAAc,IACnBC,EAAA,GAEE,EAAE,YAAAC,GAAY,WAAAC,EAAA,IAAcC,EAAsB;AAAA,IACtD,WAAAV;AAAA,IACA,eAAAM;AAAA,EAAA,CACD;AAED,iBAAeK,IAA2B;AACxC,QAAI,CAACL;AACH;AAKF,QAAI,CAFY,MAAME,EAAA,GAER;AACZ,MAAAN,EAAY,EAAI;AAEhB;AAAA,IACF;AAGA,UAAMU,IAAkBC,EAAkB,QAAQ,iBAAiB;AAEnE,IAAAD,EAAgB,KAAKN,CAAa,GAClCO,EAAkB,QAAQ,mBAAmBD,CAAe,GAC5DP,EAAY,EAAI;AAAA,EAClB;AAEA,SAAOJ,IACL,gBAAAa;AAAA,IAACC,EAAyB;AAAA,IAAzB;AAAA,MACC,OAAO,OAAOC,MAAQ;AACpB,gBAAQA,EAAI,MAAA;AAAA,UACV,KAAK;AACH,YAAAjB,EAAM,EAAE,MAAM,YAAY;AAC1B;AAAA,UACF,KAAK;AACH,YAAAG,EAAY,EAAK;AACjB;AAAA,UACF,KAAK;AACH,YAAAH,EAAM,EAAE,MAAM,eAAe;AAC7B;AAAA,UACF;AACE,YAAAkB,EAAaD,EAAI,IAAI;AAAA,QAAA;AAAA,MAE3B;AAAA,IAAA;AAAA,EAAA,IAGF,gBAAAF;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAAX;AAAA,MACA,WAAAK;AAAA,MACA,OAAO,OAAOO,MAAQ;AACpB,gBAAQA,EAAI,MAAA;AAAA,UACV,KAAK;AACH,YAAAjB,EAAM,EAAE,MAAM,YAAY;AAC1B;AAAA,UACF,KAAK;AACH,kBAAMY,EAAA;AACN;AAAA,UACF,KAAK;AACH,YAAAZ,EAAM,EAAE,MAAM,eAAe;AAC7B;AAAA,UACF;AACE,YAAAkB,EAAaD,EAAI,IAAI;AAAA,QAAA;AAAA,MAE3B;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"index.js","sources":["../../../src/features/WalletCompatibilityCheck/index.tsx"],"sourcesContent":["import { useState } from 'react';\n\nimport { WalletCompatibilityModal } from './WalletCompatibilityModal';\nimport { useUnsafeSnapshot } from '../../machine';\nimport { notReachable } from '@/utils/notReachable';\nimport { localStorageTyped } from '@/utils/localstorage';\nimport { useCompatibilityCheck } from '@/hooks/useCompatibilityCheck';\nimport type { IntentsTransferArgs } from '@/types';\n\ntype Msg = { type: 'on_sign_out' | 'on_close' };\n\ntype Props = {\n providers: IntentsTransferArgs['providers'];\n onMsg: (msg: Msg) => void;\n};\n\nexport function WalletCompatibilityCheck({ onMsg, providers }: Props) {\n const [hasError, setHasError] = useState(false);\n const [isSigned, setIsSigned] = useState(false);\n\n const {\n ctx: { walletAddress },\n } = useUnsafeSnapshot();\n\n const { handleSign, isSigning } = useCompatibilityCheck({\n providers,\n walletAddress,\n });\n\n async function handleCompatibilityCheck() {\n if (!walletAddress) {\n return;\n }\n\n const isValid = await handleSign();\n\n if (!isValid) {\n setHasError(true);\n\n return;\n }\n\n // no need to verify if a wallet is already verified, the modal won't show up\n const verifiedWallets = localStorageTyped.getItem('verifiedWallets');\n\n verifiedWallets.push(walletAddress);\n localStorageTyped.setItem('verifiedWallets', verifiedWallets);\n setIsSigned(true);\n }\n\n return hasError ? (\n <WalletCompatibilityModal.Error\n onMsg={async (msg) => {\n switch (msg.type) {\n case 'on_close':\n case 'on_sign_out':\n onMsg({ type: msg.type });\n break;\n case 'on_try_again':\n setHasError(false);\n break;\n default:\n notReachable(msg.type);\n }\n }}\n />\n ) : (\n <WalletCompatibilityModal\n isSigned={isSigned}\n isSigning={isSigning}\n onMsg={async (msg) => {\n switch (msg.type) {\n case 'on_close':\n case 'on_sign_out':\n onMsg({ type: msg.type });\n break;\n case 'on_check_compatibility':\n await handleCompatibilityCheck();\n break;\n default:\n notReachable(msg.type);\n }\n }}\n />\n );\n}\n"],"names":["WalletCompatibilityCheck","onMsg","providers","hasError","setHasError","useState","isSigned","setIsSigned","walletAddress","useUnsafeSnapshot","handleSign","isSigning","useCompatibilityCheck","handleCompatibilityCheck","verifiedWallets","localStorageTyped","jsx","WalletCompatibilityModal","msg","notReachable"],"mappings":";;;;;;;;AAgBO,SAASA,EAAyB,EAAE,OAAAC,GAAO,WAAAC,KAAoB;AACpE,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAAS,EAAK,GACxC,CAACC,GAAUC,CAAW,IAAIF,EAAS,EAAK,GAExC;AAAA,IACJ,KAAK,EAAE,eAAAG,EAAA;AAAA,EAAc,IACnBC,EAAA,GAEE,EAAE,YAAAC,GAAY,WAAAC,EAAA,IAAcC,EAAsB;AAAA,IACtD,WAAAV;AAAA,IACA,eAAAM;AAAA,EAAA,CACD;AAED,iBAAeK,IAA2B;AACxC,QAAI,CAACL;AACH;AAKF,QAAI,CAFY,MAAME,EAAA,GAER;AACZ,MAAAN,EAAY,EAAI;AAEhB;AAAA,IACF;AAGA,UAAMU,IAAkBC,EAAkB,QAAQ,iBAAiB;AAEnE,IAAAD,EAAgB,KAAKN,CAAa,GAClCO,EAAkB,QAAQ,mBAAmBD,CAAe,GAC5DP,EAAY,EAAI;AAAA,EAClB;AAEA,SAAOJ,IACL,gBAAAa;AAAA,IAACC,EAAyB;AAAA,IAAzB;AAAA,MACC,OAAO,OAAOC,MAAQ;AACpB,gBAAQA,EAAI,MAAA;AAAA,UACV,KAAK;AAAA,UACL,KAAK;AACH,YAAAjB,EAAM,EAAE,MAAMiB,EAAI,KAAA,CAAM;AACxB;AAAA,UACF,KAAK;AACH,YAAAd,EAAY,EAAK;AACjB;AAAA,UACF;AACE,YAAAe,EAAaD,EAAI,IAAI;AAAA,QAAA;AAAA,MAE3B;AAAA,IAAA;AAAA,EAAA,IAGF,gBAAAF;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAAX;AAAA,MACA,WAAAK;AAAA,MACA,OAAO,OAAOO,MAAQ;AACpB,gBAAQA,EAAI,MAAA;AAAA,UACV,KAAK;AAAA,UACL,KAAK;AACH,YAAAjB,EAAM,EAAE,MAAMiB,EAAI,KAAA,CAAM;AACxB;AAAA,UACF,KAAK;AACH,kBAAML,EAAA;AACN;AAAA,UACF;AACE,YAAAM,EAAaD,EAAI,IAAI;AAAA,QAAA;AAAA,MAE3B;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -1,4 +1,4 @@
1
- import { B as r, S as t, o as p, p as a, T as s, q as n } from "../config-Bmc4hOIl.js";
1
+ import { B as r, S as t, o as p, p as a, T as s, q as n } from "../config-Behl5hcc.js";
2
2
  import { ChainsDropdown as m } from "./ChainsDropdown/index.js";
3
3
  import { SendAddress as c } from "./SendAddress/index.js";
4
4
  import { SuccessScreen as S } from "./SuccessScreen/index.js";
@@ -1,4 +1,4 @@
1
- import { e as a, d as r, f as o, g as t, h as u, j as n, i as f, k as l, l as k, n as m, m as i } from "../config-Bmc4hOIl.js";
1
+ import { e as a, d as r, f as o, g as t, h as u, j as n, i as f, k as l, l as k, n as m, m as i } from "../config-Behl5hcc.js";
2
2
  import { useMakeEvmTransfer as T } from "./useMakeEvmTransfer.js";
3
3
  import { useMakeSolanaTransfer as M } from "./useMakeSolanaTransfer.js";
4
4
  import { useTokenInputPair as c } from "./useTokenInputPair.js";
@@ -1,5 +1,5 @@
1
1
  import "react";
2
- import { e as s } from "../config-Bmc4hOIl.js";
2
+ import { e as s } from "../config-Behl5hcc.js";
3
3
  export {
4
4
  s as useAllTokens
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import "react";
2
- import { d as p } from "../config-Bmc4hOIl.js";
2
+ import { d as p } from "../config-Behl5hcc.js";
3
3
  import "../constants/chains.js";
4
4
  export {
5
5
  p as useChains
@@ -1,7 +1,7 @@
1
1
  import { useState as f } from "react";
2
2
  import { B as l } from "../index-DEq3oXQF.js";
3
3
  import { verifyWalletSignature as N, walletVerificationMessageFactory as p } from "../utils/intents/walletCompatibilityVerification.js";
4
- import { y, w as o } from "../config-Bmc4hOIl.js";
4
+ import { y, w as o } from "../config-Behl5hcc.js";
5
5
  import { notReachable as A } from "../utils/notReachable.js";
6
6
  import { getIntentsAccountId as S } from "../utils/intents/getIntentsAccountId.js";
7
7
  import { localStorageTyped as u } from "../utils/localstorage.js";
@@ -1,5 +1,5 @@
1
1
  import "react";
2
- import { a5 as r } from "../config-Bmc4hOIl.js";
2
+ import { a7 as r } from "../config-Behl5hcc.js";
3
3
  export {
4
4
  r as useDefaultToken
5
5
  };
@@ -5,7 +5,7 @@ import "ethers";
5
5
  import "../../utils/cn.js";
6
6
  import { notReachable as l } from "../../utils/notReachable.js";
7
7
  import { useOneClickExternalDepositStatus as p } from "./useOneClickExternalDepositStatus.js";
8
- import { b as c, u as m, z as S, v as f } from "../../config-Bmc4hOIl.js";
8
+ import { b as c, u as m, A as S, v as f } from "../../config-Behl5hcc.js";
9
9
  import { WNEAR_ASSET_ID as D } from "../../constants/tokens.js";
10
10
  import { guardStates as h } from "../../machine/guards/index.js";
11
11
  import "../../machine/machine.js";
@@ -1,6 +1,6 @@
1
1
  import "react";
2
2
  import "@defuse-protocol/one-click-sdk-typescript";
3
- import { z as x } from "../../config-Bmc4hOIl.js";
3
+ import { A as x } from "../../config-Behl5hcc.js";
4
4
  import "../../network.js";
5
5
  import "ethers";
6
6
  import "../../machine/machine.js";
@@ -1,6 +1,6 @@
1
1
  import "react";
2
2
  import "@tanstack/react-query";
3
- import { f } from "../config-Bmc4hOIl.js";
3
+ import { f } from "../config-Behl5hcc.js";
4
4
  import "ethers";
5
5
  import "../machine/machine.js";
6
6
  import "../logger.js";
@@ -1 +1 @@
1
- export declare const useIsCompatibilityCheckRequired: () => boolean | "" | undefined;
1
+ export declare const useIsCompatibilityCheckRequired: () => boolean;
@@ -1,8 +1,8 @@
1
- import { b as s } from "../config-Bmc4hOIl.js";
1
+ import { b as s } from "../config-Behl5hcc.js";
2
2
  import { localStorageTyped as r } from "../utils/localstorage.js";
3
3
  const i = () => {
4
4
  const { ctx: e } = s(), t = r.getItem("verifiedWallets");
5
- return e.walletAddress && !t.includes(e.walletAddress);
5
+ return !!(e.walletAddress && !t.includes(e.walletAddress));
6
6
  };
7
7
  export {
8
8
  i as useIsCompatibilityCheckRequired
@@ -1 +1 @@
1
- {"version":3,"file":"useIsCompatibilityCheckRequired.js","sources":["../../src/hooks/useIsCompatibilityCheckRequired.ts"],"sourcesContent":["import { useUnsafeSnapshot } from '@/machine/snap';\nimport { localStorageTyped } from '@/utils/localstorage';\n\nexport const useIsCompatibilityCheckRequired = () => {\n const { ctx } = useUnsafeSnapshot();\n const verifiedWallets = localStorageTyped.getItem('verifiedWallets');\n\n return ctx.walletAddress && !verifiedWallets.includes(ctx.walletAddress);\n};\n"],"names":["useIsCompatibilityCheckRequired","ctx","useUnsafeSnapshot","verifiedWallets","localStorageTyped"],"mappings":";;AAGO,MAAMA,IAAkC,MAAM;AACnD,QAAM,EAAE,KAAAC,EAAA,IAAQC,EAAA,GACVC,IAAkBC,EAAkB,QAAQ,iBAAiB;AAEnE,SAAOH,EAAI,iBAAiB,CAACE,EAAgB,SAASF,EAAI,aAAa;AACzE;"}
1
+ {"version":3,"file":"useIsCompatibilityCheckRequired.js","sources":["../../src/hooks/useIsCompatibilityCheckRequired.ts"],"sourcesContent":["import { useUnsafeSnapshot } from '@/machine/snap';\nimport { localStorageTyped } from '@/utils/localstorage';\n\nexport const useIsCompatibilityCheckRequired = () => {\n const { ctx } = useUnsafeSnapshot();\n const verifiedWallets = localStorageTyped.getItem('verifiedWallets');\n\n return !!(ctx.walletAddress && !verifiedWallets.includes(ctx.walletAddress));\n};\n"],"names":["useIsCompatibilityCheckRequired","ctx","useUnsafeSnapshot","verifiedWallets","localStorageTyped"],"mappings":";;AAGO,MAAMA,IAAkC,MAAM;AACnD,QAAM,EAAE,KAAAC,EAAA,IAAQC,EAAA,GACVC,IAAkBC,EAAkB,QAAQ,iBAAiB;AAEnE,SAAO,CAAC,EAAEH,EAAI,iBAAiB,CAACE,EAAgB,SAASF,EAAI,aAAa;AAC5E;"}
@@ -1,7 +1,7 @@
1
1
  import "react";
2
2
  import "axios";
3
3
  import "../logger.js";
4
- import { H as k } from "../config-Bmc4hOIl.js";
4
+ import { J as k } from "../config-Behl5hcc.js";
5
5
  import "../machine/guards/index.js";
6
6
  import "../network.js";
7
7
  import "../utils/evm/isEvmChain.js";
@@ -4,7 +4,7 @@ import "change-case";
4
4
  import "../utils/near/getRandomBytes.js";
5
5
  import "../utils/intents/signers/solana.js";
6
6
  import "../logger.js";
7
- import { g as M } from "../config-Bmc4hOIl.js";
7
+ import { g as M } from "../config-Behl5hcc.js";
8
8
  import "../constants/chains.js";
9
9
  import "../constants/intents.js";
10
10
  import "../utils/notReachable.js";
@@ -1,5 +1,5 @@
1
1
  import "../utils/near/config.js";
2
- import { _ as e } from "../config-Bmc4hOIl.js";
2
+ import { a0 as e } from "../config-Behl5hcc.js";
3
3
  import "../utils/near/getNearNep141MinStorageBalance.js";
4
4
  import "../logger.js";
5
5
  import "../constants/tokens.js";
@@ -3,7 +3,7 @@ import "change-case";
3
3
  import "@defuse-protocol/one-click-sdk-typescript";
4
4
  import "axios";
5
5
  import "../logger.js";
6
- import { h as M } from "../config-Bmc4hOIl.js";
6
+ import { h as M } from "../config-Behl5hcc.js";
7
7
  import "../network.js";
8
8
  import "../machine/guards/index.js";
9
9
  import "../constants/tokens.js";
@@ -8,7 +8,7 @@ import "../utils/cn.js";
8
8
  import "./useMakeEvmTransfer.js";
9
9
  import "../utils/evm/isEvmAddress.js";
10
10
  import "./useMakeSolanaTransfer.js";
11
- import { j as Q } from "../config-Bmc4hOIl.js";
11
+ import { j as Q } from "../config-Behl5hcc.js";
12
12
  import "../utils/solana/isSolanaAddress.js";
13
13
  import "../logger.js";
14
14
  import "../constants/tokens.js";
@@ -1,4 +1,4 @@
1
- import { i as s } from "../config-Bmc4hOIl.js";
1
+ import { i as s } from "../config-Behl5hcc.js";
2
2
  import "../logger.js";
3
3
  import "ethers";
4
4
  import "../machine/machine.js";
@@ -1,6 +1,6 @@
1
1
  import "react";
2
2
  import "./useWalletBalance.js";
3
- import { k as m } from "../config-Bmc4hOIl.js";
3
+ import { k as m } from "../config-Behl5hcc.js";
4
4
  export {
5
5
  m as useMergedBalance
6
6
  };
@@ -1,6 +1,6 @@
1
1
  import "react";
2
2
  import "../constants/chains.js";
3
- import { l as c } from "../config-Bmc4hOIl.js";
3
+ import { l as c } from "../config-Behl5hcc.js";
4
4
  import "../utils/evm/isEvmChain.js";
5
5
  import "viem";
6
6
  import "ethers";
@@ -1,5 +1,5 @@
1
1
  import { useContext as e } from "react";
2
- import { ThemeContext as t } from "../theme/ThemeProvider.js";
2
+ import { C as t } from "../config-Behl5hcc.js";
3
3
  const n = () => e(t);
4
4
  export {
5
5
  n as useTheme