@aurora-is-near/intents-swap-widget 3.17.0 → 3.17.2

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 (131) hide show
  1. package/dist/components/Input.d.ts +8 -2
  2. package/dist/components/Input.js +88 -84
  3. package/dist/components/Input.js.map +1 -1
  4. package/dist/{config-BMe2x51b.js → config-BVaLnxO9.js} +804 -788
  5. package/dist/config-BVaLnxO9.js.map +1 -0
  6. package/dist/config.js +6 -5
  7. package/dist/config.js.map +1 -1
  8. package/dist/errors.js +1 -1
  9. package/dist/ext/alchemy/index.js +1 -1
  10. package/dist/ext/index.js +1 -1
  11. package/dist/features/BalanceRpcLoader/TokenBalanceLoader.js +1 -1
  12. package/dist/features/BalanceRpcLoader/index.js +1 -1
  13. package/dist/features/BalanceRpcLoader/useTokenBalanceRpc.js +1 -1
  14. package/dist/features/ChainsDropdown/index.js +1 -1
  15. package/dist/features/DepositMethodSwitcher.js +1 -1
  16. package/dist/features/ErrorBoundary.js +1 -1
  17. package/dist/features/ExternalDeposit.js +5 -4
  18. package/dist/features/ExternalDeposit.js.map +1 -1
  19. package/dist/features/SendAddress/index.js +1 -1
  20. package/dist/features/SendAddress/useNotification.js +1 -1
  21. package/dist/features/SubmitButton/index.js +1 -1
  22. package/dist/features/SuccessScreen/index.js +1 -1
  23. package/dist/features/SwapDirectionSwitcher.js +1 -1
  24. package/dist/features/SwapQuote/SwapQuote.js +1 -1
  25. package/dist/features/SwapQuote/index.js +1 -1
  26. package/dist/features/TokenInput/TokenInput.js +1 -1
  27. package/dist/features/TokenInput/TokenInputEmpty.js +1 -1
  28. package/dist/features/TokenInput/TokenInputSource.js +1 -1
  29. package/dist/features/TokenInput/TokenInputTarget.js +1 -1
  30. package/dist/features/TokenInput/WalletBalance.js +1 -1
  31. package/dist/features/TokenInput/hooks/index.js +1 -1
  32. package/dist/features/TokenInput/hooks/useTokenInputBalance.js +1 -1
  33. package/dist/features/TokenInput/index.js +1 -1
  34. package/dist/features/TokensList/TokenItem.js +1 -1
  35. package/dist/features/TokensList/TokensList.js +1 -1
  36. package/dist/features/TokensList/index.js +1 -1
  37. package/dist/features/TokensModal.js +64 -55
  38. package/dist/features/TokensModal.js.map +1 -1
  39. package/dist/features/WalletCompatibilityCheck/WalletCompatibilityModal.js +3 -3
  40. package/dist/features/WalletCompatibilityCheck/index.js +1 -1
  41. package/dist/features/index.js +1 -1
  42. package/dist/hooks/index.js +1 -1
  43. package/dist/hooks/useAllTokens.js +1 -1
  44. package/dist/hooks/useChains.js +1 -1
  45. package/dist/hooks/useCompatibilityCheck.js +1 -1
  46. package/dist/hooks/useDefaultToken.js +1 -1
  47. package/dist/hooks/useExternalDepositStatus/index.js +1 -1
  48. package/dist/hooks/useExternalDepositStatus/usePoaExternalDepositStatus.js +1 -1
  49. package/dist/hooks/useHandleKeyDown.d.ts +1 -1
  50. package/dist/hooks/useHandleKeyDown.js +12 -8
  51. package/dist/hooks/useHandleKeyDown.js.map +1 -1
  52. package/dist/hooks/useIntentsBalance.js +1 -1
  53. package/dist/hooks/useIsCompatibilityCheckRequired.js +1 -1
  54. package/dist/hooks/useMakeDepositAddress.js +1 -1
  55. package/dist/hooks/useMakeIntentsTransfer.js +4 -3
  56. package/dist/hooks/useMakeIntentsTransfer.js.map +1 -1
  57. package/dist/hooks/useMakeNEARFtTransferCall.js +4 -2
  58. package/dist/hooks/useMakeNEARFtTransferCall.js.map +1 -1
  59. package/dist/hooks/useMakeQuote.js +1 -1
  60. package/dist/hooks/useMakeQuoteTransfer.js +3 -2
  61. package/dist/hooks/useMakeQuoteTransfer.js.map +1 -1
  62. package/dist/hooks/useMakeSolanaTransfer.js +1 -1
  63. package/dist/hooks/useMakeTransfer.js +1 -1
  64. package/dist/hooks/useMergedBalance.js +1 -1
  65. package/dist/hooks/useSwitchChain.js +1 -1
  66. package/dist/hooks/useTheme.js +1 -1
  67. package/dist/hooks/useTokenInputPair.js +1 -1
  68. package/dist/hooks/useTokens.js +1 -1
  69. package/dist/hooks/useTokensFiltered.js +1 -1
  70. package/dist/hooks/useTokensIntentsUnique.js +1 -1
  71. package/dist/{index-Ce9bzNHX.js → index-JGjxyZXI.js} +70 -70
  72. package/dist/index-JGjxyZXI.js.map +1 -0
  73. package/dist/index.browser.esm-COWShN0a.js.map +1 -1
  74. package/dist/index.js +1 -1
  75. package/dist/machine/effects/index.js +1 -1
  76. package/dist/machine/effects/useAlchemyBalanceEffect.js +1 -1
  77. package/dist/machine/effects/useBalancesUpdateEffect.js +1 -1
  78. package/dist/machine/effects/useMakeQuoteEffect.js +1 -1
  79. package/dist/machine/effects/useSelectedTokensEffect.js +1 -1
  80. package/dist/machine/effects/useSetTokenBalanceEffect.js +1 -1
  81. package/dist/machine/effects/useSetTokenIntentsTargetEffect.js +1 -1
  82. package/dist/machine/effects/useWalletConnEffect.js +1 -1
  83. package/dist/machine/events/index.js +1 -1
  84. package/dist/machine/events/tokenSelect.js +1 -1
  85. package/dist/machine/events/validateInputAndMoveTo.js +1 -1
  86. package/dist/machine/events/validateInputs.js +1 -1
  87. package/dist/machine/index.js +1 -1
  88. package/dist/machine/snap.js +1 -1
  89. package/dist/machine/subscriptions/checkers/isSendAddressAsConnected.js +1 -1
  90. package/dist/machine/subscriptions/index.js +1 -1
  91. package/dist/theme/ThemeProvider.js +1 -1
  92. package/dist/utils/checkers/isUserDeniedSigning.d.ts +2 -1
  93. package/dist/utils/checkers/isUserDeniedSigning.js +6 -4
  94. package/dist/utils/checkers/isUserDeniedSigning.js.map +1 -1
  95. package/dist/utils/index.d.ts +1 -0
  96. package/dist/utils/index.js +26 -24
  97. package/dist/utils/index.js.map +1 -1
  98. package/dist/utils/intents/signers/near.d.ts +1 -1
  99. package/dist/utils/intents/signers/near.js +2 -2
  100. package/dist/utils/intents/signers/privy.d.ts +1 -1
  101. package/dist/utils/intents/signers/privy.js +1 -1
  102. package/dist/utils/intents/signers/solana.d.ts +1 -1
  103. package/dist/utils/intents/signers/solana.js.map +1 -1
  104. package/dist/utils/isErrorLikeObject.d.ts +4 -0
  105. package/dist/utils/isErrorLikeObject.js +5 -0
  106. package/dist/utils/isErrorLikeObject.js.map +1 -0
  107. package/dist/utils/near/getNearNep141StorageBalance.js +1 -1
  108. package/dist/widgets/WidgetDeposit/WidgetDepositContent.js +5 -4
  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 +5 -4
  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 -4
  115. package/dist/widgets/WidgetWithdraw/WidgetWithdrawContent.js.map +1 -1
  116. package/dist/widgets/WidgetWithdraw/WidgetWithdrawSkeleton.js +1 -1
  117. package/package.json +2 -2
  118. package/src/components/Input.tsx +111 -96
  119. package/src/features/TokensModal.tsx +19 -2
  120. package/src/hooks/useHandleKeyDown.ts +25 -3
  121. package/src/hooks/useMakeIntentsTransfer.ts +40 -29
  122. package/src/hooks/useMakeNEARFtTransferCall.ts +10 -0
  123. package/src/hooks/useMakeQuoteTransfer.ts +2 -1
  124. package/src/utils/checkers/isUserDeniedSigning.ts +11 -3
  125. package/src/utils/index.ts +1 -0
  126. package/src/utils/intents/signers/near.ts +1 -1
  127. package/src/utils/intents/signers/privy.ts +1 -1
  128. package/src/utils/intents/signers/solana.ts +1 -1
  129. package/src/utils/isErrorLikeObject.ts +11 -0
  130. package/dist/config-BMe2x51b.js.map +0 -1
  131. package/dist/index-Ce9bzNHX.js.map +0 -1
@@ -9,12 +9,12 @@ import "ethers";
9
9
  import "../../utils/cn.js";
10
10
  import "@tanstack/react-query";
11
11
  import "@defuse-protocol/one-click-sdk-typescript";
12
- import { ag as F, af as G, z as H } from "../../config-BMe2x51b.js";
12
+ import { ag as F, af as G, z as H } from "../../config-BVaLnxO9.js";
13
13
  import "../../machine/machine.js";
14
14
  import "zod";
15
15
  import "../../utils/near/rpc.js";
16
16
  import "../../index-DEq3oXQF.js";
17
- import "@defuse-protocol/bridge-sdk";
17
+ import "@defuse-protocol/intents-sdk";
18
18
  import "change-case";
19
19
  import "@defuse-protocol/internal-utils";
20
20
  import "bs58";
@@ -28,7 +28,7 @@ import "lucide-react";
28
28
  import "../../components/Card.js";
29
29
  import "../../components/Button.js";
30
30
  import "copy-text-to-clipboard";
31
- import "@headlessui/react";
31
+ import "../../components/Input.js";
32
32
  import "../../components/InputAmount.js";
33
33
  import "../../components/Notes.js";
34
34
  import "../../components/CloseButton.js";
@@ -1,6 +1,6 @@
1
1
  import { jsx as s } from "react/jsx-runtime";
2
2
  import { useState as r } from "react";
3
- import { b, z as n } from "../../config-BMe2x51b.js";
3
+ import { b, z as n } from "../../config-BVaLnxO9.js";
4
4
  import "ethers";
5
5
  import "../../machine/machine.js";
6
6
  import { notReachable as l } from "../../utils/notReachable.js";
@@ -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-BMe2x51b.js";
1
+ import { B as r, S as t, o as p, p as a, T as s, q as n } from "../config-BVaLnxO9.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 n, j as u, i as f, k as l, l as m, n as k, m as p } from "../config-BMe2x51b.js";
1
+ import { e as a, d as r, f as o, g as t, h as n, j as u, i as f, k as l, l as m, n as k, m as p } from "../config-BVaLnxO9.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-BMe2x51b.js";
2
+ import { e as s } from "../config-BVaLnxO9.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-BMe2x51b.js";
2
+ import { d as p } from "../config-BVaLnxO9.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-BMe2x51b.js";
4
+ import { y, w as o } from "../config-BVaLnxO9.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 { a7 as r } from "../config-BMe2x51b.js";
2
+ import { a7 as r } from "../config-BVaLnxO9.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, A as S, v as f } from "../../config-BMe2x51b.js";
8
+ import { b as c, u as m, A as S, v as f } from "../../config-BVaLnxO9.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 { A as x } from "../../config-BMe2x51b.js";
3
+ import { A as x } from "../../config-BVaLnxO9.js";
4
4
  import "../../network.js";
5
5
  import "ethers";
6
6
  import "../../machine/machine.js";
@@ -1 +1 @@
1
- export declare const useHandleKeyDown: (key: string, onKeyPress: () => void) => void;
1
+ export declare const useHandleKeyDown: (key: "Escape" | "ArrowDown" | "ArrowUp" | "Alphanumeric", onKeyPress: (key: string) => void, deps?: unknown[]) => void;
@@ -1,13 +1,17 @@
1
- import { useEffect as d } from "react";
2
- const w = (e, o) => {
3
- d(() => {
4
- const n = (t) => {
5
- t.key === e && o();
1
+ import { useEffect as i } from "react";
2
+ const s = (e) => e.length === 1 && /^[a-z]$/i.test(e), u = (e) => e.length === 1 && /^[0-9]$/.test(e), c = (e) => s(e) || u(e), w = (e, t, o = []) => {
3
+ i(() => {
4
+ const r = (n) => {
5
+ if (e === "Alphanumeric" && c(n.key)) {
6
+ t(n.key);
7
+ return;
8
+ }
9
+ n.key === e && t(e);
6
10
  };
7
- return window.addEventListener("keydown", n), () => {
8
- window.removeEventListener("keydown", n);
11
+ return window.addEventListener("keydown", r), () => {
12
+ window.removeEventListener("keydown", r);
9
13
  };
10
- }, [e]);
14
+ }, [e, ...o]);
11
15
  };
12
16
  export {
13
17
  w as useHandleKeyDown
@@ -1 +1 @@
1
- {"version":3,"file":"useHandleKeyDown.js","sources":["../../src/hooks/useHandleKeyDown.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nexport const useHandleKeyDown = (key: string, onKeyPress: () => void) => {\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === key) {\n onKeyPress();\n }\n };\n\n window.addEventListener('keydown', handleKeyDown);\n\n return () => {\n window.removeEventListener('keydown', handleKeyDown);\n };\n }, [key]);\n};\n"],"names":["useHandleKeyDown","key","onKeyPress","useEffect","handleKeyDown","event"],"mappings":";AAEO,MAAMA,IAAmB,CAACC,GAAaC,MAA2B;AACvE,EAAAC,EAAU,MAAM;AACd,UAAMC,IAAgB,CAACC,MAAyB;AAC9C,MAAIA,EAAM,QAAQJ,KAChBC,EAAA;AAAA,IAEJ;AAEA,kBAAO,iBAAiB,WAAWE,CAAa,GAEzC,MAAM;AACX,aAAO,oBAAoB,WAAWA,CAAa;AAAA,IACrD;AAAA,EACF,GAAG,CAACH,CAAG,CAAC;AACV;"}
1
+ {"version":3,"file":"useHandleKeyDown.js","sources":["../../src/hooks/useHandleKeyDown.ts"],"sourcesContent":["import { useEffect } from 'react';\n\nconst isLetter = (key: string) => {\n return key.length === 1 && /^[a-z]$/i.test(key);\n};\n\nconst isNumber = (key: string) => {\n return key.length === 1 && /^[0-9]$/.test(key);\n};\n\nconst isAlphanumeric = (key: string) => {\n return isLetter(key) || isNumber(key);\n};\n\nexport const useHandleKeyDown = (\n key: 'Escape' | 'ArrowDown' | 'ArrowUp' | 'Alphanumeric',\n onKeyPress: (key: string) => void,\n deps: unknown[] = [],\n) => {\n useEffect(() => {\n const handleKeyDown = (event: KeyboardEvent) => {\n if (key === 'Alphanumeric' && isAlphanumeric(event.key)) {\n onKeyPress(event.key);\n\n return;\n }\n\n if (event.key === key) {\n onKeyPress(key);\n }\n };\n\n window.addEventListener('keydown', handleKeyDown);\n\n return () => {\n window.removeEventListener('keydown', handleKeyDown);\n };\n }, [key, ...deps]);\n};\n"],"names":["isLetter","key","isNumber","isAlphanumeric","useHandleKeyDown","onKeyPress","deps","useEffect","handleKeyDown","event"],"mappings":";AAEA,MAAMA,IAAW,CAACC,MACTA,EAAI,WAAW,KAAK,WAAW,KAAKA,CAAG,GAG1CC,IAAW,CAACD,MACTA,EAAI,WAAW,KAAK,UAAU,KAAKA,CAAG,GAGzCE,IAAiB,CAACF,MACfD,EAASC,CAAG,KAAKC,EAASD,CAAG,GAGzBG,IAAmB,CAC9BH,GACAI,GACAC,IAAkB,CAAA,MACf;AACH,EAAAC,EAAU,MAAM;AACd,UAAMC,IAAgB,CAACC,MAAyB;AAC9C,UAAIR,MAAQ,kBAAkBE,EAAeM,EAAM,GAAG,GAAG;AACvD,QAAAJ,EAAWI,EAAM,GAAG;AAEpB;AAAA,MACF;AAEA,MAAIA,EAAM,QAAQR,KAChBI,EAAWJ,CAAG;AAAA,IAElB;AAEA,kBAAO,iBAAiB,WAAWO,CAAa,GAEzC,MAAM;AACX,aAAO,oBAAoB,WAAWA,CAAa;AAAA,IACrD;AAAA,EACF,GAAG,CAACP,GAAK,GAAGK,CAAI,CAAC;AACnB;"}
@@ -1,6 +1,6 @@
1
1
  import "react";
2
2
  import "@tanstack/react-query";
3
- import { f } from "../config-BMe2x51b.js";
3
+ import { f } from "../config-BVaLnxO9.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-BMe2x51b.js";
1
+ import { b as s } from "../config-BVaLnxO9.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-BMe2x51b.js";
4
+ import { J as k } from "../config-BVaLnxO9.js";
5
5
  import "../machine/guards/index.js";
6
6
  import "../network.js";
7
7
  import "../utils/evm/isEvmChain.js";
@@ -1,13 +1,14 @@
1
1
  import "../index-DEq3oXQF.js";
2
- import "@defuse-protocol/bridge-sdk";
2
+ import "@defuse-protocol/intents-sdk";
3
3
  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 T } from "../config-BMe2x51b.js";
7
+ import { g as b } from "../config-BVaLnxO9.js";
8
8
  import "../constants/chains.js";
9
9
  import "../constants/intents.js";
10
10
  import "../utils/notReachable.js";
11
+ import "../utils/isErrorLikeObject.js";
11
12
  import "../utils/localstorage.js";
12
13
  import "../utils/near/queryContract.js";
13
14
  import "../utils/formatters/formatBigToHuman.js";
@@ -15,6 +16,6 @@ import "../utils/intents/getIntentsAccountId.js";
15
16
  import "../utils/formatters/getTransactionLink.js";
16
17
  import "../utils/checkers/isUserDeniedSigning.js";
17
18
  export {
18
- T as useMakeIntentsTransfer
19
+ b as useMakeIntentsTransfer
19
20
  };
20
21
  //# 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,9 +1,11 @@
1
1
  import "../utils/near/config.js";
2
- import { a0 as e } from "../config-BMe2x51b.js";
2
+ import { a0 as s } from "../config-BVaLnxO9.js";
3
3
  import "../utils/near/getNearNep141MinStorageBalance.js";
4
4
  import "../logger.js";
5
+ import "../utils/isErrorLikeObject.js";
6
+ import "../utils/checkers/isUserDeniedSigning.js";
5
7
  import "../constants/tokens.js";
6
8
  export {
7
- e as useMakeNEARFtTransferCall
9
+ s as useMakeNEARFtTransferCall
8
10
  };
9
11
  //# sourceMappingURL=useMakeNEARFtTransferCall.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMakeNEARFtTransferCall.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
1
+ {"version":3,"file":"useMakeNEARFtTransferCall.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -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-BMe2x51b.js";
6
+ import { h as M } from "../config-BVaLnxO9.js";
7
7
  import "../network.js";
8
8
  import "../machine/guards/index.js";
9
9
  import "../constants/tokens.js";
@@ -5,15 +5,16 @@ import "viem";
5
5
  import "../utils/evm/isEvmBaseToken.js";
6
6
  import "ethers";
7
7
  import "../utils/cn.js";
8
+ import "../utils/isErrorLikeObject.js";
8
9
  import "./useMakeEvmTransfer.js";
9
10
  import "../utils/evm/isEvmAddress.js";
10
11
  import "./useMakeSolanaTransfer.js";
11
- import { j as Q } from "../config-BMe2x51b.js";
12
+ import { j as T } from "../config-BVaLnxO9.js";
12
13
  import "../utils/solana/isSolanaAddress.js";
13
14
  import "../logger.js";
14
15
  import "../constants/tokens.js";
15
16
  import "../utils/checkers/isUserDeniedSigning.js";
16
17
  export {
17
- Q as useMakeQuoteTransfer
18
+ T as useMakeQuoteTransfer
18
19
  };
19
20
  //# sourceMappingURL=useMakeQuoteTransfer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMakeQuoteTransfer.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"useMakeQuoteTransfer.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
@@ -33,7 +33,7 @@ const E = ({
33
33
  transactionLink: `https://solscan.io/tx/${m}`
34
34
  };
35
35
  }
36
- const { getAssociatedTokenAddress: k, createTransferInstruction: b } = await import("../index-Ce9bzNHX.js"), l = BigInt(t.amount);
36
+ const { getAssociatedTokenAddress: k, createTransferInstruction: b } = await import("../index-JGjxyZXI.js"), l = BigInt(t.amount);
37
37
  if (l <= 0n)
38
38
  throw new Error("Transfer amount must be positive");
39
39
  const f = new c(t.tokenAddress), p = await k(
@@ -1,4 +1,4 @@
1
- import { i as s } from "../config-BMe2x51b.js";
1
+ import { i as s } from "../config-BVaLnxO9.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-BMe2x51b.js";
3
+ import { k as m } from "../config-BVaLnxO9.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-BMe2x51b.js";
3
+ import { l as c } from "../config-BVaLnxO9.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-BMe2x51b.js";
2
+ import { C as t } from "../config-BVaLnxO9.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-BMe2x51b.js";
2
+ import { b as k } from "../config-BVaLnxO9.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-BMe2x51b.js";
4
+ import { n } from "../config-BVaLnxO9.js";
5
5
  import "../constants/chains.js";
6
6
  import "../constants/tokens.js";
7
7
  import "../utils/checkers/isValidChain.js";
@@ -1,4 +1,4 @@
1
- import { m as p } from "../config-BMe2x51b.js";
1
+ import { m as p } from "../config-BVaLnxO9.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-BMe2x51b.js";
2
+ import { ac as s } from "../config-BVaLnxO9.js";
3
3
  export {
4
4
  s as useTokensIntentsUnique
5
5
  };
@@ -1,90 +1,90 @@
1
1
  import { P as o, L as n, T as z } from "./index.browser.esm-COWShN0a.js";
2
- import { a as c } from "./index-DEq3oXQF.js";
3
- const m = new o("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");
2
+ import { a as u } from "./index-DEq3oXQF.js";
3
+ const x = new o("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA");
4
4
  new o("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");
5
5
  const M = new o("ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");
6
6
  new o("So11111111111111111111111111111111111111112");
7
7
  new o("9pan9bMn5HatX4EJdBwg9VgCa7Uz5HL8N1m5D3NdXejP");
8
- const E = (e) => {
8
+ const b = (e) => {
9
9
  const r = e.decode.bind(e), s = e.encode.bind(e);
10
10
  return { decode: r, encode: s };
11
11
  };
12
- var u = {}, b;
12
+ var d = {}, E;
13
13
  function C() {
14
- if (b) return u;
15
- b = 1, Object.defineProperty(u, "__esModule", { value: !0 });
16
- function e(t) {
14
+ if (E) return d;
15
+ E = 1, Object.defineProperty(d, "__esModule", { value: !0 });
16
+ function e(i) {
17
17
  {
18
- const i = c.from(t);
19
- i.reverse();
20
- const a = i.toString("hex");
18
+ const t = u.from(i);
19
+ t.reverse();
20
+ const a = t.toString("hex");
21
21
  return a.length === 0 ? BigInt(0) : BigInt(`0x${a}`);
22
22
  }
23
23
  }
24
- u.toBigIntLE = e;
25
- function r(t) {
24
+ d.toBigIntLE = e;
25
+ function r(i) {
26
26
  {
27
- const i = t.toString("hex");
28
- return i.length === 0 ? BigInt(0) : BigInt(`0x${i}`);
27
+ const t = i.toString("hex");
28
+ return t.length === 0 ? BigInt(0) : BigInt(`0x${t}`);
29
29
  }
30
30
  }
31
- u.toBigIntBE = r;
32
- function s(t, i) {
31
+ d.toBigIntBE = r;
32
+ function s(i, t) {
33
33
  {
34
- const a = t.toString(16), f = c.from(a.padStart(i * 2, "0").slice(0, i * 2), "hex");
34
+ const a = i.toString(16), f = u.from(a.padStart(t * 2, "0").slice(0, t * 2), "hex");
35
35
  return f.reverse(), f;
36
36
  }
37
37
  }
38
- u.toBufferLE = s;
39
- function l(t, i) {
38
+ d.toBufferLE = s;
39
+ function l(i, t) {
40
40
  {
41
- const a = t.toString(16);
42
- return c.from(a.padStart(i * 2, "0").slice(0, i * 2), "hex");
41
+ const a = i.toString(16);
42
+ return u.from(a.padStart(t * 2, "0").slice(0, t * 2), "hex");
43
43
  }
44
44
  }
45
- return u.toBufferBE = l, u;
45
+ return d.toBufferBE = l, d;
46
46
  }
47
47
  var p = C();
48
- const S = (e) => (r) => {
49
- const s = n.blob(e, r), { encode: l, decode: t } = E(s), i = s;
50
- return i.decode = (a, f) => {
51
- const d = t(a, f);
52
- return p.toBigIntLE(c.from(d));
53
- }, i.encode = (a, f, d) => {
54
- const h = p.toBufferLE(a, e);
55
- return l(h, f, d);
56
- }, i;
57
- }, B = S(8), y = (e) => {
58
- const r = n.u8(e), { encode: s, decode: l } = E(r), t = r;
59
- return t.decode = (i, a) => !!l(i, a), t.encode = (i, a, f) => {
60
- const d = Number(i);
61
- return s(d, a, f);
48
+ const y = (e) => (r) => {
49
+ const s = n.blob(e, r), { encode: l, decode: i } = b(s), t = s;
50
+ return t.decode = (a, f) => {
51
+ const c = i(a, f);
52
+ return p.toBigIntLE(u.from(c));
53
+ }, t.encode = (a, f, c) => {
54
+ const m = p.toBufferLE(a, e);
55
+ return l(m, f, c);
62
56
  }, t;
63
- }, x = (e) => {
64
- const r = n.blob(32, e), { encode: s, decode: l } = E(r), t = r;
65
- return t.decode = (i, a) => {
66
- const f = l(i, a);
57
+ }, h = y(8), v = (e) => {
58
+ const r = n.u8(e), { encode: s, decode: l } = b(r), i = r;
59
+ return i.decode = (t, a) => !!l(t, a), i.encode = (t, a, f) => {
60
+ const c = Number(t);
61
+ return s(c, a, f);
62
+ }, i;
63
+ }, g = (e) => {
64
+ const r = n.blob(32, e), { encode: s, decode: l } = b(r), i = r;
65
+ return i.decode = (t, a) => {
66
+ const f = l(t, a);
67
67
  return new o(f);
68
- }, t.encode = (i, a, f) => {
69
- const d = i.toBuffer();
70
- return s(d, a, f);
71
- }, t;
68
+ }, i.encode = (t, a, f) => {
69
+ const c = t.toBuffer();
70
+ return s(c, a, f);
71
+ }, i;
72
72
  };
73
- class v extends Error {
73
+ class S extends Error {
74
74
  constructor(r) {
75
75
  super(r);
76
76
  }
77
77
  }
78
- class P extends v {
78
+ class w extends S {
79
79
  constructor() {
80
80
  super(...arguments), this.name = "TokenOwnerOffCurveError";
81
81
  }
82
82
  }
83
83
  var A;
84
84
  (function(e) {
85
- e[e.InitializeMint = 0] = "InitializeMint", e[e.InitializeAccount = 1] = "InitializeAccount", e[e.InitializeMultisig = 2] = "InitializeMultisig", e[e.Transfer = 3] = "Transfer", e[e.Approve = 4] = "Approve", e[e.Revoke = 5] = "Revoke", e[e.SetAuthority = 6] = "SetAuthority", e[e.MintTo = 7] = "MintTo", e[e.Burn = 8] = "Burn", e[e.CloseAccount = 9] = "CloseAccount", e[e.FreezeAccount = 10] = "FreezeAccount", e[e.ThawAccount = 11] = "ThawAccount", e[e.TransferChecked = 12] = "TransferChecked", e[e.ApproveChecked = 13] = "ApproveChecked", e[e.MintToChecked = 14] = "MintToChecked", e[e.BurnChecked = 15] = "BurnChecked", e[e.InitializeAccount2 = 16] = "InitializeAccount2", e[e.SyncNative = 17] = "SyncNative", e[e.InitializeAccount3 = 18] = "InitializeAccount3", e[e.InitializeMultisig2 = 19] = "InitializeMultisig2", e[e.InitializeMint2 = 20] = "InitializeMint2", e[e.GetAccountDataSize = 21] = "GetAccountDataSize", e[e.InitializeImmutableOwner = 22] = "InitializeImmutableOwner", e[e.AmountToUiAmount = 23] = "AmountToUiAmount", e[e.UiAmountToAmount = 24] = "UiAmountToAmount", e[e.InitializeMintCloseAuthority = 25] = "InitializeMintCloseAuthority", e[e.TransferFeeExtension = 26] = "TransferFeeExtension", e[e.ConfidentialTransferExtension = 27] = "ConfidentialTransferExtension", e[e.DefaultAccountStateExtension = 28] = "DefaultAccountStateExtension", e[e.Reallocate = 29] = "Reallocate", e[e.MemoTransferExtension = 30] = "MemoTransferExtension", e[e.CreateNativeMint = 31] = "CreateNativeMint", e[e.InitializeNonTransferableMint = 32] = "InitializeNonTransferableMint", e[e.InterestBearingMintExtension = 33] = "InterestBearingMintExtension", e[e.CpiGuardExtension = 34] = "CpiGuardExtension", e[e.InitializePermanentDelegate = 35] = "InitializePermanentDelegate", e[e.TransferHookExtension = 36] = "TransferHookExtension", e[e.MetadataPointerExtension = 39] = "MetadataPointerExtension", e[e.GroupPointerExtension = 40] = "GroupPointerExtension", e[e.GroupMemberPointerExtension = 41] = "GroupMemberPointerExtension", e[e.ScaledUiAmountExtension = 43] = "ScaledUiAmountExtension", e[e.PausableExtension = 44] = "PausableExtension";
85
+ e[e.InitializeMint = 0] = "InitializeMint", e[e.InitializeAccount = 1] = "InitializeAccount", e[e.InitializeMultisig = 2] = "InitializeMultisig", e[e.Transfer = 3] = "Transfer", e[e.Approve = 4] = "Approve", e[e.Revoke = 5] = "Revoke", e[e.SetAuthority = 6] = "SetAuthority", e[e.MintTo = 7] = "MintTo", e[e.Burn = 8] = "Burn", e[e.CloseAccount = 9] = "CloseAccount", e[e.FreezeAccount = 10] = "FreezeAccount", e[e.ThawAccount = 11] = "ThawAccount", e[e.TransferChecked = 12] = "TransferChecked", e[e.ApproveChecked = 13] = "ApproveChecked", e[e.MintToChecked = 14] = "MintToChecked", e[e.BurnChecked = 15] = "BurnChecked", e[e.InitializeAccount2 = 16] = "InitializeAccount2", e[e.SyncNative = 17] = "SyncNative", e[e.InitializeAccount3 = 18] = "InitializeAccount3", e[e.InitializeMultisig2 = 19] = "InitializeMultisig2", e[e.InitializeMint2 = 20] = "InitializeMint2", e[e.GetAccountDataSize = 21] = "GetAccountDataSize", e[e.InitializeImmutableOwner = 22] = "InitializeImmutableOwner", e[e.AmountToUiAmount = 23] = "AmountToUiAmount", e[e.UiAmountToAmount = 24] = "UiAmountToAmount", e[e.InitializeMintCloseAuthority = 25] = "InitializeMintCloseAuthority", e[e.TransferFeeExtension = 26] = "TransferFeeExtension", e[e.ConfidentialTransferExtension = 27] = "ConfidentialTransferExtension", e[e.DefaultAccountStateExtension = 28] = "DefaultAccountStateExtension", e[e.Reallocate = 29] = "Reallocate", e[e.MemoTransferExtension = 30] = "MemoTransferExtension", e[e.CreateNativeMint = 31] = "CreateNativeMint", e[e.InitializeNonTransferableMint = 32] = "InitializeNonTransferableMint", e[e.InterestBearingMintExtension = 33] = "InterestBearingMintExtension", e[e.CpiGuardExtension = 34] = "CpiGuardExtension", e[e.InitializePermanentDelegate = 35] = "InitializePermanentDelegate", e[e.TransferHookExtension = 36] = "TransferHookExtension", e[e.MetadataPointerExtension = 39] = "MetadataPointerExtension";
86
86
  })(A || (A = {}));
87
- function w(e, r, s) {
87
+ function L(e, r, s) {
88
88
  if (s.length) {
89
89
  e.push({ pubkey: r, isSigner: !1, isWritable: !1 });
90
90
  for (const l of s)
@@ -97,42 +97,42 @@ function w(e, r, s) {
97
97
  e.push({ pubkey: r, isSigner: !0, isWritable: !1 });
98
98
  return e;
99
99
  }
100
- const L = n.struct([
100
+ const P = n.struct([
101
101
  n.u32("mintAuthorityOption"),
102
- x("mintAuthority"),
103
- B("supply"),
102
+ g("mintAuthority"),
103
+ h("supply"),
104
104
  n.u8("decimals"),
105
- y("isInitialized"),
105
+ v("isInitialized"),
106
106
  n.u32("freezeAuthorityOption"),
107
- x("freezeAuthority")
107
+ g("freezeAuthority")
108
108
  ]);
109
- L.span;
110
- async function D(e, r, s = !1, l = m, t = M) {
109
+ P.span;
110
+ async function D(e, r, s = !1, l = x, i = M) {
111
111
  if (!s && !o.isOnCurve(r.toBuffer()))
112
- throw new P();
113
- const [i] = await o.findProgramAddress([r.toBuffer(), l.toBuffer(), e.toBuffer()], t);
114
- return i;
112
+ throw new w();
113
+ const [t] = await o.findProgramAddress([r.toBuffer(), l.toBuffer(), e.toBuffer()], i);
114
+ return t;
115
115
  }
116
- const g = n.struct([n.u8("instruction"), B("amount")]);
117
- function G(e, r, s, l, t = [], i = m) {
118
- const a = w([
116
+ const B = n.struct([n.u8("instruction"), h("amount")]);
117
+ function G(e, r, s, l, i = [], t = x) {
118
+ const a = L([
119
119
  { pubkey: e, isSigner: !1, isWritable: !0 },
120
120
  { pubkey: r, isSigner: !1, isWritable: !0 }
121
- ], s, t), f = c.alloc(g.span);
122
- return g.encode({
121
+ ], s, i), f = u.alloc(B.span);
122
+ return B.encode({
123
123
  instruction: A.Transfer,
124
124
  amount: BigInt(l)
125
- }, f), new z({ keys: a, programId: i, data: f });
125
+ }, f), new z({ keys: a, programId: t, data: f });
126
126
  }
127
127
  export {
128
128
  M as ASSOCIATED_TOKEN_PROGRAM_ID,
129
- L as MintLayout,
130
- m as TOKEN_PROGRAM_ID,
131
- v as TokenError,
129
+ P as MintLayout,
130
+ x as TOKEN_PROGRAM_ID,
131
+ S as TokenError,
132
132
  A as TokenInstruction,
133
- P as TokenOwnerOffCurveError,
133
+ w as TokenOwnerOffCurveError,
134
134
  G as createTransferInstruction,
135
135
  D as getAssociatedTokenAddress,
136
- g as transferInstructionData
136
+ B as transferInstructionData
137
137
  };
138
- //# sourceMappingURL=index-Ce9bzNHX.js.map
138
+ //# sourceMappingURL=index-JGjxyZXI.js.map