@imtbl/checkout-widgets 2.7.6-alpha.3 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/{AddTokensWidget-BtCxQDre.js → AddTokensWidget-DtCyCdCX.js} +10 -10
- package/dist/browser/{BridgeWidget-BqQopDTq.js → BridgeWidget-V490AOed.js} +21 -21
- package/dist/browser/{CommerceWidget-BK9R-_9f.js → CommerceWidget-D8RW-KTW.js} +14 -14
- package/dist/browser/{FeesBreakdown-D__BZ8Ob.js → FeesBreakdown-B1IsEEJy.js} +1 -1
- package/dist/browser/{OnRampWidget-Dc-1o5O-.js → OnRampWidget-UN81XLhi.js} +3 -3
- package/dist/browser/{SaleWidget-Dg431ujg.js → SaleWidget-B2O2s7A3.js} +10 -10
- package/dist/browser/{SpendingCapHero-CuqaDLDZ.js → SpendingCapHero-Bhf2cPGn.js} +1 -1
- package/dist/browser/{SwapWidget-BwEhCOrV.js → SwapWidget-Vk5hc51P.js} +15 -15
- package/dist/browser/{TokenImage-C0Tdpr1x.js → TokenImage-BPB-nljj.js} +1 -1
- package/dist/browser/{TopUpView-CmomVZKf.js → TopUpView-C4l8QKWg.js} +1 -1
- package/dist/browser/{WalletApproveHero-DbwKxQoK.js → WalletApproveHero-BPc46r1b.js} +7 -7
- package/dist/browser/{WalletWidget-CbYlmBoD.js → WalletWidget-BZH5TsFw.js} +3 -3
- package/dist/browser/{auto-track-CW786a-6.js → auto-track-DMycgUFp.js} +1 -1
- package/dist/browser/{index-4Mt0QsgH.js → index-BcVfHcD-.js} +1 -1
- package/dist/browser/{index-e-IfGJ6a.js → index-BkCyxESR.js} +1 -1
- package/dist/browser/{index-BiXL-IXS.js → index-CKeYlxiz.js} +42 -40
- package/dist/browser/{index-D5LoG06y.js → index-CZMC4iHl.js} +1 -1
- package/dist/browser/{index-DcGT4xg-.js → index-Cd27FvUW.js} +1 -1
- package/dist/browser/{index-DWOPOCgF.js → index-CsMW-SZE.js} +1 -1
- package/dist/browser/{index-B7uWWX7Q.js → index-DHQRQ_mw.js} +1 -1
- package/dist/browser/{index-pznR1IOV.js → index-DJxy24SN.js} +2 -2
- package/dist/browser/index.js +1 -1
- package/dist/browser/{index.umd-D-GcL5BZ.js → index.umd-BHueIPKI.js} +1 -1
- package/dist/browser/{useInterval-Dpkv8i3Z.js → useInterval-BjUysGEJ.js} +1 -1
- package/dist/types/components/CoinSelector/CoinSelector.d.ts +2 -1
- package/dist/types/components/FormComponents/SelectForm/SelectForm.d.ts +4 -3
- package/dist/types/components/FormComponents/SelectInput/SelectInput.d.ts +4 -3
- package/dist/types/components/Transactions/Transactions.d.ts +3 -1
- package/dist/types/components/WalletDrawer/ConnectWalletDrawer.d.ts +2 -1
- package/dist/types/components/WalletDrawer/DeliverToWalletDrawer.d.ts +2 -1
- package/dist/types/components/WalletDrawer/PayWithWalletDrawer.d.ts +2 -1
- package/dist/types/components/WalletDrawer/WalletDrawer.d.ts +2 -1
- package/dist/types/lib/withDefaultWidgetConfig.d.ts +11 -2
- package/dist/types/widgets/bridge/components/BridgeForm.d.ts +3 -2
- package/dist/types/widgets/bridge/components/WalletAndNetworkSelector.d.ts +4 -1
- package/dist/types/widgets/bridge/views/Bridge.d.ts +3 -2
- package/dist/types/widgets/bridge/views/WalletNetworkSelectionView.d.ts +3 -1
- package/dist/types/widgets/connect/components/WalletList.d.ts +2 -1
- package/dist/types/widgets/connect/views/ConnectWallet.d.ts +3 -2
- package/dist/types/widgets/purchase/components/PurchaseConnectWalletDrawer.d.ts +2 -1
- package/dist/types/widgets/purchase/components/PurchaseDeliverToWalletDrawer.d.ts +2 -1
- package/dist/types/widgets/purchase/components/PurchasePayWithWalletDrawer.d.ts +2 -1
- package/dist/types/widgets/purchase/views/Purchase.d.ts +3 -2
- package/dist/types/widgets/swap/components/SwapForm.d.ts +3 -2
- package/dist/types/widgets/swap/views/SwapCoins.d.ts +3 -2
- package/package.json +7 -7
- package/src/components/CoinSelector/CoinSelector.tsx +10 -3
- package/src/components/FormComponents/SelectForm/SelectForm.tsx +6 -3
- package/src/components/FormComponents/SelectInput/SelectInput.tsx +5 -3
- package/src/components/Transactions/Transactions.tsx +4 -0
- package/src/components/WalletDrawer/ConnectWalletDrawer.tsx +3 -0
- package/src/components/WalletDrawer/DeliverToWalletDrawer.tsx +3 -0
- package/src/components/WalletDrawer/PayWithWalletDrawer.tsx +3 -0
- package/src/components/WalletDrawer/WalletDrawer.tsx +4 -0
- package/src/context/view-context/test-components/ViewContextTestComponent.tsx +7 -0
- package/src/lib/withDefaultWidgetConfig.test.ts +20 -10
- package/src/lib/withDefaultWidgetConfig.ts +12 -2
- package/src/widgets/BaseWidgetRoot.ts +1 -0
- package/src/widgets/add-tokens/views/AddTokens.tsx +2 -0
- package/src/widgets/bridge/BridgeWidget.tsx +8 -2
- package/src/widgets/bridge/components/BridgeForm.tsx +5 -2
- package/src/widgets/bridge/components/WalletAndNetworkSelector.tsx +4 -2
- package/src/widgets/bridge/views/Bridge.tsx +4 -1
- package/src/widgets/bridge/views/WalletNetworkSelectionView.tsx +4 -2
- package/src/widgets/connect/ConnectWidget.tsx +1 -0
- package/src/widgets/connect/components/WalletList.tsx +4 -0
- package/src/widgets/connect/views/ConnectWallet.tsx +4 -1
- package/src/widgets/purchase/PurchaseWidget.tsx +1 -0
- package/src/widgets/purchase/components/PurchaseConnectWalletDrawer.tsx +3 -0
- package/src/widgets/purchase/components/PurchaseDeliverToWalletDrawer.tsx +3 -0
- package/src/widgets/purchase/components/PurchasePayWithWalletDrawer.tsx +3 -0
- package/src/widgets/purchase/views/Purchase.tsx +5 -0
- package/src/widgets/swap/SwapWidget.tsx +2 -0
- package/src/widgets/swap/components/SwapForm.tsx +5 -1
- package/src/widgets/swap/views/SwapCoins.tsx +4 -1
- package/src/widgets/transfer/TransferForm.tsx +2 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { bM as K, h as Contract, r as reactExports, bR as errorToString, bS as hexToText, bT as compareStr, aU as ViewContext, V as ViewActions, bU as mn, v as jsx, bV as lo, k as useTranslation, bW as TransakIframe, e as calculateCryptoToFiat, D as useAnalytics, F as EventTargetContext, bX as toPascalCase, bY as sendSaleWidgetCloseEvent, bZ as toStringifyTransactions, b_ as sendSaleSuccessEvent, b$ as sendSaleFailedEvent, c0 as sendSaleTransactionSuccessEvent, c1 as sendSalePaymentMethodEvent, c2 as sendSalePaymentTokenEvent, U as UserJourney, M as HeaderNavigation, x as jsxs, c3 as LoadingOverlay, B as Box, aF as Fragment, z as SimpleLayout, aV as useHandover, aW as HandoverTarget, q as getRemoteRive, H as Heading, c4 as HandoverDuration, aK as isPassportProvider, aZ as HandoverContent, aP as MenuItem, bj as motion, bi as listVariants, bk as listItemVariants, a5 as SharedViews, c5 as FooterLogo, c6 as StatusType, c7 as prettyFormatNumber, J as tokenValueFormat, c8 as ShimmerCircle, y as Button, S as Stack, c9 as Te, ca as abbreviateWalletAddress, cb as formatUnits, aA as Drawer, cc as Caption, aB as Divider, cd as tokenSymbolNameOverrides, ce as Re, cf as Ce, cg as M, ch as ct, a$ as isNativeToken, b0 as getTokenImageByAddress, ci as isGasFree, G as CryptoFiatContext, Z as ConnectLoaderContext, cj as eventTargetReducer, ck as initialEventTargetState, o as oo, cl as EventTargetActions, a0 as LoadingView, aQ as Y, cm as ConnectWidgetViews, a7 as ConnectWidget, m as mo, s as so, p as po, a as ao, cn as ConnectLoaderActions, b as parseUnits, a1 as CryptoFiatActions, b3 as ButtCon, A as Body, co as widgetTheme, bH as viewReducer, bI as initialViewState, t as tt, bQ as ServiceUnavailableErrorView, Y as CryptoFiatProvider } from './index-
|
|
2
|
-
import { u as useMount, T as TopUpView } from './TopUpView-
|
|
3
|
-
import { T as TokenImage } from './TokenImage-
|
|
4
|
-
import { F as Fees, B as BridgeWidget } from './BridgeWidget-
|
|
5
|
-
import OnRampWidget from './OnRampWidget-
|
|
6
|
-
import { a as SwapWidget } from './SwapWidget-
|
|
7
|
-
import { f as fetchRiskAssessmentV2, i as isSingleAddressSanctioned } from './FeesBreakdown-
|
|
8
|
-
import './WalletApproveHero-
|
|
9
|
-
import './useInterval-
|
|
10
|
-
import './SpendingCapHero-
|
|
1
|
+
import { bM as K, h as Contract, r as reactExports, bR as errorToString, bS as hexToText, bT as compareStr, aU as ViewContext, V as ViewActions, bU as mn, v as jsx, bV as lo, k as useTranslation, bW as TransakIframe, e as calculateCryptoToFiat, D as useAnalytics, F as EventTargetContext, bX as toPascalCase, bY as sendSaleWidgetCloseEvent, bZ as toStringifyTransactions, b_ as sendSaleSuccessEvent, b$ as sendSaleFailedEvent, c0 as sendSaleTransactionSuccessEvent, c1 as sendSalePaymentMethodEvent, c2 as sendSalePaymentTokenEvent, U as UserJourney, M as HeaderNavigation, x as jsxs, c3 as LoadingOverlay, B as Box, aF as Fragment, z as SimpleLayout, aV as useHandover, aW as HandoverTarget, q as getRemoteRive, H as Heading, c4 as HandoverDuration, aK as isPassportProvider, aZ as HandoverContent, aP as MenuItem, bj as motion, bi as listVariants, bk as listItemVariants, a5 as SharedViews, c5 as FooterLogo, c6 as StatusType, c7 as prettyFormatNumber, J as tokenValueFormat, c8 as ShimmerCircle, y as Button, S as Stack, c9 as Te, ca as abbreviateWalletAddress, cb as formatUnits, aA as Drawer, cc as Caption, aB as Divider, cd as tokenSymbolNameOverrides, ce as Re, cf as Ce, cg as M, ch as ct, a$ as isNativeToken, b0 as getTokenImageByAddress, ci as isGasFree, G as CryptoFiatContext, Z as ConnectLoaderContext, cj as eventTargetReducer, ck as initialEventTargetState, o as oo, cl as EventTargetActions, a0 as LoadingView, aQ as Y, cm as ConnectWidgetViews, a7 as ConnectWidget, m as mo, s as so, p as po, a as ao, cn as ConnectLoaderActions, b as parseUnits, a1 as CryptoFiatActions, b3 as ButtCon, A as Body, co as widgetTheme, bH as viewReducer, bI as initialViewState, t as tt, bQ as ServiceUnavailableErrorView, Y as CryptoFiatProvider } from './index-CKeYlxiz.js';
|
|
2
|
+
import { u as useMount, T as TopUpView } from './TopUpView-C4l8QKWg.js';
|
|
3
|
+
import { T as TokenImage } from './TokenImage-BPB-nljj.js';
|
|
4
|
+
import { F as Fees, B as BridgeWidget } from './BridgeWidget-V490AOed.js';
|
|
5
|
+
import OnRampWidget from './OnRampWidget-UN81XLhi.js';
|
|
6
|
+
import { a as SwapWidget } from './SwapWidget-Vk5hc51P.js';
|
|
7
|
+
import { f as fetchRiskAssessmentV2, i as isSingleAddressSanctioned } from './FeesBreakdown-B1IsEEJy.js';
|
|
8
|
+
import './WalletApproveHero-BPc46r1b.js';
|
|
9
|
+
import './useInterval-BjUysGEJ.js';
|
|
10
|
+
import './SpendingCapHero-Bhf2cPGn.js';
|
|
11
11
|
|
|
12
12
|
var SaleWidgetViews;
|
|
13
13
|
(function (SaleWidgetViews) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { v as jsx, c$ as heroBackGroundStyles, B as Box, d0 as heroImageStyles, dF as heroImageBottomAlign, x as jsxs } from './index-
|
|
1
|
+
import { v as jsx, c$ as heroBackGroundStyles, B as Box, d0 as heroImageStyles, dF as heroImageBottomAlign, x as jsxs } from './index-CKeYlxiz.js';
|
|
2
2
|
|
|
3
3
|
function SpendingCapHero() {
|
|
4
4
|
return (jsx(Box, { sx: { ...heroBackGroundStyles, background: 'base.color.translucent.emphasis.100' }, children: jsx(Box, { sx: { ...heroImageStyles, ...heroImageBottomAlign }, children: jsxs("svg", { width: "430", height: "305", viewBox: "0 0 430 305", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsx("path", { d: "M94.0614 105.632L93.6321 104L92 104.429L92.4292 106.061L94.0614 105.632Z", fill: "white" }), jsx("path", { d: "M63.6531 193.101L63.1006 191L60.9996 191.553L61.5521 193.654L63.6531 193.101Z", fill: "white" }), jsx("path", { d: "M344.489 224.345L342.345 224L342 226.145L344.144 226.49L344.489 224.345Z", fill: "white" }), jsx("path", { d: "M372.286 139.905L372.905 138.619L371.619 138L371 139.286L372.286 139.905Z", fill: "white" }), jsx("path", { d: "M341.653 78.101L341.101 76L339 76.5525L339.552 78.6535L341.653 78.101Z", fill: "white" }), jsx("path", { d: "M359.286 242.905L359.905 241.619L358.619 241L358 242.286L359.286 242.905Z", fill: "white" }), jsx("path", { d: "M87.0123 112.087L86.0869 111L85.0002 111.925L85.9256 113.012L87.0123 112.087Z", fill: "white" }), jsx("path", { d: "M84.2862 248.905L84.9053 247.619L83.6192 247L83.0001 248.286L84.2862 248.905Z", fill: "white" }), jsx("path", { d: "M215.496 262.992C268.237 262.992 310.993 220.237 310.993 167.496C310.993 114.755 268.237 72 215.496 72C162.755 72 120 114.755 120 167.496C120 220.237 162.755 262.992 215.496 262.992Z", fill: "white", fillOpacity: "0.24", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M159.82 95.1695C179.975 79.6536 204.651 73.1506 227.89 77.0665C261.089 82.6606 253.281 101.028 199.197 121.314C151.934 139.037 123.49 136.348 143.823 110.95C148.422 105.208 153.721 99.8623 159.82 95.1695Z", fill: "white", fillOpacity: "0.08" }), jsx("path", { d: "M215.497 227.183C171.451 227.183 135.159 219.871 130.194 210.462H130.187C145.912 241.626 178.21 263.001 215.497 263.001C252.705 263.001 284.942 241.719 300.706 210.664C295.33 219.98 259.232 227.183 215.505 227.183H215.497Z", fill: "#36E0F8", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M284.219 219.607L283.978 219.84C281.275 222.482 256.583 215.986 253.172 218.418C222.389 240.36 182.779 269.061 146.099 219.397C146.099 219.397 140.761 217.641 138.609 216.686C139.425 217.96 140.279 219.226 141.165 220.469C170.425 261.516 227.423 271.073 268.47 241.813C276.97 235.752 284.118 228.503 289.852 220.454L292.424 216.841L288.252 218.302C287.086 218.713 285.851 219.11 284.553 219.498L284.227 219.599L284.219 219.607Z", fill: "black" }), jsx("path", { d: "M215.496 241.4C262.183 241.4 300.03 226.557 300.03 208.248C300.03 189.938 262.183 175.095 215.496 175.095C168.81 175.095 130.963 189.938 130.963 208.248C130.963 226.557 168.81 241.4 215.496 241.4Z", fill: "#F191FA", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M300.705 210.659C300.705 210.659 300.705 210.65 300.705 210.641C300.705 210.641 300.705 210.65 300.705 210.659Z", fill: "#EBE9E9", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M193.624 204.511C208.952 204.511 221.377 199.638 221.377 193.626C221.377 187.614 208.952 182.741 193.624 182.741C178.297 182.741 165.871 187.614 165.871 193.626C165.871 199.638 178.297 204.511 193.624 204.511Z", fill: "#D0F500", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M193.624 204.511C208.954 204.511 221.377 199.64 221.377 193.626V201.349C221.377 207.363 208.954 212.234 193.624 212.234C178.295 212.234 165.871 207.363 165.871 201.349V193.626C165.871 199.64 178.295 204.511 193.624 204.511Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M197.33 204.41C199.49 204.294 201.573 204.084 203.546 203.789V211.512C201.573 211.807 199.49 212.017 197.33 212.133V204.41Z", fill: "#D0F500" }), jsx("path", { d: "M206.398 203.291C211.246 202.304 215.255 200.774 217.905 198.901V206.624C215.255 208.497 211.246 210.027 206.398 211.014V203.291Z", fill: "black" }), jsx("path", { d: "M193.624 204.511C208.954 204.511 221.377 199.64 221.377 193.626V201.349C221.377 207.363 208.954 212.234 193.624 212.234C178.295 212.234 165.871 207.363 165.871 201.349V193.626C165.871 199.64 178.295 204.511 193.624 204.511Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M206.398 211.015C211.246 210.028 215.255 208.497 217.905 206.625", stroke: "#A66CFF", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M193.624 196.788C208.952 196.788 221.377 191.914 221.377 185.903C221.377 179.891 208.952 175.017 193.624 175.017C178.297 175.017 165.871 179.891 165.871 185.903C165.871 191.914 178.297 196.788 193.624 196.788Z", fill: "#D0F500", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M193.624 196.788C208.954 196.788 221.377 191.917 221.377 185.903V193.626C221.377 199.639 208.954 204.511 193.624 204.511C178.295 204.511 165.871 199.639 165.871 193.626V185.903C165.871 191.917 178.295 196.788 193.624 196.788Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M197.33 196.687C199.49 196.57 201.573 196.361 203.546 196.065V203.788C201.573 204.084 199.49 204.293 197.33 204.41V196.687Z", fill: "#36E0F8" }), jsx("path", { d: "M206.398 195.568C211.246 194.581 215.255 193.051 217.905 191.178V198.901C215.255 200.774 211.246 202.304 206.398 203.291V195.568Z", fill: "black" }), jsx("path", { d: "M193.624 196.788C208.954 196.788 221.377 191.917 221.377 185.903V193.626C221.377 199.639 208.954 204.511 193.624 204.511C178.295 204.511 165.871 199.639 165.871 193.626V185.903C165.871 191.917 178.295 196.788 193.624 196.788Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M206.398 203.291C211.246 202.304 215.255 200.774 217.905 198.901", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M193.624 189.065C208.952 189.065 221.377 184.192 221.377 178.18C221.377 172.168 208.952 167.294 193.624 167.294C178.297 167.294 165.871 172.168 165.871 178.18C165.871 184.192 178.297 189.065 193.624 189.065Z", fill: "#F191FA", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M193.624 189.065C208.954 189.065 221.377 184.194 221.377 178.18V185.903C221.377 191.917 208.954 196.788 193.624 196.788C178.295 196.788 165.871 191.917 165.871 185.903V178.18C165.871 184.194 178.295 189.065 193.624 189.065Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M197.33 188.965C199.49 188.849 201.573 188.639 203.546 188.343V196.067C201.573 196.362 199.49 196.571 197.33 196.688V188.965Z", fill: "#F191FA" }), jsx("path", { d: "M206.398 187.845C211.246 186.858 215.255 185.327 217.905 183.455V191.178C215.255 193.05 211.246 194.581 206.398 195.568V187.845Z", fill: "black" }), jsx("path", { d: "M193.624 189.065C208.954 189.065 221.377 184.194 221.377 178.18V185.903C221.377 191.917 208.954 196.788 193.624 196.788C178.295 196.788 165.871 191.917 165.871 185.903V178.18C165.871 184.194 178.295 189.065 193.624 189.065Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M206.398 195.569C211.246 194.582 215.255 193.052 217.905 191.179", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M238.601 212.934C253.929 212.934 266.354 208.06 266.354 202.049C266.354 196.037 253.929 191.164 238.601 191.164C223.274 191.164 210.848 196.037 210.848 202.049C210.848 208.06 223.274 212.934 238.601 212.934Z", fill: "#D0F500", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M238.601 212.935C253.931 212.935 266.354 208.063 266.354 202.049V209.772C266.354 215.786 253.931 220.658 238.601 220.658C223.272 220.658 210.848 215.786 210.848 209.772V202.049C210.848 208.063 223.272 212.935 238.601 212.935Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M242.307 212.833C244.467 212.717 246.55 212.507 248.523 212.212V219.935C246.55 220.23 244.467 220.44 242.307 220.556V212.833Z", fill: "#F191FA" }), jsx("path", { d: "M251.375 211.713C256.223 210.727 260.232 209.196 262.882 207.324V215.047C260.232 216.919 256.223 218.45 251.375 219.436V211.713Z", fill: "black" }), jsx("path", { d: "M238.601 212.935C253.931 212.935 266.354 208.063 266.354 202.049V209.772C266.354 215.786 253.931 220.658 238.601 220.658C223.272 220.658 210.848 215.786 210.848 209.772V202.049C210.848 208.063 223.272 212.935 238.601 212.935Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M251.375 219.437C256.223 218.45 260.232 216.919 262.882 215.047", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M238.601 205.21C253.929 205.21 266.354 200.336 266.354 194.324C266.354 188.313 253.929 183.439 238.601 183.439C223.274 183.439 210.848 188.313 210.848 194.324C210.848 200.336 223.274 205.21 238.601 205.21Z", fill: "#D0F500", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M238.601 205.21C253.931 205.21 266.354 200.339 266.354 194.325V202.048C266.354 208.062 253.931 212.934 238.601 212.934C223.272 212.934 210.848 208.062 210.848 202.048V194.325C210.848 200.339 223.272 205.21 238.601 205.21Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M242.307 205.109C244.467 204.993 246.55 204.783 248.523 204.488V212.211C246.55 212.506 244.467 212.716 242.307 212.832V205.109Z", fill: "#36E0F8" }), jsx("path", { d: "M251.375 203.989C256.223 203.003 260.232 201.472 262.882 199.6V207.323C260.232 209.195 256.223 210.726 251.375 211.712V203.989Z", fill: "black" }), jsx("path", { d: "M238.601 205.21C253.931 205.21 266.354 200.339 266.354 194.325V202.048C266.354 208.062 253.931 212.934 238.601 212.934C223.272 212.934 210.848 208.062 210.848 202.048V194.325C210.848 200.339 223.272 205.21 238.601 205.21Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M251.375 211.713C256.223 210.726 260.232 209.195 262.882 207.323", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M238.601 197.487C253.929 197.487 266.354 192.613 266.354 186.602C266.354 180.59 253.929 175.716 238.601 175.716C223.274 175.716 210.848 180.59 210.848 186.602C210.848 192.613 223.274 197.487 238.601 197.487Z", fill: "#F191FA", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M238.601 197.487C253.931 197.487 266.354 192.616 266.354 186.602V194.325C266.354 200.339 253.931 205.21 238.601 205.21C223.272 205.21 210.848 200.339 210.848 194.325V186.602C210.848 192.616 223.272 197.487 238.601 197.487Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M242.307 197.386C244.467 197.27 246.55 197.06 248.523 196.765V204.488C246.55 204.783 244.467 204.992 242.307 205.109V197.386Z", fill: "#F191FA" }), jsx("path", { d: "M251.375 196.267C256.223 195.28 260.232 193.75 262.882 191.877V199.6C260.232 201.473 256.223 203.003 251.375 203.99V196.267Z", fill: "#9AEFFB" }), jsx("path", { d: "M238.601 197.487C253.931 197.487 266.354 192.616 266.354 186.602V194.325C266.354 200.339 253.931 205.21 238.601 205.21C223.272 205.21 210.848 200.339 210.848 194.325V186.602C210.848 192.616 223.272 197.487 238.601 197.487Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M251.375 203.99C256.223 203.004 260.232 201.473 262.882 199.601", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M232.652 189.678C247.979 189.678 260.405 184.804 260.405 178.793C260.405 172.781 247.979 167.908 232.652 167.908C217.324 167.908 204.899 172.781 204.899 178.793C204.899 184.804 217.324 189.678 232.652 189.678Z", fill: "#F191FA", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M232.652 189.678C247.981 189.678 260.405 184.807 260.405 178.793V186.516C260.405 192.53 247.981 197.401 232.652 197.401C217.323 197.401 204.899 192.53 204.899 186.516V178.793C204.899 184.807 217.323 189.678 232.652 189.678Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M236.358 189.578C238.518 189.461 240.6 189.251 242.574 188.956V196.679C240.6 196.974 238.518 197.184 236.358 197.301V189.578Z", fill: "#F191FA" }), jsx("path", { d: "M245.426 188.458C250.274 187.471 254.283 185.94 256.932 184.067V191.791C254.283 193.663 250.274 195.194 245.426 196.18V188.458Z", fill: "black" }), jsx("path", { d: "M232.652 189.678C247.981 189.678 260.405 184.807 260.405 178.793V186.516C260.405 192.53 247.981 197.401 232.652 197.401C217.323 197.401 204.899 192.53 204.899 186.516V178.793C204.899 184.807 217.323 189.678 232.652 189.678Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M245.426 196.182C250.274 195.195 254.283 193.664 256.932 191.792", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M240.99 180.021C256.317 180.021 268.743 175.148 268.743 169.136C268.743 163.124 256.317 158.25 240.99 158.25C225.662 158.25 213.237 163.124 213.237 169.136C213.237 175.148 225.662 180.021 240.99 180.021Z", fill: "#F191FA", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M240.99 180.021C256.319 180.021 268.743 175.15 268.743 169.136V176.859C268.743 182.873 256.319 187.744 240.99 187.744C225.66 187.744 213.237 182.873 213.237 176.859V169.136C213.237 175.15 225.66 180.021 240.99 180.021Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M244.696 179.92C246.856 179.804 248.938 179.594 250.911 179.299V187.022C248.938 187.317 246.856 187.527 244.696 187.643V179.92Z", fill: "#9AEFFB" }), jsx("path", { d: "M253.763 178.801C258.612 177.815 262.621 176.284 265.27 174.412V182.135C262.621 184.007 258.612 185.538 253.763 186.524V178.801Z", fill: "black" }), jsx("path", { d: "M240.99 180.021C256.319 180.021 268.743 175.15 268.743 169.136V176.859C268.743 182.873 256.319 187.744 240.99 187.744C225.66 187.744 213.237 182.873 213.237 176.859V169.136C213.237 175.15 225.66 180.021 240.99 180.021Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M253.763 186.525C258.612 185.538 262.621 184.007 265.27 182.135", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M189.911 223.803C205.238 223.803 217.664 218.929 217.664 212.918C217.664 206.906 205.238 202.032 189.911 202.032C174.583 202.032 162.158 206.906 162.158 212.918C162.158 218.929 174.583 223.803 189.911 223.803Z", fill: "#F191FA", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M189.911 223.803C205.24 223.803 217.664 218.932 217.664 212.918V220.641C217.664 226.655 205.24 231.526 189.911 231.526C174.581 231.526 162.158 226.655 162.158 220.641V212.918C162.158 218.932 174.581 223.803 189.911 223.803Z", fill: "#E4F4F7", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M193.625 223.71C195.785 223.593 197.867 223.384 199.84 223.088V230.811C197.867 231.107 195.785 231.316 193.625 231.433V223.71Z", fill: "#F191FA" }), jsx("path", { d: "M202.685 222.583C207.533 221.596 211.542 220.066 214.191 218.193V225.916C211.542 227.789 207.533 229.319 202.685 230.306V222.583Z", fill: "#9AEFFB" }), jsx("path", { d: "M189.911 223.803C205.24 223.803 217.664 218.932 217.664 212.918V220.641C217.664 226.655 205.24 231.526 189.911 231.526C174.581 231.526 162.158 226.655 162.158 220.641V212.918C162.158 218.932 174.581 223.803 189.911 223.803Z", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M202.685 230.306C207.533 229.32 211.542 227.789 214.191 225.917", stroke: "white", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M300.705 210.658C300.705 210.658 300.705 210.649 300.705 210.641C300.705 210.641 300.705 210.649 300.705 210.658Z", fill: "#A66CFF", stroke: "black", strokeLinecap: "round", strokeLinejoin: "round" })] }) }) }));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { k as useTranslation, x as jsxs, de as quickswapFooterStyles, B as Box, df as quickswapFooterLogoStyles, v as jsx, A as Body, dg as quickswapFooterDisclaimerTextStyles, dh as Po, X as getRemoteImage, r as reactExports, y as Button, aA as Drawer, W as CloudImage, H as Heading, cE as Logo, di as getImxTokenImage, cb as formatUnits, e as calculateCryptoToFiat, J as tokenValueFormat, ci as isGasFree, b as parseUnits, d as formatZeroAmount, cz as ShimmerBox, bF as PriceDisplay, aF as Fragment, dj as getCryptoToUSDConversion, Z as ConnectLoaderContext, a$ as isNativeToken, cR as NATIVE, aU as ViewContext, D as useAnalytics, dk as calculateFeesFiat, U as UserJourney, cU as DEFAULT_QUOTE_REFRESH_INTERVAL, aK as isPassportProvider, dl as parseEther, P as amountInputValidation, b3 as ButtCon, bj as motion, b8 as Tooltip, bd as Icon, bM as K, V as ViewActions, a5 as SharedViews, K as getDefaultTokenImage, dm as ESTIMATE_DEBOUNCE, dn as DEFAULT_TOKEN_VALIDATION_DECIMALS, cZ as DEFAULT_TOKEN_DECIMALS, F as EventTargetContext, a0 as LoadingView, z as SimpleLayout, dp as sendSwapWidgetCloseEvent, O as orchestrationEvents, o as oo, M as HeaderNavigation, cY as IMX_TOKEN_SYMBOL, cy as S, d1 as SimpleTextBody, d2 as FooterButton, dq as m, c$ as heroBackGroundStyles, d0 as heroImageStyles, bz as Trans, L as Link, c5 as FooterLogo, aV as useHandover, bH as viewReducer, bI as initialViewState, dr as DEFAULT_BALANCE_RETRY_POLICY, ds as yo, d7 as StatusView, dt as sendSwapSuccessEvent, c6 as StatusType, du as sendSwapFailedEvent, dv as sendSwapRejectedEvent, a6 as ErrorView, bQ as ServiceUnavailableErrorView, j as ae, cP as fe } from './index-
|
|
2
|
-
import { S as SelectForm, T as TextInputForm, A as Accordion, b as gasAmountAccordionStyles, a as TransactionRejected, N as NetworkSwitchDrawer, W as WalletApproveHero, g as getAllowedBalances } from './WalletApproveHero-
|
|
3
|
-
import { u as useInterval } from './useInterval-
|
|
4
|
-
import { S as SwapWidgetViews, T as TopUpView } from './TopUpView-
|
|
5
|
-
import { F as FeesBreakdown, f as fetchRiskAssessmentV2, i as isSingleAddressSanctioned } from './FeesBreakdown-
|
|
6
|
-
import { S as SpendingCapHero } from './SpendingCapHero-
|
|
1
|
+
import { k as useTranslation, x as jsxs, de as quickswapFooterStyles, B as Box, df as quickswapFooterLogoStyles, v as jsx, A as Body, dg as quickswapFooterDisclaimerTextStyles, dh as Po, X as getRemoteImage, r as reactExports, y as Button, aA as Drawer, W as CloudImage, H as Heading, cE as Logo, di as getImxTokenImage, cb as formatUnits, e as calculateCryptoToFiat, J as tokenValueFormat, ci as isGasFree, b as parseUnits, d as formatZeroAmount, cz as ShimmerBox, bF as PriceDisplay, aF as Fragment, dj as getCryptoToUSDConversion, Z as ConnectLoaderContext, a$ as isNativeToken, cR as NATIVE, aU as ViewContext, D as useAnalytics, dk as calculateFeesFiat, U as UserJourney, cU as DEFAULT_QUOTE_REFRESH_INTERVAL, aK as isPassportProvider, dl as parseEther, P as amountInputValidation, b3 as ButtCon, bj as motion, b8 as Tooltip, bd as Icon, bM as K, V as ViewActions, a5 as SharedViews, K as getDefaultTokenImage, dm as ESTIMATE_DEBOUNCE, dn as DEFAULT_TOKEN_VALIDATION_DECIMALS, cZ as DEFAULT_TOKEN_DECIMALS, F as EventTargetContext, a0 as LoadingView, z as SimpleLayout, dp as sendSwapWidgetCloseEvent, O as orchestrationEvents, o as oo, M as HeaderNavigation, cY as IMX_TOKEN_SYMBOL, cy as S, d1 as SimpleTextBody, d2 as FooterButton, dq as m, c$ as heroBackGroundStyles, d0 as heroImageStyles, bz as Trans, L as Link, c5 as FooterLogo, aV as useHandover, bH as viewReducer, bI as initialViewState, dr as DEFAULT_BALANCE_RETRY_POLICY, ds as yo, d7 as StatusView, dt as sendSwapSuccessEvent, c6 as StatusType, du as sendSwapFailedEvent, dv as sendSwapRejectedEvent, a6 as ErrorView, bQ as ServiceUnavailableErrorView, j as ae, cP as fe } from './index-CKeYlxiz.js';
|
|
2
|
+
import { S as SelectForm, T as TextInputForm, A as Accordion, b as gasAmountAccordionStyles, a as TransactionRejected, N as NetworkSwitchDrawer, W as WalletApproveHero, g as getAllowedBalances } from './WalletApproveHero-BPc46r1b.js';
|
|
3
|
+
import { u as useInterval } from './useInterval-BjUysGEJ.js';
|
|
4
|
+
import { S as SwapWidgetViews, T as TopUpView } from './TopUpView-C4l8QKWg.js';
|
|
5
|
+
import { F as FeesBreakdown, f as fetchRiskAssessmentV2, i as isSingleAddressSanctioned } from './FeesBreakdown-B1IsEEJy.js';
|
|
6
|
+
import { S as SpendingCapHero } from './SpendingCapHero-Bhf2cPGn.js';
|
|
7
7
|
|
|
8
8
|
function QuickswapFooter({ theme, environment }) {
|
|
9
9
|
const { t } = useTranslation();
|
|
@@ -98,8 +98,8 @@ const inputStyle = {
|
|
|
98
98
|
flex: 2,
|
|
99
99
|
};
|
|
100
100
|
|
|
101
|
-
function SelectInput({ testId, options, textInputValue, textInputPlaceholder, textInputValidator, textInputType, onTextInputChange, onTextInputBlur, onTextInputFocus, textInputTextAlign, textInputSubtext, textInputErrorMessage, testInputMode, selectTextAlign, selectSubtext, selectErrorMessage, textInputMaxButtonClick, onSelectChange, textInputDisabled, selectInputDisabled, selectedOption, coinSelectorHeading, defaultTokenImage, userJourney, screen, control, environment, theme, }) {
|
|
102
|
-
return (jsxs(Box, { sx: selectInputBoxStyle, children: [jsx(Box, { sx: selectStyle, children: jsx(SelectForm, { testId: `${testId}-select-form`, options: options, subtext: selectSubtext, textAlign: selectTextAlign, errorMessage: selectErrorMessage, onSelectChange: onSelectChange, disabled: selectInputDisabled, selectedOption: selectedOption, coinSelectorHeading: coinSelectorHeading, defaultTokenImage: defaultTokenImage, control: control, userJourney: userJourney, screen: screen, environment: environment, theme: theme }) }), jsx(Box, { sx: inputStyle, children: jsx(TextInputForm, { type: textInputType, testId: `${testId}-text-form`, value: textInputValue, placeholder: textInputPlaceholder, subtext: textInputSubtext, textAlign: textInputTextAlign, errorMessage: textInputErrorMessage, validator: textInputValidator, onTextInputChange: onTextInputChange, onTextInputBlur: onTextInputBlur, onTextInputFocus: onTextInputFocus, maxButtonClick: textInputMaxButtonClick, disabled: textInputDisabled, inputMode: testInputMode }) })] }));
|
|
101
|
+
function SelectInput({ testId, options, textInputValue, textInputPlaceholder, textInputValidator, textInputType, onTextInputChange, onTextInputBlur, onTextInputFocus, textInputTextAlign, textInputSubtext, textInputErrorMessage, testInputMode, selectTextAlign, selectSubtext, selectErrorMessage, textInputMaxButtonClick, onSelectChange, textInputDisabled, selectInputDisabled, selectedOption, coinSelectorHeading, defaultTokenImage, userJourney, screen, control, environment, theme, themeOverrides, }) {
|
|
102
|
+
return (jsxs(Box, { sx: selectInputBoxStyle, children: [jsx(Box, { sx: selectStyle, children: jsx(SelectForm, { testId: `${testId}-select-form`, options: options, subtext: selectSubtext, textAlign: selectTextAlign, errorMessage: selectErrorMessage, onSelectChange: onSelectChange, disabled: selectInputDisabled, selectedOption: selectedOption, coinSelectorHeading: coinSelectorHeading, defaultTokenImage: defaultTokenImage, control: control, userJourney: userJourney, screen: screen, environment: environment, theme: theme, themeOverrides: themeOverrides }) }), jsx(Box, { sx: inputStyle, children: jsx(TextInputForm, { type: textInputType, testId: `${testId}-text-form`, value: textInputValue, placeholder: textInputPlaceholder, subtext: textInputSubtext, textAlign: textInputTextAlign, errorMessage: textInputErrorMessage, validator: textInputValidator, onTextInputChange: onTextInputChange, onTextInputBlur: onTextInputBlur, onTextInputFocus: onTextInputFocus, maxButtonClick: textInputMaxButtonClick, disabled: textInputDisabled, inputMode: testInputMode }) })] }));
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
function validateFromToken(fromToken) {
|
|
@@ -513,7 +513,7 @@ class PriceImpactError extends Error {
|
|
|
513
513
|
this.name = 'PriceImpactError';
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
|
-
function SwapForm({ data, theme, cancelAutoProceed, subTitle, }) {
|
|
516
|
+
function SwapForm({ data, theme, themeOverrides, cancelAutoProceed, subTitle, }) {
|
|
517
517
|
const { t } = useTranslation();
|
|
518
518
|
const { swapState: { allowedTokens, tokenBalances, network, autoProceed, }, } = reactExports.useContext(SwapContext);
|
|
519
519
|
const { connectLoaderState } = reactExports.useContext(ConnectLoaderContext);
|
|
@@ -1246,7 +1246,7 @@ function SwapForm({ data, theme, cancelAutoProceed, subTitle, }) {
|
|
|
1246
1246
|
: '', selectTextAlign: "left", textInputType: "number", testInputMode: "decimal", textInputValue: fromAmount, textInputPlaceholder: t('views.SWAP.swapForm.from.inputPlaceholder'), textInputSubtext: `${t('views.SWAP.content.fiatPricePrefix')}
|
|
1247
1247
|
$${formatZeroAmount(fromFiatValue, true)}`, textInputTextAlign: "right", textInputValidator: amountInputValidation, onTextInputChange: (v) => onFromTextInputChange(v), onTextInputFocus: onFromTextInputFocus, textInputMaxButtonClick: textInputMaxButtonClick, onSelectChange: onFromSelectChange, textInputErrorMessage: t(fromAmountError), selectErrorMessage: t(fromTokenError), selectedOption: fromToken
|
|
1248
1248
|
? formatTokenOptionsId(fromToken.symbol, fromToken.address)
|
|
1249
|
-
: undefined, coinSelectorHeading: t('views.SWAP.swapForm.from.selectorTitle'), defaultTokenImage: defaultTokenImage, control: "FromToken", userJourney: UserJourney.SWAP, screen: "SwapCoins", environment: checkout?.config.environment, theme: theme })] }), jsx(Box, { sx: {
|
|
1249
|
+
: undefined, coinSelectorHeading: t('views.SWAP.swapForm.from.selectorTitle'), defaultTokenImage: defaultTokenImage, control: "FromToken", userJourney: UserJourney.SWAP, screen: "SwapCoins", environment: checkout?.config.environment, theme: theme, themeOverrides: themeOverrides })] }), jsx(Box, { sx: {
|
|
1250
1250
|
display: 'flex',
|
|
1251
1251
|
justifyContent: 'center',
|
|
1252
1252
|
alignItems: 'center',
|
|
@@ -1263,7 +1263,7 @@ function SwapForm({ data, theme, cancelAutoProceed, subTitle, }) {
|
|
|
1263
1263
|
w: 'base.icon.size.300',
|
|
1264
1264
|
} }) }), jsx(Tooltip.Content, { children: swapConversionRateTooltip })] }))] }), jsx(SelectInput, { testId: "toTokenInputs", options: tokensOptionsTo, selectTextAlign: "left", textInputType: "number", testInputMode: "decimal", textInputValue: toAmount, textInputPlaceholder: t('views.SWAP.swapForm.to.inputPlaceholder'), textInputTextAlign: "right", textInputValidator: amountInputValidation, onTextInputChange: (v) => onToTextInputChange(v), onTextInputFocus: onToTextInputFocus, onSelectChange: onToSelectChange, textInputErrorMessage: t(toAmountError), selectErrorMessage: t(toTokenError), selectedOption: toToken
|
|
1265
1265
|
? formatTokenOptionsId(toToken.symbol, toToken.address)
|
|
1266
|
-
: undefined, coinSelectorHeading: t('views.SWAP.swapForm.to.selectorTitle'), defaultTokenImage: defaultTokenImage, control: "ToToken", userJourney: UserJourney.SWAP, screen: "SwapCoins", environment: checkout?.config.environment, theme: theme })] })] }), jsx(Fees, { feeFiatValue: feeFiatValue, gasFeeToken: gasFeeToken, fees: formattedFees, onFeesClick: () => {
|
|
1266
|
+
: undefined, coinSelectorHeading: t('views.SWAP.swapForm.to.selectorTitle'), defaultTokenImage: defaultTokenImage, control: "ToToken", userJourney: UserJourney.SWAP, screen: "SwapCoins", environment: checkout?.config.environment, theme: theme, themeOverrides: themeOverrides })] })] }), jsx(Fees, { feeFiatValue: feeFiatValue, gasFeeToken: gasFeeToken, fees: formattedFees, onFeesClick: () => {
|
|
1267
1267
|
track({
|
|
1268
1268
|
userJourney: UserJourney.SWAP,
|
|
1269
1269
|
screen: 'SwapCoins',
|
|
@@ -1313,7 +1313,7 @@ const hasZeroBalance = (tokenBalances, symbol) => {
|
|
|
1313
1313
|
return zeroBalance;
|
|
1314
1314
|
};
|
|
1315
1315
|
|
|
1316
|
-
function SwapCoins({ theme, cancelAutoProceed, fromAmount, toAmount, fromTokenAddress, toTokenAddress, showBackButton, showHeader, title, subTitle, }) {
|
|
1316
|
+
function SwapCoins({ theme, themeOverrides, cancelAutoProceed, fromAmount, toAmount, fromTokenAddress, toTokenAddress, showBackButton, showHeader, title, subTitle, }) {
|
|
1317
1317
|
const { t } = useTranslation();
|
|
1318
1318
|
const { viewDispatch } = reactExports.useContext(ViewContext);
|
|
1319
1319
|
const { eventTargetState: { eventTarget } } = reactExports.useContext(EventTargetContext);
|
|
@@ -1350,7 +1350,7 @@ function SwapCoins({ theme, cancelAutoProceed, fromAmount, toAmount, fromTokenAd
|
|
|
1350
1350
|
toAmount,
|
|
1351
1351
|
fromTokenAddress,
|
|
1352
1352
|
toTokenAddress,
|
|
1353
|
-
}, theme: theme, subTitle: subTitle }), jsx(NotEnoughImx, { environment: checkout?.config.environment ?? K.PRODUCTION, visible: showNotEnoughImxDrawer, showAdjustAmount: false, hasZeroImx: true, onAddCoinsClick: () => {
|
|
1353
|
+
}, theme: theme, themeOverrides: themeOverrides, subTitle: subTitle }), jsx(NotEnoughImx, { environment: checkout?.config.environment ?? K.PRODUCTION, visible: showNotEnoughImxDrawer, showAdjustAmount: false, hasZeroImx: true, onAddCoinsClick: () => {
|
|
1354
1354
|
viewDispatch({
|
|
1355
1355
|
payload: {
|
|
1356
1356
|
type: ViewActions.UPDATE_VIEW,
|
|
@@ -1769,7 +1769,7 @@ function GeoblockLoader({ widget, serviceUnavailableView, checkout, }) {
|
|
|
1769
1769
|
function SwapWidget({ amount, fromTokenAddress, toTokenAddress, config, autoProceed, direction, showBackButton, swapConfig: { customTitle, customSubTitle, showHeader }, walletProviderName, }) {
|
|
1770
1770
|
const { t } = useTranslation();
|
|
1771
1771
|
const { eventTargetState: { eventTarget }, } = reactExports.useContext(EventTargetContext);
|
|
1772
|
-
const { theme, isOnRampEnabled, isSwapEnabled, isBridgeEnabled, } = config;
|
|
1772
|
+
const { theme, themeOverrides, isOnRampEnabled, isSwapEnabled, isBridgeEnabled, } = config;
|
|
1773
1773
|
const { connectLoaderState: { checkout, provider }, } = reactExports.useContext(ConnectLoaderContext);
|
|
1774
1774
|
const [viewState, viewDispatch] = reactExports.useReducer(viewReducer, {
|
|
1775
1775
|
...initialViewState,
|
|
@@ -1893,7 +1893,7 @@ function SwapWidget({ amount, fromTokenAddress, toTokenAddress, config, autoProc
|
|
|
1893
1893
|
}
|
|
1894
1894
|
return optionsArray;
|
|
1895
1895
|
}, []);
|
|
1896
|
-
return (jsx(GeoblockLoader, { checkout: checkout, widget: (jsx(ViewContext.Provider, { value: viewReducerValues, children: jsxs(SwapContext.Provider, { value: swapReducerValues, children: [viewState.view.type === SharedViews.LOADING_VIEW && (jsx(LoadingView, { loadingText: t('views.LOADING_VIEW.text') })), viewState.view.type === SwapWidgetViews.SWAP && (jsx(SwapCoins, { theme: theme, cancelAutoProceed: cancelAutoProceed, fromAmount: viewState.view.data?.fromAmount ?? fromAmount, toAmount: viewState.view.data?.toAmount ?? toAmount, fromTokenAddress: viewState.view.data?.fromTokenAddress ?? fromTokenAddress, toTokenAddress: viewState.view.data?.toTokenAddress ?? toTokenAddress, showBackButton: showBackButton, showHeader: showHeader ?? true, title: customTitle ?? t('views.SWAP.header.title'), subTitle: customSubTitle ?? t('views.SWAP.content.title') })), viewState.view.type === SwapWidgetViews.IN_PROGRESS && (jsx(SwapInProgress, { transactionResponse: viewState.view.data.transactionResponse, swapForm: viewState.view.data.swapForm })), viewState.view.type === SwapWidgetViews.APPROVE_ERC20 && (jsx(ApproveERC20Onboarding, { data: viewState.view.data })), viewState.view.type === SwapWidgetViews.SUCCESS && (jsx(StatusView, { statusText: t('views.SWAP.success.text'), actionText: t('views.SWAP.success.actionText'), onRenderEvent: () => {
|
|
1896
|
+
return (jsx(GeoblockLoader, { checkout: checkout, widget: (jsx(ViewContext.Provider, { value: viewReducerValues, children: jsxs(SwapContext.Provider, { value: swapReducerValues, children: [viewState.view.type === SharedViews.LOADING_VIEW && (jsx(LoadingView, { loadingText: t('views.LOADING_VIEW.text') })), viewState.view.type === SwapWidgetViews.SWAP && (jsx(SwapCoins, { theme: theme, themeOverrides: themeOverrides, cancelAutoProceed: cancelAutoProceed, fromAmount: viewState.view.data?.fromAmount ?? fromAmount, toAmount: viewState.view.data?.toAmount ?? toAmount, fromTokenAddress: viewState.view.data?.fromTokenAddress ?? fromTokenAddress, toTokenAddress: viewState.view.data?.toTokenAddress ?? toTokenAddress, showBackButton: showBackButton, showHeader: showHeader ?? true, title: customTitle ?? t('views.SWAP.header.title'), subTitle: customSubTitle ?? t('views.SWAP.content.title') })), viewState.view.type === SwapWidgetViews.IN_PROGRESS && (jsx(SwapInProgress, { transactionResponse: viewState.view.data.transactionResponse, swapForm: viewState.view.data.swapForm })), viewState.view.type === SwapWidgetViews.APPROVE_ERC20 && (jsx(ApproveERC20Onboarding, { data: viewState.view.data })), viewState.view.type === SwapWidgetViews.SUCCESS && (jsx(StatusView, { statusText: t('views.SWAP.success.text'), actionText: t('views.SWAP.success.actionText'), onRenderEvent: () => {
|
|
1897
1897
|
page({
|
|
1898
1898
|
userJourney: UserJourney.SWAP,
|
|
1899
1899
|
screen: 'SwapSuccess',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as reactExports, K as getDefaultTokenImage, v as jsx } from './index-
|
|
1
|
+
import { r as reactExports, K as getDefaultTokenImage, v as jsx } from './index-CKeYlxiz.js';
|
|
2
2
|
|
|
3
3
|
function TokenImage({ src, name, environment, theme, defaultImage, ...forwardedProps }) {
|
|
4
4
|
const [error, setError] = reactExports.useState(false);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as reactExports, cb as formatUnits, v as jsx, x as jsxs, dH as isDualVariantIcon, aP as MenuItem, B as Box, k as useTranslation, aU as ViewContext, G as CryptoFiatContext, F as EventTargetContext, D as useAnalytics, a1 as CryptoFiatActions, dI as DEFAULT_TOKEN_SYMBOLS, cT as st, M as HeaderNavigation, H as Heading, A as Body, z as SimpleLayout, o as oo, V as ViewActions, O as orchestrationEvents, bM as K } from './index-
|
|
1
|
+
import { r as reactExports, cb as formatUnits, v as jsx, x as jsxs, dH as isDualVariantIcon, aP as MenuItem, B as Box, k as useTranslation, aU as ViewContext, G as CryptoFiatContext, F as EventTargetContext, D as useAnalytics, a1 as CryptoFiatActions, dI as DEFAULT_TOKEN_SYMBOLS, cT as st, M as HeaderNavigation, H as Heading, A as Body, z as SimpleLayout, o as oo, V as ViewActions, O as orchestrationEvents, bM as K } from './index-CKeYlxiz.js';
|
|
2
2
|
|
|
3
3
|
var BridgeWidgetViews;
|
|
4
4
|
(function (BridgeWidgetViews) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ac as hFlex, v as jsx, dw as motion, ae as _objectWithoutProperties, Q as useTheme, r as reactExports, ag as _slicedToArray, aq as useGetSubcomponentChild, al as merge, x as jsxs, dx as BaseClickable, b3 as ButtCon, au as SmartClone, dy as AnimatePresence, B as Box, S as Stack, dz as ClassNames, ad as _defineProperty, dA as getTertiaryButtonStyles, ar as flattenChildren, dB as isChildSubcomponent, aB as Divider, b4 as TextInput, dC as FormControlWrapper, k as useTranslation, aP as MenuItem, aA as Drawer, A as Body, aF as Fragment, D as useAnalytics, dD as Select, bM as K,
|
|
2
|
-
import { T as TokenImage } from './TokenImage-
|
|
1
|
+
import { ac as hFlex, v as jsx, dw as motion, ae as _objectWithoutProperties, Q as useTheme, r as reactExports, ag as _slicedToArray, aq as useGetSubcomponentChild, al as merge, x as jsxs, dx as BaseClickable, b3 as ButtCon, au as SmartClone, dy as AnimatePresence, B as Box, S as Stack, dz as ClassNames, ad as _defineProperty, dA as getTertiaryButtonStyles, ar as flattenChildren, dB as isChildSubcomponent, aB as Divider, b4 as TextInput, dC as FormControlWrapper, k as useTranslation, aP as MenuItem, aA as Drawer, A as Body, aF as Fragment, D as useAnalytics, dD as Select, bM as K, dE as DuoCon, H as Heading, y as Button, cJ as retry, cR as NATIVE, b0 as getTokenImageByAddress, a$ as isNativeToken, dr as DEFAULT_BALANCE_RETRY_POLICY, cO as isMetaMaskProvider, W as CloudImage, c5 as FooterLogo, X as getRemoteImage, cM as getChainNameById, cG as isWalletConnectProvider, c$ as heroBackGroundStyles, d0 as heroImageStyles, dF as heroImageBottomAlign } from './index-CKeYlxiz.js';
|
|
2
|
+
import { T as TokenImage } from './TokenImage-BPB-nljj.js';
|
|
3
3
|
|
|
4
4
|
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
5
|
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -352,7 +352,7 @@ const filterOptions = (filterBy, options) => {
|
|
|
352
352
|
|| option.symbol.toLowerCase().includes(filterByLower)
|
|
353
353
|
|| option.id.toLowerCase().endsWith(filterByLower));
|
|
354
354
|
};
|
|
355
|
-
function CoinSelector({ heading, options, defaultTokenImage, optionsLoading, children, onCloseDrawer, visible, }) {
|
|
355
|
+
function CoinSelector({ heading, options, defaultTokenImage, optionsLoading, children, onCloseDrawer, visible, drawerBackground, }) {
|
|
356
356
|
const { t } = useTranslation();
|
|
357
357
|
const [searchValue, setSearchValue] = reactExports.useState('');
|
|
358
358
|
const handleOnChange = (event) => {
|
|
@@ -363,15 +363,15 @@ function CoinSelector({ heading, options, defaultTokenImage, optionsLoading, chi
|
|
|
363
363
|
return options;
|
|
364
364
|
}
|
|
365
365
|
return filterOptions(searchValue, options);
|
|
366
|
-
}, [options, searchValue
|
|
366
|
+
}, [options, searchValue]);
|
|
367
367
|
const handleCloseDrawer = () => {
|
|
368
368
|
setSearchValue('');
|
|
369
369
|
onCloseDrawer?.();
|
|
370
370
|
};
|
|
371
|
-
return (jsxs(Drawer, { headerBarTitle: heading, size: "full", onCloseDrawer: handleCloseDrawer, visible: visible, children: [jsx(Drawer.Target, { children: children }), jsx(Drawer.Content, { children: jsxs(Box, { sx: selectOptionsContainerStyles, children: [optionsLoading && options.length === 0 && (jsxs(Box, { sx: selectOptionsLoadingIconStyles, children: [jsx(MenuItem, { shimmer: true, emphasized: true, testId: "balance-item-shimmer--1" }), jsx(MenuItem, { shimmer: true, emphasized: true, testId: "balance-item-shimmer--2" }), jsx(MenuItem, { shimmer: true, emphasized: true, testId: "balance-item-shimmer--3" })] })), !optionsLoading && options.length === 0 && (jsx(Body, { sx: { padding: 'base.spacing.x4' }, children: t('drawers.coinSelector.noCoins') })), !optionsLoading ? (jsxs(Fragment, { children: [jsx(TextInput, { sx: { marginBottom: 'base.spacing.x4', minWidth: '100%' }, testId: "search-text", onChange: (event) => handleOnChange(event), sizeVariant: "large", value: searchValue, inputMode: "search", placeholder: "name/symbol/contract address", onClearValue: () => setSearchValue(''), hideClearValueButton: false, autoFocus: true, children: jsx(TextInput.Icon, { icon: "Search" }) }), filteredOptions.map(({ onClick, icon, name, symbol, balance, id, testId, }) => (jsx(CoinSelectorOption, { id: id, testId: testId, onClick: onClick, icon: icon, name: name, symbol: symbol, balance: balance, defaultTokenImage: defaultTokenImage }, `${symbol}-${name}`)))] })) : null] }) })] }));
|
|
371
|
+
return (jsxs(Drawer, { headerBarTitle: heading, size: "full", onCloseDrawer: handleCloseDrawer, visible: visible, bgOverlaySx: drawerBackground ? { background: drawerBackground } : undefined, children: [jsx(Drawer.Target, { children: children }), jsx(Drawer.Content, { children: jsxs(Box, { sx: selectOptionsContainerStyles, children: [optionsLoading && options.length === 0 && (jsxs(Box, { sx: selectOptionsLoadingIconStyles, children: [jsx(MenuItem, { shimmer: true, emphasized: true, testId: "balance-item-shimmer--1" }), jsx(MenuItem, { shimmer: true, emphasized: true, testId: "balance-item-shimmer--2" }), jsx(MenuItem, { shimmer: true, emphasized: true, testId: "balance-item-shimmer--3" })] })), !optionsLoading && options.length === 0 && (jsx(Body, { sx: { padding: 'base.spacing.x4' }, children: t('drawers.coinSelector.noCoins') })), !optionsLoading ? (jsxs(Fragment, { children: [jsx(TextInput, { sx: { marginBottom: 'base.spacing.x4', minWidth: '100%' }, testId: "search-text", onChange: (event) => handleOnChange(event), sizeVariant: "large", value: searchValue, inputMode: "search", placeholder: "name/symbol/contract address", onClearValue: () => setSearchValue(''), hideClearValueButton: false, autoFocus: true, children: jsx(TextInput.Icon, { icon: "Search" }) }), filteredOptions.map(({ onClick, icon, name, symbol, balance, id, testId, }) => (jsx(CoinSelectorOption, { id: id, testId: testId, onClick: onClick, icon: icon, name: name, symbol: symbol, balance: balance, defaultTokenImage: defaultTokenImage }, `${symbol}-${name}`)))] })) : null] }) })] }));
|
|
372
372
|
}
|
|
373
373
|
|
|
374
|
-
function SelectForm({ testId, options, optionsLoading, subtext, onSelectChange, textAlign, errorMessage, disabled, selectedOption, coinSelectorHeading, defaultTokenImage, userJourney, screen, control, environment = K.PRODUCTION, theme
|
|
374
|
+
function SelectForm({ testId, options, optionsLoading, subtext, onSelectChange, textAlign, errorMessage, disabled, selectedOption, coinSelectorHeading, defaultTokenImage, userJourney, screen, control, environment = K.PRODUCTION, theme, themeOverrides, }) {
|
|
375
375
|
const { track } = useAnalytics();
|
|
376
376
|
const [coinSelectorOpen, setCoinSelectorOpen] = reactExports.useState(false);
|
|
377
377
|
const coinSelectorOptions = reactExports.useMemo(() => options.map((option) => ({
|
|
@@ -402,7 +402,7 @@ function SelectForm({ testId, options, optionsLoading, subtext, onSelectChange,
|
|
|
402
402
|
action: 'Opened',
|
|
403
403
|
});
|
|
404
404
|
}, [setCoinSelectorOpen, track]);
|
|
405
|
-
return (jsxs(Box, { children: [jsx(CoinSelector, { heading: coinSelectorHeading, options: coinSelectorOptions, defaultTokenImage: defaultTokenImage, optionsLoading: optionsLoading ?? false, visible: coinSelectorOpen, onCloseDrawer: () => setCoinSelectorOpen(false) }), jsx(FormControlWrapper, { testId: `${testId}-select-control`, textAlign: textAlign ?? 'left', subtext: errorMessage ? undefined : subtext, isErrored: !!errorMessage, errorMessage: errorMessage, children: jsx(Select, { testId: `${testId}-select`, size: "large", defaultLabel: "Select token", targetClickOveride: openCoinSelector, selectedOption: getSelectedOption(), sx: { minw: '170px' }, children: filteredOption && (jsxs(Select.Option, { optionKey: filteredOption.id, testId: filteredOption.testId,
|
|
405
|
+
return (jsxs(Box, { children: [jsx(CoinSelector, { heading: coinSelectorHeading, options: coinSelectorOptions, defaultTokenImage: defaultTokenImage, optionsLoading: optionsLoading ?? false, visible: coinSelectorOpen, onCloseDrawer: () => setCoinSelectorOpen(false), drawerBackground: themeOverrides.drawerBackground }), jsx(FormControlWrapper, { testId: `${testId}-select-control`, textAlign: textAlign ?? 'left', subtext: errorMessage ? undefined : subtext, isErrored: !!errorMessage, errorMessage: errorMessage, children: jsx(Select, { testId: `${testId}-select`, size: "large", defaultLabel: "Select token", targetClickOveride: openCoinSelector, selectedOption: getSelectedOption(), sx: { minw: '170px' }, children: filteredOption && (jsxs(Select.Option, { optionKey: filteredOption.id, testId: filteredOption.testId,
|
|
406
406
|
// select cannot currently be disabled so disabling at the option level for now
|
|
407
407
|
disabled: disabled, children: [!filteredOption.icon && (jsx(Select.Option.Icon, { icon: "Coins", variant: "bold" })), filteredOption.icon && (jsx(Select.Option.FramedImage, { use: (jsx(TokenImage, { environment: environment, theme: theme, src: filteredOption.icon, name: filteredOption.name })), circularFrame: true, sx: { background: 'base.color.translucent.standard.100' } })), jsx(Select.Option.Label, { children: filteredOption.symbol })] }, filteredOption.id)) }) })] }));
|
|
408
408
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ae as _objectWithoutProperties, Q as useTheme, dJ as getStartingSize, dK as DEFAULT_BUTTON_SIZE, al as merge, r as reactExports, ar as flattenChildren, v as jsx, dB as isChildSubcomponent, au as SmartClone, B as Box, dL as getResponsiveSx, dM as BUTTON_SIZES, dN as setDefaultSxBackgroundColor, b3 as ButtCon, dz as ClassNames, y as Button, ad as _defineProperty, j as ae, k as useTranslation, aU as ViewContext, x as jsxs, A as Body, V as ViewActions, Z as ConnectLoaderContext, D as useAnalytics, F as EventTargetContext, bM as K, aP as MenuItem, J as tokenValueFormat, U as UserJourney, O as orchestrationEvents, o as oo, d as formatZeroAmount, aK as isPassportProvider, dO as ZERO_BALANCE_STRING, a$ as isNativeToken, dP as sendNetworkSwitchEvent, cy as S, a5 as SharedViews, dQ as ge, dR as sortNetworksCompareFn, cB as getChainImage, cJ as retry, dr as DEFAULT_BALANCE_RETRY_POLICY, dS as sortTokensByAmount, b0 as getTokenImageByAddress, e as calculateCryptoToFiat, G as CryptoFiatContext, a1 as CryptoFiatActions, M as HeaderNavigation, cQ as ButtonNavigationStyles, dT as sendWalletWidgetCloseEvent, c5 as FooterLogo, z as SimpleLayout, cP as fe, cN as getWalletProviderNameByProvider, dH as isDualVariantIcon, ca as abbreviateWalletAddress, H as Heading, aA as Drawer, cD as useWalletConnect, dU as sendDisconnectWalletEvent, cG as isWalletConnectProvider, c$ as heroBackGroundStyles, d0 as heroImageStyles, dF as heroImageBottomAlign, d1 as SimpleTextBody, dV as FAQS_LINK, L as Link, bH as viewReducer, bI as initialViewState, Y as CryptoFiatProvider, a0 as LoadingView, a6 as ErrorView } from './index-
|
|
2
|
-
import { T as TokenImage } from './TokenImage-
|
|
3
|
-
import { u as useInterval } from './useInterval-
|
|
1
|
+
import { ae as _objectWithoutProperties, Q as useTheme, dJ as getStartingSize, dK as DEFAULT_BUTTON_SIZE, al as merge, r as reactExports, ar as flattenChildren, v as jsx, dB as isChildSubcomponent, au as SmartClone, B as Box, dL as getResponsiveSx, dM as BUTTON_SIZES, dN as setDefaultSxBackgroundColor, b3 as ButtCon, dz as ClassNames, y as Button, ad as _defineProperty, j as ae, k as useTranslation, aU as ViewContext, x as jsxs, A as Body, V as ViewActions, Z as ConnectLoaderContext, D as useAnalytics, F as EventTargetContext, bM as K, aP as MenuItem, J as tokenValueFormat, U as UserJourney, O as orchestrationEvents, o as oo, d as formatZeroAmount, aK as isPassportProvider, dO as ZERO_BALANCE_STRING, a$ as isNativeToken, dP as sendNetworkSwitchEvent, cy as S, a5 as SharedViews, dQ as ge, dR as sortNetworksCompareFn, cB as getChainImage, cJ as retry, dr as DEFAULT_BALANCE_RETRY_POLICY, dS as sortTokensByAmount, b0 as getTokenImageByAddress, e as calculateCryptoToFiat, G as CryptoFiatContext, a1 as CryptoFiatActions, M as HeaderNavigation, cQ as ButtonNavigationStyles, dT as sendWalletWidgetCloseEvent, c5 as FooterLogo, z as SimpleLayout, cP as fe, cN as getWalletProviderNameByProvider, dH as isDualVariantIcon, ca as abbreviateWalletAddress, H as Heading, aA as Drawer, cD as useWalletConnect, dU as sendDisconnectWalletEvent, cG as isWalletConnectProvider, c$ as heroBackGroundStyles, d0 as heroImageStyles, dF as heroImageBottomAlign, d1 as SimpleTextBody, dV as FAQS_LINK, L as Link, bH as viewReducer, bI as initialViewState, Y as CryptoFiatProvider, a0 as LoadingView, a6 as ErrorView } from './index-CKeYlxiz.js';
|
|
2
|
+
import { T as TokenImage } from './TokenImage-BPB-nljj.js';
|
|
3
|
+
import { u as useInterval } from './useInterval-BjUysGEJ.js';
|
|
4
4
|
|
|
5
5
|
var horizontalMenuSxProps = {
|
|
6
6
|
justifyContent: "stretch",
|