@kimafinance/kima-transaction-widget 1.5.1 → 1.5.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.
- package/dist/index.cjs +684 -692
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +357 -3
- package/dist/index.d.ts +357 -3
- package/dist/index.js +692 -700
- package/dist/index.js.map +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/package.json +3 -2
package/dist/index.cjs
CHANGED
|
@@ -251,7 +251,7 @@ var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
|
251
251
|
|
|
252
252
|
// src/assets/icons/Arrow.tsx
|
|
253
253
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
254
|
-
var
|
|
254
|
+
var Arrow = ({ width = 22, height = 25, fill = "none", ...rest }) => {
|
|
255
255
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
256
256
|
"svg",
|
|
257
257
|
{
|
|
@@ -275,7 +275,7 @@ var Arrow2 = ({ width = 22, height = 25, fill = "none", ...rest }) => {
|
|
|
275
275
|
}
|
|
276
276
|
);
|
|
277
277
|
};
|
|
278
|
-
var Arrow_default =
|
|
278
|
+
var Arrow_default = Arrow;
|
|
279
279
|
|
|
280
280
|
// src/assets/icons/Lock.tsx
|
|
281
281
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
@@ -5135,7 +5135,7 @@ var KimaProvider_default = KimaProvider;
|
|
|
5135
5135
|
|
|
5136
5136
|
// src/widgets/common/KimaTransactionWidget.tsx
|
|
5137
5137
|
var import_react67 = require("react");
|
|
5138
|
-
var
|
|
5138
|
+
var import_react_redux58 = require("react-redux");
|
|
5139
5139
|
|
|
5140
5140
|
// src/assets/loading/180-ring.tsx
|
|
5141
5141
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
@@ -5232,12 +5232,8 @@ var ExternalLink = ({ to, children, className, rest }) => /* @__PURE__ */ (0, im
|
|
|
5232
5232
|
);
|
|
5233
5233
|
var ExternalLink_default = ExternalLink;
|
|
5234
5234
|
|
|
5235
|
-
// src/components/reusable/NetworkLabel.tsx
|
|
5236
|
-
var import_react_redux27 = require("react-redux");
|
|
5237
|
-
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
5238
|
-
|
|
5239
5235
|
// src/components/reusable/PrimaryButton.tsx
|
|
5240
|
-
var
|
|
5236
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
5241
5237
|
var PrimaryButton = ({
|
|
5242
5238
|
className,
|
|
5243
5239
|
clickHandler,
|
|
@@ -5246,7 +5242,7 @@ var PrimaryButton = ({
|
|
|
5246
5242
|
disabled = false,
|
|
5247
5243
|
ref
|
|
5248
5244
|
}) => {
|
|
5249
|
-
return /* @__PURE__ */ (0,
|
|
5245
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "primary-button-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
5250
5246
|
"button",
|
|
5251
5247
|
{
|
|
5252
5248
|
className: `primary-button ${className}`,
|
|
@@ -5254,7 +5250,7 @@ var PrimaryButton = ({
|
|
|
5254
5250
|
ref,
|
|
5255
5251
|
disabled,
|
|
5256
5252
|
children: [
|
|
5257
|
-
isLoading && /* @__PURE__ */ (0,
|
|
5253
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "loading-indicator", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(ring_default, { width: 24, height: 24, fill: "white" }) }),
|
|
5258
5254
|
children
|
|
5259
5255
|
]
|
|
5260
5256
|
}
|
|
@@ -5263,7 +5259,7 @@ var PrimaryButton = ({
|
|
|
5263
5259
|
var PrimaryButton_default = PrimaryButton;
|
|
5264
5260
|
|
|
5265
5261
|
// src/components/reusable/SecondaryButton.tsx
|
|
5266
|
-
var
|
|
5262
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5267
5263
|
var SecondaryButton = ({
|
|
5268
5264
|
className,
|
|
5269
5265
|
clickHandler,
|
|
@@ -5272,7 +5268,7 @@ var SecondaryButton = ({
|
|
|
5272
5268
|
style,
|
|
5273
5269
|
disabled = false,
|
|
5274
5270
|
isLoading
|
|
5275
|
-
}) => /* @__PURE__ */ (0,
|
|
5271
|
+
}) => /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
5276
5272
|
"button",
|
|
5277
5273
|
{
|
|
5278
5274
|
className: `secondary-button ${className} ${theme}`,
|
|
@@ -5280,7 +5276,7 @@ var SecondaryButton = ({
|
|
|
5280
5276
|
...style,
|
|
5281
5277
|
disabled,
|
|
5282
5278
|
children: [
|
|
5283
|
-
isLoading && /* @__PURE__ */ (0,
|
|
5279
|
+
isLoading && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "loading-indicator", children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ring_default, { width: 24, height: 24, fill: "black" }) }),
|
|
5284
5280
|
children
|
|
5285
5281
|
]
|
|
5286
5282
|
}
|
|
@@ -5289,14 +5285,14 @@ var SecondaryButton_default = SecondaryButton;
|
|
|
5289
5285
|
|
|
5290
5286
|
// src/components/reusable/WalletButton.tsx
|
|
5291
5287
|
var import_react43 = require("react");
|
|
5292
|
-
var
|
|
5288
|
+
var import_react_redux28 = require("react-redux");
|
|
5293
5289
|
|
|
5294
5290
|
// src/shared/lib/hooks/useGetCurrentPlugin.ts
|
|
5295
5291
|
var import_react38 = require("react");
|
|
5296
|
-
var
|
|
5292
|
+
var import_react_redux27 = require("react-redux");
|
|
5297
5293
|
var useGetCurrentPlugin = () => {
|
|
5298
|
-
const isIndexed = (0,
|
|
5299
|
-
const sourceChain = (0,
|
|
5294
|
+
const isIndexed = (0, import_react_redux27.useSelector)(selectPluginIsIndexed);
|
|
5295
|
+
const sourceChain = (0, import_react_redux27.useSelector)(selectSourceChain);
|
|
5300
5296
|
const currentPlugin = (0, import_react38.useMemo)(() => {
|
|
5301
5297
|
if (!isIndexed || !sourceChain?.shortName) return null;
|
|
5302
5298
|
const plugin = getPlugin(sourceChain.shortName) ?? null;
|
|
@@ -5316,7 +5312,7 @@ var useGetCurrentPlugin_default = useGetCurrentPlugin;
|
|
|
5316
5312
|
|
|
5317
5313
|
// src/shared/plugins/default.tsx
|
|
5318
5314
|
var import_react39 = require("react");
|
|
5319
|
-
var
|
|
5315
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5320
5316
|
var DefaultPlugin = class extends PluginBase {
|
|
5321
5317
|
constructor(storeArg) {
|
|
5322
5318
|
super({
|
|
@@ -5356,7 +5352,7 @@ var DefaultPlugin = class extends PluginBase {
|
|
|
5356
5352
|
// Never “compatible” so it won’t be picked for any chain
|
|
5357
5353
|
isCompatible = () => false;
|
|
5358
5354
|
// Transparent provider: renders children as-is
|
|
5359
|
-
Provider = ({ children }) => /* @__PURE__ */ (0,
|
|
5355
|
+
Provider = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children });
|
|
5360
5356
|
};
|
|
5361
5357
|
var defaultPlugin = new DefaultPlugin(store_default);
|
|
5362
5358
|
var default_default = defaultPlugin;
|
|
@@ -5435,7 +5431,7 @@ var import_react44 = require("@reown/appkit/react");
|
|
|
5435
5431
|
|
|
5436
5432
|
// src/components/reusable/CopyButton.tsx
|
|
5437
5433
|
var import_react41 = require("react");
|
|
5438
|
-
var
|
|
5434
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5439
5435
|
var CopyButton = ({ text }) => {
|
|
5440
5436
|
const [copyClicked, setCopyClicked] = (0, import_react41.useState)(false);
|
|
5441
5437
|
(0, import_react41.useEffect)(() => {
|
|
@@ -5444,7 +5440,7 @@ var CopyButton = ({ text }) => {
|
|
|
5444
5440
|
setCopyClicked(false);
|
|
5445
5441
|
}, 2e3);
|
|
5446
5442
|
}, [copyClicked]);
|
|
5447
|
-
return /* @__PURE__ */ (0,
|
|
5443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
5448
5444
|
"span",
|
|
5449
5445
|
{
|
|
5450
5446
|
className: "copy-btn",
|
|
@@ -5452,7 +5448,7 @@ var CopyButton = ({ text }) => {
|
|
|
5452
5448
|
setCopyClicked(true);
|
|
5453
5449
|
navigator.clipboard.writeText(text);
|
|
5454
5450
|
},
|
|
5455
|
-
children: copyClicked ? /* @__PURE__ */ (0,
|
|
5451
|
+
children: copyClicked ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Check_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Copy_default, {})
|
|
5456
5452
|
}
|
|
5457
5453
|
);
|
|
5458
5454
|
};
|
|
@@ -5461,78 +5457,78 @@ var CopyButton_default = CopyButton;
|
|
|
5461
5457
|
// src/hooks/useHideActivityTab.tsx
|
|
5462
5458
|
var import_react42 = require("react");
|
|
5463
5459
|
function useHideWuiListItem(isModalOpen) {
|
|
5460
|
+
const observerRef = (0, import_react42.useRef)(null);
|
|
5464
5461
|
(0, import_react42.useEffect)(() => {
|
|
5465
5462
|
const modalSelector = "w3m-modal";
|
|
5466
|
-
let observer;
|
|
5467
5463
|
const hideFirstWuiListItem = (parent) => {
|
|
5468
5464
|
const stack = [parent];
|
|
5469
|
-
while (stack.length
|
|
5465
|
+
while (stack.length) {
|
|
5470
5466
|
const current = stack.shift();
|
|
5471
|
-
if (
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5477
|
-
|
|
5467
|
+
if (current instanceof Element) {
|
|
5468
|
+
if (current.tagName === "WUI-LIST-ITEM") {
|
|
5469
|
+
;
|
|
5470
|
+
current.style.display = "none";
|
|
5471
|
+
break;
|
|
5472
|
+
}
|
|
5473
|
+
const sr = current.shadowRoot;
|
|
5474
|
+
if (sr) stack.push(sr);
|
|
5475
|
+
stack.push(...Array.from(current.children ?? []));
|
|
5476
|
+
} else if (current instanceof ShadowRoot) {
|
|
5477
|
+
stack.push(...Array.from(current.children));
|
|
5478
5478
|
}
|
|
5479
|
-
stack.push(...Array.from(current.children));
|
|
5480
5479
|
}
|
|
5481
5480
|
};
|
|
5482
5481
|
const observeModal = () => {
|
|
5483
5482
|
const modal = document.querySelector(modalSelector);
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
hideFirstWuiListItem(wuiFlex);
|
|
5489
|
-
}
|
|
5490
|
-
}
|
|
5483
|
+
const sr = modal?.shadowRoot;
|
|
5484
|
+
if (!sr) return;
|
|
5485
|
+
const wuiFlex = sr.querySelector("wui-flex");
|
|
5486
|
+
if (wuiFlex) hideFirstWuiListItem(wuiFlex);
|
|
5491
5487
|
};
|
|
5492
|
-
const
|
|
5493
|
-
|
|
5488
|
+
const startObserver = () => {
|
|
5489
|
+
observerRef.current?.disconnect();
|
|
5490
|
+
observerRef.current = new MutationObserver(() => {
|
|
5494
5491
|
const modal = document.querySelector(modalSelector);
|
|
5495
|
-
if (modal)
|
|
5496
|
-
|
|
5497
|
-
|
|
5492
|
+
if (modal) observeModal();
|
|
5493
|
+
});
|
|
5494
|
+
observerRef.current.observe(document.body, {
|
|
5495
|
+
childList: true,
|
|
5496
|
+
subtree: true
|
|
5498
5497
|
});
|
|
5499
|
-
observer.observe(document.body, { childList: true, subtree: true });
|
|
5500
5498
|
};
|
|
5501
5499
|
if (isModalOpen) {
|
|
5502
|
-
|
|
5500
|
+
startObserver();
|
|
5503
5501
|
observeModal();
|
|
5504
5502
|
} else {
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
}
|
|
5503
|
+
observerRef.current?.disconnect();
|
|
5504
|
+
observerRef.current = null;
|
|
5508
5505
|
}
|
|
5509
5506
|
return () => {
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
}
|
|
5507
|
+
observerRef.current?.disconnect();
|
|
5508
|
+
observerRef.current = null;
|
|
5513
5509
|
};
|
|
5514
5510
|
}, [isModalOpen]);
|
|
5515
5511
|
}
|
|
5516
5512
|
var useHideActivityTab_default = useHideWuiListItem;
|
|
5517
5513
|
|
|
5518
5514
|
// src/components/reusable/WalletButton.tsx
|
|
5519
|
-
var
|
|
5515
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
5520
5516
|
var TAG = "[WalletButton]";
|
|
5521
5517
|
var WalletButton = ({
|
|
5522
5518
|
errorBelow = false,
|
|
5523
5519
|
initialSelection,
|
|
5524
5520
|
placeholder = false
|
|
5525
5521
|
}) => {
|
|
5526
|
-
const dispatch = (0,
|
|
5527
|
-
const theme = (0,
|
|
5528
|
-
const mode = (0,
|
|
5529
|
-
const selectedCoin = (0,
|
|
5530
|
-
const sourceCompliant = (0,
|
|
5531
|
-
const compliantOption = (0,
|
|
5532
|
-
const sourceNetwork = (0,
|
|
5533
|
-
const targetNetwork = (0,
|
|
5534
|
-
const targetAddress = (0,
|
|
5535
|
-
const dAppOption = (0,
|
|
5522
|
+
const dispatch = (0, import_react_redux28.useDispatch)();
|
|
5523
|
+
const theme = (0, import_react_redux28.useSelector)(selectTheme);
|
|
5524
|
+
const mode = (0, import_react_redux28.useSelector)(selectMode);
|
|
5525
|
+
const selectedCoin = (0, import_react_redux28.useSelector)(selectSourceCurrency);
|
|
5526
|
+
const sourceCompliant = (0, import_react_redux28.useSelector)(selectSourceCompliant);
|
|
5527
|
+
const compliantOption = (0, import_react_redux28.useSelector)(selectCompliantOption);
|
|
5528
|
+
const sourceNetwork = (0, import_react_redux28.useSelector)(selectSourceChain);
|
|
5529
|
+
const targetNetwork = (0, import_react_redux28.useSelector)(selectTargetChain);
|
|
5530
|
+
const targetAddress = (0, import_react_redux28.useSelector)(selectTargetAddress);
|
|
5531
|
+
const dAppOption = (0, import_react_redux28.useSelector)(selectDappOption);
|
|
5536
5532
|
const { externalProvider } = useKimaContext();
|
|
5537
5533
|
const { connected: isSolanaConnected } = (0, import_wallet_adapter_react5.useWallet)();
|
|
5538
5534
|
const { connected: isTronConnected } = (0, import_tronwallet_adapter_react_hooks5.useWallet)();
|
|
@@ -5676,12 +5672,12 @@ var WalletButton = ({
|
|
|
5676
5672
|
}, [mode, isReady, statusMessage, compliantOption, sourceCompliant]);
|
|
5677
5673
|
const renderConnectedLabel = () => {
|
|
5678
5674
|
if (isEvmSwitching) {
|
|
5679
|
-
return /* @__PURE__ */ (0,
|
|
5675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
|
5680
5676
|
"Switching network\u2026",
|
|
5681
|
-
/* @__PURE__ */ (0,
|
|
5682
|
-
/* @__PURE__ */ (0,
|
|
5683
|
-
/* @__PURE__ */ (0,
|
|
5684
|
-
/* @__PURE__ */ (0,
|
|
5677
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { className: "loading-indicator-inline", "aria-hidden": "true", children: [
|
|
5678
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "dot" }),
|
|
5679
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "dot" }),
|
|
5680
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "dot" })
|
|
5685
5681
|
] })
|
|
5686
5682
|
] });
|
|
5687
5683
|
}
|
|
@@ -5693,38 +5689,38 @@ var WalletButton = ({
|
|
|
5693
5689
|
theme.colorMode,
|
|
5694
5690
|
isEvmSwitching ? "network-switching" : ""
|
|
5695
5691
|
].filter(Boolean).join(" ");
|
|
5696
|
-
return /* @__PURE__ */ (0,
|
|
5692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
5697
5693
|
"div",
|
|
5698
5694
|
{
|
|
5699
5695
|
className: `wallet-button ${isConnected ? "connected" : "disconnected"} ${theme.colorMode} ${errorBelow ? "error-below" : ""}`,
|
|
5700
5696
|
"data-testid": "connect-wallet-btn",
|
|
5701
5697
|
children: [
|
|
5702
|
-
/* @__PURE__ */ (0,
|
|
5703
|
-
/* @__PURE__ */ (0,
|
|
5698
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("div", { className: "info-wrapper", children: [
|
|
5699
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
5704
5700
|
"button",
|
|
5705
5701
|
{
|
|
5706
5702
|
className: btnClasses,
|
|
5707
5703
|
onClick: handleClick,
|
|
5708
5704
|
disabled: !isWalletApplicable || isEvmSwitching,
|
|
5709
5705
|
"aria-busy": isEvmSwitching ? "true" : void 0,
|
|
5710
|
-
children: isConnected ? renderConnectedLabel() : /* @__PURE__ */ (0,
|
|
5706
|
+
children: isConnected ? renderConnectedLabel() : /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
|
5711
5707
|
mode === "light" /* light */ && "Select Network to Load Account",
|
|
5712
5708
|
mode !== "light" /* light */ && !hasSelectedSourceNetwork && "Select Network to Connect",
|
|
5713
|
-
mode !== "light" /* light */ && hasSelectedSourceNetwork && /* @__PURE__ */ (0,
|
|
5714
|
-
/* @__PURE__ */ (0,
|
|
5709
|
+
mode !== "light" /* light */ && hasSelectedSourceNetwork && /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_jsx_runtime60.Fragment, { children: [
|
|
5710
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Wallet_default, {}),
|
|
5715
5711
|
"Connect Wallet"
|
|
5716
5712
|
] })
|
|
5717
5713
|
] })
|
|
5718
5714
|
}
|
|
5719
5715
|
),
|
|
5720
|
-
isConnected && !placeholder && displayedAddress && !isEvmSwitching && /* @__PURE__ */ (0,
|
|
5716
|
+
isConnected && !placeholder && displayedAddress && !isEvmSwitching && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(CopyButton_default, { text: displayedAddress })
|
|
5721
5717
|
] }),
|
|
5722
|
-
isConnected && mode !== "light" /* light */ && !placeholder && /* @__PURE__ */ (0,
|
|
5718
|
+
isConnected && mode !== "light" /* light */ && !placeholder && /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_jsx_runtime60.Fragment, { children: balance !== void 0 && decimals !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("p", { className: "balance-info", children: [
|
|
5723
5719
|
formatUSD(bigIntToNumber({ value: balance, decimals })),
|
|
5724
5720
|
" ",
|
|
5725
5721
|
selectedCoin,
|
|
5726
5722
|
" available"
|
|
5727
|
-
] }) : /* @__PURE__ */ (0,
|
|
5723
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "loading", "aria-label": "balance-loading" }) })
|
|
5728
5724
|
]
|
|
5729
5725
|
}
|
|
5730
5726
|
);
|
|
@@ -5733,19 +5729,19 @@ var WalletButton_default = WalletButton;
|
|
|
5733
5729
|
|
|
5734
5730
|
// src/components/reusable/CoinDropdown.tsx
|
|
5735
5731
|
var import_react46 = require("react");
|
|
5736
|
-
var
|
|
5732
|
+
var import_react_redux30 = require("react-redux");
|
|
5737
5733
|
|
|
5738
5734
|
// src/widgets/transfer/hooks/useCurrencyOptions.tsx
|
|
5739
5735
|
var import_react45 = require("react");
|
|
5740
|
-
var
|
|
5736
|
+
var import_react_redux29 = require("react-redux");
|
|
5741
5737
|
var emptyTokenList = { tokenList: [] };
|
|
5742
5738
|
function useCurrencyOptions(isSourceChain) {
|
|
5743
|
-
const dispatch = (0,
|
|
5744
|
-
const mode = (0,
|
|
5745
|
-
const sourceChain = (0,
|
|
5746
|
-
const sourceSymbol = (0,
|
|
5747
|
-
const targetChain = (0,
|
|
5748
|
-
const targetSymbol = (0,
|
|
5739
|
+
const dispatch = (0, import_react_redux29.useDispatch)();
|
|
5740
|
+
const mode = (0, import_react_redux29.useSelector)(selectMode);
|
|
5741
|
+
const sourceChain = (0, import_react_redux29.useSelector)(selectSourceChain);
|
|
5742
|
+
const sourceSymbol = (0, import_react_redux29.useSelector)(selectSourceCurrency);
|
|
5743
|
+
const targetChain = (0, import_react_redux29.useSelector)(selectTargetChain);
|
|
5744
|
+
const targetSymbol = (0, import_react_redux29.useSelector)(selectTargetCurrency);
|
|
5749
5745
|
const output = (0, import_react45.useMemo)(() => {
|
|
5750
5746
|
const chain = isSourceChain ? sourceChain : targetChain;
|
|
5751
5747
|
const location = isSourceChain ? "origin" : "target";
|
|
@@ -5803,7 +5799,7 @@ function useCurrencyOptions(isSourceChain) {
|
|
|
5803
5799
|
}
|
|
5804
5800
|
|
|
5805
5801
|
// src/components/reusable/TokenIcon.tsx
|
|
5806
|
-
var
|
|
5802
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
5807
5803
|
var COIN_LIST2 = {
|
|
5808
5804
|
EUR: KEUR_default,
|
|
5809
5805
|
EURC: EURC_default,
|
|
@@ -5828,23 +5824,23 @@ function TokenIcon({
|
|
|
5828
5824
|
logger_default.warn(`Token icon not found for symbol: ${symbol}`);
|
|
5829
5825
|
return null;
|
|
5830
5826
|
}
|
|
5831
|
-
return /* @__PURE__ */ (0,
|
|
5827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "icon-wrapper", children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(Icon, { width, height }) });
|
|
5832
5828
|
}
|
|
5833
5829
|
|
|
5834
5830
|
// src/components/reusable/CoinDropdown.tsx
|
|
5835
|
-
var
|
|
5831
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
5836
5832
|
var CoinDropdown = ({
|
|
5837
5833
|
isSourceChain = true
|
|
5838
5834
|
}) => {
|
|
5839
5835
|
const ref = (0, import_react46.useRef)(null);
|
|
5840
|
-
const dispatch = (0,
|
|
5836
|
+
const dispatch = (0, import_react_redux30.useDispatch)();
|
|
5841
5837
|
const [collapsed, setCollapsed] = (0, import_react46.useState)(true);
|
|
5842
|
-
const theme = (0,
|
|
5843
|
-
const mode = (0,
|
|
5844
|
-
const dAppOption = (0,
|
|
5845
|
-
const transactionOption = (0,
|
|
5846
|
-
const sourceCurrency = (0,
|
|
5847
|
-
const targetCurrency = (0,
|
|
5838
|
+
const theme = (0, import_react_redux30.useSelector)(selectTheme);
|
|
5839
|
+
const mode = (0, import_react_redux30.useSelector)(selectMode);
|
|
5840
|
+
const dAppOption = (0, import_react_redux30.useSelector)(selectDappOption);
|
|
5841
|
+
const transactionOption = (0, import_react_redux30.useSelector)(selectTransactionOption);
|
|
5842
|
+
const sourceCurrency = (0, import_react_redux30.useSelector)(selectSourceCurrency);
|
|
5843
|
+
const targetCurrency = (0, import_react_redux30.useSelector)(selectTargetCurrency);
|
|
5848
5844
|
const { tokenList } = useCurrencyOptions(isSourceChain);
|
|
5849
5845
|
const tokenSymbol = isSourceChain ? sourceCurrency : targetCurrency;
|
|
5850
5846
|
const shouldLockToken = isSourceChain && mode === "payment" /* payment */ && dAppOption !== "none" /* None */ && !!transactionOption?.currency;
|
|
@@ -5890,7 +5886,7 @@ var CoinDropdown = ({
|
|
|
5890
5886
|
}
|
|
5891
5887
|
setCollapsed(true);
|
|
5892
5888
|
};
|
|
5893
|
-
return /* @__PURE__ */ (0,
|
|
5889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
5894
5890
|
"div",
|
|
5895
5891
|
{
|
|
5896
5892
|
className: `coin-dropdown ${theme.colorMode} ${collapsed ? "collapsed" : "toggled"} ${shouldLockToken ? "disabled" : ""}`,
|
|
@@ -5899,15 +5895,15 @@ var CoinDropdown = ({
|
|
|
5899
5895
|
},
|
|
5900
5896
|
ref,
|
|
5901
5897
|
children: [
|
|
5902
|
-
/* @__PURE__ */ (0,
|
|
5903
|
-
/* @__PURE__ */ (0,
|
|
5904
|
-
/* @__PURE__ */ (0,
|
|
5905
|
-
] }) : /* @__PURE__ */ (0,
|
|
5906
|
-
/* @__PURE__ */ (0,
|
|
5898
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "coin-wrapper", children: tokenSymbol ? /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_jsx_runtime62.Fragment, { children: [
|
|
5899
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(TokenIcon, { symbol: tokenSymbol, width: 24, height: 24 }),
|
|
5900
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "coin", children: tokenSymbol })
|
|
5901
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "coin placeholder", children: "Select token" }) }),
|
|
5902
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
5907
5903
|
"div",
|
|
5908
5904
|
{
|
|
5909
5905
|
className: `coin-menu ${theme.colorMode} ${collapsed ? "collapsed" : "toggled"}`,
|
|
5910
|
-
children: tokenList.map((token) => /* @__PURE__ */ (0,
|
|
5906
|
+
children: tokenList.map((token) => /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(
|
|
5911
5907
|
"div",
|
|
5912
5908
|
{
|
|
5913
5909
|
className: `coin-item ${theme.colorMode}`,
|
|
@@ -5916,15 +5912,15 @@ var CoinDropdown = ({
|
|
|
5916
5912
|
handleDropdownItemClick(token.symbol);
|
|
5917
5913
|
},
|
|
5918
5914
|
children: [
|
|
5919
|
-
/* @__PURE__ */ (0,
|
|
5920
|
-
/* @__PURE__ */ (0,
|
|
5915
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(TokenIcon, { symbol: token.symbol, width: 24, height: 24 }),
|
|
5916
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)("p", { children: token.symbol })
|
|
5921
5917
|
]
|
|
5922
5918
|
},
|
|
5923
5919
|
token.symbol
|
|
5924
5920
|
))
|
|
5925
5921
|
}
|
|
5926
5922
|
),
|
|
5927
|
-
!shouldLockToken && /* @__PURE__ */ (0,
|
|
5923
|
+
!shouldLockToken && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: `dropdown-icon ${collapsed ? "toggled" : "collapsed"}`, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(Arrow_default, { fill: "none" }) })
|
|
5928
5924
|
]
|
|
5929
5925
|
}
|
|
5930
5926
|
);
|
|
@@ -5933,10 +5929,10 @@ var CoinDropdown_default = CoinDropdown;
|
|
|
5933
5929
|
|
|
5934
5930
|
// src/components/reusable/ConfirmDetails.tsx
|
|
5935
5931
|
var import_react47 = require("react");
|
|
5936
|
-
var
|
|
5932
|
+
var import_react_redux32 = require("react-redux");
|
|
5937
5933
|
|
|
5938
5934
|
// src/components/reusable/ChainIcon.tsx
|
|
5939
|
-
var
|
|
5935
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
5940
5936
|
var chainIcons = {
|
|
5941
5937
|
ARB: Arbitrum_default,
|
|
5942
5938
|
AVX: Avalanche_default,
|
|
@@ -5958,32 +5954,32 @@ function ChainIcon({ symbol }) {
|
|
|
5958
5954
|
const Icon = symbol === "FIAT" ? chainIcons["CC"] : chainIcons[symbol];
|
|
5959
5955
|
if (!Icon) {
|
|
5960
5956
|
if (symbol) logger_default.warn(`Chain icon not found for symbol: ${symbol}`);
|
|
5961
|
-
return /* @__PURE__ */ (0,
|
|
5957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", {});
|
|
5962
5958
|
}
|
|
5963
|
-
return /* @__PURE__ */ (0,
|
|
5959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Icon, {}) });
|
|
5964
5960
|
}
|
|
5965
5961
|
|
|
5966
5962
|
// src/components/reusable/FeeDeductionRadioButtons.tsx
|
|
5967
|
-
var
|
|
5968
|
-
var
|
|
5963
|
+
var import_react_redux31 = require("react-redux");
|
|
5964
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
5969
5965
|
var FeeDeductionRadioButtons = ({ disabled }) => {
|
|
5970
|
-
const dispatch = (0,
|
|
5971
|
-
const feeDeduct = (0,
|
|
5972
|
-
const amount = (0,
|
|
5973
|
-
const sourceNetwork = (0,
|
|
5974
|
-
const targetNetwork = (0,
|
|
5975
|
-
const { totalFee: feeTotalBigInt } = (0,
|
|
5966
|
+
const dispatch = (0, import_react_redux31.useDispatch)();
|
|
5967
|
+
const feeDeduct = (0, import_react_redux31.useSelector)(selectFeeDeduct);
|
|
5968
|
+
const amount = (0, import_react_redux31.useSelector)(selectAmount);
|
|
5969
|
+
const sourceNetwork = (0, import_react_redux31.useSelector)(selectSourceChain);
|
|
5970
|
+
const targetNetwork = (0, import_react_redux31.useSelector)(selectTargetChain);
|
|
5971
|
+
const { totalFee: feeTotalBigInt } = (0, import_react_redux31.useSelector)(selectServiceFee);
|
|
5976
5972
|
const totalFee = bigIntToNumber(feeTotalBigInt);
|
|
5977
|
-
const sourceCurrency = (0,
|
|
5978
|
-
const targetCurrency = (0,
|
|
5979
|
-
const theme = (0,
|
|
5980
|
-
const isSubmitted = (0,
|
|
5973
|
+
const sourceCurrency = (0, import_react_redux31.useSelector)(selectSourceCurrency);
|
|
5974
|
+
const targetCurrency = (0, import_react_redux31.useSelector)(selectTargetCurrency);
|
|
5975
|
+
const theme = (0, import_react_redux31.useSelector)(selectTheme);
|
|
5976
|
+
const isSubmitted = (0, import_react_redux31.useSelector)(selectSubmitted);
|
|
5981
5977
|
const handleChange = (value) => {
|
|
5982
5978
|
dispatch(setFeeDeduct(value));
|
|
5983
5979
|
};
|
|
5984
|
-
return /* @__PURE__ */ (0,
|
|
5985
|
-
Number(amount) - totalFee > 0 && /* @__PURE__ */ (0,
|
|
5986
|
-
/* @__PURE__ */ (0,
|
|
5980
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: `fee-deduction-radio-container ${theme.colorMode}`, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "fee-options", children: [
|
|
5981
|
+
Number(amount) - totalFee > 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("label", { className: `fee-option ${disabled ? "disabled" : ""}`, children: [
|
|
5982
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
5987
5983
|
"input",
|
|
5988
5984
|
{
|
|
5989
5985
|
type: "radio",
|
|
@@ -5993,14 +5989,14 @@ var FeeDeductionRadioButtons = ({ disabled }) => {
|
|
|
5993
5989
|
onChange: () => handleChange(true)
|
|
5994
5990
|
}
|
|
5995
5991
|
),
|
|
5996
|
-
/* @__PURE__ */ (0,
|
|
5992
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: `radio-label ${theme.colorMode}`, children: `Pay $${formatterFloat.format(
|
|
5997
5993
|
Number(amount)
|
|
5998
5994
|
)} ${sourceCurrency} ${["BANK", "CC"].includes(sourceNetwork.shortName) ? "with" : "in"} ${sourceNetwork.name} to receive $${formatterFloat.format(
|
|
5999
5995
|
Number(amount) - totalFee
|
|
6000
5996
|
)} ${targetCurrency} ${["BANK", "CC"].includes(targetNetwork.shortName) ? "with" : "in"} ${targetNetwork.name}` })
|
|
6001
5997
|
] }),
|
|
6002
|
-
/* @__PURE__ */ (0,
|
|
6003
|
-
/* @__PURE__ */ (0,
|
|
5998
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("label", { className: `fee-option ${disabled ? "disabled" : ""}`, children: [
|
|
5999
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
6004
6000
|
"input",
|
|
6005
6001
|
{
|
|
6006
6002
|
type: "radio",
|
|
@@ -6010,7 +6006,7 @@ var FeeDeductionRadioButtons = ({ disabled }) => {
|
|
|
6010
6006
|
onChange: () => handleChange(false)
|
|
6011
6007
|
}
|
|
6012
6008
|
),
|
|
6013
|
-
/* @__PURE__ */ (0,
|
|
6009
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: `radio-label ${theme.colorMode}`, children: `Pay $${formatterFloat.format(
|
|
6014
6010
|
Number(amount) + totalFee
|
|
6015
6011
|
)} ${sourceCurrency} ${["BANK", "CC"].includes(sourceNetwork.shortName) ? "with" : "in"} ${sourceNetwork.name} to receive $${formatterFloat.format(
|
|
6016
6012
|
Number(amount)
|
|
@@ -6021,7 +6017,7 @@ var FeeDeductionRadioButtons = ({ disabled }) => {
|
|
|
6021
6017
|
var FeeDeductionRadioButtons_default = FeeDeductionRadioButtons;
|
|
6022
6018
|
|
|
6023
6019
|
// src/components/reusable/ConfirmDetails.tsx
|
|
6024
|
-
var
|
|
6020
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
6025
6021
|
var scaleUp = (value, diff) => diff <= 0 ? value : value * 10n ** BigInt(diff);
|
|
6026
6022
|
var sumBigAmts = (amts) => {
|
|
6027
6023
|
const present = amts.filter(Boolean);
|
|
@@ -6037,10 +6033,10 @@ var ConfirmDetails = ({
|
|
|
6037
6033
|
isApproved,
|
|
6038
6034
|
feeOptionDisabled
|
|
6039
6035
|
}) => {
|
|
6040
|
-
const feeDeduct = (0,
|
|
6041
|
-
const mode = (0,
|
|
6042
|
-
const dAppOption = (0,
|
|
6043
|
-
const theme = (0,
|
|
6036
|
+
const feeDeduct = (0, import_react_redux32.useSelector)(selectFeeDeduct);
|
|
6037
|
+
const mode = (0, import_react_redux32.useSelector)(selectMode);
|
|
6038
|
+
const dAppOption = (0, import_react_redux32.useSelector)(selectDappOption);
|
|
6039
|
+
const theme = (0, import_react_redux32.useSelector)(selectTheme);
|
|
6044
6040
|
const {
|
|
6045
6041
|
transactionValues,
|
|
6046
6042
|
sourceFee,
|
|
@@ -6049,13 +6045,13 @@ var ConfirmDetails = ({
|
|
|
6049
6045
|
totalFee,
|
|
6050
6046
|
swapFee,
|
|
6051
6047
|
swapInfo
|
|
6052
|
-
} = (0,
|
|
6053
|
-
const originNetwork = (0,
|
|
6054
|
-
const targetNetwork = (0,
|
|
6055
|
-
const targetAddress = (0,
|
|
6056
|
-
const networkOptions = (0,
|
|
6048
|
+
} = (0, import_react_redux32.useSelector)(selectServiceFee);
|
|
6049
|
+
const originNetwork = (0, import_react_redux32.useSelector)(selectSourceChain);
|
|
6050
|
+
const targetNetwork = (0, import_react_redux32.useSelector)(selectTargetChain);
|
|
6051
|
+
const targetAddress = (0, import_react_redux32.useSelector)(selectTargetAddress);
|
|
6052
|
+
const networkOptions = (0, import_react_redux32.useSelector)(selectNetworks);
|
|
6057
6053
|
const [feeCollapsed, setFeeCollapsed] = (0, import_react47.useState)(true);
|
|
6058
|
-
const transactionOption = (0,
|
|
6054
|
+
const transactionOption = (0, import_react_redux32.useSelector)(selectTransactionOption);
|
|
6059
6055
|
const { connectedAddress } = useIsWalletReady_default();
|
|
6060
6056
|
const targetNetworkOption = (0, import_react47.useMemo)(
|
|
6061
6057
|
() => networkOptions.filter(
|
|
@@ -6069,8 +6065,8 @@ var ConfirmDetails = ({
|
|
|
6069
6065
|
targetNetwork.shortName
|
|
6070
6066
|
]
|
|
6071
6067
|
);
|
|
6072
|
-
const sourceCurrency = (0,
|
|
6073
|
-
const targetCurrency = (0,
|
|
6068
|
+
const sourceCurrency = (0, import_react_redux32.useSelector)(selectSourceCurrency);
|
|
6069
|
+
const targetCurrency = (0, import_react_redux32.useSelector)(selectTargetCurrency);
|
|
6074
6070
|
const { width, updateWidth } = useWidth_default();
|
|
6075
6071
|
const isSwap = (0, import_react47.useMemo)(
|
|
6076
6072
|
() => !!swapInfo || !isSamePeggedToken(
|
|
@@ -6105,45 +6101,45 @@ var ConfirmDetails = ({
|
|
|
6105
6101
|
hasSwapInfo: !!swapInfo
|
|
6106
6102
|
});
|
|
6107
6103
|
}, [isSwap, sourceCurrency, targetCurrency, totalFee, swapInfo]);
|
|
6108
|
-
return /* @__PURE__ */ (0,
|
|
6109
|
-
/* @__PURE__ */ (0,
|
|
6104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: `confirm-details ${theme.colorMode}`, children: [
|
|
6105
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("p", { children: [
|
|
6110
6106
|
"Step ",
|
|
6111
6107
|
isApproved ? "2" : "1",
|
|
6112
6108
|
"\xA0of 2\xA0\xA0\xA0",
|
|
6113
6109
|
isApproved ? "Submit transaction" : originNetwork.shortName === "FIAT" /* FIAT */ ? "Bank Details" : "Approval"
|
|
6114
6110
|
] }),
|
|
6115
|
-
/* @__PURE__ */ (0,
|
|
6116
|
-
/* @__PURE__ */ (0,
|
|
6111
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "detail-item", children: [
|
|
6112
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "label", children: [
|
|
6117
6113
|
"Source",
|
|
6118
6114
|
!["BANK", "CC"].includes(originNetwork.shortName) && " wallet",
|
|
6119
6115
|
":"
|
|
6120
6116
|
] }),
|
|
6121
|
-
/* @__PURE__ */ (0,
|
|
6122
|
-
/* @__PURE__ */ (0,
|
|
6123
|
-
/* @__PURE__ */ (0,
|
|
6117
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "network-details", children: [
|
|
6118
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "kima-card-network-container", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: `kima-card-network-label ${theme.colorMode}`, children: [
|
|
6119
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(ChainIcon, { symbol: originNetwork?.shortName }),
|
|
6124
6120
|
originNetwork.name
|
|
6125
6121
|
] }) }),
|
|
6126
|
-
!["CC", "BANK"].includes(originNetwork.shortName) && /* @__PURE__ */ (0,
|
|
6122
|
+
!["CC", "BANK"].includes(originNetwork.shortName) && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("p", { className: theme.colorMode, children: dAppOption === "LPDrain" /* LPDrain */ ? targetAddress : connectedAddress })
|
|
6127
6123
|
] })
|
|
6128
6124
|
] }),
|
|
6129
|
-
/* @__PURE__ */ (0,
|
|
6130
|
-
dAppOption === "none" /* None */ && /* @__PURE__ */ (0,
|
|
6131
|
-
/* @__PURE__ */ (0,
|
|
6132
|
-
/* @__PURE__ */ (0,
|
|
6125
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "detail-item amount", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "amount-container", children: [
|
|
6126
|
+
dAppOption === "none" /* None */ && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "amount-details", children: [
|
|
6127
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: "Amount to Transfer" }),
|
|
6128
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "coin-details", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("p", { children: [
|
|
6133
6129
|
formatBigInt(txValues.allowanceAmount),
|
|
6134
6130
|
" ",
|
|
6135
6131
|
sourceCurrency
|
|
6136
6132
|
] }) })
|
|
6137
6133
|
] }),
|
|
6138
|
-
dAppOption === "none" /* None */ && /* @__PURE__ */ (0,
|
|
6139
|
-
/* @__PURE__ */ (0,
|
|
6140
|
-
/* @__PURE__ */ (0,
|
|
6134
|
+
dAppOption === "none" /* None */ && /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "amount-details", children: [
|
|
6135
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: "Total Fees" }),
|
|
6136
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
6141
6137
|
"div",
|
|
6142
6138
|
{
|
|
6143
6139
|
className: "fee-collapse",
|
|
6144
6140
|
onClick: () => setFeeCollapsed(!feeCollapsed),
|
|
6145
6141
|
children: [
|
|
6146
|
-
/* @__PURE__ */ (0,
|
|
6142
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
6147
6143
|
MiniArrow_default,
|
|
6148
6144
|
{
|
|
6149
6145
|
width: 15,
|
|
@@ -6154,7 +6150,7 @@ var ConfirmDetails = ({
|
|
|
6154
6150
|
}
|
|
6155
6151
|
}
|
|
6156
6152
|
),
|
|
6157
|
-
/* @__PURE__ */ (0,
|
|
6153
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "service-fee", children: [
|
|
6158
6154
|
formatBigInt(totalFee),
|
|
6159
6155
|
" ",
|
|
6160
6156
|
sourceCurrency
|
|
@@ -6163,91 +6159,91 @@ var ConfirmDetails = ({
|
|
|
6163
6159
|
}
|
|
6164
6160
|
)
|
|
6165
6161
|
] }),
|
|
6166
|
-
/* @__PURE__ */ (0,
|
|
6167
|
-
/* @__PURE__ */ (0,
|
|
6168
|
-
/* @__PURE__ */ (0,
|
|
6169
|
-
/* @__PURE__ */ (0,
|
|
6162
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: `fee-breakdown ${feeCollapsed ? "collapsed" : ""}`, children: isSwap ? /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
|
6163
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "amount-details", children: [
|
|
6164
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: "Swap Fees" }),
|
|
6165
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "service-fee", children: [
|
|
6170
6166
|
formatBigInt(combinedSwapFees),
|
|
6171
6167
|
" ",
|
|
6172
6168
|
sourceCurrency
|
|
6173
6169
|
] })
|
|
6174
6170
|
] }),
|
|
6175
|
-
/* @__PURE__ */ (0,
|
|
6176
|
-
/* @__PURE__ */ (0,
|
|
6177
|
-
/* @__PURE__ */ (0,
|
|
6171
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "amount-details", children: [
|
|
6172
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: "Kima Processing Fees" }),
|
|
6173
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "service-fee", children: [
|
|
6178
6174
|
formatBigInt(kimaFee),
|
|
6179
6175
|
" ",
|
|
6180
6176
|
sourceCurrency
|
|
6181
6177
|
] })
|
|
6182
6178
|
] })
|
|
6183
|
-
] }) : /* @__PURE__ */ (0,
|
|
6184
|
-
/* @__PURE__ */ (0,
|
|
6185
|
-
/* @__PURE__ */ (0,
|
|
6186
|
-
/* @__PURE__ */ (0,
|
|
6179
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_jsx_runtime65.Fragment, { children: [
|
|
6180
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "amount-details", children: [
|
|
6181
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: ["BANK", "CC"].includes(originNetwork.shortName) ? `${originNetwork.name} Processing Fee` : `Source Network Fee (${originNetwork.shortName})` }),
|
|
6182
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "service-fee", children: [
|
|
6187
6183
|
formatBigInt(sourceFee),
|
|
6188
6184
|
" ",
|
|
6189
6185
|
sourceCurrency
|
|
6190
6186
|
] })
|
|
6191
6187
|
] }),
|
|
6192
|
-
/* @__PURE__ */ (0,
|
|
6193
|
-
/* @__PURE__ */ (0,
|
|
6188
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "amount-details", children: [
|
|
6189
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { children: [
|
|
6194
6190
|
"Target Network Fee (",
|
|
6195
6191
|
targetNetwork.shortName,
|
|
6196
6192
|
")"
|
|
6197
6193
|
] }),
|
|
6198
|
-
/* @__PURE__ */ (0,
|
|
6194
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "service-fee", children: [
|
|
6199
6195
|
formatBigInt(targetFee),
|
|
6200
6196
|
" ",
|
|
6201
6197
|
targetCurrency
|
|
6202
6198
|
] })
|
|
6203
6199
|
] }),
|
|
6204
|
-
/* @__PURE__ */ (0,
|
|
6205
|
-
/* @__PURE__ */ (0,
|
|
6206
|
-
/* @__PURE__ */ (0,
|
|
6200
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "amount-details", children: [
|
|
6201
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: "KIMA Service Fee" }),
|
|
6202
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "service-fee", children: [
|
|
6207
6203
|
formatBigInt(kimaFee),
|
|
6208
6204
|
" ",
|
|
6209
6205
|
sourceCurrency
|
|
6210
6206
|
] })
|
|
6211
6207
|
] })
|
|
6212
6208
|
] }) }),
|
|
6213
|
-
/* @__PURE__ */ (0,
|
|
6214
|
-
/* @__PURE__ */ (0,
|
|
6215
|
-
/* @__PURE__ */ (0,
|
|
6209
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "amount-details", children: [
|
|
6210
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: "Target Transfer Amount" }),
|
|
6211
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: "service-fee", children: [
|
|
6216
6212
|
formatBigInt(targetDisplayAmount),
|
|
6217
6213
|
" ",
|
|
6218
6214
|
targetCurrency
|
|
6219
6215
|
] })
|
|
6220
6216
|
] })
|
|
6221
6217
|
] }) }),
|
|
6222
|
-
/* @__PURE__ */ (0,
|
|
6223
|
-
/* @__PURE__ */ (0,
|
|
6224
|
-
/* @__PURE__ */ (0,
|
|
6225
|
-
/* @__PURE__ */ (0,
|
|
6226
|
-
/* @__PURE__ */ (0,
|
|
6218
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "detail-item", children: [
|
|
6219
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { className: "label", children: "Target wallet:" }),
|
|
6220
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { className: "network-details", children: [
|
|
6221
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { className: "kima-card-network-container", children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("span", { className: `kima-card-network-label ${theme.colorMode}`, children: [
|
|
6222
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(ChainIcon, { symbol: targetNetworkOption?.shortName }),
|
|
6227
6223
|
targetNetworkOption?.name
|
|
6228
6224
|
] }) }),
|
|
6229
|
-
/* @__PURE__ */ (0,
|
|
6225
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)("p", { className: theme.colorMode, children: mode === "light" /* light */ ? targetNetwork.shortName === "SOL" ? "Ff6z...demoSol" : targetNetwork.shortName === "TRX" ? "TQx...demoTrx" : "0xDEMO...EVM" : dAppOption === "LPDrain" /* LPDrain */ ? connectedAddress : targetAddress })
|
|
6230
6226
|
] })
|
|
6231
6227
|
] }),
|
|
6232
|
-
!isSwap && mode === "bridge" /* bridge */ && BigInt(totalFee.value) > 0n && /* @__PURE__ */ (0,
|
|
6228
|
+
!isSwap && mode === "bridge" /* bridge */ && BigInt(totalFee.value) > 0n && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(FeeDeductionRadioButtons_default, { disabled: feeOptionDisabled })
|
|
6233
6229
|
] });
|
|
6234
6230
|
};
|
|
6235
6231
|
var ConfirmDetails_default = ConfirmDetails;
|
|
6236
6232
|
|
|
6237
6233
|
// src/components/reusable/AddressInput.tsx
|
|
6238
6234
|
var import_react48 = require("react");
|
|
6239
|
-
var
|
|
6240
|
-
var
|
|
6235
|
+
var import_react_redux33 = require("react-redux");
|
|
6236
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
6241
6237
|
var AddressInput = ({
|
|
6242
6238
|
theme,
|
|
6243
6239
|
placeholder
|
|
6244
6240
|
}) => {
|
|
6245
|
-
const dispatch = (0,
|
|
6246
|
-
const mode = (0,
|
|
6247
|
-
const sourceChain = (0,
|
|
6248
|
-
const targetChain = (0,
|
|
6241
|
+
const dispatch = (0, import_react_redux33.useDispatch)();
|
|
6242
|
+
const mode = (0, import_react_redux33.useSelector)(selectMode);
|
|
6243
|
+
const sourceChain = (0, import_react_redux33.useSelector)(selectSourceChain);
|
|
6244
|
+
const targetChain = (0, import_react_redux33.useSelector)(selectTargetChain);
|
|
6249
6245
|
const { connectedAddress: sourceAddress, isReady } = useIsWalletReady_default();
|
|
6250
|
-
const targetAddress = (0,
|
|
6246
|
+
const targetAddress = (0, import_react_redux33.useSelector)(selectTargetAddress);
|
|
6251
6247
|
const didAutofill = (0, import_react48.useRef)(null);
|
|
6252
6248
|
(0, import_react48.useEffect)(() => {
|
|
6253
6249
|
didAutofill.current = null;
|
|
@@ -6277,7 +6273,7 @@ var AddressInput = ({
|
|
|
6277
6273
|
targetChain.shortName,
|
|
6278
6274
|
dispatch
|
|
6279
6275
|
]);
|
|
6280
|
-
return /* @__PURE__ */ (0,
|
|
6276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
6281
6277
|
"input",
|
|
6282
6278
|
{
|
|
6283
6279
|
className: `kima-address-input ${theme}`,
|
|
@@ -6292,13 +6288,13 @@ var AddressInput = ({
|
|
|
6292
6288
|
var AddressInput_default = AddressInput;
|
|
6293
6289
|
|
|
6294
6290
|
// src/components/reusable/CustomCheckbox.tsx
|
|
6295
|
-
var
|
|
6296
|
-
var
|
|
6291
|
+
var import_react_redux34 = require("react-redux");
|
|
6292
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
6297
6293
|
|
|
6298
6294
|
// src/components/reusable/StepBox.tsx
|
|
6299
6295
|
var import_react49 = require("react");
|
|
6300
|
-
var
|
|
6301
|
-
var
|
|
6296
|
+
var import_react_redux35 = require("react-redux");
|
|
6297
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
6302
6298
|
var stepInfo = [
|
|
6303
6299
|
{
|
|
6304
6300
|
title: "Initialize"
|
|
@@ -6317,10 +6313,10 @@ var stepInfo = [
|
|
|
6317
6313
|
}
|
|
6318
6314
|
];
|
|
6319
6315
|
var StepBox = ({ step, errorStep, loadingStep, data }) => {
|
|
6320
|
-
const theme = (0,
|
|
6321
|
-
const explorerUrl = (0,
|
|
6322
|
-
const networkOption = (0,
|
|
6323
|
-
const networks = (0,
|
|
6316
|
+
const theme = (0, import_react_redux35.useSelector)(selectTheme);
|
|
6317
|
+
const explorerUrl = (0, import_react_redux35.useSelector)(selectKimaExplorer);
|
|
6318
|
+
const networkOption = (0, import_react_redux35.useSelector)(selectNetworkOption);
|
|
6319
|
+
const networks = (0, import_react_redux35.useSelector)(selectNetworks);
|
|
6324
6320
|
const { width: windowWidth } = useWidth_default();
|
|
6325
6321
|
const sourceChain = (0, import_react49.useMemo)(() => {
|
|
6326
6322
|
const sourceKey = data?.sourceChain === "FIAT" ? "CC" : data?.sourceChain;
|
|
@@ -6330,94 +6326,94 @@ var StepBox = ({ step, errorStep, loadingStep, data }) => {
|
|
|
6330
6326
|
() => networks.find((network) => network.shortName === data?.targetChain),
|
|
6331
6327
|
[data, networks]
|
|
6332
6328
|
);
|
|
6333
|
-
return /* @__PURE__ */ (0,
|
|
6334
|
-
/* @__PURE__ */ (0,
|
|
6329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "kima-stepbox", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: `content-wrapper ${theme.colorMode}`, children: stepInfo.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "step-item", children: [
|
|
6330
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
6335
6331
|
"div",
|
|
6336
6332
|
{
|
|
6337
6333
|
className: `info-item
|
|
6338
6334
|
${step >= index ? index === loadingStep ? "active" : index === errorStep ? "error" : "completed" : ""}
|
|
6339
6335
|
${step < index && "locked"} ${theme.colorMode}`,
|
|
6340
6336
|
children: [
|
|
6341
|
-
/* @__PURE__ */ (0,
|
|
6342
|
-
step < index && /* @__PURE__ */ (0,
|
|
6343
|
-
step >= index ? index === loadingStep ? /* @__PURE__ */ (0,
|
|
6337
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "info-icon", children: [
|
|
6338
|
+
step < index && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Lock_default, { width: 24, height: 24 }),
|
|
6339
|
+
step >= index ? index === loadingStep ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Loader_default, { width: 24, height: 24, className: "loader" }) : index === errorStep ? /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Warning_default, { width: 24, height: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Check_default, { width: 24, height: 24 }) : null
|
|
6344
6340
|
] }),
|
|
6345
|
-
/* @__PURE__ */ (0,
|
|
6341
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("p", { children: item.title })
|
|
6346
6342
|
]
|
|
6347
6343
|
}
|
|
6348
6344
|
),
|
|
6349
|
-
index === 0 && data?.kimaTxHash ? /* @__PURE__ */ (0,
|
|
6350
|
-
/* @__PURE__ */ (0,
|
|
6351
|
-
/* @__PURE__ */ (0,
|
|
6352
|
-
/* @__PURE__ */ (0,
|
|
6353
|
-
/* @__PURE__ */ (0,
|
|
6345
|
+
index === 0 && data?.kimaTxHash ? /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: `info-item ${theme.colorMode}`, children: [
|
|
6346
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "icon", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(USDK_default, { width: 30, height: 30 }) }),
|
|
6347
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("p", { className: "chain-name", children: "Kima TX Hash:" }),
|
|
6348
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("p", { children: [
|
|
6349
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6354
6350
|
ExternalLink_default,
|
|
6355
6351
|
{
|
|
6356
6352
|
to: `${explorerUrl}/transactions/?tx=${data?.kimaTxHash}`,
|
|
6357
6353
|
children: getShortenedAddress(data?.kimaTxHash || "")
|
|
6358
6354
|
}
|
|
6359
6355
|
),
|
|
6360
|
-
/* @__PURE__ */ (0,
|
|
6356
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(CopyButton_default, { text: data?.kimaTxHash })
|
|
6361
6357
|
] })
|
|
6362
6358
|
] }) : null,
|
|
6363
|
-
index === 1 && data?.tssPullHash && sourceChain?.shortName !== "CC" ? /* @__PURE__ */ (0,
|
|
6359
|
+
index === 1 && data?.tssPullHash && sourceChain?.shortName !== "CC" ? /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
6364
6360
|
"div",
|
|
6365
6361
|
{
|
|
6366
6362
|
className: `info-item ${theme.colorMode} source-chain ${step >= 3 ? "paid" : ""}`,
|
|
6367
6363
|
children: [
|
|
6368
|
-
/* @__PURE__ */ (0,
|
|
6369
|
-
/* @__PURE__ */ (0,
|
|
6364
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ChainIcon, { symbol: data.sourceChain }),
|
|
6365
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("p", { className: "chain-name", children: [
|
|
6370
6366
|
windowWidth >= 770 ? sourceChain?.name : sourceChain?.shortName,
|
|
6371
6367
|
" ",
|
|
6372
6368
|
"TX Hash:"
|
|
6373
6369
|
] }),
|
|
6374
|
-
/* @__PURE__ */ (0,
|
|
6375
|
-
/* @__PURE__ */ (0,
|
|
6370
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("p", { children: [
|
|
6371
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6376
6372
|
ExternalLink_default,
|
|
6377
6373
|
{
|
|
6378
6374
|
to: `${sourceChain?.blockExplorers?.default.url}/${data?.sourceChain === "TRX" /* TRON */ ? "#/transaction" : "tx"}/${data?.tssPullHash}${data?.sourceChain === "SOL" /* SOLANA */ && networkOption === "testnet" /* testnet */ ? "?cluster=devnet" : ""}`,
|
|
6379
6375
|
children: getShortenedAddress(data?.tssPullHash || "")
|
|
6380
6376
|
}
|
|
6381
6377
|
),
|
|
6382
|
-
/* @__PURE__ */ (0,
|
|
6378
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(CopyButton_default, { text: data?.tssPullHash || "" })
|
|
6383
6379
|
] })
|
|
6384
6380
|
]
|
|
6385
6381
|
}
|
|
6386
6382
|
) : null,
|
|
6387
|
-
index === 3 && data?.tssRefundHash ? /* @__PURE__ */ (0,
|
|
6388
|
-
/* @__PURE__ */ (0,
|
|
6389
|
-
/* @__PURE__ */ (0,
|
|
6383
|
+
index === 3 && data?.tssRefundHash ? /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: `info-item ${theme.colorMode} target-chain`, children: [
|
|
6384
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ChainIcon, { symbol: data.sourceChain }),
|
|
6385
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("p", { className: "chain-name", children: [
|
|
6390
6386
|
windowWidth >= 770 ? sourceChain?.name : sourceChain?.shortName,
|
|
6391
6387
|
" ",
|
|
6392
6388
|
"TX Hash:"
|
|
6393
6389
|
] }),
|
|
6394
|
-
/* @__PURE__ */ (0,
|
|
6395
|
-
/* @__PURE__ */ (0,
|
|
6390
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("p", { children: [
|
|
6391
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6396
6392
|
ExternalLink_default,
|
|
6397
6393
|
{
|
|
6398
6394
|
to: `${sourceChain?.blockExplorers?.default.url}/${data?.sourceChain === "TRX" /* TRON */ ? "#/transaction" : "tx"}/${data?.tssRefundHash}${data?.sourceChain === "SOL" /* SOLANA */ && networkOption === "testnet" /* testnet */ ? "?cluster=devnet" : ""}`,
|
|
6399
6395
|
children: getShortenedAddress(data?.tssRefundHash || "")
|
|
6400
6396
|
}
|
|
6401
6397
|
),
|
|
6402
|
-
/* @__PURE__ */ (0,
|
|
6398
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(CopyButton_default, { text: data?.tssRefundHash || "" })
|
|
6403
6399
|
] })
|
|
6404
6400
|
] }) : null,
|
|
6405
|
-
index === 3 && data?.tssReleaseHash ? /* @__PURE__ */ (0,
|
|
6406
|
-
/* @__PURE__ */ (0,
|
|
6407
|
-
/* @__PURE__ */ (0,
|
|
6401
|
+
index === 3 && data?.tssReleaseHash ? /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: `info-item ${theme.colorMode} target-chain`, children: [
|
|
6402
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ChainIcon, { symbol: data.targetChain }),
|
|
6403
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("p", { className: "chain-name", children: [
|
|
6408
6404
|
windowWidth >= 770 ? targetChain?.name : targetChain?.shortName,
|
|
6409
6405
|
" ",
|
|
6410
6406
|
"TX Hash:"
|
|
6411
6407
|
] }),
|
|
6412
|
-
/* @__PURE__ */ (0,
|
|
6413
|
-
/* @__PURE__ */ (0,
|
|
6408
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("p", { children: [
|
|
6409
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
6414
6410
|
ExternalLink_default,
|
|
6415
6411
|
{
|
|
6416
6412
|
to: `${targetChain?.blockExplorers?.default.url}/${data?.targetChain === "TRX" /* TRON */ ? "#/transaction" : "tx"}/${data?.tssReleaseHash}${data?.targetChain === "SOL" /* SOLANA */ && networkOption === "testnet" /* testnet */ ? "?cluster=devnet" : ""}`,
|
|
6417
6413
|
children: getShortenedAddress(data?.tssReleaseHash || "")
|
|
6418
6414
|
}
|
|
6419
6415
|
),
|
|
6420
|
-
/* @__PURE__ */ (0,
|
|
6416
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(CopyButton_default, { text: data?.tssReleaseHash || "" })
|
|
6421
6417
|
] })
|
|
6422
6418
|
] }) : null
|
|
6423
6419
|
] }, item.title)) }) });
|
|
@@ -6425,8 +6421,8 @@ var StepBox = ({ step, errorStep, loadingStep, data }) => {
|
|
|
6425
6421
|
var StepBox_default = StepBox;
|
|
6426
6422
|
|
|
6427
6423
|
// src/widgets/common/ErrorWidget.tsx
|
|
6428
|
-
var
|
|
6429
|
-
var
|
|
6424
|
+
var import_react_redux36 = require("react-redux");
|
|
6425
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
6430
6426
|
var ErrorWidget = ({
|
|
6431
6427
|
theme,
|
|
6432
6428
|
title,
|
|
@@ -6434,26 +6430,26 @@ var ErrorWidget = ({
|
|
|
6434
6430
|
backButtonEnabled = false,
|
|
6435
6431
|
backButtonFunction
|
|
6436
6432
|
}) => {
|
|
6437
|
-
const sourceChain = (0,
|
|
6438
|
-
const ccTransactionId = (0,
|
|
6433
|
+
const sourceChain = (0, import_react_redux36.useSelector)(selectSourceChain);
|
|
6434
|
+
const ccTransactionId = (0, import_react_redux36.useSelector)(selectCCTransactionId);
|
|
6439
6435
|
const isCreditCardSource = sourceChain.shortName === "CC";
|
|
6440
|
-
const isRetrying = (0,
|
|
6441
|
-
return /* @__PURE__ */ (0,
|
|
6436
|
+
const isRetrying = (0, import_react_redux36.useSelector)(selectCCTransactionRetrying);
|
|
6437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6442
6438
|
"div",
|
|
6443
6439
|
{
|
|
6444
6440
|
className: `kima-card ${theme.colorMode}`,
|
|
6445
6441
|
style: {
|
|
6446
6442
|
background: theme.colorMode === "light" /* light */ ? theme.backgroundColorLight : theme.backgroundColorDark
|
|
6447
6443
|
},
|
|
6448
|
-
children: /* @__PURE__ */ (0,
|
|
6449
|
-
/* @__PURE__ */ (0,
|
|
6450
|
-
/* @__PURE__ */ (0,
|
|
6451
|
-
/* @__PURE__ */ (0,
|
|
6444
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "transfer-card", children: [
|
|
6445
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "kima-card-header", children: [
|
|
6446
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "topbar", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "title", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("h3", { children: title }) }) }),
|
|
6447
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("h4", { className: "subtitle" })
|
|
6452
6448
|
] }),
|
|
6453
|
-
/* @__PURE__ */ (0,
|
|
6454
|
-
isCreditCardSource && !isRetrying && /* @__PURE__ */ (0,
|
|
6455
|
-
message && message !== "" && /* @__PURE__ */ (0,
|
|
6456
|
-
isCreditCardSource && /* @__PURE__ */ (0,
|
|
6449
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "kima-card-content error", children: [
|
|
6450
|
+
isCreditCardSource && !isRetrying && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Error_default, { width: 40, height: 40 }),
|
|
6451
|
+
message && message !== "" && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("h2", { children: message }),
|
|
6452
|
+
isCreditCardSource && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
6457
6453
|
"div",
|
|
6458
6454
|
{
|
|
6459
6455
|
style: {
|
|
@@ -6462,8 +6458,8 @@ var ErrorWidget = ({
|
|
|
6462
6458
|
flexDirection: "column"
|
|
6463
6459
|
},
|
|
6464
6460
|
children: [
|
|
6465
|
-
isRetrying ? /* @__PURE__ */ (0,
|
|
6466
|
-
ccTransactionId && /* @__PURE__ */ (0,
|
|
6461
|
+
isRetrying ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("p", { children: "The transaction is being retried in the background. This may take a few moments. If the issue persists, please contact support and provide the transaction ID below for reference." }) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("p", { children: "This credit card transaction has failed. Please check the details and try again. If the issue persists, please contact support and provide the transaction ID below for reference." }),
|
|
6462
|
+
ccTransactionId && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
6467
6463
|
"div",
|
|
6468
6464
|
{
|
|
6469
6465
|
style: {
|
|
@@ -6473,7 +6469,7 @@ var ErrorWidget = ({
|
|
|
6473
6469
|
justifyContent: "center"
|
|
6474
6470
|
},
|
|
6475
6471
|
children: [
|
|
6476
|
-
/* @__PURE__ */ (0,
|
|
6472
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6477
6473
|
"code",
|
|
6478
6474
|
{
|
|
6479
6475
|
style: {
|
|
@@ -6484,16 +6480,16 @@ var ErrorWidget = ({
|
|
|
6484
6480
|
children: ccTransactionId
|
|
6485
6481
|
}
|
|
6486
6482
|
),
|
|
6487
|
-
/* @__PURE__ */ (0,
|
|
6483
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(CopyButton_default, { text: ccTransactionId })
|
|
6488
6484
|
]
|
|
6489
6485
|
}
|
|
6490
6486
|
),
|
|
6491
|
-
isRetrying && /* @__PURE__ */ (0,
|
|
6487
|
+
isRetrying && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ring_default, { width: 30, height: 30, fill: "#86b8ce" })
|
|
6492
6488
|
]
|
|
6493
6489
|
}
|
|
6494
6490
|
)
|
|
6495
6491
|
] }),
|
|
6496
|
-
backButtonEnabled && /* @__PURE__ */ (0,
|
|
6492
|
+
backButtonEnabled && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
6497
6493
|
"div",
|
|
6498
6494
|
{
|
|
6499
6495
|
style: {
|
|
@@ -6501,14 +6497,14 @@ var ErrorWidget = ({
|
|
|
6501
6497
|
justifyContent: "flex-end",
|
|
6502
6498
|
marginTop: 16
|
|
6503
6499
|
},
|
|
6504
|
-
children: /* @__PURE__ */ (0,
|
|
6500
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(PrimaryButton_default, { clickHandler: backButtonFunction, children: "Back" })
|
|
6505
6501
|
}
|
|
6506
6502
|
),
|
|
6507
|
-
/* @__PURE__ */ (0,
|
|
6508
|
-
/* @__PURE__ */ (0,
|
|
6509
|
-
/* @__PURE__ */ (0,
|
|
6510
|
-
/* @__PURE__ */ (0,
|
|
6511
|
-
/* @__PURE__ */ (0,
|
|
6503
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "kima-card-footer" }),
|
|
6504
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "floating-footer", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: `items ${theme.colorMode}`, children: [
|
|
6505
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children: "Powered by" }),
|
|
6506
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)(FooterLogo_default, { width: 50, fill: "black" }),
|
|
6507
|
+
/* @__PURE__ */ (0, import_jsx_runtime69.jsx)("strong", { children: "Network" })
|
|
6512
6508
|
] }) })
|
|
6513
6509
|
] })
|
|
6514
6510
|
}
|
|
@@ -6550,14 +6546,14 @@ var useDebugCode = (sequence = ["D", "E", "B", "U", "G"]) => {
|
|
|
6550
6546
|
// src/widgets/common/KimaWidgetWrapper.tsx
|
|
6551
6547
|
var import_react65 = require("@reown/appkit/react");
|
|
6552
6548
|
var import_react66 = require("react");
|
|
6553
|
-
var
|
|
6549
|
+
var import_react_redux57 = require("react-redux");
|
|
6554
6550
|
|
|
6555
6551
|
// src/widgets/transaction/components/TransactionWidget.tsx
|
|
6556
6552
|
var import_react53 = require("react");
|
|
6557
6553
|
|
|
6558
6554
|
// src/components/reusable/Progressbar.tsx
|
|
6559
|
-
var
|
|
6560
|
-
var
|
|
6555
|
+
var import_react_redux37 = require("react-redux");
|
|
6556
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
6561
6557
|
var stepInfo2 = [
|
|
6562
6558
|
{
|
|
6563
6559
|
title: "Initialize"
|
|
@@ -6576,10 +6572,10 @@ var stepInfo2 = [
|
|
|
6576
6572
|
}
|
|
6577
6573
|
];
|
|
6578
6574
|
var Progressbar = ({ step, errorStep, setFocus, loadingStep }) => {
|
|
6579
|
-
const theme = (0,
|
|
6580
|
-
return /* @__PURE__ */ (0,
|
|
6581
|
-
/* @__PURE__ */ (0,
|
|
6582
|
-
/* @__PURE__ */ (0,
|
|
6575
|
+
const theme = (0, import_react_redux37.useSelector)(selectTheme);
|
|
6576
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "kima-progressbar", children: [
|
|
6577
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: `value step-${step * 100 / 4}` }),
|
|
6578
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { className: "step-indicators", children: stepInfo2.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
6583
6579
|
"div",
|
|
6584
6580
|
{
|
|
6585
6581
|
className: `step ${step === index && "active"}
|
|
@@ -6588,10 +6584,10 @@ var Progressbar = ({ step, errorStep, setFocus, loadingStep }) => {
|
|
|
6588
6584
|
onClick: () => {
|
|
6589
6585
|
if (index < 4) setFocus(index);
|
|
6590
6586
|
},
|
|
6591
|
-
children: /* @__PURE__ */ (0,
|
|
6592
|
-
step < index && /* @__PURE__ */ (0,
|
|
6593
|
-
step >= index ? index === loadingStep ? /* @__PURE__ */ (0,
|
|
6594
|
-
/* @__PURE__ */ (0,
|
|
6587
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "step-info", children: [
|
|
6588
|
+
step < index && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Lock_default, {}),
|
|
6589
|
+
step >= index ? index === loadingStep ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Loader_default, { className: "loader" }) : index === errorStep ? /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Warning_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Check_default, {}) : null,
|
|
6590
|
+
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)("span", { children: item.title })
|
|
6595
6591
|
] })
|
|
6596
6592
|
},
|
|
6597
6593
|
item.title
|
|
@@ -6601,9 +6597,9 @@ var Progressbar = ({ step, errorStep, setFocus, loadingStep }) => {
|
|
|
6601
6597
|
var Progressbar_default = Progressbar;
|
|
6602
6598
|
|
|
6603
6599
|
// src/widgets/transaction/components/TransactionWidget.tsx
|
|
6600
|
+
var import_react_redux40 = require("react-redux");
|
|
6604
6601
|
var import_react_redux41 = require("react-redux");
|
|
6605
6602
|
var import_react_redux42 = require("react-redux");
|
|
6606
|
-
var import_react_redux43 = require("react-redux");
|
|
6607
6603
|
var import_react_hot_toast2 = require("react-hot-toast");
|
|
6608
6604
|
|
|
6609
6605
|
// src/widgets/transaction/hooks/useTxData.ts
|
|
@@ -6727,20 +6723,20 @@ var useTxData = (txId, dAppOption, backendUrl, isSwap) => {
|
|
|
6727
6723
|
var useTxData_default = useTxData;
|
|
6728
6724
|
|
|
6729
6725
|
// src/components/reusable/TransactionStatusMessage.tsx
|
|
6730
|
-
var
|
|
6726
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
6731
6727
|
var TransactionStatusMessage = ({
|
|
6732
6728
|
isCompleted,
|
|
6733
6729
|
transactionId
|
|
6734
6730
|
}) => {
|
|
6735
|
-
return /* @__PURE__ */ (0,
|
|
6736
|
-
/* @__PURE__ */ (0,
|
|
6731
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "transaction-status-message", children: [
|
|
6732
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("h2", { children: [
|
|
6737
6733
|
isCompleted !== "Completed" /* COMPLETED */ && "Your transaction is currently being processed.",
|
|
6738
6734
|
" ",
|
|
6739
6735
|
"Please copy the Transaction ID below for future reference. You can use this ID to track the transaction status or resolve any issues if needed."
|
|
6740
6736
|
] }),
|
|
6741
|
-
/* @__PURE__ */ (0,
|
|
6742
|
-
/* @__PURE__ */ (0,
|
|
6743
|
-
/* @__PURE__ */ (0,
|
|
6737
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("span", { className: "transaction-copy", children: [
|
|
6738
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("h3", { children: transactionId }),
|
|
6739
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(CopyButton_default, { text: transactionId })
|
|
6744
6740
|
] })
|
|
6745
6741
|
] });
|
|
6746
6742
|
};
|
|
@@ -6748,20 +6744,20 @@ var TransactionStatusMessage_default = TransactionStatusMessage;
|
|
|
6748
6744
|
|
|
6749
6745
|
// src/components/reusable/TransactionSearch.tsx
|
|
6750
6746
|
var import_react52 = require("react");
|
|
6747
|
+
var import_react_redux38 = require("react-redux");
|
|
6751
6748
|
var import_react_redux39 = require("react-redux");
|
|
6752
|
-
var import_react_redux40 = require("react-redux");
|
|
6753
6749
|
var import_react_hot_toast = __toESM(require("react-hot-toast"), 1);
|
|
6754
|
-
var
|
|
6750
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
6755
6751
|
var TransactionSearch = () => {
|
|
6756
|
-
const theme = (0,
|
|
6757
|
-
const backendUrl = (0,
|
|
6758
|
-
const dispatch = (0,
|
|
6752
|
+
const theme = (0, import_react_redux38.useSelector)(selectTheme);
|
|
6753
|
+
const backendUrl = (0, import_react_redux38.useSelector)(selectBackendUrl);
|
|
6754
|
+
const dispatch = (0, import_react_redux39.useDispatch)();
|
|
6759
6755
|
const [transactionId, setTransactionId] = (0, import_react52.useState)("");
|
|
6760
6756
|
const refPollForUpdates = (0, import_react52.useRef)(false);
|
|
6761
6757
|
const handleSearch = async () => {
|
|
6762
6758
|
if (transactionId.length <= 0)
|
|
6763
6759
|
return import_react_hot_toast.default.error("You must provide a valid transaction id", {
|
|
6764
|
-
icon: /* @__PURE__ */ (0,
|
|
6760
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Error_default, {})
|
|
6765
6761
|
});
|
|
6766
6762
|
try {
|
|
6767
6763
|
const data = await getTxData({
|
|
@@ -6779,14 +6775,14 @@ var TransactionSearch = () => {
|
|
|
6779
6775
|
logger_default.error("Error searching transaction: ", error);
|
|
6780
6776
|
return import_react_hot_toast.default.error(
|
|
6781
6777
|
"Transaction not found. Please check for the proper transaction id.",
|
|
6782
|
-
{ icon: /* @__PURE__ */ (0,
|
|
6778
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Error_default, {}) }
|
|
6783
6779
|
);
|
|
6784
6780
|
}
|
|
6785
6781
|
};
|
|
6786
|
-
return /* @__PURE__ */ (0,
|
|
6787
|
-
/* @__PURE__ */ (0,
|
|
6788
|
-
/* @__PURE__ */ (0,
|
|
6789
|
-
/* @__PURE__ */ (0,
|
|
6782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "form-item transaction-search", children: [
|
|
6783
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "transaction-input", children: [
|
|
6784
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "label", children: "Search Transaction:" }),
|
|
6785
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
6790
6786
|
"input",
|
|
6791
6787
|
{
|
|
6792
6788
|
className: `${theme.colorMode}`,
|
|
@@ -6798,13 +6794,13 @@ var TransactionSearch = () => {
|
|
|
6798
6794
|
}
|
|
6799
6795
|
)
|
|
6800
6796
|
] }),
|
|
6801
|
-
/* @__PURE__ */ (0,
|
|
6797
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(SecondaryButton_default, { clickHandler: handleSearch, children: "Search" })
|
|
6802
6798
|
] });
|
|
6803
6799
|
};
|
|
6804
6800
|
var TransactionSearch_default = TransactionSearch;
|
|
6805
6801
|
|
|
6806
6802
|
// src/widgets/transaction/components/TransactionWidget.tsx
|
|
6807
|
-
var
|
|
6803
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
6808
6804
|
var TransactionWidget = ({ theme }) => {
|
|
6809
6805
|
const [step, setStep] = (0, import_react53.useState)(0);
|
|
6810
6806
|
const [focus, setFocus] = (0, import_react53.useState)(-1);
|
|
@@ -6813,23 +6809,23 @@ var TransactionWidget = ({ theme }) => {
|
|
|
6813
6809
|
const [loadingStep, setLoadingStep] = (0, import_react53.useState)(-1);
|
|
6814
6810
|
const [minimized, setMinimized] = (0, import_react53.useState)(false);
|
|
6815
6811
|
const [isComplete, setIsComplete] = (0, import_react53.useState)(false);
|
|
6816
|
-
const dispatch = (0,
|
|
6817
|
-
const explorerUrl = (0,
|
|
6818
|
-
const mode = (0,
|
|
6819
|
-
const feeDeduct = (0,
|
|
6820
|
-
const amount = (0,
|
|
6821
|
-
const txId = (0,
|
|
6822
|
-
const dAppOption = (0,
|
|
6823
|
-
const { transactionValues } = (0,
|
|
6812
|
+
const dispatch = (0, import_react_redux42.useDispatch)();
|
|
6813
|
+
const explorerUrl = (0, import_react_redux41.useSelector)(selectKimaExplorer);
|
|
6814
|
+
const mode = (0, import_react_redux41.useSelector)(selectMode);
|
|
6815
|
+
const feeDeduct = (0, import_react_redux41.useSelector)(selectFeeDeduct);
|
|
6816
|
+
const amount = (0, import_react_redux41.useSelector)(selectAmount);
|
|
6817
|
+
const txId = (0, import_react_redux41.useSelector)(selectTxId);
|
|
6818
|
+
const dAppOption = (0, import_react_redux41.useSelector)(selectDappOption);
|
|
6819
|
+
const { transactionValues } = (0, import_react_redux41.useSelector)(selectServiceFee);
|
|
6824
6820
|
const txValues = feeDeduct ? transactionValues.feeFromTarget : transactionValues.feeFromOrigin;
|
|
6825
|
-
const transactionOption = (0,
|
|
6826
|
-
const sourceChain = (0,
|
|
6827
|
-
const targetChain = (0,
|
|
6828
|
-
const sourceSymbol = (0,
|
|
6829
|
-
const targetSymbol = (0,
|
|
6830
|
-
const networks = (0,
|
|
6821
|
+
const transactionOption = (0, import_react_redux41.useSelector)(selectTransactionOption);
|
|
6822
|
+
const sourceChain = (0, import_react_redux41.useSelector)(selectSourceChain);
|
|
6823
|
+
const targetChain = (0, import_react_redux41.useSelector)(selectTargetChain);
|
|
6824
|
+
const sourceSymbol = (0, import_react_redux41.useSelector)(selectSourceCurrency);
|
|
6825
|
+
const targetSymbol = (0, import_react_redux41.useSelector)(selectTargetCurrency);
|
|
6826
|
+
const networks = (0, import_react_redux41.useSelector)(selectNetworks);
|
|
6831
6827
|
const { successHandler, closeHandler } = useKimaContext();
|
|
6832
|
-
const backendUrl = (0,
|
|
6828
|
+
const backendUrl = (0, import_react_redux41.useSelector)(selectBackendUrl);
|
|
6833
6829
|
const three = (s) => (s ?? "").trim().toLowerCase().slice(0, 3);
|
|
6834
6830
|
const isSwapByPegged = !isSamePeggedToken(
|
|
6835
6831
|
sourceChain,
|
|
@@ -6839,11 +6835,17 @@ var TransactionWidget = ({ theme }) => {
|
|
|
6839
6835
|
);
|
|
6840
6836
|
const isSwapBy3Letters = three(sourceSymbol) !== three(targetSymbol);
|
|
6841
6837
|
const widgetIsSwap = mode === "status" /* status */ ? isSwapBy3Letters : isSwapByPegged;
|
|
6842
|
-
const { data, error } = useTxData_default(txId, dAppOption, backendUrl, widgetIsSwap);
|
|
6843
6838
|
const { width: windowWidth, updateWidth } = useWidth_default();
|
|
6844
6839
|
(0, import_react53.useEffect)(() => {
|
|
6845
6840
|
windowWidth === 0 && updateWidth(window.innerWidth);
|
|
6846
6841
|
}, [windowWidth, updateWidth]);
|
|
6842
|
+
const safeTxId = typeof txId === "string" || typeof txId === "number" ? txId : -1;
|
|
6843
|
+
const { data, error } = useTxData_default(
|
|
6844
|
+
safeTxId,
|
|
6845
|
+
dAppOption,
|
|
6846
|
+
backendUrl,
|
|
6847
|
+
widgetIsSwap
|
|
6848
|
+
);
|
|
6847
6849
|
const transactionSourceChain = (0, import_react53.useMemo)(
|
|
6848
6850
|
() => networks.find(
|
|
6849
6851
|
(network) => network.shortName === (mode === "status" /* status */ ? data?.sourceChain === "FIAT" ? "CC" : data?.sourceChain : sourceChain.shortName)
|
|
@@ -6857,8 +6859,8 @@ var TransactionWidget = ({ theme }) => {
|
|
|
6857
6859
|
[data, mode, targetChain, networks]
|
|
6858
6860
|
);
|
|
6859
6861
|
const isValidTxId = (0, import_react53.useMemo)(() => {
|
|
6860
|
-
return !(
|
|
6861
|
-
}, [
|
|
6862
|
+
return !(safeTxId === -1 || typeof safeTxId === "string" && safeTxId.length === 0);
|
|
6863
|
+
}, [safeTxId]);
|
|
6862
6864
|
const isEmptyStatus = (0, import_react53.useMemo)(() => {
|
|
6863
6865
|
if (!data) return true;
|
|
6864
6866
|
return data?.amount === "";
|
|
@@ -6867,9 +6869,9 @@ var TransactionWidget = ({ theme }) => {
|
|
|
6867
6869
|
(0, import_react53.useEffect)(() => {
|
|
6868
6870
|
if (!data || data.status !== "Completed" /* COMPLETED */) return;
|
|
6869
6871
|
successHandler && successHandler({
|
|
6870
|
-
txId
|
|
6872
|
+
txId: safeTxId
|
|
6871
6873
|
});
|
|
6872
|
-
}, [data, successHandler,
|
|
6874
|
+
}, [data, successHandler, safeTxId]);
|
|
6873
6875
|
(0, import_react53.useEffect)(() => {
|
|
6874
6876
|
if (!data) return;
|
|
6875
6877
|
if (data.status === "Completed" /* COMPLETED */) {
|
|
@@ -6880,9 +6882,7 @@ var TransactionWidget = ({ theme }) => {
|
|
|
6880
6882
|
if (error)
|
|
6881
6883
|
import_react_hot_toast2.toast.error(
|
|
6882
6884
|
"The provided transaction id is not valid, please use a different one or contact support for further assistance",
|
|
6883
|
-
{
|
|
6884
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Error_default, {})
|
|
6885
|
-
}
|
|
6885
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Error_default, {}) }
|
|
6886
6886
|
);
|
|
6887
6887
|
}, [error]);
|
|
6888
6888
|
(0, import_react53.useEffect)(() => {
|
|
@@ -6910,7 +6910,7 @@ var TransactionWidget = ({ theme }) => {
|
|
|
6910
6910
|
setErrorStep(1);
|
|
6911
6911
|
setLoadingStep(-1);
|
|
6912
6912
|
logger_default.error("transaction failed:", data?.failReason);
|
|
6913
|
-
import_react_hot_toast2.toast.error("Unavailable", { icon: /* @__PURE__ */ (0,
|
|
6913
|
+
import_react_hot_toast2.toast.error("Unavailable", { icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Error_default, {}) });
|
|
6914
6914
|
setErrorMessage("Unavailable");
|
|
6915
6915
|
return;
|
|
6916
6916
|
}
|
|
@@ -6924,9 +6924,7 @@ var TransactionWidget = ({ theme }) => {
|
|
|
6924
6924
|
setLoadingStep(3);
|
|
6925
6925
|
import_react_hot_toast2.toast.error(
|
|
6926
6926
|
"Failed to release tokens to target! Starting refund process.",
|
|
6927
|
-
{
|
|
6928
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Error_default, {})
|
|
6929
|
-
}
|
|
6927
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Error_default, {}) }
|
|
6930
6928
|
);
|
|
6931
6929
|
setErrorMessage(
|
|
6932
6930
|
"Failed to release tokens to target! Starting refund process."
|
|
@@ -6937,7 +6935,7 @@ var TransactionWidget = ({ theme }) => {
|
|
|
6937
6935
|
setStep(3);
|
|
6938
6936
|
setErrorStep(3);
|
|
6939
6937
|
setLoadingStep(-1);
|
|
6940
|
-
import_react_hot_toast2.toast.error("Failed to refund tokens to source!", { icon: /* @__PURE__ */ (0,
|
|
6938
|
+
import_react_hot_toast2.toast.error("Failed to refund tokens to source!", { icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Error_default, {}) });
|
|
6941
6939
|
setErrorMessage("Failed to refund tokens to source!");
|
|
6942
6940
|
return;
|
|
6943
6941
|
}
|
|
@@ -6945,7 +6943,7 @@ var TransactionWidget = ({ theme }) => {
|
|
|
6945
6943
|
setStep(4);
|
|
6946
6944
|
setErrorStep(3);
|
|
6947
6945
|
setLoadingStep(-1);
|
|
6948
|
-
import_react_hot_toast2.toast.success("Refund completed!", { icon: /* @__PURE__ */ (0,
|
|
6946
|
+
import_react_hot_toast2.toast.success("Refund completed!", { icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Error_default, {}) });
|
|
6949
6947
|
setErrorMessage("Refund completed!");
|
|
6950
6948
|
return;
|
|
6951
6949
|
}
|
|
@@ -6955,7 +6953,7 @@ var TransactionWidget = ({ theme }) => {
|
|
|
6955
6953
|
setLoadingStep(-1);
|
|
6956
6954
|
logger_default.error("transaction failed:", data?.failReason);
|
|
6957
6955
|
import_react_hot_toast2.toast.error("Failed to release tokens to target!", {
|
|
6958
|
-
icon: /* @__PURE__ */ (0,
|
|
6956
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Error_default, {})
|
|
6959
6957
|
});
|
|
6960
6958
|
setErrorMessage("Failed to release tokens to target!");
|
|
6961
6959
|
return;
|
|
@@ -6965,7 +6963,7 @@ var TransactionWidget = ({ theme }) => {
|
|
|
6965
6963
|
setErrorStep(1);
|
|
6966
6964
|
setLoadingStep(-1);
|
|
6967
6965
|
logger_default.error("transaction failed:", data?.failReason);
|
|
6968
|
-
import_react_hot_toast2.toast.error("Failed to pull tokens from source!", { icon: /* @__PURE__ */ (0,
|
|
6966
|
+
import_react_hot_toast2.toast.error("Failed to pull tokens from source!", { icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Error_default, {}) });
|
|
6969
6967
|
setErrorMessage("Failed to pull tokens from source!");
|
|
6970
6968
|
return;
|
|
6971
6969
|
}
|
|
@@ -6982,6 +6980,7 @@ var TransactionWidget = ({ theme }) => {
|
|
|
6982
6980
|
return;
|
|
6983
6981
|
}
|
|
6984
6982
|
}, [data?.status]);
|
|
6983
|
+
const fmt3 = (v) => formatterFloat.format(Number(Number(v ?? 0).toFixed(3)));
|
|
6985
6984
|
const verb = (0, import_react53.useMemo)(() => {
|
|
6986
6985
|
if (mode === "status" /* status */) {
|
|
6987
6986
|
if (isEmptyStatus) return "Fetching transaction status ";
|
|
@@ -7079,14 +7078,13 @@ var TransactionWidget = ({ theme }) => {
|
|
|
7079
7078
|
logger_default.error("[TransactionWidget] reset failed", e);
|
|
7080
7079
|
import_react_hot_toast2.toast.error(
|
|
7081
7080
|
"Unable to reset the transaction view. Please contact support for assistance.",
|
|
7082
|
-
{ icon: /* @__PURE__ */ (0,
|
|
7081
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Error_default, {}) }
|
|
7083
7082
|
);
|
|
7084
7083
|
}
|
|
7085
7084
|
};
|
|
7086
7085
|
const swapSrcAmt = data?.amountIn ?? amount;
|
|
7087
7086
|
const swapDstAmt = data?.amount;
|
|
7088
|
-
|
|
7089
|
-
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_react_redux41.Provider, { store: store_default, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
7087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_react_redux40.Provider, { store: store_default, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
7090
7088
|
"div",
|
|
7091
7089
|
{
|
|
7092
7090
|
className: `kima-card transaction-card ${isComplete ? "transaction-complete" : ""} ${theme.colorMode} ${minimized ? "minimized" : ""}`,
|
|
@@ -7094,9 +7092,9 @@ var TransactionWidget = ({ theme }) => {
|
|
|
7094
7092
|
background: theme.colorMode === "light" /* light */ ? theme.backgroundColorLight : theme.backgroundColorDark
|
|
7095
7093
|
},
|
|
7096
7094
|
children: [
|
|
7097
|
-
/* @__PURE__ */ (0,
|
|
7098
|
-
/* @__PURE__ */ (0,
|
|
7099
|
-
!isComplete && /* @__PURE__ */ (0,
|
|
7095
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "kima-card-header", children: [
|
|
7096
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "topbar", children: [
|
|
7097
|
+
!isComplete && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "title", children: isValidTxId && !error ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "transaction-title", children: showFetchingTitle ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(import_jsx_runtime73.Fragment, { children: "Getting transaction details\u2026" }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
|
|
7100
7098
|
verb,
|
|
7101
7099
|
leftAmt,
|
|
7102
7100
|
" ",
|
|
@@ -7105,35 +7103,31 @@ var TransactionWidget = ({ theme }) => {
|
|
|
7105
7103
|
rightAmt,
|
|
7106
7104
|
" ",
|
|
7107
7105
|
rightSym
|
|
7108
|
-
] }) }) : /* @__PURE__ */ (0,
|
|
7109
|
-
!minimized ? /* @__PURE__ */ (0,
|
|
7106
|
+
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("h3", { className: "transaction", children: "Transaction Status" }) }) }),
|
|
7107
|
+
!minimized ? /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
7110
7108
|
"div",
|
|
7111
7109
|
{
|
|
7112
7110
|
className: `control-buttons ${isComplete ? "complete" : ""}`,
|
|
7113
7111
|
children: [
|
|
7114
|
-
isComplete && /* @__PURE__ */ (0,
|
|
7112
|
+
isComplete && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
7115
7113
|
"button",
|
|
7116
7114
|
{
|
|
7117
7115
|
className: "menu-button",
|
|
7118
7116
|
style: { marginRight: "auto" },
|
|
7119
|
-
onClick: () =>
|
|
7120
|
-
setIsComplete(false);
|
|
7121
|
-
},
|
|
7117
|
+
onClick: () => setIsComplete(false),
|
|
7122
7118
|
children: "< Back"
|
|
7123
7119
|
}
|
|
7124
7120
|
),
|
|
7125
|
-
/* @__PURE__ */ (0,
|
|
7121
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
7126
7122
|
"button",
|
|
7127
7123
|
{
|
|
7128
7124
|
className: "icon-button minimize",
|
|
7129
|
-
onClick: () =>
|
|
7130
|
-
|
|
7131
|
-
},
|
|
7132
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Minimize_default, {})
|
|
7125
|
+
onClick: () => setMinimized(true),
|
|
7126
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Minimize_default, {})
|
|
7133
7127
|
}
|
|
7134
7128
|
),
|
|
7135
|
-
!isComplete && (!isValidTxId || loadingStep < 0 || error && dAppOption !== "none" /* None */) ? /* @__PURE__ */ (0,
|
|
7136
|
-
closeHandler && /* @__PURE__ */ (0,
|
|
7129
|
+
!isComplete && (!isValidTxId || loadingStep < 0 || error && dAppOption !== "none" /* None */) ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("button", { className: "reset-button", onClick: resetForm, children: "Reset" }) : null,
|
|
7130
|
+
closeHandler && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
7137
7131
|
"button",
|
|
7138
7132
|
{
|
|
7139
7133
|
className: "cross-icon-button",
|
|
@@ -7141,44 +7135,44 @@ var TransactionWidget = ({ theme }) => {
|
|
|
7141
7135
|
resetForm();
|
|
7142
7136
|
closeHandler(0);
|
|
7143
7137
|
},
|
|
7144
|
-
children: /* @__PURE__ */ (0,
|
|
7138
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Cross_default, {})
|
|
7145
7139
|
}
|
|
7146
7140
|
)
|
|
7147
7141
|
]
|
|
7148
7142
|
}
|
|
7149
|
-
) : /* @__PURE__ */ (0,
|
|
7143
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "control-buttons", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "maximize", onClick: () => setMinimized(false), children: "View" }) })
|
|
7150
7144
|
] }),
|
|
7151
|
-
data && !isComplete && /* @__PURE__ */ (0,
|
|
7152
|
-
/* @__PURE__ */ (0,
|
|
7153
|
-
/* @__PURE__ */ (0,
|
|
7145
|
+
data && !isComplete && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "header-network-labels", children: [
|
|
7146
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: `kima-card-network-label ${theme.colorMode}`, children: [
|
|
7147
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
7154
7148
|
ChainIcon,
|
|
7155
7149
|
{
|
|
7156
7150
|
symbol: transactionSourceChain?.shortName
|
|
7157
7151
|
}
|
|
7158
7152
|
),
|
|
7159
|
-
windowWidth > 450 && /* @__PURE__ */ (0,
|
|
7153
|
+
windowWidth > 450 && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("h3", { children: transactionSourceChain?.name })
|
|
7160
7154
|
] }),
|
|
7161
|
-
/* @__PURE__ */ (0,
|
|
7155
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
7162
7156
|
"div",
|
|
7163
7157
|
{
|
|
7164
7158
|
style: { display: "inline-block", transform: "rotate(-90deg)" },
|
|
7165
|
-
children: /* @__PURE__ */ (0,
|
|
7159
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Arrow_default, { width: 25, height: 25 })
|
|
7166
7160
|
}
|
|
7167
7161
|
),
|
|
7168
|
-
/* @__PURE__ */ (0,
|
|
7169
|
-
/* @__PURE__ */ (0,
|
|
7162
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: `kima-card-network-label ${theme.colorMode}`, children: [
|
|
7163
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
7170
7164
|
ChainIcon,
|
|
7171
7165
|
{
|
|
7172
7166
|
symbol: transactionTargetChain?.shortName
|
|
7173
7167
|
}
|
|
7174
7168
|
),
|
|
7175
|
-
windowWidth > 450 && /* @__PURE__ */ (0,
|
|
7169
|
+
windowWidth > 450 && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("h3", { children: transactionTargetChain?.name })
|
|
7176
7170
|
] })
|
|
7177
7171
|
] })
|
|
7178
7172
|
] }),
|
|
7179
|
-
isValidTxId && !error ? /* @__PURE__ */ (0,
|
|
7180
|
-
!isComplete ? /* @__PURE__ */ (0,
|
|
7181
|
-
/* @__PURE__ */ (0,
|
|
7173
|
+
isValidTxId && !error ? /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "kima-card-content", children: [
|
|
7174
|
+
!isComplete ? /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "transaction-content", children: [
|
|
7175
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
7182
7176
|
Progressbar_default,
|
|
7183
7177
|
{
|
|
7184
7178
|
step,
|
|
@@ -7188,7 +7182,7 @@ var TransactionWidget = ({ theme }) => {
|
|
|
7188
7182
|
loadingStep
|
|
7189
7183
|
}
|
|
7190
7184
|
),
|
|
7191
|
-
/* @__PURE__ */ (0,
|
|
7185
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
7192
7186
|
StepBox_default,
|
|
7193
7187
|
{
|
|
7194
7188
|
step,
|
|
@@ -7197,15 +7191,15 @@ var TransactionWidget = ({ theme }) => {
|
|
|
7197
7191
|
data
|
|
7198
7192
|
}
|
|
7199
7193
|
)
|
|
7200
|
-
] }) : /* @__PURE__ */ (0,
|
|
7201
|
-
/* @__PURE__ */ (0,
|
|
7202
|
-
/* @__PURE__ */ (0,
|
|
7203
|
-
/* @__PURE__ */ (0,
|
|
7194
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "transaction-content transaction-complete", children: [
|
|
7195
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TransactionComplete_default, {}),
|
|
7196
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("h2", { children: widgetIsSwap ? "Swap Complete" : "Transaction Complete" }),
|
|
7197
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "kima-stepbox", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
7204
7198
|
"div",
|
|
7205
7199
|
{
|
|
7206
7200
|
className: `content-wrapper transaction-complete ${theme.colorMode}`,
|
|
7207
7201
|
children: [
|
|
7208
|
-
/* @__PURE__ */ (0,
|
|
7202
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("p", { children: widgetIsSwap ? /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
|
|
7209
7203
|
"You just swapped ",
|
|
7210
7204
|
fmt3(swapSrcAmt),
|
|
7211
7205
|
" ",
|
|
@@ -7214,50 +7208,50 @@ var TransactionWidget = ({ theme }) => {
|
|
|
7214
7208
|
fmt3(swapDstAmt),
|
|
7215
7209
|
" ",
|
|
7216
7210
|
data?.targetSymbol
|
|
7217
|
-
] }) : /* @__PURE__ */ (0,
|
|
7211
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
|
|
7218
7212
|
"You just transferred ",
|
|
7219
7213
|
data?.amount,
|
|
7220
7214
|
" ",
|
|
7221
7215
|
data?.sourceSymbol
|
|
7222
7216
|
] }) }),
|
|
7223
|
-
/* @__PURE__ */ (0,
|
|
7224
|
-
/* @__PURE__ */ (0,
|
|
7217
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "header-network-labels", children: [
|
|
7218
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
7225
7219
|
"div",
|
|
7226
7220
|
{
|
|
7227
7221
|
className: `kima-card-network-label ${theme.colorMode}`,
|
|
7228
7222
|
children: [
|
|
7229
|
-
/* @__PURE__ */ (0,
|
|
7223
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
7230
7224
|
ChainIcon,
|
|
7231
7225
|
{
|
|
7232
7226
|
symbol: transactionSourceChain?.shortName
|
|
7233
7227
|
}
|
|
7234
7228
|
),
|
|
7235
|
-
windowWidth > 450 && /* @__PURE__ */ (0,
|
|
7229
|
+
windowWidth > 450 && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("h3", { children: transactionSourceChain?.name })
|
|
7236
7230
|
]
|
|
7237
7231
|
}
|
|
7238
7232
|
),
|
|
7239
|
-
/* @__PURE__ */ (0,
|
|
7233
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
7240
7234
|
"div",
|
|
7241
7235
|
{
|
|
7242
7236
|
style: {
|
|
7243
7237
|
display: "inline-block",
|
|
7244
7238
|
transform: "rotate(-90deg)"
|
|
7245
7239
|
},
|
|
7246
|
-
children: /* @__PURE__ */ (0,
|
|
7240
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Arrow_default, { width: 25, height: 25 })
|
|
7247
7241
|
}
|
|
7248
7242
|
),
|
|
7249
|
-
/* @__PURE__ */ (0,
|
|
7243
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
7250
7244
|
"div",
|
|
7251
7245
|
{
|
|
7252
7246
|
className: `kima-card-network-label ${theme.colorMode}`,
|
|
7253
7247
|
children: [
|
|
7254
|
-
/* @__PURE__ */ (0,
|
|
7248
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
7255
7249
|
ChainIcon,
|
|
7256
7250
|
{
|
|
7257
7251
|
symbol: transactionTargetChain?.shortName
|
|
7258
7252
|
}
|
|
7259
7253
|
),
|
|
7260
|
-
windowWidth > 450 && /* @__PURE__ */ (0,
|
|
7254
|
+
windowWidth > 450 && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("h3", { children: transactionTargetChain?.name })
|
|
7261
7255
|
]
|
|
7262
7256
|
}
|
|
7263
7257
|
)
|
|
@@ -7265,8 +7259,8 @@ var TransactionWidget = ({ theme }) => {
|
|
|
7265
7259
|
]
|
|
7266
7260
|
}
|
|
7267
7261
|
) }),
|
|
7268
|
-
/* @__PURE__ */ (0,
|
|
7269
|
-
/* @__PURE__ */ (0,
|
|
7262
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "transaction-buttons", children: [
|
|
7263
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
7270
7264
|
SecondaryButton_default,
|
|
7271
7265
|
{
|
|
7272
7266
|
clickHandler: resetForm,
|
|
@@ -7274,34 +7268,32 @@ var TransactionWidget = ({ theme }) => {
|
|
|
7274
7268
|
children: "New Transaction"
|
|
7275
7269
|
}
|
|
7276
7270
|
),
|
|
7277
|
-
/* @__PURE__ */ (0,
|
|
7271
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
7278
7272
|
ExternalLink_default,
|
|
7279
7273
|
{
|
|
7280
7274
|
to: `${explorerUrl}/transactions/?tx=${data?.kimaTxHash}`,
|
|
7281
|
-
children: /* @__PURE__ */ (0,
|
|
7275
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(PrimaryButton_default, { children: "View Details" })
|
|
7282
7276
|
}
|
|
7283
7277
|
)
|
|
7284
7278
|
] })
|
|
7285
7279
|
] }),
|
|
7286
|
-
!error && !isEmptyStatus && !isComplete && /* @__PURE__ */ (0,
|
|
7280
|
+
!error && !isEmptyStatus && !isComplete && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
7287
7281
|
TransactionStatusMessage_default,
|
|
7288
7282
|
{
|
|
7289
7283
|
isCompleted: data?.status,
|
|
7290
|
-
transactionId:
|
|
7284
|
+
transactionId: String(safeTxId)
|
|
7291
7285
|
}
|
|
7292
7286
|
)
|
|
7293
|
-
] }) : /* @__PURE__ */ (0,
|
|
7294
|
-
/* @__PURE__ */ (0,
|
|
7295
|
-
/* @__PURE__ */ (0,
|
|
7287
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "kima-card-content", children: [
|
|
7288
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("h4", { className: "subtitle", children: "You can follow the status of a previous submitted transaction by entering the provided transaction id" }),
|
|
7289
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "single-form", children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TransactionSearch_default, {}) })
|
|
7296
7290
|
] }),
|
|
7297
|
-
/* @__PURE__ */ (0,
|
|
7291
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
7298
7292
|
import_react_hot_toast2.Toaster,
|
|
7299
7293
|
{
|
|
7300
7294
|
position: "top-right",
|
|
7301
7295
|
reverseOrder: false,
|
|
7302
|
-
containerStyle: {
|
|
7303
|
-
position: "absolute"
|
|
7304
|
-
},
|
|
7296
|
+
containerStyle: { position: "absolute" },
|
|
7305
7297
|
toastOptions: {
|
|
7306
7298
|
duration: 5 * 1e3,
|
|
7307
7299
|
style: {
|
|
@@ -7321,13 +7313,13 @@ var TransactionWidget = ({ theme }) => {
|
|
|
7321
7313
|
}
|
|
7322
7314
|
}
|
|
7323
7315
|
),
|
|
7324
|
-
/* @__PURE__ */ (0,
|
|
7316
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
7325
7317
|
"div",
|
|
7326
7318
|
{
|
|
7327
7319
|
className: `floating-footer ${isComplete ? "complete" : "status"}`,
|
|
7328
|
-
children: /* @__PURE__ */ (0,
|
|
7329
|
-
/* @__PURE__ */ (0,
|
|
7330
|
-
/* @__PURE__ */ (0,
|
|
7320
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: `items ${theme.colorMode}`, children: [
|
|
7321
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { children: "Powered by" }),
|
|
7322
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(KimaNetwork_default, {})
|
|
7331
7323
|
] })
|
|
7332
7324
|
}
|
|
7333
7325
|
)
|
|
@@ -7338,7 +7330,7 @@ var TransactionWidget = ({ theme }) => {
|
|
|
7338
7330
|
|
|
7339
7331
|
// src/hooks/useGetFees.tsx
|
|
7340
7332
|
var import_react_query18 = require("@tanstack/react-query");
|
|
7341
|
-
var
|
|
7333
|
+
var import_react_redux43 = require("react-redux");
|
|
7342
7334
|
|
|
7343
7335
|
// src/services/feesApi.ts
|
|
7344
7336
|
var getFees = async (amount, originChain, originAddress, originSymbol, targetChain, targetAddress, targetSymbol, backendUrl) => {
|
|
@@ -7433,7 +7425,7 @@ var useGetFees = ({
|
|
|
7433
7425
|
targetSymbol,
|
|
7434
7426
|
backendUrl
|
|
7435
7427
|
}) => {
|
|
7436
|
-
const mode = (0,
|
|
7428
|
+
const mode = (0, import_react_redux43.useSelector)(selectMode);
|
|
7437
7429
|
const isFiat = sourceNetwork === "BANK" || sourceNetwork === "CC";
|
|
7438
7430
|
const haveBasics = !!backendUrl && !!amount && !!sourceNetwork && !!sourceSymbol && !!targetNetwork && !!targetAddress && !!targetSymbol;
|
|
7439
7431
|
const enabled = haveBasics && (isFiat ? true : !!sourceAddress);
|
|
@@ -7481,24 +7473,24 @@ var useGetFees = ({
|
|
|
7481
7473
|
var useGetFees_default = useGetFees;
|
|
7482
7474
|
|
|
7483
7475
|
// src/widgets/transfer/hooks/useSubmitTransaction.tsx
|
|
7484
|
-
var
|
|
7476
|
+
var import_react_redux44 = require("react-redux");
|
|
7485
7477
|
var import_react_query19 = require("@tanstack/react-query");
|
|
7486
7478
|
var useSubmitTransaction = (isSubmitting, setIsSubmitting) => {
|
|
7487
|
-
const dispatch = (0,
|
|
7488
|
-
const backendUrl = (0,
|
|
7489
|
-
const mode = (0,
|
|
7479
|
+
const dispatch = (0, import_react_redux44.useDispatch)();
|
|
7480
|
+
const backendUrl = (0, import_react_redux44.useSelector)(selectBackendUrl);
|
|
7481
|
+
const mode = (0, import_react_redux44.useSelector)(selectMode);
|
|
7490
7482
|
const {
|
|
7491
7483
|
feeId,
|
|
7492
7484
|
transactionValues,
|
|
7493
7485
|
totalFee,
|
|
7494
7486
|
options: feeOptions,
|
|
7495
7487
|
swapInfo
|
|
7496
|
-
} = (0,
|
|
7497
|
-
const originChainData = (0,
|
|
7498
|
-
const targetChainData = (0,
|
|
7499
|
-
const feeDeduct = (0,
|
|
7500
|
-
const ccTransactionIdSeed = (0,
|
|
7501
|
-
const submitted = (0,
|
|
7488
|
+
} = (0, import_react_redux44.useSelector)(selectServiceFee);
|
|
7489
|
+
const originChainData = (0, import_react_redux44.useSelector)(selectSourceChain);
|
|
7490
|
+
const targetChainData = (0, import_react_redux44.useSelector)(selectTargetChain);
|
|
7491
|
+
const feeDeduct = (0, import_react_redux44.useSelector)(selectFeeDeduct);
|
|
7492
|
+
const ccTransactionIdSeed = (0, import_react_redux44.useSelector)(selectCCTransactionIdSeed);
|
|
7493
|
+
const submitted = (0, import_react_redux44.useSelector)(selectSubmitted);
|
|
7502
7494
|
const doSwap = !isSamePeggedToken(
|
|
7503
7495
|
originChainData,
|
|
7504
7496
|
transactionValues.originSymbol,
|
|
@@ -7623,7 +7615,7 @@ var useSubmitTransaction_default = useSubmitTransaction;
|
|
|
7623
7615
|
// src/widgets/transfer/hooks/useValidateTransaction.tsx
|
|
7624
7616
|
var import_react54 = require("react");
|
|
7625
7617
|
var import_viem7 = require("viem");
|
|
7626
|
-
var
|
|
7618
|
+
var import_react_redux45 = require("react-redux");
|
|
7627
7619
|
var useValidateTransaction = (inputs) => {
|
|
7628
7620
|
const {
|
|
7629
7621
|
allowance = 0n,
|
|
@@ -7646,8 +7638,8 @@ var useValidateTransaction = (inputs) => {
|
|
|
7646
7638
|
} = inputs;
|
|
7647
7639
|
const { kimaBackendUrl } = useKimaContext();
|
|
7648
7640
|
const { data: envOptions } = useGetEnvOptions({ kimaBackendUrl });
|
|
7649
|
-
const mode = (0,
|
|
7650
|
-
const networkOption = (0,
|
|
7641
|
+
const mode = (0, import_react_redux45.useSelector)(selectMode);
|
|
7642
|
+
const networkOption = (0, import_react_redux45.useSelector)(selectNetworkOption);
|
|
7651
7643
|
const maxValue = (0, import_react54.useMemo)(() => {
|
|
7652
7644
|
logger_default.debug("useValidateTransaction: maxValue: ", inputs);
|
|
7653
7645
|
if (!balance) return 0n;
|
|
@@ -7765,11 +7757,11 @@ var useValidateTransaction_default = useValidateTransaction;
|
|
|
7765
7757
|
// src/widgets/transfer/components/TransferWidget.tsx
|
|
7766
7758
|
var import_react64 = require("react");
|
|
7767
7759
|
var import_react_hot_toast4 = __toESM(require("react-hot-toast"), 1);
|
|
7768
|
-
var
|
|
7760
|
+
var import_react_redux56 = require("react-redux");
|
|
7769
7761
|
var import_viem9 = require("viem");
|
|
7770
7762
|
|
|
7771
7763
|
// src/components/reusable/WarningModal.tsx
|
|
7772
|
-
var
|
|
7764
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
7773
7765
|
var WarningModal = ({
|
|
7774
7766
|
message,
|
|
7775
7767
|
cancelButtonText = "Cancel",
|
|
@@ -7777,11 +7769,11 @@ var WarningModal = ({
|
|
|
7777
7769
|
onAcknowledge,
|
|
7778
7770
|
onCancel
|
|
7779
7771
|
}) => {
|
|
7780
|
-
return /* @__PURE__ */ (0,
|
|
7781
|
-
/* @__PURE__ */ (0,
|
|
7782
|
-
/* @__PURE__ */ (0,
|
|
7783
|
-
/* @__PURE__ */ (0,
|
|
7784
|
-
/* @__PURE__ */ (0,
|
|
7772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "warning-modal-overlay", children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "warning-modal", children: [
|
|
7773
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("h3", { children: "Warning" }),
|
|
7774
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("p", { children: message }),
|
|
7775
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "warning-modal-buttons", children: [
|
|
7776
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
7785
7777
|
SecondaryButton_default,
|
|
7786
7778
|
{
|
|
7787
7779
|
className: "warning-modal-cancel",
|
|
@@ -7789,7 +7781,7 @@ var WarningModal = ({
|
|
|
7789
7781
|
children: cancelButtonText
|
|
7790
7782
|
}
|
|
7791
7783
|
),
|
|
7792
|
-
/* @__PURE__ */ (0,
|
|
7784
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
7793
7785
|
PrimaryButton_default,
|
|
7794
7786
|
{
|
|
7795
7787
|
className: "warning-modal-acknowledge",
|
|
@@ -7806,12 +7798,12 @@ var WarningModal_default = WarningModal;
|
|
|
7806
7798
|
var import_viem8 = require("viem");
|
|
7807
7799
|
var import_react56 = require("react");
|
|
7808
7800
|
var import_react_hot_toast3 = require("react-hot-toast");
|
|
7809
|
-
var
|
|
7801
|
+
var import_react_redux47 = require("react-redux");
|
|
7810
7802
|
|
|
7811
7803
|
// src/components/primary/NetworkSelector.tsx
|
|
7812
7804
|
var import_react55 = __toESM(require("react"), 1);
|
|
7813
|
-
var
|
|
7814
|
-
var
|
|
7805
|
+
var import_react_redux46 = require("react-redux");
|
|
7806
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
7815
7807
|
var NetworkSelector = ({
|
|
7816
7808
|
type,
|
|
7817
7809
|
initialSelection,
|
|
@@ -7819,17 +7811,17 @@ var NetworkSelector = ({
|
|
|
7819
7811
|
}) => {
|
|
7820
7812
|
const [collapsed, setCollapsed] = (0, import_react55.useState)(true);
|
|
7821
7813
|
const ref = (0, import_react55.useRef)(null);
|
|
7822
|
-
const dispatch = (0,
|
|
7823
|
-
const theme = (0,
|
|
7824
|
-
const networkOptions = (0,
|
|
7825
|
-
const transactionOption = (0,
|
|
7826
|
-
const dAppOption = (0,
|
|
7827
|
-
const mode = (0,
|
|
7828
|
-
const sourceNetwork = (0,
|
|
7829
|
-
const sourceSymbol = (0,
|
|
7830
|
-
const targetNetwork = (0,
|
|
7831
|
-
const currentSourceAddr = (0,
|
|
7832
|
-
const currentTargetAddr = (0,
|
|
7814
|
+
const dispatch = (0, import_react_redux46.useDispatch)();
|
|
7815
|
+
const theme = (0, import_react_redux46.useSelector)(selectTheme);
|
|
7816
|
+
const networkOptions = (0, import_react_redux46.useSelector)(selectNetworks);
|
|
7817
|
+
const transactionOption = (0, import_react_redux46.useSelector)(selectTransactionOption);
|
|
7818
|
+
const dAppOption = (0, import_react_redux46.useSelector)(selectDappOption);
|
|
7819
|
+
const mode = (0, import_react_redux46.useSelector)(selectMode);
|
|
7820
|
+
const sourceNetwork = (0, import_react_redux46.useSelector)(selectSourceChain);
|
|
7821
|
+
const sourceSymbol = (0, import_react_redux46.useSelector)(selectSourceCurrency);
|
|
7822
|
+
const targetNetwork = (0, import_react_redux46.useSelector)(selectTargetChain);
|
|
7823
|
+
const currentSourceAddr = (0, import_react_redux46.useSelector)(selectSourceAddress);
|
|
7824
|
+
const currentTargetAddr = (0, import_react_redux46.useSelector)(selectTargetAddress);
|
|
7833
7825
|
const { switchChainHandler } = useKimaContext();
|
|
7834
7826
|
const isOriginSelector = type === "origin";
|
|
7835
7827
|
(0, import_react55.useEffect)(() => {
|
|
@@ -8052,7 +8044,7 @@ var NetworkSelector = ({
|
|
|
8052
8044
|
currentTargetAddr,
|
|
8053
8045
|
dispatch
|
|
8054
8046
|
]);
|
|
8055
|
-
return /* @__PURE__ */ (0,
|
|
8047
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
|
|
8056
8048
|
"div",
|
|
8057
8049
|
{
|
|
8058
8050
|
className: `network-dropdown ${theme?.colorMode ?? ""} ${collapsed ? "collapsed" : "toggled"} ${shouldLockSourceNetwork ? "disabled" : ""}`,
|
|
@@ -8061,15 +8053,15 @@ var NetworkSelector = ({
|
|
|
8061
8053
|
},
|
|
8062
8054
|
ref,
|
|
8063
8055
|
children: [
|
|
8064
|
-
/* @__PURE__ */ (0,
|
|
8065
|
-
/* @__PURE__ */ (0,
|
|
8066
|
-
/* @__PURE__ */ (0,
|
|
8056
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "network-wrapper", children: [
|
|
8057
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(ChainIcon, { symbol: selectedNetwork.shortName }),
|
|
8058
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { children: selectedNetwork.name })
|
|
8067
8059
|
] }),
|
|
8068
|
-
/* @__PURE__ */ (0,
|
|
8060
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
8069
8061
|
"div",
|
|
8070
8062
|
{
|
|
8071
8063
|
className: `network-menu custom-scrollbar ${theme?.colorMode ?? ""} ${collapsed ? "collapsed" : "toggled"}`,
|
|
8072
|
-
children: networks.filter((network) => network.shortName !== selectedNetwork.shortName).map((network) => /* @__PURE__ */ (0,
|
|
8064
|
+
children: networks.filter((network) => network.shortName !== selectedNetwork.shortName).map((network) => /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)(
|
|
8073
8065
|
"div",
|
|
8074
8066
|
{
|
|
8075
8067
|
className: `network-menu-item ${theme?.colorMode ?? ""} ${network.disabled ? "disabled has-tooltip" : "enabled"}`,
|
|
@@ -8078,16 +8070,16 @@ var NetworkSelector = ({
|
|
|
8078
8070
|
if (!network.disabled) handleNetworkChange(network);
|
|
8079
8071
|
},
|
|
8080
8072
|
children: [
|
|
8081
|
-
network.disabled ? /* @__PURE__ */ (0,
|
|
8082
|
-
/* @__PURE__ */ (0,
|
|
8083
|
-
network.disabled && /* @__PURE__ */ (0,
|
|
8073
|
+
network.disabled ? /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Warning_default, { width: 25, height: 25 }) : /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(ChainIcon, { symbol: network.shortName }),
|
|
8074
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("p", { children: network.name }),
|
|
8075
|
+
network.disabled && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("span", { className: "tooltip", children: "Temporarily unavailable" })
|
|
8084
8076
|
]
|
|
8085
8077
|
},
|
|
8086
8078
|
network.id ?? network.shortName
|
|
8087
8079
|
))
|
|
8088
8080
|
}
|
|
8089
8081
|
),
|
|
8090
|
-
!shouldLockSourceNetwork && /* @__PURE__ */ (0,
|
|
8082
|
+
!shouldLockSourceNetwork && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: `dropdown-icon ${collapsed ? "toggled" : "collapsed"}`, children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Arrow_default, { fill: "none" }) })
|
|
8091
8083
|
]
|
|
8092
8084
|
}
|
|
8093
8085
|
);
|
|
@@ -8095,30 +8087,30 @@ var NetworkSelector = ({
|
|
|
8095
8087
|
var NetworkSelector_default = import_react55.default.memo(NetworkSelector);
|
|
8096
8088
|
|
|
8097
8089
|
// src/components/reusable/SingleForm.tsx
|
|
8098
|
-
var
|
|
8090
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
8099
8091
|
var SingleForm = ({
|
|
8100
8092
|
isLoadingFees,
|
|
8101
8093
|
initialSelection,
|
|
8102
8094
|
setInitialSelection
|
|
8103
8095
|
}) => {
|
|
8104
|
-
const dispatch = (0,
|
|
8105
|
-
const mode = (0,
|
|
8106
|
-
const theme = (0,
|
|
8107
|
-
const feeDeduct = (0,
|
|
8108
|
-
const { totalFee } = (0,
|
|
8109
|
-
const dAppOption = (0,
|
|
8110
|
-
const compliantOption = (0,
|
|
8111
|
-
const targetCompliant = (0,
|
|
8112
|
-
const sourceAddress = (0,
|
|
8113
|
-
const sourceNetwork = (0,
|
|
8114
|
-
const targetNetwork = (0,
|
|
8115
|
-
const targetAddress = (0,
|
|
8096
|
+
const dispatch = (0, import_react_redux47.useDispatch)();
|
|
8097
|
+
const mode = (0, import_react_redux47.useSelector)(selectMode);
|
|
8098
|
+
const theme = (0, import_react_redux47.useSelector)(selectTheme);
|
|
8099
|
+
const feeDeduct = (0, import_react_redux47.useSelector)(selectFeeDeduct);
|
|
8100
|
+
const { totalFee } = (0, import_react_redux47.useSelector)(selectServiceFee);
|
|
8101
|
+
const dAppOption = (0, import_react_redux47.useSelector)(selectDappOption);
|
|
8102
|
+
const compliantOption = (0, import_react_redux47.useSelector)(selectCompliantOption);
|
|
8103
|
+
const targetCompliant = (0, import_react_redux47.useSelector)(selectTargetCompliant);
|
|
8104
|
+
const sourceAddress = (0, import_react_redux47.useSelector)(selectSourceAddress);
|
|
8105
|
+
const sourceNetwork = (0, import_react_redux47.useSelector)(selectSourceChain);
|
|
8106
|
+
const targetNetwork = (0, import_react_redux47.useSelector)(selectTargetChain);
|
|
8107
|
+
const targetAddress = (0, import_react_redux47.useSelector)(selectTargetAddress);
|
|
8116
8108
|
const { isReady } = useIsWalletReady_default();
|
|
8117
8109
|
const [amountValue, setAmountValue] = (0, import_react56.useState)("");
|
|
8118
|
-
const amount = (0,
|
|
8119
|
-
const sourceCurrency = (0,
|
|
8120
|
-
const targetCurrency = (0,
|
|
8121
|
-
const backendUrl = (0,
|
|
8110
|
+
const amount = (0, import_react_redux47.useSelector)(selectAmount);
|
|
8111
|
+
const sourceCurrency = (0, import_react_redux47.useSelector)(selectSourceCurrency);
|
|
8112
|
+
const targetCurrency = (0, import_react_redux47.useSelector)(selectTargetCurrency);
|
|
8113
|
+
const backendUrl = (0, import_react_redux47.useSelector)(selectBackendUrl);
|
|
8122
8114
|
const { balance, decimals } = useBalance_default();
|
|
8123
8115
|
const { kimaBackendUrl } = useKimaContext();
|
|
8124
8116
|
const { data: envOptions } = useGetEnvOptions({ kimaBackendUrl });
|
|
@@ -8289,14 +8281,14 @@ var SingleForm = ({
|
|
|
8289
8281
|
demoSourceAddress,
|
|
8290
8282
|
feeDeduct
|
|
8291
8283
|
]);
|
|
8292
|
-
return /* @__PURE__ */ (0,
|
|
8293
|
-
/* @__PURE__ */ (0,
|
|
8294
|
-
/* @__PURE__ */ (0,
|
|
8284
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "single-form", children: [
|
|
8285
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "form-item", children: [
|
|
8286
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { className: "label", children: [
|
|
8295
8287
|
dAppOption === "none" /* None */ && "Source",
|
|
8296
8288
|
" Network:"
|
|
8297
8289
|
] }),
|
|
8298
|
-
/* @__PURE__ */ (0,
|
|
8299
|
-
/* @__PURE__ */ (0,
|
|
8290
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "items", children: [
|
|
8291
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8300
8292
|
NetworkSelector_default,
|
|
8301
8293
|
{
|
|
8302
8294
|
type: "origin",
|
|
@@ -8306,30 +8298,30 @@ var SingleForm = ({
|
|
|
8306
8298
|
}
|
|
8307
8299
|
}
|
|
8308
8300
|
),
|
|
8309
|
-
/* @__PURE__ */ (0,
|
|
8301
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(CoinDropdown_default, { isSourceChain: true })
|
|
8310
8302
|
] })
|
|
8311
8303
|
] }),
|
|
8312
|
-
/* @__PURE__ */ (0,
|
|
8304
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
8313
8305
|
"div",
|
|
8314
8306
|
{
|
|
8315
8307
|
className: `dynamic-area ${sourceNetwork.shortName === "FIAT" /* FIAT */ ? "reverse" : "1"}`,
|
|
8316
8308
|
children: [
|
|
8317
8309
|
!["CC" /* CC */, "BANK" /* BANK */].includes(
|
|
8318
8310
|
sourceNetwork.compatibility
|
|
8319
|
-
) && /* @__PURE__ */ (0,
|
|
8311
|
+
) && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
8320
8312
|
"div",
|
|
8321
8313
|
{
|
|
8322
8314
|
className: `form-item wallet-button-item ${isConnectedSourceWrapper ? "connected" : ""}`,
|
|
8323
8315
|
children: [
|
|
8324
|
-
/* @__PURE__ */ (0,
|
|
8325
|
-
/* @__PURE__ */ (0,
|
|
8316
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "label", children: "Wallet:" }),
|
|
8317
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(WalletButton_default, { initialSelection: initialSelection.sourceSelection })
|
|
8326
8318
|
]
|
|
8327
8319
|
}
|
|
8328
8320
|
),
|
|
8329
|
-
mode !== "payment" /* payment */ && /* @__PURE__ */ (0,
|
|
8330
|
-
/* @__PURE__ */ (0,
|
|
8331
|
-
/* @__PURE__ */ (0,
|
|
8332
|
-
/* @__PURE__ */ (0,
|
|
8321
|
+
mode !== "payment" /* payment */ && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "form-item", children: [
|
|
8322
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "label", children: "Target Network:" }),
|
|
8323
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "items", children: [
|
|
8324
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8333
8325
|
NetworkSelector_default,
|
|
8334
8326
|
{
|
|
8335
8327
|
type: "target",
|
|
@@ -8339,15 +8331,15 @@ var SingleForm = ({
|
|
|
8339
8331
|
}
|
|
8340
8332
|
}
|
|
8341
8333
|
),
|
|
8342
|
-
/* @__PURE__ */ (0,
|
|
8334
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(CoinDropdown_default, { isSourceChain: false })
|
|
8343
8335
|
] })
|
|
8344
8336
|
] })
|
|
8345
8337
|
]
|
|
8346
8338
|
}
|
|
8347
8339
|
),
|
|
8348
|
-
mode === "bridge" /* bridge */ && /* @__PURE__ */ (0,
|
|
8349
|
-
/* @__PURE__ */ (0,
|
|
8350
|
-
/* @__PURE__ */ (0,
|
|
8340
|
+
mode === "bridge" /* bridge */ && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: `form-item ${theme.colorMode}`, children: [
|
|
8341
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "label", children: "Target Address:" }),
|
|
8342
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8351
8343
|
AddressInput_default,
|
|
8352
8344
|
{
|
|
8353
8345
|
theme: theme.colorMode,
|
|
@@ -8355,14 +8347,14 @@ var SingleForm = ({
|
|
|
8355
8347
|
}
|
|
8356
8348
|
)
|
|
8357
8349
|
] }),
|
|
8358
|
-
mode === "light" /* light */ && /* @__PURE__ */ (0,
|
|
8350
|
+
mode === "light" /* light */ && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
8359
8351
|
"div",
|
|
8360
8352
|
{
|
|
8361
8353
|
className: `form-item wallet-button-item ${isConnectedTargetWrapper ? "connected" : ""}`,
|
|
8362
8354
|
style: { display: "flex", alignItems: "center" },
|
|
8363
8355
|
children: [
|
|
8364
|
-
/* @__PURE__ */ (0,
|
|
8365
|
-
/* @__PURE__ */ (0,
|
|
8356
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "label", children: "Target Wallet:" }),
|
|
8357
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8366
8358
|
WalletButton_default,
|
|
8367
8359
|
{
|
|
8368
8360
|
initialSelection: initialSelection.targetSelection,
|
|
@@ -8372,10 +8364,10 @@ var SingleForm = ({
|
|
|
8372
8364
|
]
|
|
8373
8365
|
}
|
|
8374
8366
|
),
|
|
8375
|
-
/* @__PURE__ */ (0,
|
|
8376
|
-
/* @__PURE__ */ (0,
|
|
8377
|
-
/* @__PURE__ */ (0,
|
|
8378
|
-
/* @__PURE__ */ (0,
|
|
8367
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: `form-item ${theme.colorMode}`, children: [
|
|
8368
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "label", children: "Amount:" }),
|
|
8369
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: `amount-label-container items ${theme.colorMode}`, children: [
|
|
8370
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
8379
8371
|
"input",
|
|
8380
8372
|
{
|
|
8381
8373
|
className: `${theme.colorMode}`,
|
|
@@ -8386,21 +8378,21 @@ var SingleForm = ({
|
|
|
8386
8378
|
disabled: mode === "payment" /* payment */
|
|
8387
8379
|
}
|
|
8388
8380
|
),
|
|
8389
|
-
/* @__PURE__ */ (0,
|
|
8390
|
-
sourceNetwork.shortName !== "CC" && mode !== "payment" /* payment */ && /* @__PURE__ */ (0,
|
|
8391
|
-
dAppOption === "none" /* None */ && canQuoteFees && /* @__PURE__ */ (0,
|
|
8381
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "max-disclaimer", children: [
|
|
8382
|
+
sourceNetwork.shortName !== "CC" && mode !== "payment" /* payment */ && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "max-button", onClick: onMaxClick, children: "Max" }),
|
|
8383
|
+
dAppOption === "none" /* None */ && canQuoteFees && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("p", { className: "fee-amount", children: [
|
|
8392
8384
|
"Est fees:",
|
|
8393
8385
|
" ",
|
|
8394
|
-
isLoadingFees ? /* @__PURE__ */ (0,
|
|
8395
|
-
/* @__PURE__ */ (0,
|
|
8396
|
-
/* @__PURE__ */ (0,
|
|
8397
|
-
/* @__PURE__ */ (0,
|
|
8398
|
-
] }) : totalFee.value >= 0n ? /* @__PURE__ */ (0,
|
|
8386
|
+
isLoadingFees ? /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { className: "inline-spinner loading", "aria-live": "polite", children: [
|
|
8387
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "dot" }),
|
|
8388
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "dot" }),
|
|
8389
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "dot" })
|
|
8390
|
+
] }) : totalFee.value >= 0n ? /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("span", { className: "fee-value", children: [
|
|
8399
8391
|
"$ ",
|
|
8400
8392
|
formatBigInt(totalFee),
|
|
8401
8393
|
" ",
|
|
8402
8394
|
feeCurrency
|
|
8403
|
-
] }) : /* @__PURE__ */ (0,
|
|
8395
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "fee-value", children: "\u2014" })
|
|
8404
8396
|
] })
|
|
8405
8397
|
] })
|
|
8406
8398
|
] })
|
|
@@ -8411,7 +8403,7 @@ var SingleForm_default = SingleForm;
|
|
|
8411
8403
|
|
|
8412
8404
|
// src/components/reusable/FiatWidget.tsx
|
|
8413
8405
|
var import_react57 = require("react");
|
|
8414
|
-
var
|
|
8406
|
+
var import_react_redux48 = require("react-redux");
|
|
8415
8407
|
var import_uuid = require("uuid");
|
|
8416
8408
|
|
|
8417
8409
|
// src/widgets/transfer/hooks/useCCTransactionId.tsx
|
|
@@ -8438,16 +8430,16 @@ var useCCTransactionId = (backendUrl, transactionIdSeed) => {
|
|
|
8438
8430
|
};
|
|
8439
8431
|
|
|
8440
8432
|
// src/components/reusable/FiatWidget.tsx
|
|
8441
|
-
var
|
|
8433
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
8442
8434
|
var FiatWidget = ({ submitCallback }) => {
|
|
8443
|
-
const dispatch = (0,
|
|
8444
|
-
const feeDeduct = (0,
|
|
8445
|
-
const backendUrl = (0,
|
|
8446
|
-
const ccTransactionStatus = (0,
|
|
8447
|
-
const networkOption = (0,
|
|
8448
|
-
const sourceCurrency = (0,
|
|
8449
|
-
const sourceChain = (0,
|
|
8450
|
-
const { transactionValues } = (0,
|
|
8435
|
+
const dispatch = (0, import_react_redux48.useDispatch)();
|
|
8436
|
+
const feeDeduct = (0, import_react_redux48.useSelector)(selectFeeDeduct);
|
|
8437
|
+
const backendUrl = (0, import_react_redux48.useSelector)(selectBackendUrl);
|
|
8438
|
+
const ccTransactionStatus = (0, import_react_redux48.useSelector)(selectCCTransactionStatus);
|
|
8439
|
+
const networkOption = (0, import_react_redux48.useSelector)(selectNetworkOption);
|
|
8440
|
+
const sourceCurrency = (0, import_react_redux48.useSelector)(selectSourceCurrency);
|
|
8441
|
+
const sourceChain = (0, import_react_redux48.useSelector)(selectSourceChain);
|
|
8442
|
+
const { transactionValues } = (0, import_react_redux48.useSelector)(selectServiceFee);
|
|
8451
8443
|
const ccTransactionIdSeedRef = (0, import_react57.useRef)((0, import_uuid.v4)());
|
|
8452
8444
|
const ccTransactionSubmittedRef = (0, import_react57.useRef)(false);
|
|
8453
8445
|
const { data: envOptions, isLoading: isEnvLoading } = useGetEnvOptions({
|
|
@@ -8509,9 +8501,9 @@ var FiatWidget = ({ submitCallback }) => {
|
|
|
8509
8501
|
(0, import_react57.useEffect)(() => {
|
|
8510
8502
|
if (error) dispatch(setCCTransactionStatus("error-id"));
|
|
8511
8503
|
}, [dispatch, error]);
|
|
8512
|
-
return /* @__PURE__ */ (0,
|
|
8513
|
-
(isLoading || isTransactionIdLoading || isEnvLoading || ccTransactionStatus === "success") && /* @__PURE__ */ (0,
|
|
8514
|
-
/* @__PURE__ */ (0,
|
|
8504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: `cc-widget ${isLoading ? "loading" : ""}`, children: [
|
|
8505
|
+
(isLoading || isTransactionIdLoading || isEnvLoading || ccTransactionStatus === "success") && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "cc-widget-loader", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(ring_default, { width: 50, height: 50, fill: "#86b8ce" }) }),
|
|
8506
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
8515
8507
|
"iframe",
|
|
8516
8508
|
{
|
|
8517
8509
|
width: isLoading || isTransactionIdLoading || ccTransactionStatus === "success" || error ? 0 : "100%",
|
|
@@ -8607,19 +8599,19 @@ var useDisconnectWallet_default = useDisconnectWallet6;
|
|
|
8607
8599
|
|
|
8608
8600
|
// src/widgets/transfer/components/solana/SolanaConnectModal.tsx
|
|
8609
8601
|
var import_react60 = __toESM(require("react"), 1);
|
|
8610
|
-
var
|
|
8602
|
+
var import_react_redux52 = require("react-redux");
|
|
8611
8603
|
var import_wallet_adapter_react8 = require("@solana/wallet-adapter-react");
|
|
8612
8604
|
|
|
8613
8605
|
// src/widgets/transfer/components/solana/SolanaWalletSelect.tsx
|
|
8614
8606
|
var import_react58 = require("react");
|
|
8615
|
-
var
|
|
8607
|
+
var import_react_redux49 = require("react-redux");
|
|
8616
8608
|
var import_wallet_adapter_react6 = require("@solana/wallet-adapter-react");
|
|
8617
8609
|
var import_wallet_adapter_base = require("@solana/wallet-adapter-base");
|
|
8618
|
-
var
|
|
8610
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
8619
8611
|
var SolanaWalletSelect = () => {
|
|
8620
|
-
const theme = (0,
|
|
8621
|
-
const sourceChain = (0,
|
|
8622
|
-
const dispatch = (0,
|
|
8612
|
+
const theme = (0, import_react_redux49.useSelector)(selectTheme);
|
|
8613
|
+
const sourceChain = (0, import_react_redux49.useSelector)(selectSourceChain);
|
|
8614
|
+
const dispatch = (0, import_react_redux49.useDispatch)();
|
|
8623
8615
|
const sliderRef = (0, import_react58.useRef)();
|
|
8624
8616
|
const { wallet, wallets, select, connect, connected } = (0, import_wallet_adapter_react6.useWallet)();
|
|
8625
8617
|
const [detected, undetected] = (0, import_react58.useMemo)(() => {
|
|
@@ -8680,27 +8672,27 @@ var SolanaWalletSelect = () => {
|
|
|
8680
8672
|
}
|
|
8681
8673
|
dispatch(setSolanaConnectModal(false));
|
|
8682
8674
|
}, [wallet, sourceChain]);
|
|
8683
|
-
return /* @__PURE__ */ (0,
|
|
8684
|
-
detected.map((wallet2, index) => /* @__PURE__ */ (0,
|
|
8675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: `wallet-select`, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: "slide-area hide-scrollbar", ref: sliderRef, children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "wallet-container", children: [
|
|
8676
|
+
detected.map((wallet2, index) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
8685
8677
|
"div",
|
|
8686
8678
|
{
|
|
8687
8679
|
className: `card-item ${theme.colorMode}`,
|
|
8688
8680
|
onClick: () => handleWalletClick(wallet2.adapter.name),
|
|
8689
|
-
children: /* @__PURE__ */ (0,
|
|
8690
|
-
/* @__PURE__ */ (0,
|
|
8691
|
-
/* @__PURE__ */ (0,
|
|
8681
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "wallet-item", children: [
|
|
8682
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("img", { src: wallet2.adapter.icon, alt: wallet2.adapter.name }),
|
|
8683
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { children: wallet2.adapter.name })
|
|
8692
8684
|
] })
|
|
8693
8685
|
},
|
|
8694
8686
|
`${wallet2.adapter.name}-${index}`
|
|
8695
8687
|
)),
|
|
8696
|
-
undetected.map((wallet2, index) => /* @__PURE__ */ (0,
|
|
8688
|
+
undetected.map((wallet2, index) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
8697
8689
|
ExternalLink_default,
|
|
8698
8690
|
{
|
|
8699
8691
|
to: wallet2.adapter.url,
|
|
8700
8692
|
className: `card-item ${theme.colorMode}`,
|
|
8701
|
-
children: /* @__PURE__ */ (0,
|
|
8702
|
-
/* @__PURE__ */ (0,
|
|
8703
|
-
/* @__PURE__ */ (0,
|
|
8693
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "wallet-item", children: [
|
|
8694
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("img", { src: wallet2.adapter.icon, alt: wallet2.adapter.name }),
|
|
8695
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { children: [
|
|
8704
8696
|
"Install ",
|
|
8705
8697
|
wallet2.adapter.name
|
|
8706
8698
|
] })
|
|
@@ -8714,12 +8706,12 @@ var SolanaWalletSelect_default = SolanaWalletSelect;
|
|
|
8714
8706
|
|
|
8715
8707
|
// src/widgets/transfer/components/solana/AccountDetailsModal.tsx
|
|
8716
8708
|
var import_react59 = require("react");
|
|
8717
|
-
var
|
|
8709
|
+
var import_react_redux51 = require("react-redux");
|
|
8718
8710
|
var import_wallet_adapter_react7 = require("@solana/wallet-adapter-react");
|
|
8719
8711
|
|
|
8720
8712
|
// src/widgets/transfer/components/WalletModalShell.tsx
|
|
8721
|
-
var
|
|
8722
|
-
var
|
|
8713
|
+
var import_react_redux50 = require("react-redux");
|
|
8714
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
8723
8715
|
var WalletModalShell = ({
|
|
8724
8716
|
isOpen,
|
|
8725
8717
|
title,
|
|
@@ -8728,20 +8720,20 @@ var WalletModalShell = ({
|
|
|
8728
8720
|
className = "",
|
|
8729
8721
|
rightHeader
|
|
8730
8722
|
}) => {
|
|
8731
|
-
const theme = (0,
|
|
8723
|
+
const theme = (0, import_react_redux50.useSelector)(selectTheme);
|
|
8732
8724
|
if (!isOpen) return null;
|
|
8733
|
-
return /* @__PURE__ */ (0,
|
|
8725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
8734
8726
|
"div",
|
|
8735
8727
|
{
|
|
8736
8728
|
className: `kima-modal ${theme.colorMode} ${isOpen ? "open" : ""} ${className}`,
|
|
8737
8729
|
children: [
|
|
8738
|
-
/* @__PURE__ */ (0,
|
|
8739
|
-
/* @__PURE__ */ (0,
|
|
8740
|
-
/* @__PURE__ */ (0,
|
|
8741
|
-
/* @__PURE__ */ (0,
|
|
8742
|
-
/* @__PURE__ */ (0,
|
|
8730
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "modal-overlay", onClick: onClose }),
|
|
8731
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: `modal-content-container ${theme.colorMode}`, children: [
|
|
8732
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "kima-card-header", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "topbar", children: [
|
|
8733
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "title", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("h3", { children: title }) }),
|
|
8734
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "control-buttons", children: rightHeader })
|
|
8743
8735
|
] }) }),
|
|
8744
|
-
/* @__PURE__ */ (0,
|
|
8736
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "modal-content", children })
|
|
8745
8737
|
] })
|
|
8746
8738
|
]
|
|
8747
8739
|
}
|
|
@@ -8750,15 +8742,15 @@ var WalletModalShell = ({
|
|
|
8750
8742
|
var WalletModalShell_default = WalletModalShell;
|
|
8751
8743
|
|
|
8752
8744
|
// src/widgets/transfer/components/solana/AccountDetailsModal.tsx
|
|
8753
|
-
var
|
|
8745
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
8754
8746
|
var AccountDetailsModal = () => {
|
|
8755
|
-
const dispatch = (0,
|
|
8756
|
-
const theme = (0,
|
|
8757
|
-
const mode = (0,
|
|
8758
|
-
const sourceAddress = (0,
|
|
8759
|
-
const networkOption = (0,
|
|
8760
|
-
const sourceChain = (0,
|
|
8761
|
-
const isOpen = (0,
|
|
8747
|
+
const dispatch = (0, import_react_redux51.useDispatch)();
|
|
8748
|
+
const theme = (0, import_react_redux51.useSelector)(selectTheme);
|
|
8749
|
+
const mode = (0, import_react_redux51.useSelector)(selectMode);
|
|
8750
|
+
const sourceAddress = (0, import_react_redux51.useSelector)(selectSourceAddress);
|
|
8751
|
+
const networkOption = (0, import_react_redux51.useSelector)(selectNetworkOption);
|
|
8752
|
+
const sourceChain = (0, import_react_redux51.useSelector)(selectSourceChain);
|
|
8753
|
+
const isOpen = (0, import_react_redux51.useSelector)(selectAccountDetailsModal);
|
|
8762
8754
|
const { disconnect: solanaWalletDisconnect } = (0, import_wallet_adapter_react7.useWallet)();
|
|
8763
8755
|
const { balance: solBalance } = useSolNativeBalance();
|
|
8764
8756
|
const isSol = sourceChain.shortName === "SOL" /* SOLANA */;
|
|
@@ -8781,30 +8773,30 @@ var AccountDetailsModal = () => {
|
|
|
8781
8773
|
close();
|
|
8782
8774
|
}
|
|
8783
8775
|
};
|
|
8784
|
-
return /* @__PURE__ */ (0,
|
|
8776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
8785
8777
|
WalletModalShell_default,
|
|
8786
8778
|
{
|
|
8787
8779
|
isOpen: !!isOpen,
|
|
8788
8780
|
title: "Account Details",
|
|
8789
8781
|
onClose: close,
|
|
8790
|
-
rightHeader: /* @__PURE__ */ (0,
|
|
8782
|
+
rightHeader: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("button", { className: "cross-icon-button", onClick: close, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Cross_default, { fill: theme.colorMode === "light" ? "black" : "white" }) }),
|
|
8791
8783
|
children: [
|
|
8792
|
-
/* @__PURE__ */ (0,
|
|
8793
|
-
/* @__PURE__ */ (0,
|
|
8794
|
-
/* @__PURE__ */ (0,
|
|
8795
|
-
sourceAddress && /* @__PURE__ */ (0,
|
|
8784
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "summary", children: [
|
|
8785
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "address", children: [
|
|
8786
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("h2", { children: sourceAddress ? getShortenedAddress(sourceAddress) : "\u2014" }),
|
|
8787
|
+
sourceAddress && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(CopyButton_default, { text: sourceAddress })
|
|
8796
8788
|
] }),
|
|
8797
|
-
/* @__PURE__ */ (0,
|
|
8789
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("h3", { children: [
|
|
8798
8790
|
formatterFloat.format(Number(solBalance || 0)),
|
|
8799
8791
|
" SOL"
|
|
8800
8792
|
] })
|
|
8801
8793
|
] }),
|
|
8802
|
-
/* @__PURE__ */ (0,
|
|
8803
|
-
/* @__PURE__ */ (0,
|
|
8804
|
-
/* @__PURE__ */ (0,
|
|
8805
|
-
/* @__PURE__ */ (0,
|
|
8794
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(SecondaryButton_default, { className: "block-explorer", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(ExternalLink_default, { className: "link", to: explorerUrl, children: [
|
|
8795
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Explorer_default, { fill: "#778DA3" }),
|
|
8796
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("p", { children: "Block explorer" }),
|
|
8797
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(ExternalUrl_default, { fill: "#778DA3" })
|
|
8806
8798
|
] }) }),
|
|
8807
|
-
/* @__PURE__ */ (0,
|
|
8799
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
8808
8800
|
PrimaryButton_default,
|
|
8809
8801
|
{
|
|
8810
8802
|
clickHandler: handleDisconnect,
|
|
@@ -8819,13 +8811,13 @@ var AccountDetailsModal = () => {
|
|
|
8819
8811
|
var AccountDetailsModal_default = AccountDetailsModal;
|
|
8820
8812
|
|
|
8821
8813
|
// src/widgets/transfer/components/solana/SolanaConnectModal.tsx
|
|
8822
|
-
var
|
|
8814
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
8823
8815
|
var SolanaWalletConnectModal = () => {
|
|
8824
|
-
const dispatch = (0,
|
|
8825
|
-
const theme = (0,
|
|
8826
|
-
const isOpen = (0,
|
|
8827
|
-
const mode = (0,
|
|
8828
|
-
const sourceChain = (0,
|
|
8816
|
+
const dispatch = (0, import_react_redux52.useDispatch)();
|
|
8817
|
+
const theme = (0, import_react_redux52.useSelector)(selectTheme);
|
|
8818
|
+
const isOpen = (0, import_react_redux52.useSelector)(selectSolanaConnectModal);
|
|
8819
|
+
const mode = (0, import_react_redux52.useSelector)(selectMode);
|
|
8820
|
+
const sourceChain = (0, import_react_redux52.useSelector)(selectSourceChain);
|
|
8829
8821
|
const { connect, connecting, connected, publicKey } = (0, import_wallet_adapter_react8.useWallet)();
|
|
8830
8822
|
const isSol = sourceChain.shortName === "SOL" /* SOLANA */;
|
|
8831
8823
|
const close = (0, import_react60.useCallback)(() => {
|
|
@@ -8858,16 +8850,16 @@ var SolanaWalletConnectModal = () => {
|
|
|
8858
8850
|
() => mode === "light" /* light */ ? `Light mode uses a demo Solana address (${lightDemoAccounts.SOL}).` : "",
|
|
8859
8851
|
[mode]
|
|
8860
8852
|
);
|
|
8861
|
-
return /* @__PURE__ */ (0,
|
|
8862
|
-
/* @__PURE__ */ (0,
|
|
8863
|
-
/* @__PURE__ */ (0,
|
|
8853
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
8854
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(AccountDetailsModal_default, {}),
|
|
8855
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
|
|
8864
8856
|
WalletModalShell_default,
|
|
8865
8857
|
{
|
|
8866
8858
|
isOpen: !!isOpen,
|
|
8867
8859
|
title: "Connect Wallet",
|
|
8868
8860
|
onClose: close,
|
|
8869
8861
|
className: "wallet-connect",
|
|
8870
|
-
rightHeader: /* @__PURE__ */ (0,
|
|
8862
|
+
rightHeader: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("button", { className: "cross-icon-button", onClick: close, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8871
8863
|
Cross_default,
|
|
8872
8864
|
{
|
|
8873
8865
|
width: 30,
|
|
@@ -8876,10 +8868,10 @@ var SolanaWalletConnectModal = () => {
|
|
|
8876
8868
|
}
|
|
8877
8869
|
) }),
|
|
8878
8870
|
children: [
|
|
8879
|
-
demoMsg && /* @__PURE__ */ (0,
|
|
8880
|
-
mode !== "light" /* light */ ? /* @__PURE__ */ (0,
|
|
8881
|
-
/* @__PURE__ */ (0,
|
|
8882
|
-
/* @__PURE__ */ (0,
|
|
8871
|
+
demoMsg && /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("p", { className: "muted", children: demoMsg }),
|
|
8872
|
+
mode !== "light" /* light */ ? /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_jsx_runtime81.Fragment, { children: [
|
|
8873
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(SolanaWalletSelect_default, {}),
|
|
8874
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { style: { marginTop: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8883
8875
|
"button",
|
|
8884
8876
|
{
|
|
8885
8877
|
className: "primary",
|
|
@@ -8888,8 +8880,8 @@ var SolanaWalletConnectModal = () => {
|
|
|
8888
8880
|
children: connecting ? "Connecting\u2026" : connected ? "Connected" : "Connect"
|
|
8889
8881
|
}
|
|
8890
8882
|
) })
|
|
8891
|
-
] }) : /* @__PURE__ */ (0,
|
|
8892
|
-
/* @__PURE__ */ (0,
|
|
8883
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { style: { display: "flex", gap: 8 }, children: [
|
|
8884
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
8893
8885
|
"button",
|
|
8894
8886
|
{
|
|
8895
8887
|
className: "secondary",
|
|
@@ -8897,7 +8889,7 @@ var SolanaWalletConnectModal = () => {
|
|
|
8897
8889
|
children: "View Account"
|
|
8898
8890
|
}
|
|
8899
8891
|
),
|
|
8900
|
-
/* @__PURE__ */ (0,
|
|
8892
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("button", { className: "primary", onClick: close, children: "Close" })
|
|
8901
8893
|
] })
|
|
8902
8894
|
]
|
|
8903
8895
|
}
|
|
@@ -8908,22 +8900,22 @@ var SolanaConnectModal_default = SolanaWalletConnectModal;
|
|
|
8908
8900
|
|
|
8909
8901
|
// src/widgets/transfer/components/tron/TronWalletConnectModal.tsx
|
|
8910
8902
|
var import_react63 = require("react");
|
|
8911
|
-
var
|
|
8903
|
+
var import_react_redux55 = require("react-redux");
|
|
8912
8904
|
var import_tronwallet_adapter_react_hooks8 = require("@tronweb3/tronwallet-adapter-react-hooks");
|
|
8913
8905
|
|
|
8914
8906
|
// src/widgets/transfer/components/tron/AccountDetailsModal.tsx
|
|
8915
8907
|
var import_react61 = require("react");
|
|
8916
|
-
var
|
|
8908
|
+
var import_react_redux53 = require("react-redux");
|
|
8917
8909
|
var import_tronwallet_adapter_react_hooks6 = require("@tronweb3/tronwallet-adapter-react-hooks");
|
|
8918
|
-
var
|
|
8910
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
8919
8911
|
var AccountDetailsModal2 = () => {
|
|
8920
|
-
const dispatch = (0,
|
|
8921
|
-
const theme = (0,
|
|
8922
|
-
const mode = (0,
|
|
8923
|
-
const networkOption = (0,
|
|
8924
|
-
const sourceChain = (0,
|
|
8925
|
-
const sourceAddress = (0,
|
|
8926
|
-
const isOpen = (0,
|
|
8912
|
+
const dispatch = (0, import_react_redux53.useDispatch)();
|
|
8913
|
+
const theme = (0, import_react_redux53.useSelector)(selectTheme);
|
|
8914
|
+
const mode = (0, import_react_redux53.useSelector)(selectMode);
|
|
8915
|
+
const networkOption = (0, import_react_redux53.useSelector)(selectNetworkOption);
|
|
8916
|
+
const sourceChain = (0, import_react_redux53.useSelector)(selectSourceChain);
|
|
8917
|
+
const sourceAddress = (0, import_react_redux53.useSelector)(selectSourceAddress);
|
|
8918
|
+
const isOpen = (0, import_react_redux53.useSelector)(selectAccountDetailsModal);
|
|
8927
8919
|
const { disconnect: tronWalletDisconnect } = (0, import_tronwallet_adapter_react_hooks6.useWallet)();
|
|
8928
8920
|
const { balance: tronBalance } = useTronNativeBalance();
|
|
8929
8921
|
const isTrx = sourceChain.shortName === "TRX" /* TRON */;
|
|
@@ -8946,30 +8938,30 @@ var AccountDetailsModal2 = () => {
|
|
|
8946
8938
|
close();
|
|
8947
8939
|
}
|
|
8948
8940
|
};
|
|
8949
|
-
return /* @__PURE__ */ (0,
|
|
8941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
|
|
8950
8942
|
WalletModalShell_default,
|
|
8951
8943
|
{
|
|
8952
8944
|
isOpen: !!isOpen,
|
|
8953
8945
|
title: "Account Details",
|
|
8954
8946
|
onClose: close,
|
|
8955
|
-
rightHeader: /* @__PURE__ */ (0,
|
|
8947
|
+
rightHeader: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("button", { className: "cross-icon-button", onClick: close, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Cross_default, { fill: theme.colorMode === "light" ? "black" : "white" }) }),
|
|
8956
8948
|
children: [
|
|
8957
|
-
/* @__PURE__ */ (0,
|
|
8958
|
-
/* @__PURE__ */ (0,
|
|
8959
|
-
/* @__PURE__ */ (0,
|
|
8960
|
-
sourceAddress && /* @__PURE__ */ (0,
|
|
8949
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "summary", children: [
|
|
8950
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "address", children: [
|
|
8951
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("h2", { children: sourceAddress ? getShortenedAddress(sourceAddress) : "\u2014" }),
|
|
8952
|
+
sourceAddress && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(CopyButton_default, { text: sourceAddress })
|
|
8961
8953
|
] }),
|
|
8962
|
-
/* @__PURE__ */ (0,
|
|
8954
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("h3", { children: [
|
|
8963
8955
|
formatterFloat.format(Number(tronBalance || 0)),
|
|
8964
8956
|
" TRX"
|
|
8965
8957
|
] })
|
|
8966
8958
|
] }),
|
|
8967
|
-
/* @__PURE__ */ (0,
|
|
8968
|
-
/* @__PURE__ */ (0,
|
|
8969
|
-
/* @__PURE__ */ (0,
|
|
8970
|
-
/* @__PURE__ */ (0,
|
|
8959
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(SecondaryButton_default, { className: "block-explorer", children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(ExternalLink_default, { className: "link", to: explorerUrl, children: [
|
|
8960
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Explorer_default, { fill: "#778DA3" }),
|
|
8961
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("p", { children: "Block explorer" }),
|
|
8962
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(ExternalUrl_default, { fill: "#778DA3" })
|
|
8971
8963
|
] }) }),
|
|
8972
|
-
/* @__PURE__ */ (0,
|
|
8964
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
8973
8965
|
PrimaryButton_default,
|
|
8974
8966
|
{
|
|
8975
8967
|
clickHandler: handleDisconnect,
|
|
@@ -8985,14 +8977,14 @@ var AccountDetailsModal_default2 = AccountDetailsModal2;
|
|
|
8985
8977
|
|
|
8986
8978
|
// src/widgets/transfer/components/tron/TronWalletSelect.tsx
|
|
8987
8979
|
var import_react62 = require("react");
|
|
8988
|
-
var
|
|
8980
|
+
var import_react_redux54 = require("react-redux");
|
|
8989
8981
|
var import_tronwallet_adapter_react_hooks7 = require("@tronweb3/tronwallet-adapter-react-hooks");
|
|
8990
8982
|
var import_tronwallet_abstract_adapter = require("@tronweb3/tronwallet-abstract-adapter");
|
|
8991
|
-
var
|
|
8983
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
8992
8984
|
var TronWalletSelect = () => {
|
|
8993
|
-
const theme = (0,
|
|
8985
|
+
const theme = (0, import_react_redux54.useSelector)(selectTheme);
|
|
8994
8986
|
const sliderRef = (0, import_react62.useRef)();
|
|
8995
|
-
const dispatch = (0,
|
|
8987
|
+
const dispatch = (0, import_react_redux54.useDispatch)();
|
|
8996
8988
|
const {
|
|
8997
8989
|
wallets,
|
|
8998
8990
|
select,
|
|
@@ -9044,27 +9036,27 @@ var TronWalletSelect = () => {
|
|
|
9044
9036
|
const connectWallet = async (walletName) => {
|
|
9045
9037
|
currentWallet?.adapter.name === walletName ? await connect() : select(walletName);
|
|
9046
9038
|
};
|
|
9047
|
-
return /* @__PURE__ */ (0,
|
|
9048
|
-
detected.map((wallet, index) => /* @__PURE__ */ (0,
|
|
9039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: `wallet-select`, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: "slide-area hide-scrollbar", ref: sliderRef, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "wallet-container", children: [
|
|
9040
|
+
detected.map((wallet, index) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9049
9041
|
"div",
|
|
9050
9042
|
{
|
|
9051
9043
|
className: `card-item ${theme.colorMode}`,
|
|
9052
9044
|
onClick: () => connectWallet(wallet.adapter.name),
|
|
9053
|
-
children: /* @__PURE__ */ (0,
|
|
9054
|
-
/* @__PURE__ */ (0,
|
|
9055
|
-
/* @__PURE__ */ (0,
|
|
9045
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "wallet-item", children: [
|
|
9046
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("img", { src: wallet.adapter.icon, alt: wallet.adapter.name }),
|
|
9047
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { children: wallet.adapter.name })
|
|
9056
9048
|
] })
|
|
9057
9049
|
},
|
|
9058
9050
|
`${wallet.adapter.name}-${index}`
|
|
9059
9051
|
)),
|
|
9060
|
-
undetected.map((wallet, index) => /* @__PURE__ */ (0,
|
|
9052
|
+
undetected.map((wallet, index) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
9061
9053
|
ExternalLink_default,
|
|
9062
9054
|
{
|
|
9063
9055
|
to: wallet.adapter.url,
|
|
9064
9056
|
className: `card-item ${theme.colorMode}`,
|
|
9065
|
-
children: /* @__PURE__ */ (0,
|
|
9066
|
-
/* @__PURE__ */ (0,
|
|
9067
|
-
/* @__PURE__ */ (0,
|
|
9057
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "wallet-item", children: [
|
|
9058
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("img", { src: wallet.adapter.icon, alt: wallet.adapter.name }),
|
|
9059
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("span", { children: [
|
|
9068
9060
|
"Install ",
|
|
9069
9061
|
wallet.adapter.name
|
|
9070
9062
|
] })
|
|
@@ -9077,13 +9069,13 @@ var TronWalletSelect = () => {
|
|
|
9077
9069
|
var TronWalletSelect_default = TronWalletSelect;
|
|
9078
9070
|
|
|
9079
9071
|
// src/widgets/transfer/components/tron/TronWalletConnectModal.tsx
|
|
9080
|
-
var
|
|
9072
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
9081
9073
|
var TronWalletConnectModal = () => {
|
|
9082
|
-
const dispatch = (0,
|
|
9083
|
-
const theme = (0,
|
|
9084
|
-
const isOpen = (0,
|
|
9085
|
-
const mode = (0,
|
|
9086
|
-
const sourceChain = (0,
|
|
9074
|
+
const dispatch = (0, import_react_redux55.useDispatch)();
|
|
9075
|
+
const theme = (0, import_react_redux55.useSelector)(selectTheme);
|
|
9076
|
+
const isOpen = (0, import_react_redux55.useSelector)(selectTronConnectModal);
|
|
9077
|
+
const mode = (0, import_react_redux55.useSelector)(selectMode);
|
|
9078
|
+
const sourceChain = (0, import_react_redux55.useSelector)(selectSourceChain);
|
|
9087
9079
|
const { connect, connected, connecting } = (0, import_tronwallet_adapter_react_hooks8.useWallet)();
|
|
9088
9080
|
const isTrx = sourceChain.shortName === "TRX" /* TRON */;
|
|
9089
9081
|
const close = (0, import_react63.useCallback)(() => {
|
|
@@ -9109,21 +9101,21 @@ var TronWalletConnectModal = () => {
|
|
|
9109
9101
|
() => mode === "light" /* light */ ? `Light mode uses a demo Tron address (${lightDemoAccounts.TRX}).` : "",
|
|
9110
9102
|
[mode]
|
|
9111
9103
|
);
|
|
9112
|
-
return /* @__PURE__ */ (0,
|
|
9113
|
-
/* @__PURE__ */ (0,
|
|
9114
|
-
/* @__PURE__ */ (0,
|
|
9104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_jsx_runtime84.Fragment, { children: [
|
|
9105
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(AccountDetailsModal_default2, {}),
|
|
9106
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(
|
|
9115
9107
|
WalletModalShell_default,
|
|
9116
9108
|
{
|
|
9117
9109
|
isOpen: !!isOpen,
|
|
9118
9110
|
title: "Connect Wallet",
|
|
9119
9111
|
onClose: close,
|
|
9120
9112
|
className: "wallet-connect",
|
|
9121
|
-
rightHeader: /* @__PURE__ */ (0,
|
|
9113
|
+
rightHeader: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("button", { className: "icon-button", onClick: close, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Cross_default, { fill: theme.colorMode === "light" ? "black" : "white" }) }),
|
|
9122
9114
|
children: [
|
|
9123
|
-
demoMsg && /* @__PURE__ */ (0,
|
|
9124
|
-
mode !== "light" /* light */ ? /* @__PURE__ */ (0,
|
|
9125
|
-
/* @__PURE__ */ (0,
|
|
9126
|
-
/* @__PURE__ */ (0,
|
|
9115
|
+
demoMsg && /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("p", { className: "muted", children: demoMsg }),
|
|
9116
|
+
mode !== "light" /* light */ ? /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(import_jsx_runtime84.Fragment, { children: [
|
|
9117
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(TronWalletSelect_default, {}),
|
|
9118
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { style: { marginTop: 12 }, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9127
9119
|
"button",
|
|
9128
9120
|
{
|
|
9129
9121
|
className: "primary",
|
|
@@ -9132,8 +9124,8 @@ var TronWalletConnectModal = () => {
|
|
|
9132
9124
|
children: connecting ? "Connecting\u2026" : connected ? "Connected" : "Connect"
|
|
9133
9125
|
}
|
|
9134
9126
|
) })
|
|
9135
|
-
] }) : /* @__PURE__ */ (0,
|
|
9136
|
-
/* @__PURE__ */ (0,
|
|
9127
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { style: { display: "flex", gap: 8 }, children: [
|
|
9128
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
9137
9129
|
"button",
|
|
9138
9130
|
{
|
|
9139
9131
|
className: "secondary",
|
|
@@ -9141,7 +9133,7 @@ var TronWalletConnectModal = () => {
|
|
|
9141
9133
|
children: "View Account"
|
|
9142
9134
|
}
|
|
9143
9135
|
),
|
|
9144
|
-
/* @__PURE__ */ (0,
|
|
9136
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)("button", { className: "primary", onClick: close, children: "Close" })
|
|
9145
9137
|
] })
|
|
9146
9138
|
]
|
|
9147
9139
|
}
|
|
@@ -9151,7 +9143,7 @@ var TronWalletConnectModal = () => {
|
|
|
9151
9143
|
var TronWalletConnectModal_default = TronWalletConnectModal;
|
|
9152
9144
|
|
|
9153
9145
|
// src/widgets/transfer/components/TransferWidget.tsx
|
|
9154
|
-
var
|
|
9146
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
9155
9147
|
var TransferWidget = ({
|
|
9156
9148
|
theme,
|
|
9157
9149
|
helpURL,
|
|
@@ -9159,7 +9151,7 @@ var TransferWidget = ({
|
|
|
9159
9151
|
paymentTitleOption
|
|
9160
9152
|
}) => {
|
|
9161
9153
|
logger_default.debug("[TransferWidget] mount");
|
|
9162
|
-
const dispatch = (0,
|
|
9154
|
+
const dispatch = (0, import_react_redux56.useDispatch)();
|
|
9163
9155
|
const mainRef = (0, import_react64.useRef)(null);
|
|
9164
9156
|
const [signature, setSignature2] = (0, import_react64.useState)("");
|
|
9165
9157
|
const [isSubmitting, setIsSubmitting] = (0, import_react64.useState)(false);
|
|
@@ -9170,26 +9162,26 @@ var TransferWidget = ({
|
|
|
9170
9162
|
const [isApproving, setApproving] = (0, import_react64.useState)(false);
|
|
9171
9163
|
const [isSigning, setSigning] = (0, import_react64.useState)(false);
|
|
9172
9164
|
const [feeOptionDisabled, setFeeOptionDisabled] = (0, import_react64.useState)(false);
|
|
9173
|
-
const networkOption = (0,
|
|
9174
|
-
const dAppOption = (0,
|
|
9175
|
-
const mode = (0,
|
|
9176
|
-
const transactionOption = (0,
|
|
9177
|
-
const backendUrl = (0,
|
|
9178
|
-
const sourceAddress = (0,
|
|
9179
|
-
const targetAddress = (0,
|
|
9180
|
-
const sourceChain = (0,
|
|
9181
|
-
const targetChain = (0,
|
|
9182
|
-
const sourceCurrency = (0,
|
|
9183
|
-
const targetCurrency = (0,
|
|
9184
|
-
const amount = (0,
|
|
9185
|
-
const { totalFee, transactionValues } = (0,
|
|
9186
|
-
const compliantOption = (0,
|
|
9187
|
-
const networkOptions = (0,
|
|
9188
|
-
const feeDeduct = (0,
|
|
9189
|
-
const pendingTxs = (0,
|
|
9190
|
-
const networks = (0,
|
|
9191
|
-
const submitted = (0,
|
|
9192
|
-
const ccTransactionStatus = (0,
|
|
9165
|
+
const networkOption = (0, import_react_redux56.useSelector)(selectNetworkOption);
|
|
9166
|
+
const dAppOption = (0, import_react_redux56.useSelector)(selectDappOption);
|
|
9167
|
+
const mode = (0, import_react_redux56.useSelector)(selectMode);
|
|
9168
|
+
const transactionOption = (0, import_react_redux56.useSelector)(selectTransactionOption);
|
|
9169
|
+
const backendUrl = (0, import_react_redux56.useSelector)(selectBackendUrl);
|
|
9170
|
+
const sourceAddress = (0, import_react_redux56.useSelector)(selectSourceAddress);
|
|
9171
|
+
const targetAddress = (0, import_react_redux56.useSelector)(selectTargetAddress);
|
|
9172
|
+
const sourceChain = (0, import_react_redux56.useSelector)(selectSourceChain);
|
|
9173
|
+
const targetChain = (0, import_react_redux56.useSelector)(selectTargetChain);
|
|
9174
|
+
const sourceCurrency = (0, import_react_redux56.useSelector)(selectSourceCurrency);
|
|
9175
|
+
const targetCurrency = (0, import_react_redux56.useSelector)(selectTargetCurrency);
|
|
9176
|
+
const amount = (0, import_react_redux56.useSelector)(selectAmount);
|
|
9177
|
+
const { totalFee, transactionValues } = (0, import_react_redux56.useSelector)(selectServiceFee);
|
|
9178
|
+
const compliantOption = (0, import_react_redux56.useSelector)(selectCompliantOption);
|
|
9179
|
+
const networkOptions = (0, import_react_redux56.useSelector)(selectNetworkOption);
|
|
9180
|
+
const feeDeduct = (0, import_react_redux56.useSelector)(selectFeeDeduct);
|
|
9181
|
+
const pendingTxs = (0, import_react_redux56.useSelector)(selectPendingTxs);
|
|
9182
|
+
const networks = (0, import_react_redux56.useSelector)(selectNetworks);
|
|
9183
|
+
const submitted = (0, import_react_redux56.useSelector)(selectSubmitted);
|
|
9184
|
+
const ccTransactionStatus = (0, import_react_redux56.useSelector)(selectCCTransactionStatus);
|
|
9193
9185
|
const txValues = feeDeduct ? transactionValues.feeFromTarget : transactionValues.feeFromOrigin;
|
|
9194
9186
|
const { keplrHandler, closeHandler } = useKimaContext();
|
|
9195
9187
|
const { width: windowWidth } = useWidth_default();
|
|
@@ -9244,7 +9236,7 @@ var TransferWidget = ({
|
|
|
9244
9236
|
);
|
|
9245
9237
|
import_react_hot_toast4.default.error(
|
|
9246
9238
|
"An unexpected error occurred while preparing the transfer. Please contact support for assistance.",
|
|
9247
|
-
{ icon: /* @__PURE__ */ (0,
|
|
9239
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Error_default, {}) }
|
|
9248
9240
|
);
|
|
9249
9241
|
}
|
|
9250
9242
|
}, [fees, mode, transactionOption, dispatch]);
|
|
@@ -9302,7 +9294,7 @@ var TransferWidget = ({
|
|
|
9302
9294
|
logger_default.error("[TransferWidget] submit failed", err);
|
|
9303
9295
|
import_react_hot_toast4.default.error(
|
|
9304
9296
|
"Failed to submit your transaction. Please contact support for assistance.",
|
|
9305
|
-
{ icon: /* @__PURE__ */ (0,
|
|
9297
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Error_default, {}) }
|
|
9306
9298
|
);
|
|
9307
9299
|
dispatch(setCCTransactionStatus("error-generic"));
|
|
9308
9300
|
}
|
|
@@ -9310,7 +9302,7 @@ var TransferWidget = ({
|
|
|
9310
9302
|
const handleSubmit = async () => {
|
|
9311
9303
|
const { error, message: validationMessage } = validate(true);
|
|
9312
9304
|
if (error === "ValidationError" /* Error */) {
|
|
9313
|
-
import_react_hot_toast4.default.error(validationMessage, { icon: /* @__PURE__ */ (0,
|
|
9305
|
+
import_react_hot_toast4.default.error(validationMessage, { icon: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Error_default, {}) });
|
|
9314
9306
|
return;
|
|
9315
9307
|
}
|
|
9316
9308
|
if (["BANK", "CC"].includes(sourceChain.shortName)) {
|
|
@@ -9349,14 +9341,14 @@ var TransferWidget = ({
|
|
|
9349
9341
|
if (msg.includes("ChainMismatch")) {
|
|
9350
9342
|
import_react_hot_toast4.default.error(
|
|
9351
9343
|
`Your wallet is on the wrong network. Please switch to ${sourceChain.name} and try again.`,
|
|
9352
|
-
{ icon: /* @__PURE__ */ (0,
|
|
9344
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Error_default, {}) }
|
|
9353
9345
|
);
|
|
9354
9346
|
return;
|
|
9355
9347
|
}
|
|
9356
9348
|
logger_default.error("[TransferWidget] approval failed", err);
|
|
9357
9349
|
import_react_hot_toast4.default.error(
|
|
9358
9350
|
"Failed to approve the token allowance. Please contact support for assistance.",
|
|
9359
|
-
{ icon: /* @__PURE__ */ (0,
|
|
9351
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Error_default, {}) }
|
|
9360
9352
|
);
|
|
9361
9353
|
}
|
|
9362
9354
|
return;
|
|
@@ -9391,7 +9383,7 @@ var TransferWidget = ({
|
|
|
9391
9383
|
logger_default.error("[TransferWidget] handleSubmit failed", err);
|
|
9392
9384
|
import_react_hot_toast4.default.error(
|
|
9393
9385
|
"An unexpected error occurred while submitting. Please contact support for assistance.",
|
|
9394
|
-
{ icon: /* @__PURE__ */ (0,
|
|
9386
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Error_default, {}) }
|
|
9395
9387
|
);
|
|
9396
9388
|
setIsSubmitting(false);
|
|
9397
9389
|
}
|
|
@@ -9411,7 +9403,7 @@ var TransferWidget = ({
|
|
|
9411
9403
|
void handleSubmit();
|
|
9412
9404
|
return;
|
|
9413
9405
|
}
|
|
9414
|
-
import_react_hot_toast4.default.error(validationMessage, { icon: /* @__PURE__ */ (0,
|
|
9406
|
+
import_react_hot_toast4.default.error(validationMessage, { icon: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Error_default, {}) });
|
|
9415
9407
|
mainRef.current?.click();
|
|
9416
9408
|
};
|
|
9417
9409
|
const onBack = () => {
|
|
@@ -9439,7 +9431,7 @@ var TransferWidget = ({
|
|
|
9439
9431
|
logger_default.error("[TransferWidget] cancel approve failed", err);
|
|
9440
9432
|
import_react_hot_toast4.default.error(
|
|
9441
9433
|
"Unable to cancel the approval. Please contact support for assistance.",
|
|
9442
|
-
{ icon: /* @__PURE__ */ (0,
|
|
9434
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Error_default, {}) }
|
|
9443
9435
|
);
|
|
9444
9436
|
}
|
|
9445
9437
|
} finally {
|
|
@@ -9484,11 +9476,11 @@ var TransferWidget = ({
|
|
|
9484
9476
|
logger_default.error("[TransferWidget] reset failed", e);
|
|
9485
9477
|
import_react_hot_toast4.default.error(
|
|
9486
9478
|
"Unable to reset the form. Please contact support for assistance.",
|
|
9487
|
-
{ icon: /* @__PURE__ */ (0,
|
|
9479
|
+
{ icon: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Error_default, {}) }
|
|
9488
9480
|
);
|
|
9489
9481
|
}
|
|
9490
9482
|
};
|
|
9491
|
-
return /* @__PURE__ */ (0,
|
|
9483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(
|
|
9492
9484
|
"div",
|
|
9493
9485
|
{
|
|
9494
9486
|
className: `kima-card ${theme.colorMode}`,
|
|
@@ -9496,7 +9488,7 @@ var TransferWidget = ({
|
|
|
9496
9488
|
background: theme.colorMode === "light" /* light */ ? theme.backgroundColorLight : theme.backgroundColorDark
|
|
9497
9489
|
},
|
|
9498
9490
|
children: [
|
|
9499
|
-
resetModalOpen && /* @__PURE__ */ (0,
|
|
9491
|
+
resetModalOpen && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9500
9492
|
WarningModal_default,
|
|
9501
9493
|
{
|
|
9502
9494
|
message: "Are you sure you want to reset the widget?",
|
|
@@ -9508,7 +9500,7 @@ var TransferWidget = ({
|
|
|
9508
9500
|
onCancel: () => setResetModalOpen(false)
|
|
9509
9501
|
}
|
|
9510
9502
|
),
|
|
9511
|
-
warningModalOpen && /* @__PURE__ */ (0,
|
|
9503
|
+
warningModalOpen && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9512
9504
|
WarningModal_default,
|
|
9513
9505
|
{
|
|
9514
9506
|
message: warningModalOpen.message,
|
|
@@ -9522,21 +9514,21 @@ var TransferWidget = ({
|
|
|
9522
9514
|
}
|
|
9523
9515
|
}
|
|
9524
9516
|
),
|
|
9525
|
-
mode === "payment" /* payment */ && !transactionOption && /* @__PURE__ */ (0,
|
|
9526
|
-
/* @__PURE__ */ (0,
|
|
9527
|
-
/* @__PURE__ */ (0,
|
|
9528
|
-
/* @__PURE__ */ (0,
|
|
9529
|
-
/* @__PURE__ */ (0,
|
|
9530
|
-
/* @__PURE__ */ (0,
|
|
9531
|
-
/* @__PURE__ */ (0,
|
|
9517
|
+
mode === "payment" /* payment */ && !transactionOption && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("h2", { className: "invalid-option-banner", children: "We're unable to process your payment. Please ensure the necessary transaction details are provided. Contact support if the issue persists." }),
|
|
9518
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "transfer-card", children: [
|
|
9519
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "kima-card-header", children: [
|
|
9520
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "topbar", children: [
|
|
9521
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "title", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("h3", { style: { marginRight: "5px" }, children: formStep === 0 ? titleOption?.initialTitle ?? (mode === "payment" /* payment */ ? "New Purchase" : "New Transfer") : titleOption?.confirmTitle ?? (mode === "payment" /* payment */ ? "Confirm Purchase" : "Transfer Details") }) }),
|
|
9522
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "control-buttons", children: [
|
|
9523
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9532
9524
|
ExternalLink_default,
|
|
9533
9525
|
{
|
|
9534
9526
|
to: helpURL ? helpURL : networkOption === "testnet" /* testnet */ ? "https://docs.kima.network/kima-network/try-kima-with-the-demo-app" : "https://support.kima.network",
|
|
9535
|
-
children: /* @__PURE__ */ (0,
|
|
9527
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "menu-button", children: "I need help" })
|
|
9536
9528
|
}
|
|
9537
9529
|
),
|
|
9538
|
-
["BANK", "CC"].includes(sourceChain.shortName) && formStep > 0 && /* @__PURE__ */ (0,
|
|
9539
|
-
formStep === 0 && mode !== "payment" /* payment */ && /* @__PURE__ */ (0,
|
|
9530
|
+
["BANK", "CC"].includes(sourceChain.shortName) && formStep > 0 && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(ExternalLink_default, { to: "https://docs.kima.network/kima-network/supported-fiat#unsupported-countries-credit-cards", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "menu-button", children: "Unsupported Countries" }) }),
|
|
9531
|
+
formStep === 0 && mode !== "payment" /* payment */ && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9540
9532
|
"button",
|
|
9541
9533
|
{
|
|
9542
9534
|
className: "reset-button",
|
|
@@ -9545,7 +9537,7 @@ var TransferWidget = ({
|
|
|
9545
9537
|
children: "Reset"
|
|
9546
9538
|
}
|
|
9547
9539
|
),
|
|
9548
|
-
closeHandler && /* @__PURE__ */ (0,
|
|
9540
|
+
closeHandler && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9549
9541
|
"button",
|
|
9550
9542
|
{
|
|
9551
9543
|
className: "cross-icon-button",
|
|
@@ -9553,14 +9545,14 @@ var TransferWidget = ({
|
|
|
9553
9545
|
resetForm();
|
|
9554
9546
|
closeHandler(0);
|
|
9555
9547
|
},
|
|
9556
|
-
children: /* @__PURE__ */ (0,
|
|
9548
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Cross_default, {})
|
|
9557
9549
|
}
|
|
9558
9550
|
)
|
|
9559
9551
|
] })
|
|
9560
9552
|
] }),
|
|
9561
|
-
mode === "payment" /* payment */ && paymentTitleOption?.title && /* @__PURE__ */ (0,
|
|
9553
|
+
mode === "payment" /* payment */ && paymentTitleOption?.title && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("h4", { className: "subtitle", children: paymentTitleOption.title })
|
|
9562
9554
|
] }),
|
|
9563
|
-
/* @__PURE__ */ (0,
|
|
9555
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "kima-card-content", ref: mainRef, children: formStep === 0 ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9564
9556
|
SingleForm_default,
|
|
9565
9557
|
{
|
|
9566
9558
|
...{
|
|
@@ -9573,7 +9565,7 @@ var TransferWidget = ({
|
|
|
9573
9565
|
setInitialSelection
|
|
9574
9566
|
}
|
|
9575
9567
|
}
|
|
9576
|
-
) : ccTransactionStatus !== "idle" ? /* @__PURE__ */ (0,
|
|
9568
|
+
) : ccTransactionStatus !== "idle" ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(FiatWidget_default, { submitCallback: submit }) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9577
9569
|
ConfirmDetails_default,
|
|
9578
9570
|
{
|
|
9579
9571
|
...{
|
|
@@ -9582,12 +9574,12 @@ var TransferWidget = ({
|
|
|
9582
9574
|
}
|
|
9583
9575
|
}
|
|
9584
9576
|
) }),
|
|
9585
|
-
/* @__PURE__ */ (0,
|
|
9577
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9586
9578
|
"div",
|
|
9587
9579
|
{
|
|
9588
9580
|
className: `kima-card-footer ${mode === "bridge" /* bridge */ && formStep !== 0 && "confirm"}`,
|
|
9589
|
-
children: /* @__PURE__ */ (0,
|
|
9590
|
-
isBackButtonEnabled && /* @__PURE__ */ (0,
|
|
9581
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "button-group", children: [
|
|
9582
|
+
isBackButtonEnabled && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9591
9583
|
SecondaryButton_default,
|
|
9592
9584
|
{
|
|
9593
9585
|
clickHandler: onBack,
|
|
@@ -9597,7 +9589,7 @@ var TransferWidget = ({
|
|
|
9597
9589
|
}
|
|
9598
9590
|
),
|
|
9599
9591
|
!!allowance && allowance > 0n && formStep !== 0 && !["BANK", "CC"].includes(sourceChain.shortName) && // EVM path
|
|
9600
|
-
mode !== "light" /* light */ && /* @__PURE__ */ (0,
|
|
9592
|
+
mode !== "light" /* light */ && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9601
9593
|
SecondaryButton_default,
|
|
9602
9594
|
{
|
|
9603
9595
|
clickHandler: onCancelApprove,
|
|
@@ -9607,7 +9599,7 @@ var TransferWidget = ({
|
|
|
9607
9599
|
children: isCancellingApprove ? "Cancelling Approval" : "Cancel Approve"
|
|
9608
9600
|
}
|
|
9609
9601
|
),
|
|
9610
|
-
isSubmitButtonEnabled && /* @__PURE__ */ (0,
|
|
9602
|
+
isSubmitButtonEnabled && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9611
9603
|
PrimaryButton_default,
|
|
9612
9604
|
{
|
|
9613
9605
|
clickHandler: onNext,
|
|
@@ -9619,9 +9611,9 @@ var TransferWidget = ({
|
|
|
9619
9611
|
] })
|
|
9620
9612
|
}
|
|
9621
9613
|
),
|
|
9622
|
-
/* @__PURE__ */ (0,
|
|
9623
|
-
/* @__PURE__ */ (0,
|
|
9624
|
-
/* @__PURE__ */ (0,
|
|
9614
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(SolanaConnectModal_default, {}),
|
|
9615
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(TronWalletConnectModal_default, {}),
|
|
9616
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
9625
9617
|
import_react_hot_toast4.Toaster,
|
|
9626
9618
|
{
|
|
9627
9619
|
position: "top-right",
|
|
@@ -9645,9 +9637,9 @@ var TransferWidget = ({
|
|
|
9645
9637
|
}
|
|
9646
9638
|
}
|
|
9647
9639
|
),
|
|
9648
|
-
/* @__PURE__ */ (0,
|
|
9649
|
-
/* @__PURE__ */ (0,
|
|
9650
|
-
/* @__PURE__ */ (0,
|
|
9640
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "floating-footer", children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: `items ${theme.colorMode}`, children: [
|
|
9641
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("span", { children: "Powered by" }),
|
|
9642
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(KimaNetwork_default, {})
|
|
9651
9643
|
] }) })
|
|
9652
9644
|
] })
|
|
9653
9645
|
]
|
|
@@ -9656,7 +9648,7 @@ var TransferWidget = ({
|
|
|
9656
9648
|
};
|
|
9657
9649
|
|
|
9658
9650
|
// src/widgets/common/KimaWidgetWrapper.tsx
|
|
9659
|
-
var
|
|
9651
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
9660
9652
|
var KimaWidgetWrapper = ({
|
|
9661
9653
|
mode,
|
|
9662
9654
|
txId,
|
|
@@ -9672,12 +9664,12 @@ var KimaWidgetWrapper = ({
|
|
|
9672
9664
|
}) => {
|
|
9673
9665
|
useDebugCode();
|
|
9674
9666
|
const { kimaBackendUrl } = useKimaContext();
|
|
9675
|
-
const dispatch = (0,
|
|
9667
|
+
const dispatch = (0, import_react_redux57.useDispatch)();
|
|
9676
9668
|
const { setThemeMode, setThemeVariables } = (0, import_react65.useAppKitTheme)();
|
|
9677
|
-
const submitted = (0,
|
|
9678
|
-
const sourceChain = (0,
|
|
9679
|
-
const ccTransactionStatus = (0,
|
|
9680
|
-
const ccTransactionRetrying = (0,
|
|
9669
|
+
const submitted = (0, import_react_redux57.useSelector)(selectSubmitted);
|
|
9670
|
+
const sourceChain = (0, import_react_redux57.useSelector)(selectSourceChain);
|
|
9671
|
+
const ccTransactionStatus = (0, import_react_redux57.useSelector)(selectCCTransactionStatus);
|
|
9672
|
+
const ccTransactionRetrying = (0, import_react_redux57.useSelector)(selectCCTransactionRetrying);
|
|
9681
9673
|
const networkOption = envOptions?.env;
|
|
9682
9674
|
const kimaExplorer = envOptions?.kimaExplorer || "https://explorer.sardis.kima.network";
|
|
9683
9675
|
const { currentPlugin } = useGetCurrentPlugin_default();
|
|
@@ -9826,10 +9818,10 @@ var KimaWidgetWrapper = ({
|
|
|
9826
9818
|
}, [currentPlugin?.id, sourceChain?.shortName]);
|
|
9827
9819
|
const content = (0, import_react66.useMemo)(() => {
|
|
9828
9820
|
if (mode === "status" /* status */) {
|
|
9829
|
-
return /* @__PURE__ */ (0,
|
|
9821
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(TransactionWidget, { theme });
|
|
9830
9822
|
}
|
|
9831
9823
|
if (!currentPlugin && !sourceChain?.shortName) {
|
|
9832
|
-
return /* @__PURE__ */ (0,
|
|
9824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9833
9825
|
TransferWidget,
|
|
9834
9826
|
{
|
|
9835
9827
|
theme,
|
|
@@ -9841,15 +9833,15 @@ var KimaWidgetWrapper = ({
|
|
|
9841
9833
|
);
|
|
9842
9834
|
}
|
|
9843
9835
|
if (!currentPlugin) {
|
|
9844
|
-
return /* @__PURE__ */ (0,
|
|
9836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(SkeletonLoader_default, { theme });
|
|
9845
9837
|
}
|
|
9846
9838
|
if (sourceChain.shortName === "CC") {
|
|
9847
9839
|
if (submitted) {
|
|
9848
9840
|
logger_default.debug("[KimaWidgetWrapper] CC mode -> TransactionWidget");
|
|
9849
|
-
return /* @__PURE__ */ (0,
|
|
9841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(TransactionWidget, { theme });
|
|
9850
9842
|
}
|
|
9851
9843
|
if (ccTransactionStatus === "error-id") {
|
|
9852
|
-
return /* @__PURE__ */ (0,
|
|
9844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9853
9845
|
ErrorWidget_default,
|
|
9854
9846
|
{
|
|
9855
9847
|
theme,
|
|
@@ -9864,7 +9856,7 @@ var KimaWidgetWrapper = ({
|
|
|
9864
9856
|
);
|
|
9865
9857
|
}
|
|
9866
9858
|
if (ccTransactionStatus === "error-generic") {
|
|
9867
|
-
return /* @__PURE__ */ (0,
|
|
9859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9868
9860
|
ErrorWidget_default,
|
|
9869
9861
|
{
|
|
9870
9862
|
theme,
|
|
@@ -9878,7 +9870,7 @@ var KimaWidgetWrapper = ({
|
|
|
9878
9870
|
}
|
|
9879
9871
|
);
|
|
9880
9872
|
}
|
|
9881
|
-
return /* @__PURE__ */ (0,
|
|
9873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9882
9874
|
TransferWidget,
|
|
9883
9875
|
{
|
|
9884
9876
|
theme,
|
|
@@ -9893,7 +9885,7 @@ var KimaWidgetWrapper = ({
|
|
|
9893
9885
|
"[KimaWidgetWrapper] rendering TransferWidget with plugin",
|
|
9894
9886
|
currentPlugin?.id
|
|
9895
9887
|
);
|
|
9896
|
-
return submitted ? /* @__PURE__ */ (0,
|
|
9888
|
+
return submitted ? /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(TransactionWidget, { theme }) : /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
9897
9889
|
TransferWidget,
|
|
9898
9890
|
{
|
|
9899
9891
|
theme,
|
|
@@ -9922,7 +9914,7 @@ var KimaWidgetWrapper = ({
|
|
|
9922
9914
|
var KimaWidgetWrapper_default = KimaWidgetWrapper;
|
|
9923
9915
|
|
|
9924
9916
|
// src/widgets/common/KimaTransactionWidget.tsx
|
|
9925
|
-
var
|
|
9917
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
9926
9918
|
var KimaTransactionWidget = ({
|
|
9927
9919
|
mode,
|
|
9928
9920
|
txId,
|
|
@@ -9934,7 +9926,7 @@ var KimaTransactionWidget = ({
|
|
|
9934
9926
|
compliantOption = false,
|
|
9935
9927
|
transactionOption
|
|
9936
9928
|
}) => {
|
|
9937
|
-
const dispatch = (0,
|
|
9929
|
+
const dispatch = (0, import_react_redux58.useDispatch)();
|
|
9938
9930
|
const { kimaBackendUrl } = useKimaContext();
|
|
9939
9931
|
const [hydrated, setHydrated] = (0, import_react67.useState)(false);
|
|
9940
9932
|
const {
|
|
@@ -9956,11 +9948,11 @@ var KimaTransactionWidget = ({
|
|
|
9956
9948
|
}
|
|
9957
9949
|
}, [theme?.colorMode, dispatch, theme]);
|
|
9958
9950
|
if (!hydrated || !theme?.colorMode)
|
|
9959
|
-
return /* @__PURE__ */ (0,
|
|
9951
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(ring_default, { width: 20, height: 20, fill: "#86b8ce" });
|
|
9960
9952
|
if (isLoadingEnvs || isLoadingChainData)
|
|
9961
|
-
return /* @__PURE__ */ (0,
|
|
9953
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(SkeletonLoader_default, { theme });
|
|
9962
9954
|
if (envOptionsError || !envOptions)
|
|
9963
|
-
return /* @__PURE__ */ (0,
|
|
9955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
9964
9956
|
ErrorWidget_default,
|
|
9965
9957
|
{
|
|
9966
9958
|
theme,
|
|
@@ -9969,7 +9961,7 @@ var KimaTransactionWidget = ({
|
|
|
9969
9961
|
}
|
|
9970
9962
|
);
|
|
9971
9963
|
if (chainDataError || !chainData)
|
|
9972
|
-
return /* @__PURE__ */ (0,
|
|
9964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
9973
9965
|
ErrorWidget_default,
|
|
9974
9966
|
{
|
|
9975
9967
|
theme,
|
|
@@ -9977,7 +9969,7 @@ var KimaTransactionWidget = ({
|
|
|
9977
9969
|
message: "There was an error loading the chain data from the backend. Please check that the backend is running properly and the widget points to the corresponding url." /* ChainLoadingError */
|
|
9978
9970
|
}
|
|
9979
9971
|
);
|
|
9980
|
-
return /* @__PURE__ */ (0,
|
|
9972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
9981
9973
|
KimaWidgetWrapper_default,
|
|
9982
9974
|
{
|
|
9983
9975
|
...{
|