@aurora-is-near/intents-swap-widget 3.14.0-redesign.9 → 3.14.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 (104) hide show
  1. package/dist/{config-CG-NCoEP.js → config-QBojKcju.js} +584 -569
  2. package/dist/config-QBojKcju.js.map +1 -0
  3. package/dist/config.js +1 -1
  4. package/dist/errors.js +1 -1
  5. package/dist/ext/alchemy/index.js +1 -1
  6. package/dist/ext/index.js +1 -1
  7. package/dist/features/BalanceRpcLoader/TokenBalanceLoader.js +1 -1
  8. package/dist/features/BalanceRpcLoader/index.js +1 -1
  9. package/dist/features/BalanceRpcLoader/useTokenBalanceRpc.js +1 -1
  10. package/dist/features/ChainsDropdown/index.js +31 -31
  11. package/dist/features/ChainsDropdown/index.js.map +1 -1
  12. package/dist/features/DepositMethodSwitcher.js +12 -10
  13. package/dist/features/DepositMethodSwitcher.js.map +1 -1
  14. package/dist/features/ErrorBoundary.js +1 -1
  15. package/dist/features/ExternalDeposit.js +1 -1
  16. package/dist/features/SendAddress/index.js +1 -1
  17. package/dist/features/SendAddress/useNotification.js +1 -1
  18. package/dist/features/SubmitButton/index.js +1 -1
  19. package/dist/features/SuccessScreen/index.js +1 -1
  20. package/dist/features/SwapDirectionSwitcher.js +1 -1
  21. package/dist/features/SwapQuote/SwapQuote.js +1 -1
  22. package/dist/features/SwapQuote/index.js +1 -1
  23. package/dist/features/TokenInput/TokenInput.js +1 -1
  24. package/dist/features/TokenInput/TokenInputEmpty.js +1 -1
  25. package/dist/features/TokenInput/TokenInputSource.js +1 -1
  26. package/dist/features/TokenInput/TokenInputTarget.js +1 -1
  27. package/dist/features/TokenInput/WalletBalance.js +1 -1
  28. package/dist/features/TokenInput/hooks/index.js +1 -1
  29. package/dist/features/TokenInput/hooks/useTokenInputBalance.js +1 -1
  30. package/dist/features/TokenInput/index.js +1 -1
  31. package/dist/features/TokensList/TokenItem.js +1 -1
  32. package/dist/features/TokensList/TokensList.js +1 -1
  33. package/dist/features/TokensList/index.js +1 -1
  34. package/dist/features/TokensModal.js +1 -1
  35. package/dist/features/WalletCompatibilityCheck/WalletCompatibilityModal.js +1 -1
  36. package/dist/features/WalletCompatibilityCheck/index.js +1 -1
  37. package/dist/features/index.js +1 -1
  38. package/dist/hooks/index.js +1 -1
  39. package/dist/hooks/useAllTokens.js +1 -1
  40. package/dist/hooks/useChains.js +1 -1
  41. package/dist/hooks/useCompatibilityCheck.js +1 -1
  42. package/dist/hooks/useDefaultToken.js +1 -1
  43. package/dist/hooks/useExternalDepositStatus/index.js +1 -1
  44. package/dist/hooks/useExternalDepositStatus/usePoaExternalDepositStatus.js +1 -1
  45. package/dist/hooks/useIntentsBalance.js +1 -1
  46. package/dist/hooks/useIsCompatibilityCheckRequired.js +1 -1
  47. package/dist/hooks/useMakeDepositAddress.js +1 -1
  48. package/dist/hooks/useMakeIntentsTransfer.js +3 -2
  49. package/dist/hooks/useMakeIntentsTransfer.js.map +1 -1
  50. package/dist/hooks/useMakeNEARFtTransferCall.js +1 -1
  51. package/dist/hooks/useMakeQuote.js +1 -1
  52. package/dist/hooks/useMakeQuoteTransfer.js +1 -1
  53. package/dist/hooks/useMakeTransfer.js +1 -1
  54. package/dist/hooks/useMergedBalance.js +1 -1
  55. package/dist/hooks/useSwitchChain.js +1 -1
  56. package/dist/hooks/useTheme.js +1 -1
  57. package/dist/hooks/useTokenInputPair.js +1 -1
  58. package/dist/hooks/useTokens.js +1 -1
  59. package/dist/hooks/useTokensFiltered.js +1 -1
  60. package/dist/hooks/useTokensIntentsUnique.js +1 -1
  61. package/dist/index.js +1 -1
  62. package/dist/machine/effects/index.js +1 -1
  63. package/dist/machine/effects/useAlchemyBalanceEffect.js +1 -1
  64. package/dist/machine/effects/useBalancesUpdateEffect.js +1 -1
  65. package/dist/machine/effects/useMakeQuoteEffect.js +1 -1
  66. package/dist/machine/effects/useSelectedTokensEffect.js +1 -1
  67. package/dist/machine/effects/useSetTokenBalanceEffect.js +1 -1
  68. package/dist/machine/effects/useSetTokenIntentsTargetEffect.js +1 -1
  69. package/dist/machine/effects/useWalletConnEffect.js +1 -1
  70. package/dist/machine/errors.d.ts +5 -0
  71. package/dist/machine/errors.js.map +1 -1
  72. package/dist/machine/events/index.js +1 -1
  73. package/dist/machine/events/tokenSelect.js +1 -1
  74. package/dist/machine/events/validateInputAndMoveTo.js +1 -1
  75. package/dist/machine/events/validateInputs.js +1 -1
  76. package/dist/machine/index.js +1 -1
  77. package/dist/machine/snap.d.ts +15 -0
  78. package/dist/machine/snap.js +1 -1
  79. package/dist/machine/subscriptions/checkers/isSendAddressAsConnected.js +1 -1
  80. package/dist/machine/subscriptions/index.js +1 -1
  81. package/dist/theme/ThemeProvider.js +1 -1
  82. package/dist/utils/intents/signers/near.js +1 -1
  83. package/dist/utils/intents/signers/privy.js +1 -1
  84. package/dist/utils/localstorage.d.ts +2 -2
  85. package/dist/utils/localstorage.js +1 -0
  86. package/dist/utils/localstorage.js.map +1 -1
  87. package/dist/utils/near/getNearNep141StorageBalance.js +1 -1
  88. package/dist/widgets/WidgetDeposit/WidgetDepositContent.js +1 -1
  89. package/dist/widgets/WidgetDeposit/WidgetDepositSkeleton.js +1 -1
  90. package/dist/widgets/WidgetSwap/WidgetSwapContent.js +1 -1
  91. package/dist/widgets/WidgetSwap/WidgetSwapSkeleton.js +1 -1
  92. package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js +1 -1
  93. package/dist/widgets/WidgetWithdraw/WidgetWithdrawSkeleton.js +1 -1
  94. package/package.json +3 -3
  95. package/src/features/ChainsDropdown/index.tsx +1 -1
  96. package/src/features/DepositMethodSwitcher.tsx +2 -0
  97. package/src/features/SubmitButton/index.tsx +4 -1
  98. package/src/features/TokensList/TokensList.tsx +1 -1
  99. package/src/hooks/useMakeIntentsTransfer.ts +22 -0
  100. package/src/machine/errors.ts +1 -0
  101. package/src/tests/mock-localstorage.ts +32 -0
  102. package/src/utils/localstorage.ts +2 -2
  103. package/src/widgets/WidgetDeposit/WidgetDeposit.test.tsx +6 -0
  104. package/dist/config-CG-NCoEP.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import "react";
2
2
  import "@defuse-protocol/one-click-sdk-typescript";
3
- import { A as x } from "../../config-CG-NCoEP.js";
3
+ import { A as x } from "../../config-QBojKcju.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-CG-NCoEP.js";
3
+ import { f } from "../config-QBojKcju.js";
4
4
  import "ethers";
5
5
  import "../machine/machine.js";
6
6
  import "../logger.js";
@@ -1,4 +1,4 @@
1
- import { b as s } from "../config-CG-NCoEP.js";
1
+ import { b as s } from "../config-QBojKcju.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");
@@ -1,7 +1,7 @@
1
1
  import "react";
2
2
  import "axios";
3
3
  import "../logger.js";
4
- import { J as k } from "../config-CG-NCoEP.js";
4
+ import { J as k } from "../config-QBojKcju.js";
5
5
  import "../machine/guards/index.js";
6
6
  import "../network.js";
7
7
  import "../utils/evm/isEvmChain.js";
@@ -4,16 +4,17 @@ 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-CG-NCoEP.js";
7
+ import { g as T } from "../config-QBojKcju.js";
8
8
  import "../constants/chains.js";
9
9
  import "../constants/intents.js";
10
10
  import "../utils/notReachable.js";
11
11
  import "../utils/localstorage.js";
12
12
  import "../utils/near/queryContract.js";
13
+ import "../utils/formatters/formatBigToHuman.js";
13
14
  import "../utils/intents/getIntentsAccountId.js";
14
15
  import "../utils/formatters/getTransactionLink.js";
15
16
  import "../utils/checkers/isUserDeniedSigning.js";
16
17
  export {
17
- M as useMakeIntentsTransfer
18
+ T as useMakeIntentsTransfer
18
19
  };
19
20
  //# sourceMappingURL=useMakeIntentsTransfer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMakeIntentsTransfer.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"useMakeIntentsTransfer.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import "../utils/near/config.js";
2
- import { a0 as e } from "../config-CG-NCoEP.js";
2
+ import { a0 as e } from "../config-QBojKcju.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-CG-NCoEP.js";
6
+ import { h as M } from "../config-QBojKcju.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-CG-NCoEP.js";
11
+ import { j as Q } from "../config-QBojKcju.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-CG-NCoEP.js";
1
+ import { i as s } from "../config-QBojKcju.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-CG-NCoEP.js";
3
+ import { k as m } from "../config-QBojKcju.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-CG-NCoEP.js";
3
+ import { l as c } from "../config-QBojKcju.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 { C as t } from "../config-CG-NCoEP.js";
2
+ import { C as t } from "../config-QBojKcju.js";
3
3
  const n = () => e(t);
4
4
  export {
5
5
  n as useTheme
@@ -1,5 +1,5 @@
1
1
  import { useState as m } from "react";
2
- import { b as k } from "../config-CG-NCoEP.js";
2
+ import { b as k } from "../config-QBojKcju.js";
3
3
  import "ethers";
4
4
  import "../machine/machine.js";
5
5
  import { fireEvent as o } from "../machine/events/utils/fireEvent.js";
@@ -1,7 +1,7 @@
1
1
  import "react";
2
2
  import "@tanstack/react-query";
3
3
  import "@defuse-protocol/one-click-sdk-typescript";
4
- import { n } from "../config-CG-NCoEP.js";
4
+ import { n } from "../config-QBojKcju.js";
5
5
  import "../constants/tokens.js";
6
6
  import "../constants/chains.js";
7
7
  import "../utils/checkers/isValidChain.js";
@@ -1,4 +1,4 @@
1
- import { m as p } from "../config-CG-NCoEP.js";
1
+ import { m as p } from "../config-QBojKcju.js";
2
2
  import "../utils/tokens/sort.js";
3
3
  import "../utils/tokens/filterByIntents.js";
4
4
  import "../utils/tokens/filterBySearchString.js";
@@ -1,5 +1,5 @@
1
1
  import "react";
2
- import { ac as s } from "../config-CG-NCoEP.js";
2
+ import { ac as s } from "../config-QBojKcju.js";
3
3
  export {
4
4
  s as useTokensIntentsUnique
5
5
  };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { B as o, M as t, Q as s, S as a, o as n, p, T as f, q as m, w as i, W as u, v as x, x as d, r as c, t as S, e as l, d as k, u as T, f as g, g as h, h as B, j as C, i as E, k as M, a as I, c as W, l as w, n as D, m as A, b as v } from "./config-CG-NCoEP.js";
1
+ import { B as o, M as t, Q as s, S as a, o as n, p, T as f, q as m, w as i, W as u, v as x, x as d, r as c, t as S, e as l, d as k, u as T, f as g, g as h, h as B, j as C, i as E, k as M, a as I, c as W, l as w, n as D, m as A, b as v } from "./config-QBojKcju.js";
2
2
  import { DEFAULT_RPCS as y } from "./rpcs.js";
3
3
  import { Accordion as L } from "./components/Accordion.js";
4
4
  import { Badge as R } from "./components/Badge.js";
@@ -1,6 +1,6 @@
1
1
  import "lodash.once";
2
2
  import "react";
3
- import { r as i, c as m } from "../../config-CG-NCoEP.js";
3
+ import { r as i, c as m } from "../../config-QBojKcju.js";
4
4
  import "../../logger.js";
5
5
  export {
6
6
  i as registerStoreEvents,
@@ -1,4 +1,4 @@
1
- import { U as c } from "../../config-CG-NCoEP.js";
1
+ import { U as c } from "../../config-QBojKcju.js";
2
2
  export {
3
3
  c as useAlchemyBalanceEffect
4
4
  };
@@ -1,6 +1,6 @@
1
1
  import "react";
2
2
  import "@tanstack/react-query";
3
- import { F as a } from "../../config-CG-NCoEP.js";
3
+ import { F as a } from "../../config-QBojKcju.js";
4
4
  import "../guards/index.js";
5
5
  import "../machine.js";
6
6
  export {
@@ -1,7 +1,7 @@
1
1
  import "react";
2
2
  import "../../logger.js";
3
3
  import "../guards/checks/isDryQuote.js";
4
- import { P as a } from "../../config-CG-NCoEP.js";
4
+ import { P as a } from "../../config-QBojKcju.js";
5
5
  import "../guards/index.js";
6
6
  import "../machine.js";
7
7
  import "../events/utils/fireEvent.js";
@@ -2,7 +2,7 @@ import "react";
2
2
  import "../../utils/solana/isSolanaAddress.js";
3
3
  import "../../utils/evm/isEvmAddress.js";
4
4
  import "../../utils/near/isNearAddress.js";
5
- import { R as l } from "../../config-CG-NCoEP.js";
5
+ import { R as l } from "../../config-QBojKcju.js";
6
6
  import "../../utils/tokens/getMainTokenByChain.js";
7
7
  import "../../utils/tokens/getDefaultIntentsToken.js";
8
8
  import "../../utils/tokens/getTokenWithHighBalance.js";
@@ -1,5 +1,5 @@
1
1
  import "react";
2
- import { G as a } from "../../config-CG-NCoEP.js";
2
+ import { G as a } from "../../config-QBojKcju.js";
3
3
  import "../../utils/intents/getTokenBalanceKey.js";
4
4
  import "ethers";
5
5
  import "../machine.js";
@@ -1,5 +1,5 @@
1
1
  import "react";
2
- import { H as i } from "../../config-CG-NCoEP.js";
2
+ import { H as i } from "../../config-QBojKcju.js";
3
3
  import "ethers";
4
4
  import "../machine.js";
5
5
  import "../events/utils/fireEvent.js";
@@ -1,6 +1,6 @@
1
1
  import "react";
2
2
  import "../../hooks/useWalletAddressForToken.js";
3
- import { I as f } from "../../config-CG-NCoEP.js";
3
+ import { I as f } from "../../config-QBojKcju.js";
4
4
  import "../guards/index.js";
5
5
  import "../machine.js";
6
6
  import "../events/utils/fireEvent.js";
@@ -72,6 +72,11 @@ export type InputValidWalletError = InputValidDryError | {
72
72
  code: 'QUOTE_NO_ONE_TIME_ADDRESS';
73
73
  };
74
74
  export type QuoteSuccessDirectTransferError = {
75
+ code: 'MIN_WITHDRAWAL_AMOUNT_ERROR';
76
+ meta: {
77
+ minAmount?: string;
78
+ };
79
+ } | {
75
80
  code: 'DIRECT_TRANSFER_ERROR';
76
81
  meta?: {
77
82
  message?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sources":["../../src/machine/errors.ts"],"sourcesContent":["import type { Chains } from '@/types/chain';\n\nexport type InitialDryStateError =\n | { code: 'SOURCE_TOKEN_IS_EMPTY' }\n | { code: 'TARGET_TOKEN_IS_EMPTY' }\n | { code: 'SOURCE_TOKEN_AMOUNT_IS_EMPTY' }\n | { code: 'SOURCE_BALANCE_INSUFFICIENT' };\n\nexport type InitialInternalStateError =\n | InitialDryStateError\n | { code: 'SOURCE_TOKEN_NOT_INTENT' }\n | { code: 'INVALID_SOURCE_BALANCE' };\n\ntype SendAddressValidationError =\n | {\n code: 'SEND_ADDRESS_IS_NOT_VERIFIED';\n meta: { address: string; chain: Chains };\n }\n | {\n code: 'SEND_ADDRESS_IS_NOT_FOUND';\n meta: { address: string; chain: Chains };\n };\n\nexport type InitialExternalStateError =\n | InitialDryStateError\n | SendAddressValidationError\n | { code: 'SOURCE_TOKEN_IS_INTENT' }\n | { code: 'INVALID_SOURCE_BALANCE' }\n | { code: 'SEND_ADDRESS_IS_EMPTY' }\n | {\n code: 'SEND_ADDRESS_IS_INVALID';\n meta: { address: string; chain: Chains };\n };\n\nexport type InputValidDryError =\n | { code: 'NO_NEAR_TOKEN_FOUND'; meta: { symbol: string } }\n | { code: 'TOKEN_IS_NOT_SUPPORTED' }\n | { code: 'QUOTE_FAILED'; meta: { message: string } }\n | { code: 'QUOTE_INVALID'; meta: { isDry: boolean } }\n | { code: 'QUOTE_INVALID_INITIAL'; meta: { isDry: boolean; message: string } }\n | {\n code: 'QUOTE_AMOUNT_IS_TOO_LOW';\n meta: { minAmount?: string };\n };\n\nexport type InputValidWalletError =\n | InputValidDryError\n | { code: 'QUOTE_NO_ONE_TIME_ADDRESS' };\n\nexport type QuoteSuccessDirectTransferError =\n | { code: 'DIRECT_TRANSFER_ERROR'; meta?: { message?: string } }\n | { code: 'BRIDGE_SDK_FAILED' }\n | { code: 'FEES_NOT_ESTIMATED' };\n\nexport type QuoteSuccessTransferError =\n | { code: 'NO_QUOTE_FOUND' }\n | { code: 'NO_DEPOSIT_RESULT' }\n | { code: 'QUOTE_ERROR'; meta: { message: string } }\n | { code: 'TRANSFER_INVALID_INITIAL'; meta: { message: string } }\n | { code: 'EXTERNAL_TRANSFER_FAILED' }\n | { code: 'EXTERNAL_TRANSFER_REFUNDED' }\n | { code: 'EXTERNAL_TRANSFER_INCOMPLETE' };\n\nexport type QuoteSuccessError =\n | QuoteSuccessDirectTransferError\n | QuoteSuccessTransferError;\n\nexport type ErrorType =\n | InitialDryStateError\n | InitialInternalStateError\n | InitialExternalStateError\n | InputValidDryError\n | InputValidWalletError\n | QuoteSuccessError;\n\nexport const QUOTE_ERRORS: Array<\n InputValidDryError['code'] | InputValidWalletError['code']\n> = [\n 'NO_NEAR_TOKEN_FOUND',\n 'TOKEN_IS_NOT_SUPPORTED',\n 'QUOTE_FAILED',\n 'QUOTE_INVALID',\n 'QUOTE_INVALID_INITIAL',\n 'QUOTE_AMOUNT_IS_TOO_LOW',\n 'QUOTE_NO_ONE_TIME_ADDRESS',\n];\n\nexport const TRANSFER_ERRORS: Array<\n QuoteSuccessDirectTransferError['code'] | QuoteSuccessTransferError['code']\n> = [\n 'DIRECT_TRANSFER_ERROR',\n 'BRIDGE_SDK_FAILED',\n 'FEES_NOT_ESTIMATED',\n 'NO_QUOTE_FOUND',\n 'NO_DEPOSIT_RESULT',\n 'QUOTE_ERROR',\n 'TRANSFER_INVALID_INITIAL',\n 'EXTERNAL_TRANSFER_FAILED',\n 'EXTERNAL_TRANSFER_REFUNDED',\n 'EXTERNAL_TRANSFER_INCOMPLETE',\n];\n\nexport const SEND_ADDRESS_VALIDATION_ERRORS: Array<\n SendAddressValidationError['code']\n> = ['SEND_ADDRESS_IS_NOT_VERIFIED', 'SEND_ADDRESS_IS_NOT_FOUND'];\n\nexport const isQuoteError = (\n error: ErrorType,\n): error is InputValidDryError | InputValidWalletError => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return QUOTE_ERRORS.includes(error.code as any);\n};\n\nexport const isTransferError = (\n error: ErrorType,\n): error is QuoteSuccessError => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return TRANSFER_ERRORS.includes(error.code as any);\n};\n\nexport const isAsyncSendAddressValidationError = (\n error: ErrorType,\n): error is SendAddressValidationError => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return SEND_ADDRESS_VALIDATION_ERRORS.includes(error.code as any);\n};\n"],"names":["QUOTE_ERRORS","TRANSFER_ERRORS","SEND_ADDRESS_VALIDATION_ERRORS","isQuoteError","error","isTransferError","isAsyncSendAddressValidationError"],"mappings":"AA2EO,MAAMA,IAET;AAAA,EACF;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEaC,IAET;AAAA,EACF;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEaC,IAET,CAAC,gCAAgC,2BAA2B,GAEnDC,IAAe,CAC1BC,MAGOJ,EAAa,SAASI,EAAM,IAAW,GAGnCC,IAAkB,CAC7BD,MAGOH,EAAgB,SAASG,EAAM,IAAW,GAGtCE,IAAoC,CAC/CF,MAGOF,EAA+B,SAASE,EAAM,IAAW;"}
1
+ {"version":3,"file":"errors.js","sources":["../../src/machine/errors.ts"],"sourcesContent":["import type { Chains } from '@/types/chain';\n\nexport type InitialDryStateError =\n | { code: 'SOURCE_TOKEN_IS_EMPTY' }\n | { code: 'TARGET_TOKEN_IS_EMPTY' }\n | { code: 'SOURCE_TOKEN_AMOUNT_IS_EMPTY' }\n | { code: 'SOURCE_BALANCE_INSUFFICIENT' };\n\nexport type InitialInternalStateError =\n | InitialDryStateError\n | { code: 'SOURCE_TOKEN_NOT_INTENT' }\n | { code: 'INVALID_SOURCE_BALANCE' };\n\ntype SendAddressValidationError =\n | {\n code: 'SEND_ADDRESS_IS_NOT_VERIFIED';\n meta: { address: string; chain: Chains };\n }\n | {\n code: 'SEND_ADDRESS_IS_NOT_FOUND';\n meta: { address: string; chain: Chains };\n };\n\nexport type InitialExternalStateError =\n | InitialDryStateError\n | SendAddressValidationError\n | { code: 'SOURCE_TOKEN_IS_INTENT' }\n | { code: 'INVALID_SOURCE_BALANCE' }\n | { code: 'SEND_ADDRESS_IS_EMPTY' }\n | {\n code: 'SEND_ADDRESS_IS_INVALID';\n meta: { address: string; chain: Chains };\n };\n\nexport type InputValidDryError =\n | { code: 'NO_NEAR_TOKEN_FOUND'; meta: { symbol: string } }\n | { code: 'TOKEN_IS_NOT_SUPPORTED' }\n | { code: 'QUOTE_FAILED'; meta: { message: string } }\n | { code: 'QUOTE_INVALID'; meta: { isDry: boolean } }\n | { code: 'QUOTE_INVALID_INITIAL'; meta: { isDry: boolean; message: string } }\n | {\n code: 'QUOTE_AMOUNT_IS_TOO_LOW';\n meta: { minAmount?: string };\n };\n\nexport type InputValidWalletError =\n | InputValidDryError\n | { code: 'QUOTE_NO_ONE_TIME_ADDRESS' };\n\nexport type QuoteSuccessDirectTransferError =\n | { code: 'MIN_WITHDRAWAL_AMOUNT_ERROR'; meta: { minAmount?: string } }\n | { code: 'DIRECT_TRANSFER_ERROR'; meta?: { message?: string } }\n | { code: 'BRIDGE_SDK_FAILED' }\n | { code: 'FEES_NOT_ESTIMATED' };\n\nexport type QuoteSuccessTransferError =\n | { code: 'NO_QUOTE_FOUND' }\n | { code: 'NO_DEPOSIT_RESULT' }\n | { code: 'QUOTE_ERROR'; meta: { message: string } }\n | { code: 'TRANSFER_INVALID_INITIAL'; meta: { message: string } }\n | { code: 'EXTERNAL_TRANSFER_FAILED' }\n | { code: 'EXTERNAL_TRANSFER_REFUNDED' }\n | { code: 'EXTERNAL_TRANSFER_INCOMPLETE' };\n\nexport type QuoteSuccessError =\n | QuoteSuccessDirectTransferError\n | QuoteSuccessTransferError;\n\nexport type ErrorType =\n | InitialDryStateError\n | InitialInternalStateError\n | InitialExternalStateError\n | InputValidDryError\n | InputValidWalletError\n | QuoteSuccessError;\n\nexport const QUOTE_ERRORS: Array<\n InputValidDryError['code'] | InputValidWalletError['code']\n> = [\n 'NO_NEAR_TOKEN_FOUND',\n 'TOKEN_IS_NOT_SUPPORTED',\n 'QUOTE_FAILED',\n 'QUOTE_INVALID',\n 'QUOTE_INVALID_INITIAL',\n 'QUOTE_AMOUNT_IS_TOO_LOW',\n 'QUOTE_NO_ONE_TIME_ADDRESS',\n];\n\nexport const TRANSFER_ERRORS: Array<\n QuoteSuccessDirectTransferError['code'] | QuoteSuccessTransferError['code']\n> = [\n 'DIRECT_TRANSFER_ERROR',\n 'BRIDGE_SDK_FAILED',\n 'FEES_NOT_ESTIMATED',\n 'NO_QUOTE_FOUND',\n 'NO_DEPOSIT_RESULT',\n 'QUOTE_ERROR',\n 'TRANSFER_INVALID_INITIAL',\n 'EXTERNAL_TRANSFER_FAILED',\n 'EXTERNAL_TRANSFER_REFUNDED',\n 'EXTERNAL_TRANSFER_INCOMPLETE',\n];\n\nexport const SEND_ADDRESS_VALIDATION_ERRORS: Array<\n SendAddressValidationError['code']\n> = ['SEND_ADDRESS_IS_NOT_VERIFIED', 'SEND_ADDRESS_IS_NOT_FOUND'];\n\nexport const isQuoteError = (\n error: ErrorType,\n): error is InputValidDryError | InputValidWalletError => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return QUOTE_ERRORS.includes(error.code as any);\n};\n\nexport const isTransferError = (\n error: ErrorType,\n): error is QuoteSuccessError => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return TRANSFER_ERRORS.includes(error.code as any);\n};\n\nexport const isAsyncSendAddressValidationError = (\n error: ErrorType,\n): error is SendAddressValidationError => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return SEND_ADDRESS_VALIDATION_ERRORS.includes(error.code as any);\n};\n"],"names":["QUOTE_ERRORS","TRANSFER_ERRORS","SEND_ADDRESS_VALIDATION_ERRORS","isQuoteError","error","isTransferError","isAsyncSendAddressValidationError"],"mappings":"AA4EO,MAAMA,IAET;AAAA,EACF;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEaC,IAET;AAAA,EACF;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEaC,IAET,CAAC,gCAAgC,2BAA2B,GAEnDC,IAAe,CAC1BC,MAGOJ,EAAa,SAASI,EAAM,IAAW,GAGnCC,IAAkB,CAC7BD,MAGOH,EAAgB,SAASG,EAAM,IAAW,GAGtCE,IAAoC,CAC/CF,MAGOF,EAA+B,SAASE,EAAM,IAAW;"}
@@ -3,7 +3,7 @@ import "./tokenSelectRotate.js";
3
3
  import "./errorSet.js";
4
4
  import "./quoteSet.js";
5
5
  import "./addressSet.js";
6
- import { _ as b } from "../../config-CG-NCoEP.js";
6
+ import { _ as b } from "../../config-QBojKcju.js";
7
7
  import "./tokenSetAmount.js";
8
8
  import "./quoteSetStatus.js";
9
9
  import "./depositTypeSet.js";
@@ -1,6 +1,6 @@
1
1
  import "valtio";
2
2
  import "./tokenSelectRotate.js";
3
- import { Z as p } from "../../config-CG-NCoEP.js";
3
+ import { Z as p } from "../../config-QBojKcju.js";
4
4
  import "../../utils/notReachable.js";
5
5
  export {
6
6
  p as tokenSelect
@@ -1,4 +1,4 @@
1
- import { O as m } from "../../config-CG-NCoEP.js";
1
+ import { O as m } from "../../config-QBojKcju.js";
2
2
  import "ethers";
3
3
  import "../machine.js";
4
4
  import "../guards/checks/isDryQuote.js";
@@ -3,7 +3,7 @@ import "../../utils/near/checkNearAccountExists.js";
3
3
  import "../../utils/checkers/isNotEmptyAmount.js";
4
4
  import "../../utils/checkers/isValidBigint.js";
5
5
  import "../../utils/near/isNearAddress.js";
6
- import { K as I, L as d, N as u } from "../../config-CG-NCoEP.js";
6
+ import { K as I, L as d, N as u } from "../../config-QBojKcju.js";
7
7
  import "../guards/index.js";
8
8
  import "../machine.js";
9
9
  import "../guards/checks/isBalanceSufficient.js";
@@ -1,4 +1,4 @@
1
- import { r as o, u as t, a as r, c as a, b as f } from "../config-CG-NCoEP.js";
1
+ import { r as o, u as t, a as r, c as a, b as f } from "../config-QBojKcju.js";
2
2
  import { guardStates as S } from "./guards/index.js";
3
3
  import { machine as n, moveTo as u } from "./machine.js";
4
4
  import { fireEvent as i } from "./events/utils/fireEvent.js";
@@ -392,6 +392,11 @@ export declare const useUnsafeSnapshot: () => {
392
392
  readonly isDepositFromExternalWallet: boolean;
393
393
  readonly externalDepositTxReceived?: never | undefined;
394
394
  readonly error: {
395
+ readonly code: "MIN_WITHDRAWAL_AMOUNT_ERROR";
396
+ readonly meta: {
397
+ readonly minAmount?: string | undefined;
398
+ };
399
+ } | {
395
400
  readonly code: "DIRECT_TRANSFER_ERROR";
396
401
  readonly meta?: {
397
402
  readonly message?: string | undefined;
@@ -473,6 +478,11 @@ export declare const useUnsafeSnapshot: () => {
473
478
  readonly isDepositFromExternalWallet: boolean;
474
479
  readonly externalDepositTxReceived?: never | undefined;
475
480
  readonly error: {
481
+ readonly code: "MIN_WITHDRAWAL_AMOUNT_ERROR";
482
+ readonly meta: {
483
+ readonly minAmount?: string | undefined;
484
+ };
485
+ } | {
476
486
  readonly code: "DIRECT_TRANSFER_ERROR";
477
487
  readonly meta?: {
478
488
  readonly message?: string | undefined;
@@ -558,6 +568,11 @@ export declare const useUnsafeSnapshot: () => {
558
568
  readonly isDepositFromExternalWallet: boolean;
559
569
  readonly externalDepositTxReceived: boolean | undefined;
560
570
  readonly error: {
571
+ readonly code: "MIN_WITHDRAWAL_AMOUNT_ERROR";
572
+ readonly meta: {
573
+ readonly minAmount?: string | undefined;
574
+ };
575
+ } | {
561
576
  readonly code: "DIRECT_TRANSFER_ERROR";
562
577
  readonly meta?: {
563
578
  readonly message?: string | undefined;
@@ -2,7 +2,7 @@ import "valtio";
2
2
  import "derive-valtio";
3
3
  import "./computed/getIsNativeNearDeposit.js";
4
4
  import "./computed/getIsDirectTokenOnNearDeposit.js";
5
- import { u as h, a as b, b as d } from "../config-CG-NCoEP.js";
5
+ import { u as h, a as b, b as d } from "../config-QBojKcju.js";
6
6
  import "./machine.js";
7
7
  import "./guards/index.js";
8
8
  import "./computed/getUsdTradeDelta.js";
@@ -1,5 +1,5 @@
1
1
  import "valtio";
2
- import { V as o } from "../../../config-CG-NCoEP.js";
2
+ import { V as o } from "../../../config-QBojKcju.js";
3
3
  export {
4
4
  o as isSendAddressAsConnected
5
5
  };
@@ -5,7 +5,7 @@ import "./checkers/isOnlyErrorChanged.js";
5
5
  import "./checkers/isValidInitialState.js";
6
6
  import "./checkers/isWalletDisconnected.js";
7
7
  import "./checkers/isSendAddressForbidden.js";
8
- import { X as g, Y as u } from "../../config-CG-NCoEP.js";
8
+ import { X as g, Y as u } from "../../config-QBojKcju.js";
9
9
  import "./checkers/isAmountChangedFromQuote.js";
10
10
  import "ethers";
11
11
  import "../machine.js";
@@ -2,7 +2,7 @@ import "react/jsx-runtime";
2
2
  import "browser-or-node";
3
3
  import "react";
4
4
  import "./createColorPalette.js";
5
- import { C as p, ae as a } from "../config-CG-NCoEP.js";
5
+ import { C as p, ae as a } from "../config-QBojKcju.js";
6
6
  export {
7
7
  p as ThemeContext,
8
8
  a as ThemeProvider
@@ -1,6 +1,6 @@
1
1
  import "../../../index-DEq3oXQF.js";
2
2
  import "@defuse-protocol/bridge-sdk";
3
- import { a2 as o } from "../../../config-CG-NCoEP.js";
3
+ import { a2 as o } from "../../../config-QBojKcju.js";
4
4
  export {
5
5
  o as createNearWalletSigner
6
6
  };
@@ -1,5 +1,5 @@
1
1
  import "@defuse-protocol/internal-utils";
2
- import { a1 as i } from "../../../config-CG-NCoEP.js";
2
+ import { a1 as i } from "../../../config-QBojKcju.js";
3
3
  export {
4
4
  i as IntentSignerPrivy
5
5
  };
@@ -1,11 +1,11 @@
1
- type LocalStorage = {
1
+ export type LocalStorage = {
2
2
  verifiedWallets: string[];
3
3
  verifiedNearAccounts: string[];
4
4
  nearWalletsPk: Record<string, string>;
5
5
  };
6
+ export declare const defaultValues: LocalStorage;
6
7
  export declare const localStorageTyped: {
7
8
  getItem: <T extends keyof LocalStorage>(key: T) => LocalStorage[T];
8
9
  setItem: <T extends keyof LocalStorage>(key: T, value: LocalStorage[T]) => void;
9
10
  removeItem: (key: keyof LocalStorage) => void;
10
11
  };
11
- export {};
@@ -57,6 +57,7 @@ const a = {
57
57
  removeItem: g
58
58
  };
59
59
  export {
60
+ a as defaultValues,
60
61
  p as localStorageTyped
61
62
  };
62
63
  //# sourceMappingURL=localstorage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"localstorage.js","sources":["../../src/utils/localstorage.ts"],"sourcesContent":["import { logger } from '@/logger';\n\ntype LocalStorage = {\n verifiedWallets: string[];\n verifiedNearAccounts: string[];\n nearWalletsPk: Record<string, string>;\n};\n\nconst defaultValues: LocalStorage = {\n verifiedWallets: [],\n verifiedNearAccounts: [],\n nearWalletsPk: {},\n};\n\nconst isBrowser = typeof window !== 'undefined' && !!window.localStorage;\n\nconst KEY_PREFIX = 'sw';\nconst getStorageKey = (key: string) => `${KEY_PREFIX}.${key}`;\n\nconst getItem = <T extends keyof LocalStorage>(key: T): LocalStorage[T] => {\n if (!isBrowser) {\n if (process.env.NODE_ENV === 'development') {\n logger.debug(\n `[WIDGET] Attempted to read ${getStorageKey(key)} from localstorage on server; returning default`,\n );\n }\n\n return defaultValues[key];\n }\n\n try {\n const storedValueLegacy = window.localStorage.getItem(key);\n let storedValue = window.localStorage.getItem(getStorageKey(key));\n\n // Migrate legacy key to new namespaced key\n if (storedValueLegacy && !storedValue) {\n storedValue = storedValueLegacy;\n window.localStorage.setItem(getStorageKey(key), storedValueLegacy);\n window.localStorage.removeItem(key);\n }\n\n return (\n // @ts-expect-error It's ok to pass null to JSON.parse\n (JSON.parse(storedValue) as LocalStorage[T]) ?? defaultValues[key]\n );\n } catch (error) {\n logger.warn(\n `[WIDGET] Failed to parse ${getStorageKey(key)} from localStorage:`,\n error,\n );\n\n return defaultValues[key];\n }\n};\n\nconst setItem = <T extends keyof LocalStorage>(\n key: T,\n value: LocalStorage[T],\n) => {\n if (!isBrowser) {\n if (process.env.NODE_ENV === 'development') {\n logger.debug(\n `[WIDGET] Attempted to set ${getStorageKey(key)} on server; skipping`,\n );\n }\n\n return;\n }\n\n try {\n const serialized =\n typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean'\n ? String(value)\n : JSON.stringify(value);\n\n window.localStorage.setItem(getStorageKey(key), serialized);\n } catch (error) {\n logger.warn(\n `[WIDGET] Failed to set ${getStorageKey(key)} in localStorage:`,\n error,\n );\n }\n};\n\nconst removeItem = (key: keyof LocalStorage) => {\n if (!isBrowser) {\n if (process.env.NODE_ENV === 'development') {\n logger.debug(\n `[WIDGET] Attempted to remove ${getStorageKey(key)} from localstorage on server; skipping`,\n );\n }\n\n return;\n }\n\n try {\n window.localStorage.removeItem(getStorageKey(key));\n } catch (error) {\n logger.warn(\n `[WIDGET] Failed to remove ${getStorageKey(key)} from localStorage:`,\n error,\n );\n }\n};\n\nexport const localStorageTyped = {\n getItem,\n setItem,\n removeItem,\n};\n"],"names":["defaultValues","isBrowser","KEY_PREFIX","getStorageKey","key","getItem","process","logger","storedValueLegacy","storedValue","error","setItem","value","serialized","removeItem","localStorageTyped"],"mappings":";;AAQA,MAAMA,IAA8B;AAAA,EAClC,iBAAiB,CAAA;AAAA,EACjB,sBAAsB,CAAA;AAAA,EACtB,eAAe,CAAA;AACjB,GAEMC,IAAY,OAAO,SAAW,OAAe,CAAC,CAAC,OAAO,cAEtDC,IAAa,MACbC,IAAgB,CAACC,MAAgB,GAAGF,CAAU,IAAIE,CAAG,IAErDC,IAAU,CAA+BD,MAA4B;AACzE,MAAI,CAACH;AACH,WAAIK,EAAQ,IAAI,aAAa,iBAC3BC,EAAO;AAAA,MACL,8BAA8BJ,EAAcC,CAAG,CAAC;AAAA,IAAA,GAI7CJ,EAAcI,CAAG;AAG1B,MAAI;AACF,UAAMI,IAAoB,OAAO,aAAa,QAAQJ,CAAG;AACzD,QAAIK,IAAc,OAAO,aAAa,QAAQN,EAAcC,CAAG,CAAC;AAGhE,WAAII,KAAqB,CAACC,MACxBA,IAAcD,GACd,OAAO,aAAa,QAAQL,EAAcC,CAAG,GAAGI,CAAiB,GACjE,OAAO,aAAa,WAAWJ,CAAG;AAAA,IAKjC,KAAK,MAAMK,CAAW,KAAyBT,EAAcI,CAAG;AAAA,EAErE,SAASM,GAAO;AACd,WAAAH,EAAO;AAAA,MACL,4BAA4BJ,EAAcC,CAAG,CAAC;AAAA,MAC9CM;AAAA,IAAA,GAGKV,EAAcI,CAAG;AAAA,EAC1B;AACF,GAEMO,IAAU,CACdP,GACAQ,MACG;AACH,MAAI,CAACX,GAAW;AACd,IAAIK,EAAQ,IAAI,aAAa,iBAC3BC,EAAO;AAAA,MACL,6BAA6BJ,EAAcC,CAAG,CAAC;AAAA,IAAA;AAInD;AAAA,EACF;AAEA,MAAI;AACF,UAAMS,IACJ,OAAOD,KAAU,YACjB,OAAOA,KAAU,YACjB,OAAOA,KAAU,YACb,OAAOA,CAAK,IACZ,KAAK,UAAUA,CAAK;AAE1B,WAAO,aAAa,QAAQT,EAAcC,CAAG,GAAGS,CAAU;AAAA,EAC5D,SAASH,GAAO;AACd,IAAAH,EAAO;AAAA,MACL,0BAA0BJ,EAAcC,CAAG,CAAC;AAAA,MAC5CM;AAAA,IAAA;AAAA,EAEJ;AACF,GAEMI,IAAa,CAACV,MAA4B;AAC9C,MAAI,CAACH,GAAW;AACd,IAAIK,EAAQ,IAAI,aAAa,iBAC3BC,EAAO;AAAA,MACL,gCAAgCJ,EAAcC,CAAG,CAAC;AAAA,IAAA;AAItD;AAAA,EACF;AAEA,MAAI;AACF,WAAO,aAAa,WAAWD,EAAcC,CAAG,CAAC;AAAA,EACnD,SAASM,GAAO;AACd,IAAAH,EAAO;AAAA,MACL,6BAA6BJ,EAAcC,CAAG,CAAC;AAAA,MAC/CM;AAAA,IAAA;AAAA,EAEJ;AACF,GAEaK,IAAoB;AAAA,EAC/B,SAAAV;AAAA,EACA,SAAAM;AAAA,EACA,YAAAG;AACF;"}
1
+ {"version":3,"file":"localstorage.js","sources":["../../src/utils/localstorage.ts"],"sourcesContent":["import { logger } from '@/logger';\n\nexport type LocalStorage = {\n verifiedWallets: string[];\n verifiedNearAccounts: string[];\n nearWalletsPk: Record<string, string>;\n};\n\nexport const defaultValues: LocalStorage = {\n verifiedWallets: [],\n verifiedNearAccounts: [],\n nearWalletsPk: {},\n};\n\nconst isBrowser = typeof window !== 'undefined' && !!window.localStorage;\n\nconst KEY_PREFIX = 'sw';\nconst getStorageKey = (key: string) => `${KEY_PREFIX}.${key}`;\n\nconst getItem = <T extends keyof LocalStorage>(key: T): LocalStorage[T] => {\n if (!isBrowser) {\n if (process.env.NODE_ENV === 'development') {\n logger.debug(\n `[WIDGET] Attempted to read ${getStorageKey(key)} from localstorage on server; returning default`,\n );\n }\n\n return defaultValues[key];\n }\n\n try {\n const storedValueLegacy = window.localStorage.getItem(key);\n let storedValue = window.localStorage.getItem(getStorageKey(key));\n\n // Migrate legacy key to new namespaced key\n if (storedValueLegacy && !storedValue) {\n storedValue = storedValueLegacy;\n window.localStorage.setItem(getStorageKey(key), storedValueLegacy);\n window.localStorage.removeItem(key);\n }\n\n return (\n // @ts-expect-error It's ok to pass null to JSON.parse\n (JSON.parse(storedValue) as LocalStorage[T]) ?? defaultValues[key]\n );\n } catch (error) {\n logger.warn(\n `[WIDGET] Failed to parse ${getStorageKey(key)} from localStorage:`,\n error,\n );\n\n return defaultValues[key];\n }\n};\n\nconst setItem = <T extends keyof LocalStorage>(\n key: T,\n value: LocalStorage[T],\n) => {\n if (!isBrowser) {\n if (process.env.NODE_ENV === 'development') {\n logger.debug(\n `[WIDGET] Attempted to set ${getStorageKey(key)} on server; skipping`,\n );\n }\n\n return;\n }\n\n try {\n const serialized =\n typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean'\n ? String(value)\n : JSON.stringify(value);\n\n window.localStorage.setItem(getStorageKey(key), serialized);\n } catch (error) {\n logger.warn(\n `[WIDGET] Failed to set ${getStorageKey(key)} in localStorage:`,\n error,\n );\n }\n};\n\nconst removeItem = (key: keyof LocalStorage) => {\n if (!isBrowser) {\n if (process.env.NODE_ENV === 'development') {\n logger.debug(\n `[WIDGET] Attempted to remove ${getStorageKey(key)} from localstorage on server; skipping`,\n );\n }\n\n return;\n }\n\n try {\n window.localStorage.removeItem(getStorageKey(key));\n } catch (error) {\n logger.warn(\n `[WIDGET] Failed to remove ${getStorageKey(key)} from localStorage:`,\n error,\n );\n }\n};\n\nexport const localStorageTyped = {\n getItem,\n setItem,\n removeItem,\n};\n"],"names":["defaultValues","isBrowser","KEY_PREFIX","getStorageKey","key","getItem","process","logger","storedValueLegacy","storedValue","error","setItem","value","serialized","removeItem","localStorageTyped"],"mappings":";;AAQO,MAAMA,IAA8B;AAAA,EACzC,iBAAiB,CAAA;AAAA,EACjB,sBAAsB,CAAA;AAAA,EACtB,eAAe,CAAA;AACjB,GAEMC,IAAY,OAAO,SAAW,OAAe,CAAC,CAAC,OAAO,cAEtDC,IAAa,MACbC,IAAgB,CAACC,MAAgB,GAAGF,CAAU,IAAIE,CAAG,IAErDC,IAAU,CAA+BD,MAA4B;AACzE,MAAI,CAACH;AACH,WAAIK,EAAQ,IAAI,aAAa,iBAC3BC,EAAO;AAAA,MACL,8BAA8BJ,EAAcC,CAAG,CAAC;AAAA,IAAA,GAI7CJ,EAAcI,CAAG;AAG1B,MAAI;AACF,UAAMI,IAAoB,OAAO,aAAa,QAAQJ,CAAG;AACzD,QAAIK,IAAc,OAAO,aAAa,QAAQN,EAAcC,CAAG,CAAC;AAGhE,WAAII,KAAqB,CAACC,MACxBA,IAAcD,GACd,OAAO,aAAa,QAAQL,EAAcC,CAAG,GAAGI,CAAiB,GACjE,OAAO,aAAa,WAAWJ,CAAG;AAAA,IAKjC,KAAK,MAAMK,CAAW,KAAyBT,EAAcI,CAAG;AAAA,EAErE,SAASM,GAAO;AACd,WAAAH,EAAO;AAAA,MACL,4BAA4BJ,EAAcC,CAAG,CAAC;AAAA,MAC9CM;AAAA,IAAA,GAGKV,EAAcI,CAAG;AAAA,EAC1B;AACF,GAEMO,IAAU,CACdP,GACAQ,MACG;AACH,MAAI,CAACX,GAAW;AACd,IAAIK,EAAQ,IAAI,aAAa,iBAC3BC,EAAO;AAAA,MACL,6BAA6BJ,EAAcC,CAAG,CAAC;AAAA,IAAA;AAInD;AAAA,EACF;AAEA,MAAI;AACF,UAAMS,IACJ,OAAOD,KAAU,YACjB,OAAOA,KAAU,YACjB,OAAOA,KAAU,YACb,OAAOA,CAAK,IACZ,KAAK,UAAUA,CAAK;AAE1B,WAAO,aAAa,QAAQT,EAAcC,CAAG,GAAGS,CAAU;AAAA,EAC5D,SAASH,GAAO;AACd,IAAAH,EAAO;AAAA,MACL,0BAA0BJ,EAAcC,CAAG,CAAC;AAAA,MAC5CM;AAAA,IAAA;AAAA,EAEJ;AACF,GAEMI,IAAa,CAACV,MAA4B;AAC9C,MAAI,CAACH,GAAW;AACd,IAAIK,EAAQ,IAAI,aAAa,iBAC3BC,EAAO;AAAA,MACL,gCAAgCJ,EAAcC,CAAG,CAAC;AAAA,IAAA;AAItD;AAAA,EACF;AAEA,MAAI;AACF,WAAO,aAAa,WAAWD,EAAcC,CAAG,CAAC;AAAA,EACnD,SAASM,GAAO;AACd,IAAAH,EAAO;AAAA,MACL,6BAA6BJ,EAAcC,CAAG,CAAC;AAAA,MAC/CM;AAAA,IAAA;AAAA,EAEJ;AACF,GAEaK,IAAoB;AAAA,EAC/B,SAAAV;AAAA,EACA,SAAAM;AAAA,EACA,YAAAG;AACF;"}
@@ -2,7 +2,7 @@ import "../../index-DEq3oXQF.js";
2
2
  import "zod";
3
3
  import "./decodeQueryResult.js";
4
4
  import "./rpc.js";
5
- import { $ as m } from "../../config-CG-NCoEP.js";
5
+ import { $ as m } from "../../config-QBojKcju.js";
6
6
  export {
7
7
  m as getNearNep141StorageBalance
8
8
  };
@@ -3,7 +3,7 @@ import { useState as y, useEffect as l, useCallback as B } from "react";
3
3
  import { useTokenModal as R } from "../../hooks/useTokenModal.js";
4
4
  import { useTypedTranslation as A } from "../../localisation.js";
5
5
  import { WidgetDepositSkeleton as b } from "./WidgetDepositSkeleton.js";
6
- import { b as F, u as q, y as N, n as j, c as O, p as Q, o as U, S as K } from "../../config-CG-NCoEP.js";
6
+ import { b as F, u as q, y as N, n as j, c as O, p as Q, o as U, S as K } from "../../config-QBojKcju.js";
7
7
  import "@tanstack/react-query";
8
8
  import "@headlessui/react";
9
9
  import "framer-motion";
@@ -1,7 +1,7 @@
1
1
  import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
2
  import a from "clsx";
3
3
  import { SkeletonBox as s } from "../../components/SkeletonBox.js";
4
- import { y as i } from "../../config-CG-NCoEP.js";
4
+ import { y as i } from "../../config-QBojKcju.js";
5
5
  const p = () => {
6
6
  const { hideTokenInputHeadings: l } = i();
7
7
  return /* @__PURE__ */ o("div", { className: "w-full gap-sw-xl relative flex flex-col", children: [
@@ -3,7 +3,7 @@ import { useState as b, useEffect as y } from "react";
3
3
  import { useTokenModal as R } from "../../hooks/useTokenModal.js";
4
4
  import { WidgetSwapSkeleton as S } from "./WidgetSwapSkeleton.js";
5
5
  import { useTypedTranslation as D } from "../../localisation.js";
6
- import { b as N, u as O, y as Q, n as j, c as q, p as w, o as F, S as U } from "../../config-CG-NCoEP.js";
6
+ import { b as N, u as O, y as Q, n as j, c as q, p as w, o as F, S as U } from "../../config-QBojKcju.js";
7
7
  import "@tanstack/react-query";
8
8
  import "@headlessui/react";
9
9
  import "framer-motion";
@@ -1,7 +1,7 @@
1
1
  import { jsxs as a, jsx as l } from "react/jsx-runtime";
2
2
  import o from "clsx";
3
3
  import { SkeletonBox as s } from "../../components/SkeletonBox.js";
4
- import { y as i } from "../../config-CG-NCoEP.js";
4
+ import { y as i } from "../../config-QBojKcju.js";
5
5
  const m = () => {
6
6
  const { hideTokenInputHeadings: e } = i();
7
7
  return /* @__PURE__ */ a("div", { className: "w-full gap-sw-lg relative flex flex-col", children: [
@@ -3,7 +3,7 @@ import { useState as w, useEffect as b } from "react";
3
3
  import { useTokenModal as B } from "../../hooks/useTokenModal.js";
4
4
  import { WidgetWithdrawSkeleton as y } from "./WidgetWithdrawSkeleton.js";
5
5
  import { useTypedTranslation as D } from "../../localisation.js";
6
- import { b as N, u as O, y as Q, n as j, c as q, p as S, o as F, S as U } from "../../config-CG-NCoEP.js";
6
+ import { b as N, u as O, y as Q, n as j, c as q, p as S, o as F, S as U } from "../../config-QBojKcju.js";
7
7
  import "@tanstack/react-query";
8
8
  import "@headlessui/react";
9
9
  import "framer-motion";
@@ -1,7 +1,7 @@
1
1
  import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
2
  import o from "clsx";
3
3
  import { SkeletonBox as l } from "../../components/SkeletonBox.js";
4
- import { y as x } from "../../config-CG-NCoEP.js";
4
+ import { y as x } from "../../config-QBojKcju.js";
5
5
  const p = () => {
6
6
  const { hideTokenInputHeadings: s } = x();
7
7
  return /* @__PURE__ */ a("div", { className: "w-full gap-sw-xl relative flex flex-col", children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aurora-is-near/intents-swap-widget",
3
- "version": "3.14.0-redesign.9",
3
+ "version": "3.14.1",
4
4
  "description": "Provides components and hooks to build your own Intents swap widget",
5
5
  "author": "Maksim Vashchuk",
6
6
  "license": "MIT",
@@ -60,8 +60,8 @@
60
60
  "@defuse-protocol/one-click-sdk-typescript": "^0.1.5",
61
61
  "@headlessui/react": "^2.2.4",
62
62
  "@hot-labs/near-connect": "^0.6.8",
63
- "@material-symbols-svg/react": "^0.1.14",
64
- "@material-symbols-svg/react-rounded": "^0.1.14",
63
+ "@material-symbols-svg/react": "^0.1.19",
64
+ "@material-symbols-svg/react-rounded": "^0.1.19",
65
65
  "@radix-ui/react-icons": "^1.3.2",
66
66
  "@tanstack/react-query": "^5.85.5",
67
67
  "@ton/core": "^0.62.0",
@@ -62,7 +62,7 @@ export const ChainsDropdown = ({
62
62
  <Icon
63
63
  radius={10}
64
64
  icon={appIcon}
65
- label={`${appName} account`}
65
+ label={appName}
66
66
  />
67
67
  ) : null;
68
68
  default:
@@ -27,6 +27,7 @@ export const DepositMethodSwitcher = ({ children, className }: Props) => {
27
27
  <Button
28
28
  size="md"
29
29
  icon={Icons.Wallet2}
30
+ state={ctx.isDepositFromExternalWallet ? 'default' : 'active'}
30
31
  variant={ctx.isDepositFromExternalWallet ? 'outlined' : 'primary'}
31
32
  onClick={() => onToggle(false)}>
32
33
  My wallet
@@ -34,6 +35,7 @@ export const DepositMethodSwitcher = ({ children, className }: Props) => {
34
35
  <Button
35
36
  size="md"
36
37
  icon={Icons.QrCode}
38
+ state={ctx.isDepositFromExternalWallet ? 'active' : 'default'}
37
39
  variant={ctx.isDepositFromExternalWallet ? 'primary' : 'outlined'}
38
40
  onClick={() => onToggle(true)}>
39
41
  QR / Address
@@ -75,7 +75,10 @@ const useGetErrorButton = (ctx: Context) => {
75
75
  );
76
76
  }
77
77
 
78
- if (ctx.error?.code === 'QUOTE_AMOUNT_IS_TOO_LOW') {
78
+ if (
79
+ ctx.error?.code === 'QUOTE_AMOUNT_IS_TOO_LOW' ||
80
+ ctx.error?.code === 'MIN_WITHDRAWAL_AMOUNT_ERROR'
81
+ ) {
79
82
  return (
80
83
  <div className="gap-sw-md flex flex-col">
81
84
  <Button state="error" {...commonBtnProps}>
@@ -77,7 +77,7 @@ export const TokensList = ({
77
77
 
78
78
  const tokensBySection = useMemo(
79
79
  () => [
80
- { label: `${appName} account`, tokens: filteredTokens.intents },
80
+ { label: appName, tokens: filteredTokens.intents },
81
81
  {
82
82
  label: chainIsNotSupported ? null : 'Connected wallet',
83
83
  tokens: filteredTokens.wallet,