@kimafinance/kima-transaction-widget 1.4.8 → 1.4.10
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 +813 -386
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +219 -267
- package/dist/index.css.map +1 -1
- package/dist/index.js +760 -333
- package/dist/index.js.map +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/package.json +4 -3
- package/dist/assets/Manrope-ExtraLight-47OLGDTA.woff +0 -0
- package/dist/assets/Manrope-ExtraLight-6BGXUBPE.woff2 +0 -0
- package/dist/assets/Manrope-ExtraLight-6KZAMPI7.eot +0 -0
- package/dist/assets/SohneBreit-Buch-FPHQDKKW.woff +0 -0
- package/dist/assets/SohneBreit-Buch-UDQP3HAK.woff2 +0 -0
- package/dist/assets/SohneBreit-Buch-VTQ4XGFE.eot +0 -0
package/dist/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
// src/KimaProvider.tsx
|
|
4
|
-
import * as
|
|
4
|
+
import * as React50 from "react";
|
|
5
5
|
import { createContext, useContext, useMemo as useMemo7 } from "react";
|
|
6
6
|
import { Provider, useSelector as useSelector16 } from "react-redux";
|
|
7
|
+
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
7
8
|
|
|
8
9
|
// src/store/index.tsx
|
|
9
10
|
import { configureStore } from "@reduxjs/toolkit";
|
|
@@ -188,7 +189,7 @@ var Arrow_default = Arrow;
|
|
|
188
189
|
|
|
189
190
|
// src/assets/icons/Lock.tsx
|
|
190
191
|
import React8 from "react";
|
|
191
|
-
var Lock = ({ width = 24, height =
|
|
192
|
+
var Lock = ({ width = 24, height = 24, fill = "none", ...rest }) => {
|
|
192
193
|
return /* @__PURE__ */ React8.createElement(
|
|
193
194
|
"svg",
|
|
194
195
|
{
|
|
@@ -1436,6 +1437,264 @@ var EURC = ({ width = 100, height = 100, ...rest }) => {
|
|
|
1436
1437
|
};
|
|
1437
1438
|
var EURC_default = EURC;
|
|
1438
1439
|
|
|
1440
|
+
// src/assets/icons/TransactionComplete.tsx
|
|
1441
|
+
import React42 from "react";
|
|
1442
|
+
var TransactionComplete = ({ width = 140, height = 120, ...rest }) => {
|
|
1443
|
+
return /* @__PURE__ */ React42.createElement(
|
|
1444
|
+
"svg",
|
|
1445
|
+
{
|
|
1446
|
+
width,
|
|
1447
|
+
height,
|
|
1448
|
+
viewBox: "0 0 141 116",
|
|
1449
|
+
fill: "none",
|
|
1450
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1451
|
+
...rest
|
|
1452
|
+
},
|
|
1453
|
+
/* @__PURE__ */ React42.createElement(
|
|
1454
|
+
"rect",
|
|
1455
|
+
{
|
|
1456
|
+
x: "140.724",
|
|
1457
|
+
y: "53.4307",
|
|
1458
|
+
width: "9.00052",
|
|
1459
|
+
height: "21.8584",
|
|
1460
|
+
rx: "4.50026",
|
|
1461
|
+
transform: "rotate(90 140.724 53.4307)",
|
|
1462
|
+
fill: "url(#paint0_linear_1838_5769)"
|
|
1463
|
+
}
|
|
1464
|
+
),
|
|
1465
|
+
/* @__PURE__ */ React42.createElement(
|
|
1466
|
+
"rect",
|
|
1467
|
+
{
|
|
1468
|
+
x: "133.009",
|
|
1469
|
+
y: "29.001",
|
|
1470
|
+
width: "9.00052",
|
|
1471
|
+
height: "21.8584",
|
|
1472
|
+
rx: "4.50026",
|
|
1473
|
+
transform: "rotate(60 133.009 29.001)",
|
|
1474
|
+
fill: "url(#paint1_linear_1838_5769)"
|
|
1475
|
+
}
|
|
1476
|
+
),
|
|
1477
|
+
/* @__PURE__ */ React42.createElement(
|
|
1478
|
+
"rect",
|
|
1479
|
+
{
|
|
1480
|
+
x: "136.866",
|
|
1481
|
+
y: "78.5039",
|
|
1482
|
+
width: "9.00052",
|
|
1483
|
+
height: "21.8584",
|
|
1484
|
+
rx: "4.50026",
|
|
1485
|
+
transform: "rotate(120 136.866 78.5039)",
|
|
1486
|
+
fill: "url(#paint2_linear_1838_5769)"
|
|
1487
|
+
}
|
|
1488
|
+
),
|
|
1489
|
+
/* @__PURE__ */ React42.createElement(
|
|
1490
|
+
"rect",
|
|
1491
|
+
{
|
|
1492
|
+
y: "61.8682",
|
|
1493
|
+
width: "9.00052",
|
|
1494
|
+
height: "21.8584",
|
|
1495
|
+
rx: "4.50026",
|
|
1496
|
+
transform: "rotate(-90 0 61.8682)",
|
|
1497
|
+
fill: "url(#paint3_linear_1838_5769)"
|
|
1498
|
+
}
|
|
1499
|
+
),
|
|
1500
|
+
/* @__PURE__ */ React42.createElement(
|
|
1501
|
+
"rect",
|
|
1502
|
+
{
|
|
1503
|
+
x: "7.71472",
|
|
1504
|
+
y: "86.2979",
|
|
1505
|
+
width: "9.00052",
|
|
1506
|
+
height: "21.8584",
|
|
1507
|
+
rx: "4.50026",
|
|
1508
|
+
transform: "rotate(-120 7.71472 86.2979)",
|
|
1509
|
+
fill: "url(#paint4_linear_1838_5769)"
|
|
1510
|
+
}
|
|
1511
|
+
),
|
|
1512
|
+
/* @__PURE__ */ React42.createElement(
|
|
1513
|
+
"rect",
|
|
1514
|
+
{
|
|
1515
|
+
x: "3.85742",
|
|
1516
|
+
y: "36.7959",
|
|
1517
|
+
width: "9.00052",
|
|
1518
|
+
height: "21.8584",
|
|
1519
|
+
rx: "4.50026",
|
|
1520
|
+
transform: "rotate(-60 3.85742 36.7959)",
|
|
1521
|
+
fill: "url(#paint5_linear_1838_5769)"
|
|
1522
|
+
}
|
|
1523
|
+
),
|
|
1524
|
+
/* @__PURE__ */ React42.createElement("g", { filter: "url(#filter0_d_1838_5769)" }, /* @__PURE__ */ React42.createElement("circle", { cx: "70.3622", cy: "57.9308", r: "37.9308", fill: "white" }), /* @__PURE__ */ React42.createElement(
|
|
1525
|
+
"circle",
|
|
1526
|
+
{
|
|
1527
|
+
cx: "70.3622",
|
|
1528
|
+
cy: "57.9308",
|
|
1529
|
+
r: "36.0021",
|
|
1530
|
+
stroke: "url(#paint6_linear_1838_5769)",
|
|
1531
|
+
strokeWidth: "3.85736"
|
|
1532
|
+
}
|
|
1533
|
+
)),
|
|
1534
|
+
/* @__PURE__ */ React42.createElement(
|
|
1535
|
+
"path",
|
|
1536
|
+
{
|
|
1537
|
+
d: "M62.571 74.3906C61.9266 74.3944 61.2878 74.268 60.6912 74.0186C60.0946 73.7691 59.552 73.4017 59.0944 72.9371L49.3011 62.9134C48.3791 61.9697 47.8611 60.6897 47.8611 59.355C47.8611 58.0204 48.3791 56.7404 49.3011 55.7966C50.2232 54.8529 51.4738 54.3227 52.7778 54.3227C54.0817 54.3227 55.3323 54.8529 56.2544 55.7966L62.571 62.312L83.5776 40.7611C84.4997 39.8173 85.7502 39.2871 87.0542 39.2871C88.3582 39.2871 89.6088 39.8173 90.5308 40.7611C91.4529 41.7048 91.9709 42.9848 91.9709 44.3195C91.9709 45.6541 91.4529 46.9341 90.5308 47.8779L66.0476 72.9371C65.5901 73.4017 65.0475 73.7691 64.4509 74.0186C63.8543 74.268 63.2155 74.3944 62.571 74.3906Z",
|
|
1538
|
+
fill: "url(#paint7_linear_1838_5769)"
|
|
1539
|
+
}
|
|
1540
|
+
),
|
|
1541
|
+
/* @__PURE__ */ React42.createElement("defs", null, /* @__PURE__ */ React42.createElement(
|
|
1542
|
+
"filter",
|
|
1543
|
+
{
|
|
1544
|
+
id: "filter0_d_1838_5769",
|
|
1545
|
+
x: "13.1446",
|
|
1546
|
+
y: "0.713175",
|
|
1547
|
+
width: "114.435",
|
|
1548
|
+
height: "114.435",
|
|
1549
|
+
filterUnits: "userSpaceOnUse",
|
|
1550
|
+
colorInterpolationFilters: "sRGB"
|
|
1551
|
+
},
|
|
1552
|
+
/* @__PURE__ */ React42.createElement("feFlood", { floodOpacity: "0", result: "BackgroundImageFix" }),
|
|
1553
|
+
/* @__PURE__ */ React42.createElement(
|
|
1554
|
+
"feColorMatrix",
|
|
1555
|
+
{
|
|
1556
|
+
in: "SourceAlpha",
|
|
1557
|
+
type: "matrix",
|
|
1558
|
+
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",
|
|
1559
|
+
result: "hardAlpha"
|
|
1560
|
+
}
|
|
1561
|
+
),
|
|
1562
|
+
/* @__PURE__ */ React42.createElement("feOffset", null),
|
|
1563
|
+
/* @__PURE__ */ React42.createElement("feGaussianBlur", { stdDeviation: "9.64341" }),
|
|
1564
|
+
/* @__PURE__ */ React42.createElement("feComposite", { in2: "hardAlpha", operator: "out" }),
|
|
1565
|
+
/* @__PURE__ */ React42.createElement(
|
|
1566
|
+
"feColorMatrix",
|
|
1567
|
+
{
|
|
1568
|
+
type: "matrix",
|
|
1569
|
+
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"
|
|
1570
|
+
}
|
|
1571
|
+
),
|
|
1572
|
+
/* @__PURE__ */ React42.createElement(
|
|
1573
|
+
"feBlend",
|
|
1574
|
+
{
|
|
1575
|
+
mode: "normal",
|
|
1576
|
+
in2: "BackgroundImageFix",
|
|
1577
|
+
result: "effect1_dropShadow_1838_5769"
|
|
1578
|
+
}
|
|
1579
|
+
),
|
|
1580
|
+
/* @__PURE__ */ React42.createElement(
|
|
1581
|
+
"feBlend",
|
|
1582
|
+
{
|
|
1583
|
+
mode: "normal",
|
|
1584
|
+
in: "SourceGraphic",
|
|
1585
|
+
in2: "effect1_dropShadow_1838_5769",
|
|
1586
|
+
result: "shape"
|
|
1587
|
+
}
|
|
1588
|
+
)
|
|
1589
|
+
), /* @__PURE__ */ React42.createElement(
|
|
1590
|
+
"linearGradient",
|
|
1591
|
+
{
|
|
1592
|
+
id: "paint0_linear_1838_5769",
|
|
1593
|
+
x1: "140.724",
|
|
1594
|
+
y1: "64.3599",
|
|
1595
|
+
x2: "149.724",
|
|
1596
|
+
y2: "64.3599",
|
|
1597
|
+
gradientUnits: "userSpaceOnUse"
|
|
1598
|
+
},
|
|
1599
|
+
/* @__PURE__ */ React42.createElement("stop", { stopColor: "#ADF4A6" }),
|
|
1600
|
+
/* @__PURE__ */ React42.createElement("stop", { offset: "0.315", stopColor: "#80D7F5" }),
|
|
1601
|
+
/* @__PURE__ */ React42.createElement("stop", { offset: "0.775", stopColor: "#9990D5" })
|
|
1602
|
+
), /* @__PURE__ */ React42.createElement(
|
|
1603
|
+
"linearGradient",
|
|
1604
|
+
{
|
|
1605
|
+
id: "paint1_linear_1838_5769",
|
|
1606
|
+
x1: "133.009",
|
|
1607
|
+
y1: "39.9302",
|
|
1608
|
+
x2: "142.009",
|
|
1609
|
+
y2: "39.9302",
|
|
1610
|
+
gradientUnits: "userSpaceOnUse"
|
|
1611
|
+
},
|
|
1612
|
+
/* @__PURE__ */ React42.createElement("stop", { stopColor: "#ADF4A6" }),
|
|
1613
|
+
/* @__PURE__ */ React42.createElement("stop", { offset: "0.315", stopColor: "#80D7F5" }),
|
|
1614
|
+
/* @__PURE__ */ React42.createElement("stop", { offset: "0.775", stopColor: "#9990D5" })
|
|
1615
|
+
), /* @__PURE__ */ React42.createElement(
|
|
1616
|
+
"linearGradient",
|
|
1617
|
+
{
|
|
1618
|
+
id: "paint2_linear_1838_5769",
|
|
1619
|
+
x1: "136.866",
|
|
1620
|
+
y1: "89.4331",
|
|
1621
|
+
x2: "145.867",
|
|
1622
|
+
y2: "89.4331",
|
|
1623
|
+
gradientUnits: "userSpaceOnUse"
|
|
1624
|
+
},
|
|
1625
|
+
/* @__PURE__ */ React42.createElement("stop", { stopColor: "#ADF4A6" }),
|
|
1626
|
+
/* @__PURE__ */ React42.createElement("stop", { offset: "0.315", stopColor: "#80D7F5" }),
|
|
1627
|
+
/* @__PURE__ */ React42.createElement("stop", { offset: "0.775", stopColor: "#9990D5" })
|
|
1628
|
+
), /* @__PURE__ */ React42.createElement(
|
|
1629
|
+
"linearGradient",
|
|
1630
|
+
{
|
|
1631
|
+
id: "paint3_linear_1838_5769",
|
|
1632
|
+
x1: "0",
|
|
1633
|
+
y1: "72.7974",
|
|
1634
|
+
x2: "9.00052",
|
|
1635
|
+
y2: "72.7974",
|
|
1636
|
+
gradientUnits: "userSpaceOnUse"
|
|
1637
|
+
},
|
|
1638
|
+
/* @__PURE__ */ React42.createElement("stop", { stopColor: "#ADF4A6" }),
|
|
1639
|
+
/* @__PURE__ */ React42.createElement("stop", { offset: "0.315", stopColor: "#80D7F5" }),
|
|
1640
|
+
/* @__PURE__ */ React42.createElement("stop", { offset: "0.775", stopColor: "#9990D5" })
|
|
1641
|
+
), /* @__PURE__ */ React42.createElement(
|
|
1642
|
+
"linearGradient",
|
|
1643
|
+
{
|
|
1644
|
+
id: "paint4_linear_1838_5769",
|
|
1645
|
+
x1: "7.71472",
|
|
1646
|
+
y1: "97.2271",
|
|
1647
|
+
x2: "16.7152",
|
|
1648
|
+
y2: "97.2271",
|
|
1649
|
+
gradientUnits: "userSpaceOnUse"
|
|
1650
|
+
},
|
|
1651
|
+
/* @__PURE__ */ React42.createElement("stop", { stopColor: "#ADF4A6" }),
|
|
1652
|
+
/* @__PURE__ */ React42.createElement("stop", { offset: "0.315", stopColor: "#80D7F5" }),
|
|
1653
|
+
/* @__PURE__ */ React42.createElement("stop", { offset: "0.775", stopColor: "#9990D5" })
|
|
1654
|
+
), /* @__PURE__ */ React42.createElement(
|
|
1655
|
+
"linearGradient",
|
|
1656
|
+
{
|
|
1657
|
+
id: "paint5_linear_1838_5769",
|
|
1658
|
+
x1: "3.85742",
|
|
1659
|
+
y1: "47.7251",
|
|
1660
|
+
x2: "12.8579",
|
|
1661
|
+
y2: "47.7251",
|
|
1662
|
+
gradientUnits: "userSpaceOnUse"
|
|
1663
|
+
},
|
|
1664
|
+
/* @__PURE__ */ React42.createElement("stop", { stopColor: "#ADF4A6" }),
|
|
1665
|
+
/* @__PURE__ */ React42.createElement("stop", { offset: "0.315", stopColor: "#80D7F5" }),
|
|
1666
|
+
/* @__PURE__ */ React42.createElement("stop", { offset: "0.775", stopColor: "#9990D5" })
|
|
1667
|
+
), /* @__PURE__ */ React42.createElement(
|
|
1668
|
+
"linearGradient",
|
|
1669
|
+
{
|
|
1670
|
+
id: "paint6_linear_1838_5769",
|
|
1671
|
+
x1: "32.4314",
|
|
1672
|
+
y1: "57.9308",
|
|
1673
|
+
x2: "108.293",
|
|
1674
|
+
y2: "57.9308",
|
|
1675
|
+
gradientUnits: "userSpaceOnUse"
|
|
1676
|
+
},
|
|
1677
|
+
/* @__PURE__ */ React42.createElement("stop", { stopColor: "#ADF4A6" }),
|
|
1678
|
+
/* @__PURE__ */ React42.createElement("stop", { offset: "0.315", stopColor: "#80D7F5" }),
|
|
1679
|
+
/* @__PURE__ */ React42.createElement("stop", { offset: "0.775", stopColor: "#9990D5" })
|
|
1680
|
+
), /* @__PURE__ */ React42.createElement(
|
|
1681
|
+
"linearGradient",
|
|
1682
|
+
{
|
|
1683
|
+
id: "paint7_linear_1838_5769",
|
|
1684
|
+
x1: "47.8611",
|
|
1685
|
+
y1: "56.8389",
|
|
1686
|
+
x2: "91.9709",
|
|
1687
|
+
y2: "56.8389",
|
|
1688
|
+
gradientUnits: "userSpaceOnUse"
|
|
1689
|
+
},
|
|
1690
|
+
/* @__PURE__ */ React42.createElement("stop", { stopColor: "#ADF4A6" }),
|
|
1691
|
+
/* @__PURE__ */ React42.createElement("stop", { offset: "0.315", stopColor: "#80D7F5" }),
|
|
1692
|
+
/* @__PURE__ */ React42.createElement("stop", { offset: "0.775", stopColor: "#9990D5" })
|
|
1693
|
+
))
|
|
1694
|
+
);
|
|
1695
|
+
};
|
|
1696
|
+
var TransactionComplete_default = TransactionComplete;
|
|
1697
|
+
|
|
1439
1698
|
// src/utils/constants.tsx
|
|
1440
1699
|
import {
|
|
1441
1700
|
arbitrum,
|
|
@@ -1647,11 +1906,11 @@ var ColorModeOptions = /* @__PURE__ */ ((ColorModeOptions2) => {
|
|
|
1647
1906
|
ColorModeOptions2["dark"] = "dark";
|
|
1648
1907
|
return ColorModeOptions2;
|
|
1649
1908
|
})(ColorModeOptions || {});
|
|
1650
|
-
var DAppOptions = /* @__PURE__ */ ((
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
return
|
|
1909
|
+
var DAppOptions = /* @__PURE__ */ ((DAppOptions3) => {
|
|
1910
|
+
DAppOptions3["None"] = "none";
|
|
1911
|
+
DAppOptions3["LPAdd"] = "LPAdd";
|
|
1912
|
+
DAppOptions3["LPDrain"] = "LPDrain";
|
|
1913
|
+
return DAppOptions3;
|
|
1655
1914
|
})(DAppOptions || {});
|
|
1656
1915
|
|
|
1657
1916
|
// src/store/optionSlice.tsx
|
|
@@ -2098,9 +2357,6 @@ var getAllPlugins = () => {
|
|
|
2098
2357
|
return pluginRegistry;
|
|
2099
2358
|
};
|
|
2100
2359
|
|
|
2101
|
-
// src/KimaProvider.tsx
|
|
2102
|
-
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
2103
|
-
|
|
2104
2360
|
// src/hooks/useGetEnvOptions.tsx
|
|
2105
2361
|
import { useQuery } from "@tanstack/react-query";
|
|
2106
2362
|
|
|
@@ -2172,7 +2428,7 @@ var useGetEnvOptions = ({
|
|
|
2172
2428
|
};
|
|
2173
2429
|
|
|
2174
2430
|
// plugins/evm/index.tsx
|
|
2175
|
-
import
|
|
2431
|
+
import React44 from "react";
|
|
2176
2432
|
|
|
2177
2433
|
// plugins/PluginBase.ts
|
|
2178
2434
|
var PluginBase = class {
|
|
@@ -2209,7 +2465,7 @@ var PluginBase = class {
|
|
|
2209
2465
|
};
|
|
2210
2466
|
|
|
2211
2467
|
// plugins/evm/features/walletConnect/WalletProvider.tsx
|
|
2212
|
-
import
|
|
2468
|
+
import React43, { useEffect, useState } from "react";
|
|
2213
2469
|
|
|
2214
2470
|
// plugins/evm/config/modalConfig.ts
|
|
2215
2471
|
import { createAppKit } from "@reown/appkit/react";
|
|
@@ -2301,9 +2557,9 @@ var WalletProvider = ({
|
|
|
2301
2557
|
}
|
|
2302
2558
|
}, [networkOption, isLoading, walletConnectProjectId]);
|
|
2303
2559
|
if (!isReady) {
|
|
2304
|
-
return /* @__PURE__ */
|
|
2560
|
+
return /* @__PURE__ */ React43.createElement(React43.Fragment, null);
|
|
2305
2561
|
}
|
|
2306
|
-
return /* @__PURE__ */
|
|
2562
|
+
return /* @__PURE__ */ React43.createElement(React43.Fragment, null, children);
|
|
2307
2563
|
};
|
|
2308
2564
|
var WalletProvider_default = WalletProvider;
|
|
2309
2565
|
|
|
@@ -2893,12 +3149,13 @@ function useEvmAllowance() {
|
|
|
2893
3149
|
const sourceChain = useSelector4(selectSourceChain);
|
|
2894
3150
|
const sourceAddress = useSelector4(selectSourceAddress);
|
|
2895
3151
|
const networkOption = useSelector4(selectNetworkOption);
|
|
3152
|
+
const dAppOption = useSelector4(selectDappOption);
|
|
2896
3153
|
const { transactionValues } = useSelector4(selectServiceFee);
|
|
2897
3154
|
const selectedCoin = useSelector4(selectSourceCurrency);
|
|
2898
3155
|
const tokenOptions = useSelector4(selectTokenOptions);
|
|
2899
3156
|
const backendUrl = useSelector4(selectBackendUrl);
|
|
2900
3157
|
const feeDeduct = useSelector4(selectFeeDeduct);
|
|
2901
|
-
const txValues = feeDeduct ? transactionValues.feeFromTarget : transactionValues.feeFromOrigin;
|
|
3158
|
+
const txValues = feeDeduct || dAppOption !== "none" /* None */ ? transactionValues.feeFromTarget : transactionValues.feeFromOrigin;
|
|
2902
3159
|
const allowanceNumber = BigInt(txValues.allowanceAmount.value);
|
|
2903
3160
|
const { pools } = useGetPools_default(backendUrl, networkOption);
|
|
2904
3161
|
const { walletProvider, walletAddress } = useEvmProvider();
|
|
@@ -3000,7 +3257,9 @@ function useEvmAllowance() {
|
|
|
3000
3257
|
import { useDisconnect } from "@reown/appkit/react";
|
|
3001
3258
|
function useDisconnectWallet() {
|
|
3002
3259
|
const { disconnect } = useDisconnect();
|
|
3003
|
-
return {
|
|
3260
|
+
return {
|
|
3261
|
+
disconnectWallet: disconnect
|
|
3262
|
+
};
|
|
3004
3263
|
}
|
|
3005
3264
|
var useDisconnectWallet_default = useDisconnectWallet;
|
|
3006
3265
|
|
|
@@ -3027,7 +3286,7 @@ var EvmPlugin = class extends PluginBase {
|
|
|
3027
3286
|
walletConnectProjectId,
|
|
3028
3287
|
isLoading
|
|
3029
3288
|
}) => {
|
|
3030
|
-
return /* @__PURE__ */
|
|
3289
|
+
return /* @__PURE__ */ React44.createElement(
|
|
3031
3290
|
WalletProvider_default,
|
|
3032
3291
|
{
|
|
3033
3292
|
children,
|
|
@@ -3043,10 +3302,10 @@ var evmPlugin = new EvmPlugin(store);
|
|
|
3043
3302
|
var evm_default = evmPlugin;
|
|
3044
3303
|
|
|
3045
3304
|
// plugins/solana/index.tsx
|
|
3046
|
-
import
|
|
3305
|
+
import React46 from "react";
|
|
3047
3306
|
|
|
3048
3307
|
// plugins/solana/features/walletConnect/WalletProvider.tsx
|
|
3049
|
-
import
|
|
3308
|
+
import React45 from "react";
|
|
3050
3309
|
import {
|
|
3051
3310
|
ConnectionProvider,
|
|
3052
3311
|
WalletProvider as SolanaWalletProvider
|
|
@@ -3084,7 +3343,7 @@ var WalletProvider2 = ({
|
|
|
3084
3343
|
logger_default.debug(
|
|
3085
3344
|
`WalletProvider initialized with projectId: ${walletConnectProjectId}`
|
|
3086
3345
|
);
|
|
3087
|
-
return /* @__PURE__ */
|
|
3346
|
+
return /* @__PURE__ */ React45.createElement(ConnectionProvider, { endpoint }, /* @__PURE__ */ React45.createElement(
|
|
3088
3347
|
SolanaWalletProvider,
|
|
3089
3348
|
{
|
|
3090
3349
|
autoConnect: false,
|
|
@@ -3151,10 +3410,12 @@ import { useSelector as useSelector8 } from "react-redux";
|
|
|
3151
3410
|
|
|
3152
3411
|
// plugins/solana/core/hooks/useBalance.tsx
|
|
3153
3412
|
import { useSelector as useSelector7 } from "react-redux";
|
|
3413
|
+
import { useQuery as useQuery7 } from "@tanstack/react-query";
|
|
3414
|
+
import { PublicKey as PublicKey6 } from "@solana/web3.js";
|
|
3154
3415
|
|
|
3155
3416
|
// plugins/solana/utils/getTokenAllowance.tsx
|
|
3156
|
-
import { getAssociatedTokenAddress } from "@solana/spl-token";
|
|
3157
3417
|
import { PublicKey as PublicKey4 } from "@solana/web3.js";
|
|
3418
|
+
import { getAssociatedTokenAddress } from "@solana/spl-token";
|
|
3158
3419
|
var getTokenAllowance2 = async ({
|
|
3159
3420
|
tokenOptions,
|
|
3160
3421
|
selectedCoin,
|
|
@@ -3195,9 +3456,6 @@ var getTokenAllowance2 = async ({
|
|
|
3195
3456
|
}
|
|
3196
3457
|
};
|
|
3197
3458
|
|
|
3198
|
-
// plugins/solana/core/hooks/useBalance.tsx
|
|
3199
|
-
import { useQuery as useQuery7 } from "@tanstack/react-query";
|
|
3200
|
-
|
|
3201
3459
|
// plugins/solana/core/hooks/useSolanaProvider.ts
|
|
3202
3460
|
import { useSelector as useSelector6 } from "react-redux";
|
|
3203
3461
|
import { useConnection as useConnection2, useWallet as useWallet2 } from "@solana/wallet-adapter-react";
|
|
@@ -3225,7 +3483,6 @@ var useSolanaProvider = () => {
|
|
|
3225
3483
|
};
|
|
3226
3484
|
|
|
3227
3485
|
// plugins/solana/core/hooks/useBalance.tsx
|
|
3228
|
-
import { PublicKey as PublicKey6 } from "@solana/web3.js";
|
|
3229
3486
|
var emptyResult2 = {};
|
|
3230
3487
|
function useBalance2() {
|
|
3231
3488
|
const sourceChain = useSelector7(selectSourceChain);
|
|
@@ -3441,7 +3698,7 @@ var SolanaPlugin = class extends PluginBase {
|
|
|
3441
3698
|
networkOption,
|
|
3442
3699
|
walletConnectProjectId
|
|
3443
3700
|
}) => {
|
|
3444
|
-
return /* @__PURE__ */
|
|
3701
|
+
return /* @__PURE__ */ React46.createElement(
|
|
3445
3702
|
WalletProvider_default2,
|
|
3446
3703
|
{
|
|
3447
3704
|
networkOption,
|
|
@@ -3455,10 +3712,10 @@ var solanaPlugin = new SolanaPlugin(store);
|
|
|
3455
3712
|
var solana_default = solanaPlugin;
|
|
3456
3713
|
|
|
3457
3714
|
// plugins/tron/index.tsx
|
|
3458
|
-
import
|
|
3715
|
+
import React48 from "react";
|
|
3459
3716
|
|
|
3460
3717
|
// plugins/tron/features/walletConnect/WalletProvider.tsx
|
|
3461
|
-
import
|
|
3718
|
+
import React47, { useMemo as useMemo3 } from "react";
|
|
3462
3719
|
import { WalletProvider as TronWalletProviderBase } from "@tronweb3/tronwallet-adapter-react-hooks";
|
|
3463
3720
|
import { LedgerAdapter } from "@tronweb3/tronwallet-adapter-ledger";
|
|
3464
3721
|
import { TronLinkAdapter } from "@tronweb3/tronwallet-adapter-tronlink";
|
|
@@ -3500,7 +3757,7 @@ var WalletProvider3 = ({ children, networkOption }) => {
|
|
|
3500
3757
|
adapters[0].switchChain("0x2b6653dc");
|
|
3501
3758
|
}
|
|
3502
3759
|
};
|
|
3503
|
-
return /* @__PURE__ */
|
|
3760
|
+
return /* @__PURE__ */ React47.createElement(
|
|
3504
3761
|
TronWalletProviderBase,
|
|
3505
3762
|
{
|
|
3506
3763
|
adapters,
|
|
@@ -3612,6 +3869,7 @@ var useTronProvider = () => {
|
|
|
3612
3869
|
|
|
3613
3870
|
// plugins/tron/core/hooks/useBalance.tsx
|
|
3614
3871
|
import { useSelector as useSelector12 } from "react-redux";
|
|
3872
|
+
import { useQuery as useQuery9 } from "@tanstack/react-query";
|
|
3615
3873
|
|
|
3616
3874
|
// plugins/tron/utils/ethereum/erc20ABI.json
|
|
3617
3875
|
var erc20ABI_default = {
|
|
@@ -3868,7 +4126,6 @@ var getTokenAllowance3 = async ({
|
|
|
3868
4126
|
};
|
|
3869
4127
|
|
|
3870
4128
|
// plugins/tron/core/hooks/useBalance.tsx
|
|
3871
|
-
import { useQuery as useQuery9 } from "@tanstack/react-query";
|
|
3872
4129
|
var emptyResult3 = {};
|
|
3873
4130
|
function useBalance3() {
|
|
3874
4131
|
const mode = useSelector12(selectMode);
|
|
@@ -4058,7 +4315,7 @@ var TronPlugin = class extends PluginBase {
|
|
|
4058
4315
|
networkOption,
|
|
4059
4316
|
walletConnectProjectId
|
|
4060
4317
|
}) => {
|
|
4061
|
-
return /* @__PURE__ */
|
|
4318
|
+
return /* @__PURE__ */ React48.createElement(
|
|
4062
4319
|
WalletProvider_default3,
|
|
4063
4320
|
{
|
|
4064
4321
|
networkOption,
|
|
@@ -4072,7 +4329,7 @@ var tronPlugin = new TronPlugin(store);
|
|
|
4072
4329
|
var tron_default = tronPlugin;
|
|
4073
4330
|
|
|
4074
4331
|
// plugins/credit-card/index.tsx
|
|
4075
|
-
import
|
|
4332
|
+
import React49 from "react";
|
|
4076
4333
|
|
|
4077
4334
|
// plugins/credit-card/core/hooks/useIsProviderReady.tsx
|
|
4078
4335
|
import { useDispatch as useDispatch5, useSelector as useSelector15 } from "react-redux";
|
|
@@ -4128,7 +4385,7 @@ var CreditCardPlugin = class extends PluginBase {
|
|
|
4128
4385
|
return chain.compatibility === "CC";
|
|
4129
4386
|
};
|
|
4130
4387
|
Provider = ({ children }) => {
|
|
4131
|
-
return /* @__PURE__ */
|
|
4388
|
+
return /* @__PURE__ */ React49.createElement(React49.Fragment, null, children);
|
|
4132
4389
|
};
|
|
4133
4390
|
};
|
|
4134
4391
|
var creditCardPlugin = new CreditCardPlugin(store);
|
|
@@ -4149,7 +4406,7 @@ var useKimaContext = () => {
|
|
|
4149
4406
|
}
|
|
4150
4407
|
return context;
|
|
4151
4408
|
};
|
|
4152
|
-
var InternalKimaProvider =
|
|
4409
|
+
var InternalKimaProvider = React50.memo(
|
|
4153
4410
|
({ kimaBackendUrl, walletConnectProjectId, children, logLevel }) => {
|
|
4154
4411
|
const { data: envOptions, isLoading } = useGetEnvOptions({
|
|
4155
4412
|
kimaBackendUrl
|
|
@@ -4163,7 +4420,7 @@ var InternalKimaProvider = React49.memo(
|
|
|
4163
4420
|
const plugin = getPluginProvider(pluginData.id);
|
|
4164
4421
|
if (plugin) {
|
|
4165
4422
|
const { Provider: Provider3 } = plugin;
|
|
4166
|
-
return /* @__PURE__ */
|
|
4423
|
+
return /* @__PURE__ */ React50.createElement(
|
|
4167
4424
|
Provider3,
|
|
4168
4425
|
{
|
|
4169
4426
|
key: plugin.data.id,
|
|
@@ -4177,12 +4434,12 @@ var InternalKimaProvider = React49.memo(
|
|
|
4177
4434
|
return acc;
|
|
4178
4435
|
}, children);
|
|
4179
4436
|
}, [plugins, walletConnectProjectId, envOptions, isLoading]);
|
|
4180
|
-
return /* @__PURE__ */
|
|
4437
|
+
return /* @__PURE__ */ React50.createElement(React50.Fragment, null, WrappedProviders);
|
|
4181
4438
|
}
|
|
4182
4439
|
);
|
|
4183
4440
|
var KimaProvider = ({
|
|
4184
4441
|
walletConnectProjectId,
|
|
4185
|
-
children = /* @__PURE__ */
|
|
4442
|
+
children = /* @__PURE__ */ React50.createElement(React50.Fragment, null),
|
|
4186
4443
|
externalProvider,
|
|
4187
4444
|
kimaBackendUrl = "http://localhost:3001",
|
|
4188
4445
|
logLevel,
|
|
@@ -4217,7 +4474,7 @@ var KimaProvider = ({
|
|
|
4217
4474
|
errorHandler,
|
|
4218
4475
|
switchChainHandler
|
|
4219
4476
|
};
|
|
4220
|
-
return /* @__PURE__ */
|
|
4477
|
+
return /* @__PURE__ */ React50.createElement(QueryClientProvider, { client: queryClient }, /* @__PURE__ */ React50.createElement(Provider, { store }, /* @__PURE__ */ React50.createElement(KimaContext.Provider, { value: kimaContext }, /* @__PURE__ */ React50.createElement(
|
|
4221
4478
|
InternalKimaProvider,
|
|
4222
4479
|
{
|
|
4223
4480
|
kimaBackendUrl,
|
|
@@ -4229,17 +4486,17 @@ var KimaProvider = ({
|
|
|
4229
4486
|
var KimaProvider_default = KimaProvider;
|
|
4230
4487
|
|
|
4231
4488
|
// src/components/KimaTransactionWidget.tsx
|
|
4232
|
-
import
|
|
4489
|
+
import React89, { useEffect as useEffect24, useState as useState17 } from "react";
|
|
4233
4490
|
|
|
4234
4491
|
// src/components/KimaWidgetWrapper.tsx
|
|
4235
|
-
import
|
|
4492
|
+
import React87, { useEffect as useEffect23 } from "react";
|
|
4236
4493
|
import { useDispatch as useDispatch27, useSelector as useSelector47 } from "react-redux";
|
|
4237
4494
|
|
|
4238
4495
|
// src/components/TransactionWidget.tsx
|
|
4239
|
-
import
|
|
4496
|
+
import React74, { useEffect as useEffect15, useMemo as useMemo12, useState as useState11 } from "react";
|
|
4240
4497
|
|
|
4241
4498
|
// src/components/reusable/Progressbar.tsx
|
|
4242
|
-
import
|
|
4499
|
+
import React51 from "react";
|
|
4243
4500
|
import { useSelector as useSelector17 } from "react-redux";
|
|
4244
4501
|
var stepInfo = [
|
|
4245
4502
|
{
|
|
@@ -4260,12 +4517,12 @@ var stepInfo = [
|
|
|
4260
4517
|
];
|
|
4261
4518
|
var Progressbar = ({ step, errorStep, setFocus, loadingStep }) => {
|
|
4262
4519
|
const theme = useSelector17(selectTheme);
|
|
4263
|
-
return /* @__PURE__ */
|
|
4520
|
+
return /* @__PURE__ */ React51.createElement("div", { className: "kima-progressbar" }, /* @__PURE__ */ React51.createElement(
|
|
4264
4521
|
"div",
|
|
4265
4522
|
{
|
|
4266
4523
|
className: `value step-${step * 100 / 4}`
|
|
4267
4524
|
}
|
|
4268
|
-
), /* @__PURE__ */
|
|
4525
|
+
), /* @__PURE__ */ React51.createElement("div", { className: "step-indicators" }, stepInfo.map((item, index) => /* @__PURE__ */ React51.createElement(
|
|
4269
4526
|
"div",
|
|
4270
4527
|
{
|
|
4271
4528
|
key: item.title,
|
|
@@ -4276,14 +4533,14 @@ var Progressbar = ({ step, errorStep, setFocus, loadingStep }) => {
|
|
|
4276
4533
|
if (index < 4) setFocus(index);
|
|
4277
4534
|
}
|
|
4278
4535
|
},
|
|
4279
|
-
/* @__PURE__ */
|
|
4536
|
+
/* @__PURE__ */ React51.createElement("div", { className: "step-info" }, step < index && /* @__PURE__ */ React51.createElement(Lock_default, null), step >= index ? index === loadingStep ? /* @__PURE__ */ React51.createElement(Loader_default, { className: "loader" }) : index === errorStep ? /* @__PURE__ */ React51.createElement(Warning_default, null) : /* @__PURE__ */ React51.createElement(Check_default, null) : null, /* @__PURE__ */ React51.createElement("span", null, item.title))
|
|
4280
4537
|
))));
|
|
4281
4538
|
};
|
|
4282
4539
|
var Progressbar_default = Progressbar;
|
|
4283
4540
|
|
|
4284
4541
|
// src/components/reusable/ExternalLink.tsx
|
|
4285
|
-
import
|
|
4286
|
-
var ExternalLink = ({ to, children, className, rest }) => /* @__PURE__ */
|
|
4542
|
+
import React52 from "react";
|
|
4543
|
+
var ExternalLink = ({ to, children, className, rest }) => /* @__PURE__ */ React52.createElement(
|
|
4287
4544
|
"a",
|
|
4288
4545
|
{
|
|
4289
4546
|
className,
|
|
@@ -4297,20 +4554,20 @@ var ExternalLink = ({ to, children, className, rest }) => /* @__PURE__ */ React5
|
|
|
4297
4554
|
var ExternalLink_default = ExternalLink;
|
|
4298
4555
|
|
|
4299
4556
|
// src/components/reusable/NetworkLabel.tsx
|
|
4300
|
-
import
|
|
4557
|
+
import React53 from "react";
|
|
4301
4558
|
import { useSelector as useSelector18 } from "react-redux";
|
|
4302
4559
|
|
|
4303
4560
|
// src/components/reusable/PrimaryButton.tsx
|
|
4304
|
-
import
|
|
4561
|
+
import React56 from "react";
|
|
4305
4562
|
|
|
4306
4563
|
// src/assets/loading/180-ring.tsx
|
|
4307
|
-
import
|
|
4564
|
+
import React54 from "react";
|
|
4308
4565
|
var Loading180Ring = ({
|
|
4309
4566
|
width = 24,
|
|
4310
4567
|
height = 24,
|
|
4311
4568
|
fill = "white"
|
|
4312
4569
|
}) => {
|
|
4313
|
-
return /* @__PURE__ */
|
|
4570
|
+
return /* @__PURE__ */ React54.createElement(
|
|
4314
4571
|
"svg",
|
|
4315
4572
|
{
|
|
4316
4573
|
width,
|
|
@@ -4319,7 +4576,7 @@ var Loading180Ring = ({
|
|
|
4319
4576
|
viewBox: "0 0 24 24",
|
|
4320
4577
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4321
4578
|
},
|
|
4322
|
-
/* @__PURE__ */
|
|
4579
|
+
/* @__PURE__ */ React54.createElement("path", { d: "M12,4a8,8,0,0,1,7.89,6.7A1.53,1.53,0,0,0,21.38,12h0a1.5,1.5,0,0,0,1.48-1.75,11,11,0,0,0-21.72,0A1.5,1.5,0,0,0,2.62,12h0a1.53,1.53,0,0,0,1.49-1.3A8,8,0,0,1,12,4Z" }, /* @__PURE__ */ React54.createElement(
|
|
4323
4580
|
"animateTransform",
|
|
4324
4581
|
{
|
|
4325
4582
|
attributeName: "transform",
|
|
@@ -4334,7 +4591,7 @@ var Loading180Ring = ({
|
|
|
4334
4591
|
var ring_default = Loading180Ring;
|
|
4335
4592
|
|
|
4336
4593
|
// src/assets/loading/6-dots-scale.tsx
|
|
4337
|
-
import
|
|
4594
|
+
import React55 from "react";
|
|
4338
4595
|
|
|
4339
4596
|
// src/components/reusable/PrimaryButton.tsx
|
|
4340
4597
|
var PrimaryButton = ({
|
|
@@ -4345,7 +4602,7 @@ var PrimaryButton = ({
|
|
|
4345
4602
|
disabled = false,
|
|
4346
4603
|
ref
|
|
4347
4604
|
}) => {
|
|
4348
|
-
return /* @__PURE__ */
|
|
4605
|
+
return /* @__PURE__ */ React56.createElement("div", { className: "primary-button-wrapper" }, /* @__PURE__ */ React56.createElement(
|
|
4349
4606
|
"button",
|
|
4350
4607
|
{
|
|
4351
4608
|
className: `primary-button ${className}`,
|
|
@@ -4353,14 +4610,14 @@ var PrimaryButton = ({
|
|
|
4353
4610
|
ref,
|
|
4354
4611
|
disabled
|
|
4355
4612
|
},
|
|
4356
|
-
isLoading && /* @__PURE__ */
|
|
4613
|
+
isLoading && /* @__PURE__ */ React56.createElement("div", { className: "loading-indicator" }, /* @__PURE__ */ React56.createElement(ring_default, { width: 24, height: 24, fill: "white" })),
|
|
4357
4614
|
children
|
|
4358
4615
|
));
|
|
4359
4616
|
};
|
|
4360
4617
|
var PrimaryButton_default = PrimaryButton;
|
|
4361
4618
|
|
|
4362
4619
|
// src/components/reusable/SecondaryButton.tsx
|
|
4363
|
-
import
|
|
4620
|
+
import React57 from "react";
|
|
4364
4621
|
var SecondaryButton = ({
|
|
4365
4622
|
className,
|
|
4366
4623
|
clickHandler,
|
|
@@ -4369,7 +4626,7 @@ var SecondaryButton = ({
|
|
|
4369
4626
|
style,
|
|
4370
4627
|
disabled = false,
|
|
4371
4628
|
isLoading
|
|
4372
|
-
}) => /* @__PURE__ */
|
|
4629
|
+
}) => /* @__PURE__ */ React57.createElement(
|
|
4373
4630
|
"button",
|
|
4374
4631
|
{
|
|
4375
4632
|
className: `secondary-button ${className} ${theme}`,
|
|
@@ -4377,18 +4634,18 @@ var SecondaryButton = ({
|
|
|
4377
4634
|
...style,
|
|
4378
4635
|
disabled
|
|
4379
4636
|
},
|
|
4380
|
-
isLoading && /* @__PURE__ */
|
|
4637
|
+
isLoading && /* @__PURE__ */ React57.createElement("div", { className: "loading-indicator" }, /* @__PURE__ */ React57.createElement(ring_default, { width: 24, height: 24, fill: "black" })),
|
|
4381
4638
|
children
|
|
4382
4639
|
);
|
|
4383
4640
|
var SecondaryButton_default = SecondaryButton;
|
|
4384
4641
|
|
|
4385
4642
|
// src/components/reusable/Dropdown.tsx
|
|
4386
|
-
import
|
|
4643
|
+
import React58 from "react";
|
|
4387
4644
|
import { useDispatch as useDispatch6 } from "react-redux";
|
|
4388
4645
|
import { useSelector as useSelector19 } from "react-redux";
|
|
4389
4646
|
|
|
4390
4647
|
// src/components/reusable/WalletButton.tsx
|
|
4391
|
-
import
|
|
4648
|
+
import React61, { useEffect as useEffect10, useMemo as useMemo8 } from "react";
|
|
4392
4649
|
import { useDispatch as useDispatch7, useSelector as useSelector21 } from "react-redux";
|
|
4393
4650
|
|
|
4394
4651
|
// src/hooks/useGetCurrentPlugin.tsx
|
|
@@ -4396,7 +4653,7 @@ import { useEffect as useEffect6, useState as useState5 } from "react";
|
|
|
4396
4653
|
import { useSelector as useSelector20 } from "react-redux";
|
|
4397
4654
|
|
|
4398
4655
|
// plugins/default/index.tsx
|
|
4399
|
-
import
|
|
4656
|
+
import React59 from "react";
|
|
4400
4657
|
var DefaultPlugin = class extends PluginBase {
|
|
4401
4658
|
constructor(store2) {
|
|
4402
4659
|
super({
|
|
@@ -4431,7 +4688,7 @@ var DefaultPlugin = class extends PluginBase {
|
|
|
4431
4688
|
networkOption,
|
|
4432
4689
|
walletConnectProjectId
|
|
4433
4690
|
}) => {
|
|
4434
|
-
return /* @__PURE__ */
|
|
4691
|
+
return /* @__PURE__ */ React59.createElement("div", null, children);
|
|
4435
4692
|
};
|
|
4436
4693
|
};
|
|
4437
4694
|
var defaultPlugin = new DefaultPlugin(store);
|
|
@@ -4524,7 +4781,7 @@ import { useWallet as useTronWallet2 } from "@tronweb3/tronwallet-adapter-react-
|
|
|
4524
4781
|
import { useAppKit, useAppKitState } from "@reown/appkit/react";
|
|
4525
4782
|
|
|
4526
4783
|
// src/components/reusable/CopyButton.tsx
|
|
4527
|
-
import
|
|
4784
|
+
import React60, { useEffect as useEffect8, useState as useState7 } from "react";
|
|
4528
4785
|
var CopyButton = ({ text }) => {
|
|
4529
4786
|
const [copyClicked, setCopyClicked] = useState7(false);
|
|
4530
4787
|
useEffect8(() => {
|
|
@@ -4533,7 +4790,7 @@ var CopyButton = ({ text }) => {
|
|
|
4533
4790
|
setCopyClicked(false);
|
|
4534
4791
|
}, 2e3);
|
|
4535
4792
|
}, [copyClicked]);
|
|
4536
|
-
return /* @__PURE__ */
|
|
4793
|
+
return /* @__PURE__ */ React60.createElement(
|
|
4537
4794
|
"span",
|
|
4538
4795
|
{
|
|
4539
4796
|
className: "copy-btn",
|
|
@@ -4542,7 +4799,7 @@ var CopyButton = ({ text }) => {
|
|
|
4542
4799
|
navigator.clipboard.writeText(text);
|
|
4543
4800
|
}
|
|
4544
4801
|
},
|
|
4545
|
-
copyClicked ? /* @__PURE__ */
|
|
4802
|
+
copyClicked ? /* @__PURE__ */ React60.createElement(Check_default, null) : /* @__PURE__ */ React60.createElement(Copy_default, null)
|
|
4546
4803
|
);
|
|
4547
4804
|
};
|
|
4548
4805
|
var CopyButton_default = CopyButton;
|
|
@@ -4698,6 +4955,7 @@ var WalletButton = ({
|
|
|
4698
4955
|
const compliantOption = useSelector21(selectCompliantOption);
|
|
4699
4956
|
const selectedNetwork = useSelector21(selectSourceChain);
|
|
4700
4957
|
const targetAddress = useSelector21(selectTargetAddress);
|
|
4958
|
+
const dAppOption = useSelector21(selectDappOption);
|
|
4701
4959
|
const { externalProvider } = useKimaContext();
|
|
4702
4960
|
const { connected: isSolanaConnected } = useSolanaWallet2();
|
|
4703
4961
|
const { connected: isTronConnected } = useTronWallet2();
|
|
@@ -4759,8 +5017,11 @@ var WalletButton = ({
|
|
|
4759
5017
|
return "";
|
|
4760
5018
|
}, [isReady, statusMessage, sourceCompliant, compliantOption]);
|
|
4761
5019
|
const isConnected = useMemo8(() => {
|
|
5020
|
+
if (mode === "payment" /* payment */ && dAppOption !== "none" /* None */) {
|
|
5021
|
+
return isReady;
|
|
5022
|
+
}
|
|
4762
5023
|
return isReady && !initialSelection;
|
|
4763
|
-
}, [isReady, initialSelection]);
|
|
5024
|
+
}, [isReady, initialSelection, mode, dAppOption]);
|
|
4764
5025
|
useEffect10(() => {
|
|
4765
5026
|
if (!isReady) {
|
|
4766
5027
|
dispatch(setSourceAddress(""));
|
|
@@ -4768,13 +5029,13 @@ var WalletButton = ({
|
|
|
4768
5029
|
}
|
|
4769
5030
|
dispatch(setSourceAddress(connectedAddress));
|
|
4770
5031
|
}, [isReady]);
|
|
4771
|
-
return /* @__PURE__ */
|
|
5032
|
+
return /* @__PURE__ */ React61.createElement(
|
|
4772
5033
|
"div",
|
|
4773
5034
|
{
|
|
4774
5035
|
className: `wallet-button ${isConnected ? "connected" : "disconnected"} ${theme.colorMode} ${errorBelow ? "error-below" : ""}`,
|
|
4775
5036
|
"data-testid": "connect-wallet-btn"
|
|
4776
5037
|
},
|
|
4777
|
-
/* @__PURE__ */
|
|
5038
|
+
/* @__PURE__ */ React61.createElement("div", { className: "info-wrapper" }, /* @__PURE__ */ React61.createElement(
|
|
4778
5039
|
"button",
|
|
4779
5040
|
{
|
|
4780
5041
|
className: `${isConnected ? "connected" : "disconnected"} ${width < 640 && "shortened"} ${theme.colorMode}`,
|
|
@@ -4784,16 +5045,16 @@ var WalletButton = ({
|
|
|
4784
5045
|
isConnected && !placeholder ? width >= 640 ? `${connectedAddress || ""}` : getShortenedAddress(connectedAddress || "") : "",
|
|
4785
5046
|
!isConnected && mode === "light" /* light */ && "Select Network to Load Account",
|
|
4786
5047
|
!isConnected && mode !== "light" /* light */ && initialSelection && "Select Network to Connect",
|
|
4787
|
-
!isConnected && mode !== "light" /* light */ && !initialSelection && /* @__PURE__ */
|
|
5048
|
+
!isConnected && mode !== "light" /* light */ && !initialSelection && /* @__PURE__ */ React61.createElement(Wallet_default, null),
|
|
4788
5049
|
!isConnected && mode !== "light" /* light */ && !initialSelection && "Connect Wallet"
|
|
4789
|
-
), isConnected && !placeholder && /* @__PURE__ */
|
|
4790
|
-
isConnected && !placeholder && balance !== void 0 && decimals !== void 0 ? /* @__PURE__ */
|
|
5050
|
+
), isConnected && !placeholder && /* @__PURE__ */ React61.createElement(CopyButton_default, { text: connectedAddress })),
|
|
5051
|
+
isConnected && !placeholder && balance !== void 0 && decimals !== void 0 ? /* @__PURE__ */ React61.createElement("p", { className: "balance-info" }, formatUSD(bigIntToNumber({ value: balance, decimals })), " ", selectedCoin, " available") : null
|
|
4791
5052
|
);
|
|
4792
5053
|
};
|
|
4793
5054
|
var WalletButton_default = WalletButton;
|
|
4794
5055
|
|
|
4795
5056
|
// src/components/reusable/CoinDropdown.tsx
|
|
4796
|
-
import
|
|
5057
|
+
import React63, { useEffect as useEffect12, useRef, useState as useState8 } from "react";
|
|
4797
5058
|
import { useSelector as useSelector23 } from "react-redux";
|
|
4798
5059
|
import { useDispatch as useDispatch9 } from "react-redux";
|
|
4799
5060
|
|
|
@@ -4866,7 +5127,7 @@ function useCurrencyOptions(isSourceChain) {
|
|
|
4866
5127
|
}
|
|
4867
5128
|
|
|
4868
5129
|
// src/components/reusable/TokenIcon.tsx
|
|
4869
|
-
import
|
|
5130
|
+
import React62 from "react";
|
|
4870
5131
|
var COIN_LIST = {
|
|
4871
5132
|
EUR: KEUR_default,
|
|
4872
5133
|
EURC: EURC_default,
|
|
@@ -4891,7 +5152,7 @@ function TokenIcon({
|
|
|
4891
5152
|
logger_default.warn(`Token icon not found for symbol: ${symbol}`);
|
|
4892
5153
|
return null;
|
|
4893
5154
|
}
|
|
4894
|
-
return /* @__PURE__ */
|
|
5155
|
+
return /* @__PURE__ */ React62.createElement("div", { className: "icon-wrapper" }, /* @__PURE__ */ React62.createElement(Icon, { width, height }));
|
|
4895
5156
|
}
|
|
4896
5157
|
|
|
4897
5158
|
// src/components/reusable/CoinDropdown.tsx
|
|
@@ -4902,10 +5163,24 @@ var CoinDropdown = ({
|
|
|
4902
5163
|
const dispatch = useDispatch9();
|
|
4903
5164
|
const [collapsed, setCollapsed] = useState8(true);
|
|
4904
5165
|
const sourceCurrency = useSelector23(selectSourceCurrency);
|
|
5166
|
+
const mode = useSelector23(selectMode);
|
|
5167
|
+
const dAppOption = useSelector23(selectDappOption);
|
|
5168
|
+
const transactionOption = useSelector23(selectTransactionOption);
|
|
4905
5169
|
const targetCurrency = useSelector23(selectTargetCurrency);
|
|
4906
5170
|
const { tokenList } = useCurrencyOptions(isSourceChain);
|
|
4907
5171
|
const theme = useSelector23(selectTheme);
|
|
4908
5172
|
const tokenSymbol = isSourceChain ? sourceCurrency : targetCurrency;
|
|
5173
|
+
const shouldLockToken = isSourceChain && mode === "payment" /* payment */ && dAppOption !== "none" /* None */ && !!transactionOption?.currency;
|
|
5174
|
+
useEffect12(() => {
|
|
5175
|
+
if (!shouldLockToken) return;
|
|
5176
|
+
const matched = tokenList.find(
|
|
5177
|
+
(token) => token.symbol === transactionOption.currency
|
|
5178
|
+
);
|
|
5179
|
+
if (matched) {
|
|
5180
|
+
dispatch(setSourceCurrency(transactionOption.currency));
|
|
5181
|
+
dispatch(setTargetCurrency(transactionOption.currency));
|
|
5182
|
+
}
|
|
5183
|
+
}, [shouldLockToken, transactionOption?.currency, tokenList]);
|
|
4909
5184
|
useEffect12(() => {
|
|
4910
5185
|
const bodyMouseDowntHandler = (e) => {
|
|
4911
5186
|
if (ref?.current && !ref.current.contains(e.target)) {
|
|
@@ -4924,41 +5199,43 @@ var CoinDropdown = ({
|
|
|
4924
5199
|
dispatch(setTargetCurrency(symbol));
|
|
4925
5200
|
}
|
|
4926
5201
|
};
|
|
4927
|
-
return /* @__PURE__ */
|
|
5202
|
+
return /* @__PURE__ */ React63.createElement(
|
|
4928
5203
|
"div",
|
|
4929
5204
|
{
|
|
4930
|
-
className: `coin-dropdown ${theme.colorMode} ${collapsed ? "collapsed" : "toggled"}`,
|
|
4931
|
-
onClick: () =>
|
|
5205
|
+
className: `coin-dropdown ${theme.colorMode} ${collapsed ? "collapsed" : "toggled"} ${shouldLockToken ? "disabled" : ""}`,
|
|
5206
|
+
onClick: () => {
|
|
5207
|
+
if (!shouldLockToken) setCollapsed((prev) => !prev);
|
|
5208
|
+
},
|
|
4932
5209
|
ref
|
|
4933
5210
|
},
|
|
4934
|
-
/* @__PURE__ */
|
|
4935
|
-
/* @__PURE__ */
|
|
5211
|
+
/* @__PURE__ */ React63.createElement("div", { className: "coin-wrapper" }, /* @__PURE__ */ React63.createElement(TokenIcon, { symbol: tokenSymbol, width: 24, height: 24 }), /* @__PURE__ */ React63.createElement("span", { className: "coin" }, tokenSymbol)),
|
|
5212
|
+
/* @__PURE__ */ React63.createElement(
|
|
4936
5213
|
"div",
|
|
4937
5214
|
{
|
|
4938
5215
|
className: `coin-menu ${theme.colorMode} ${collapsed ? "collapsed" : "toggled"}`
|
|
4939
5216
|
},
|
|
4940
|
-
tokenList.map((token) => /* @__PURE__ */
|
|
5217
|
+
tokenList.map((token) => /* @__PURE__ */ React63.createElement(
|
|
4941
5218
|
"div",
|
|
4942
5219
|
{
|
|
4943
5220
|
className: `coin-item ${theme.colorMode}`,
|
|
4944
5221
|
key: token.symbol,
|
|
4945
5222
|
onClick: () => handleDropdownItemClick(token.symbol)
|
|
4946
5223
|
},
|
|
4947
|
-
/* @__PURE__ */
|
|
4948
|
-
/* @__PURE__ */
|
|
5224
|
+
/* @__PURE__ */ React63.createElement(TokenIcon, { symbol: token.symbol, width: 24, height: 24 }),
|
|
5225
|
+
/* @__PURE__ */ React63.createElement("p", null, token.symbol)
|
|
4949
5226
|
))
|
|
4950
5227
|
),
|
|
4951
|
-
/* @__PURE__ */
|
|
5228
|
+
!shouldLockToken && /* @__PURE__ */ React63.createElement("div", { className: `dropdown-icon ${collapsed ? "toggled" : "collapsed"}` }, /* @__PURE__ */ React63.createElement(Arrow_default, { fill: "none" }))
|
|
4952
5229
|
);
|
|
4953
5230
|
};
|
|
4954
5231
|
var CoinDropdown_default = CoinDropdown;
|
|
4955
5232
|
|
|
4956
5233
|
// src/components/reusable/ConfirmDetails.tsx
|
|
4957
|
-
import
|
|
5234
|
+
import React66, { useEffect as useEffect13, useMemo as useMemo10, useState as useState9 } from "react";
|
|
4958
5235
|
import { useSelector as useSelector25 } from "react-redux";
|
|
4959
5236
|
|
|
4960
5237
|
// src/components/reusable/ChainIcon.tsx
|
|
4961
|
-
import
|
|
5238
|
+
import React64 from "react";
|
|
4962
5239
|
var chainIcons = {
|
|
4963
5240
|
ARB: Arbitrum_default,
|
|
4964
5241
|
AVX: Avalanche_default,
|
|
@@ -4980,13 +5257,13 @@ function ChainIcon({ symbol }) {
|
|
|
4980
5257
|
const Icon = symbol === "FIAT" ? chainIcons["CC"] : chainIcons[symbol];
|
|
4981
5258
|
if (!Icon) {
|
|
4982
5259
|
if (symbol) logger_default.warn(`Chain icon not found for symbol: ${symbol}`);
|
|
4983
|
-
return /* @__PURE__ */
|
|
5260
|
+
return /* @__PURE__ */ React64.createElement("div", null);
|
|
4984
5261
|
}
|
|
4985
|
-
return /* @__PURE__ */
|
|
5262
|
+
return /* @__PURE__ */ React64.createElement("div", { className: "icon" }, /* @__PURE__ */ React64.createElement(Icon, null));
|
|
4986
5263
|
}
|
|
4987
5264
|
|
|
4988
5265
|
// src/components/reusable/FeeDeductionRadioButtons.tsx
|
|
4989
|
-
import
|
|
5266
|
+
import React65 from "react";
|
|
4990
5267
|
import { useDispatch as useDispatch10, useSelector as useSelector24 } from "react-redux";
|
|
4991
5268
|
var FeeDeductionRadioButtons = ({ disabled }) => {
|
|
4992
5269
|
const dispatch = useDispatch10();
|
|
@@ -5003,7 +5280,7 @@ var FeeDeductionRadioButtons = ({ disabled }) => {
|
|
|
5003
5280
|
const handleChange = (value) => {
|
|
5004
5281
|
dispatch(setFeeDeduct(value));
|
|
5005
5282
|
};
|
|
5006
|
-
return /* @__PURE__ */
|
|
5283
|
+
return /* @__PURE__ */ React65.createElement("div", { className: `fee-deduction-radio-container ${theme.colorMode}` }, /* @__PURE__ */ React65.createElement("div", { className: "fee-options" }, Number(amount) - totalFee > 0 && /* @__PURE__ */ React65.createElement("label", { className: `fee-option ${disabled ? "disabled" : ""}` }, /* @__PURE__ */ React65.createElement(
|
|
5007
5284
|
"input",
|
|
5008
5285
|
{
|
|
5009
5286
|
type: "radio",
|
|
@@ -5012,11 +5289,11 @@ var FeeDeductionRadioButtons = ({ disabled }) => {
|
|
|
5012
5289
|
disabled,
|
|
5013
5290
|
onChange: () => handleChange(true)
|
|
5014
5291
|
}
|
|
5015
|
-
), /* @__PURE__ */
|
|
5292
|
+
), /* @__PURE__ */ React65.createElement("span", { className: `radio-label ${theme.colorMode}` }, `Pay $${formatterFloat.format(
|
|
5016
5293
|
Number(amount)
|
|
5017
5294
|
)} ${sourceCurrency} in ${sourceNetwork.name} to receive $${formatterFloat.format(
|
|
5018
5295
|
Number(amount) - totalFee
|
|
5019
|
-
)} ${targetCurrency} in ${targetNetwork.name}`)), /* @__PURE__ */
|
|
5296
|
+
)} ${targetCurrency} in ${targetNetwork.name}`)), /* @__PURE__ */ React65.createElement("label", { className: `fee-option ${disabled ? "disabled" : ""}` }, /* @__PURE__ */ React65.createElement(
|
|
5020
5297
|
"input",
|
|
5021
5298
|
{
|
|
5022
5299
|
type: "radio",
|
|
@@ -5025,7 +5302,7 @@ var FeeDeductionRadioButtons = ({ disabled }) => {
|
|
|
5025
5302
|
disabled,
|
|
5026
5303
|
onChange: () => handleChange(false)
|
|
5027
5304
|
}
|
|
5028
|
-
), /* @__PURE__ */
|
|
5305
|
+
), /* @__PURE__ */ React65.createElement("span", { className: `radio-label ${theme.colorMode}` }, `Pay $${formatterFloat.format(
|
|
5029
5306
|
Number(amount) + totalFee
|
|
5030
5307
|
)} ${sourceCurrency} in ${sourceNetwork.name} to receive $${formatterFloat.format(
|
|
5031
5308
|
Number(amount)
|
|
@@ -5066,13 +5343,13 @@ var ConfirmDetails = ({
|
|
|
5066
5343
|
useEffect13(() => {
|
|
5067
5344
|
width === 0 && updateWidth(window.innerWidth);
|
|
5068
5345
|
}, []);
|
|
5069
|
-
return /* @__PURE__ */
|
|
5346
|
+
return /* @__PURE__ */ React66.createElement("div", { className: `confirm-details ${theme.colorMode}` }, /* @__PURE__ */ React66.createElement("p", null, "Step ", isApproved ? "2" : "1", "\xA0of 2\xA0\xA0\xA0", isApproved ? "Submit transaction" : originNetwork.shortName === "FIAT" /* FIAT */ ? "Bank Details" : "Approval"), originNetwork.shortName === "FIAT" /* FIAT */ ? /* @__PURE__ */ React66.createElement("div", null, /* @__PURE__ */ React66.createElement("div", { className: "detail-item" }, /* @__PURE__ */ React66.createElement("span", { className: "label" }, "IBAN:"), /* @__PURE__ */ React66.createElement("span", { className: `kima-card-network-label ${theme.colorMode}` }, /* @__PURE__ */ React66.createElement(ChainIcon, { symbol: originNetwork?.shortName }), "FIAT"), /* @__PURE__ */ React66.createElement("p", null, "ES6621000418401234567891")), /* @__PURE__ */ React66.createElement("div", { className: "detail-item" }, /* @__PURE__ */ React66.createElement("span", { className: "label" }, "Recipient:"), /* @__PURE__ */ React66.createElement("p", null, "Kima Sandbox")), /* @__PURE__ */ React66.createElement("div", { className: "detail-item" }, /* @__PURE__ */ React66.createElement("span", { className: "label" }, "BIC:"), /* @__PURE__ */ React66.createElement("p", null, "CAIXESBBXXX")), /* @__PURE__ */ React66.createElement("div", { className: "detail-item" }, /* @__PURE__ */ React66.createElement("span", { className: "label" }, "Description:"), /* @__PURE__ */ React66.createElement("p", { className: "signature" }, signature))) : /* @__PURE__ */ React66.createElement("div", { className: "detail-item" }, /* @__PURE__ */ React66.createElement("span", { className: "label" }, "Source ", originNetwork.shortName !== "CC" && "wallet", ":"), /* @__PURE__ */ React66.createElement("div", { className: "network-details" }, /* @__PURE__ */ React66.createElement("div", { className: "kima-card-network-container" }, /* @__PURE__ */ React66.createElement("span", { className: `kima-card-network-label ${theme.colorMode}` }, /* @__PURE__ */ React66.createElement(ChainIcon, { symbol: originNetwork?.shortName }), originNetwork.name)), originNetwork.shortName !== "CC" && /* @__PURE__ */ React66.createElement("p", { className: theme.colorMode }, dAppOption === "LPDrain" /* LPDrain */ ? targetAddress : connectedAddress))), /* @__PURE__ */ React66.createElement("div", { className: "detail-item amount" }, /* @__PURE__ */ React66.createElement("span", { className: "amount-container" }, dAppOption === "none" /* None */ && /* @__PURE__ */ React66.createElement("div", { className: "amount-details" }, /* @__PURE__ */ React66.createElement("span", null, "Amount to Transfer "), /* @__PURE__ */ React66.createElement("div", { className: "coin-details" }, /* @__PURE__ */ React66.createElement("p", null, formatBigInt(txValues.allowanceAmount), " ", sourceCurrency))), dAppOption === "none" /* None */ && /* @__PURE__ */ React66.createElement("div", { className: "amount-details" }, /* @__PURE__ */ React66.createElement("span", null, "Total Fees"), /* @__PURE__ */ React66.createElement(
|
|
5070
5347
|
"div",
|
|
5071
5348
|
{
|
|
5072
5349
|
className: "fee-collapse",
|
|
5073
5350
|
onClick: () => setFeeCollapsed(!feeCollapsed)
|
|
5074
5351
|
},
|
|
5075
|
-
/* @__PURE__ */
|
|
5352
|
+
/* @__PURE__ */ React66.createElement(
|
|
5076
5353
|
MiniArrow_default,
|
|
5077
5354
|
{
|
|
5078
5355
|
width: 15,
|
|
@@ -5083,16 +5360,16 @@ var ConfirmDetails = ({
|
|
|
5083
5360
|
}
|
|
5084
5361
|
}
|
|
5085
5362
|
),
|
|
5086
|
-
/* @__PURE__ */
|
|
5087
|
-
)), /* @__PURE__ */
|
|
5363
|
+
/* @__PURE__ */ React66.createElement("span", { className: "service-fee" }, formatBigInt(totalFee), " ", sourceCurrency)
|
|
5364
|
+
)), /* @__PURE__ */ React66.createElement("div", { className: `fee-breakdown ${feeCollapsed ? "collapsed" : ""}` }, /* @__PURE__ */ React66.createElement("div", { className: "amount-details" }, /* @__PURE__ */ React66.createElement("span", null, originNetwork.shortName === "CC" ? "Credit Card Processing Fee" : `Source Network Fee (${originNetwork.shortName})`), /* @__PURE__ */ React66.createElement("span", { className: "service-fee" }, formatBigInt(sourceFee), " ", sourceCurrency)), /* @__PURE__ */ React66.createElement("div", { className: "amount-details" }, /* @__PURE__ */ React66.createElement("span", null, "Target Network Fee (", targetNetwork.shortName, ")"), /* @__PURE__ */ React66.createElement("span", { className: "service-fee" }, formatBigInt(targetFee), " ", targetCurrency)), /* @__PURE__ */ React66.createElement("div", { className: "amount-details" }, /* @__PURE__ */ React66.createElement("span", null, "KIMA Service Fee"), /* @__PURE__ */ React66.createElement("span", { className: "service-fee" }, formatBigInt(kimaFee), " ", sourceCurrency))), /* @__PURE__ */ React66.createElement("div", { className: "amount-details" }, /* @__PURE__ */ React66.createElement("span", null, "Target Transfer Amount"), /* @__PURE__ */ React66.createElement("span", { className: "service-fee" }, formatBigInt(txValues.submitAmount), " ", targetCurrency)))), targetNetwork.shortName === "FIAT" /* FIAT */ ? /* @__PURE__ */ React66.createElement("div", null, /* @__PURE__ */ React66.createElement("div", { className: "detail-item" }, /* @__PURE__ */ React66.createElement("span", { className: "label" }, "IBAN:"), /* @__PURE__ */ React66.createElement("p", null, bankDetails.iban), /* @__PURE__ */ React66.createElement("span", { className: `kima-card-network-label ${theme.colorMode}` }, /* @__PURE__ */ React66.createElement(ChainIcon, { symbol: targetNetworkOption?.shortName }), "FIAT")), /* @__PURE__ */ React66.createElement("div", { className: "detail-item" }, /* @__PURE__ */ React66.createElement("span", { className: "label" }, "Recipient:"), /* @__PURE__ */ React66.createElement("p", null, bankDetails.recipient))) : /* @__PURE__ */ React66.createElement("div", { className: "detail-item" }, /* @__PURE__ */ React66.createElement("span", { className: "label" }, "Target wallet:"), /* @__PURE__ */ React66.createElement("div", { className: "network-details" }, /* @__PURE__ */ React66.createElement("div", { className: "kima-card-network-container" }, /* @__PURE__ */ React66.createElement("span", { className: `kima-card-network-label ${theme.colorMode}` }, /* @__PURE__ */ React66.createElement(ChainIcon, { symbol: targetNetworkOption?.shortName }), targetNetworkOption?.name)), /* @__PURE__ */ React66.createElement("p", { className: theme.colorMode }, mode === "light" /* light */ ? targetNetwork.shortName === "SOL" ? lightDemoAccounts.SOL : targetNetwork.shortName === "TRX" ? lightDemoAccounts.TRX : lightDemoAccounts.EVM : dAppOption === "LPDrain" /* LPDrain */ ? connectedAddress : targetAddress))), mode === "bridge" /* bridge */ && BigInt(totalFee.value) > BigInt(0) ? (
|
|
5088
5365
|
// <FeeDeductionSlider />
|
|
5089
|
-
/* @__PURE__ */
|
|
5366
|
+
/* @__PURE__ */ React66.createElement(FeeDeductionRadioButtons_default, { disabled: feeOptionDisabled })
|
|
5090
5367
|
) : null);
|
|
5091
5368
|
};
|
|
5092
5369
|
var ConfirmDetails_default = ConfirmDetails;
|
|
5093
5370
|
|
|
5094
5371
|
// src/components/reusable/AddressInput.tsx
|
|
5095
|
-
import
|
|
5372
|
+
import React67, { useEffect as useEffect14 } from "react";
|
|
5096
5373
|
import { useDispatch as useDispatch11, useSelector as useSelector26 } from "react-redux";
|
|
5097
5374
|
var AddressInput = ({
|
|
5098
5375
|
theme,
|
|
@@ -5131,7 +5408,7 @@ var AddressInput = ({
|
|
|
5131
5408
|
mode,
|
|
5132
5409
|
dispatch
|
|
5133
5410
|
]);
|
|
5134
|
-
return /* @__PURE__ */
|
|
5411
|
+
return /* @__PURE__ */ React67.createElement(
|
|
5135
5412
|
"input",
|
|
5136
5413
|
{
|
|
5137
5414
|
className: `kima-address-input ${theme}`,
|
|
@@ -5146,11 +5423,11 @@ var AddressInput = ({
|
|
|
5146
5423
|
var AddressInput_default = AddressInput;
|
|
5147
5424
|
|
|
5148
5425
|
// src/components/reusable/CustomCheckbox.tsx
|
|
5149
|
-
import
|
|
5426
|
+
import React68 from "react";
|
|
5150
5427
|
import { useSelector as useSelector27 } from "react-redux";
|
|
5151
5428
|
|
|
5152
5429
|
// src/components/reusable/StepBox.tsx
|
|
5153
|
-
import
|
|
5430
|
+
import React69, { useMemo as useMemo11 } from "react";
|
|
5154
5431
|
import { useSelector as useSelector28 } from "react-redux";
|
|
5155
5432
|
var stepInfo2 = [
|
|
5156
5433
|
{
|
|
@@ -5174,6 +5451,7 @@ var StepBox = ({ step, errorStep, loadingStep, data }) => {
|
|
|
5174
5451
|
const explorerUrl = useSelector28(selectKimaExplorer);
|
|
5175
5452
|
const networkOption = useSelector28(selectNetworkOption);
|
|
5176
5453
|
const networks = useSelector28(selectNetworks);
|
|
5454
|
+
const { width: windowWidth } = useWidth_default();
|
|
5177
5455
|
const sourceChain = useMemo11(() => {
|
|
5178
5456
|
const sourceKey = data?.sourceChain === "FIAT" ? "CC" : data?.sourceChain;
|
|
5179
5457
|
return networks.find((network) => network.shortName === sourceKey);
|
|
@@ -5182,61 +5460,60 @@ var StepBox = ({ step, errorStep, loadingStep, data }) => {
|
|
|
5182
5460
|
() => networks.find((network) => network.shortName === data?.targetChain),
|
|
5183
5461
|
[data, networks]
|
|
5184
5462
|
);
|
|
5185
|
-
return /* @__PURE__ */
|
|
5463
|
+
return /* @__PURE__ */ React69.createElement("div", { className: "kima-stepbox" }, /* @__PURE__ */ React69.createElement("div", { className: `content-wrapper ${theme.colorMode}` }, stepInfo2.map((item, index) => /* @__PURE__ */ React69.createElement("div", { key: item.title, className: "step-item" }, /* @__PURE__ */ React69.createElement(
|
|
5186
5464
|
"div",
|
|
5187
5465
|
{
|
|
5188
5466
|
className: `info-item
|
|
5189
5467
|
${step >= index ? index === loadingStep ? "active" : index === errorStep ? "error" : "completed" : ""}
|
|
5190
5468
|
${step < index && "locked"} ${theme.colorMode}`
|
|
5191
5469
|
},
|
|
5192
|
-
step < index && /* @__PURE__ */
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
), index === 0 && data?.kimaTxHash ? /* @__PURE__ */ React68.createElement("div", { className: `info-item ${theme.colorMode}` }, /* @__PURE__ */ React68.createElement("div", { className: "icon" }, /* @__PURE__ */ React68.createElement(USDK_default, { width: 30, height: 30 })), /* @__PURE__ */ React68.createElement("p", { className: "chain-name" }, "Kima TX Hash:"), /* @__PURE__ */ React68.createElement("p", null, /* @__PURE__ */ React68.createElement(
|
|
5470
|
+
/* @__PURE__ */ React69.createElement("div", { className: "info-icon" }, step < index && /* @__PURE__ */ React69.createElement(Lock_default, { width: 24, height: 24 }), step >= index ? index === loadingStep ? /* @__PURE__ */ React69.createElement(Loader_default, { width: 24, height: 24, className: "loader" }) : index === errorStep ? /* @__PURE__ */ React69.createElement(Warning_default, { width: 24, height: 24 }) : /* @__PURE__ */ React69.createElement(Check_default, { width: 24, height: 24 }) : null),
|
|
5471
|
+
/* @__PURE__ */ React69.createElement("p", null, item.title)
|
|
5472
|
+
), index === 0 && data?.kimaTxHash ? /* @__PURE__ */ React69.createElement("div", { className: `info-item ${theme.colorMode}` }, /* @__PURE__ */ React69.createElement("div", { className: "icon" }, /* @__PURE__ */ React69.createElement(USDK_default, { width: 30, height: 30 })), /* @__PURE__ */ React69.createElement("p", { className: "chain-name" }, "Kima TX Hash:"), /* @__PURE__ */ React69.createElement("p", null, /* @__PURE__ */ React69.createElement(
|
|
5196
5473
|
ExternalLink_default,
|
|
5197
5474
|
{
|
|
5198
5475
|
to: `${explorerUrl}/transactions/?tx=${data?.kimaTxHash}`
|
|
5199
5476
|
},
|
|
5200
5477
|
getShortenedAddress(data?.kimaTxHash || "")
|
|
5201
|
-
), /* @__PURE__ */
|
|
5478
|
+
), /* @__PURE__ */ React69.createElement(CopyButton_default, { text: data?.kimaTxHash }))) : null, index === 1 && data?.tssPullHash && sourceChain?.shortName !== "CC" ? /* @__PURE__ */ React69.createElement(
|
|
5202
5479
|
"div",
|
|
5203
5480
|
{
|
|
5204
5481
|
className: `info-item ${theme.colorMode} source-chain ${step >= 3 ? "paid" : ""}`
|
|
5205
5482
|
},
|
|
5206
|
-
/* @__PURE__ */
|
|
5207
|
-
/* @__PURE__ */
|
|
5208
|
-
/* @__PURE__ */
|
|
5483
|
+
/* @__PURE__ */ React69.createElement(ChainIcon, { symbol: data.sourceChain }),
|
|
5484
|
+
/* @__PURE__ */ React69.createElement("p", { className: "chain-name" }, windowWidth >= 770 ? sourceChain?.name : sourceChain?.shortName, " ", "TX Hash:"),
|
|
5485
|
+
/* @__PURE__ */ React69.createElement("p", null, /* @__PURE__ */ React69.createElement(
|
|
5209
5486
|
ExternalLink_default,
|
|
5210
5487
|
{
|
|
5211
5488
|
to: `${sourceChain?.blockExplorers?.default.url}/${data?.sourceChain === "TRX" /* TRON */ ? "#/transaction" : "tx"}/${data?.tssPullHash}${data?.sourceChain === "SOL" /* SOLANA */ && networkOption === "testnet" /* testnet */ ? "?cluster=devnet" : ""}`
|
|
5212
5489
|
},
|
|
5213
5490
|
getShortenedAddress(data?.tssPullHash || "")
|
|
5214
|
-
), /* @__PURE__ */
|
|
5215
|
-
) : null, index === 3 && data?.tssRefundHash ? /* @__PURE__ */
|
|
5491
|
+
), /* @__PURE__ */ React69.createElement(CopyButton_default, { text: data?.tssPullHash || "" }))
|
|
5492
|
+
) : null, index === 3 && data?.tssRefundHash ? /* @__PURE__ */ React69.createElement("div", { className: `info-item ${theme.colorMode} target-chain` }, /* @__PURE__ */ React69.createElement(ChainIcon, { symbol: data.sourceChain }), /* @__PURE__ */ React69.createElement("p", { className: "chain-name" }, windowWidth >= 770 ? sourceChain?.name : sourceChain?.shortName, " ", "TX Hash:"), /* @__PURE__ */ React69.createElement("p", null, /* @__PURE__ */ React69.createElement(
|
|
5216
5493
|
ExternalLink_default,
|
|
5217
5494
|
{
|
|
5218
5495
|
to: `${sourceChain?.blockExplorers?.default.url}/${data?.sourceChain === "TRX" /* TRON */ ? "#/transaction" : "tx"}/${data?.tssRefundHash}${data?.sourceChain === "SOL" /* SOLANA */ && networkOption === "testnet" /* testnet */ ? "?cluster=devnet" : ""}`
|
|
5219
5496
|
},
|
|
5220
5497
|
getShortenedAddress(data?.tssRefundHash || "")
|
|
5221
|
-
), /* @__PURE__ */
|
|
5498
|
+
), /* @__PURE__ */ React69.createElement(CopyButton_default, { text: data?.tssRefundHash || "" }))) : null, index === 3 && data?.tssReleaseHash ? /* @__PURE__ */ React69.createElement("div", { className: `info-item ${theme.colorMode} target-chain` }, /* @__PURE__ */ React69.createElement(ChainIcon, { symbol: data.targetChain }), /* @__PURE__ */ React69.createElement("p", { className: "chain-name" }, windowWidth >= 770 ? targetChain?.name : targetChain?.shortName, " ", "TX Hash:"), /* @__PURE__ */ React69.createElement("p", null, /* @__PURE__ */ React69.createElement(
|
|
5222
5499
|
ExternalLink_default,
|
|
5223
5500
|
{
|
|
5224
5501
|
to: `${targetChain?.blockExplorers?.default.url}/${data?.targetChain === "TRX" /* TRON */ ? "#/transaction" : "tx"}/${data?.tssReleaseHash}${data?.targetChain === "SOL" /* SOLANA */ && networkOption === "testnet" /* testnet */ ? "?cluster=devnet" : ""}`
|
|
5225
5502
|
},
|
|
5226
5503
|
getShortenedAddress(data?.tssReleaseHash || "")
|
|
5227
|
-
), /* @__PURE__ */
|
|
5504
|
+
), /* @__PURE__ */ React69.createElement(CopyButton_default, { text: data?.tssReleaseHash || "" }))) : null))));
|
|
5228
5505
|
};
|
|
5229
5506
|
var StepBox_default = StepBox;
|
|
5230
5507
|
|
|
5231
5508
|
// src/components/reusable/BankInput.tsx
|
|
5232
|
-
import
|
|
5509
|
+
import React70 from "react";
|
|
5233
5510
|
import { useDispatch as useDispatch12 } from "react-redux";
|
|
5234
5511
|
import { useSelector as useSelector29 } from "react-redux";
|
|
5235
5512
|
var BankInput = () => {
|
|
5236
5513
|
const dispatch = useDispatch12();
|
|
5237
5514
|
const theme = useSelector29(selectTheme);
|
|
5238
5515
|
const bankDetails = useSelector29(selectBankDetails);
|
|
5239
|
-
return /* @__PURE__ */
|
|
5516
|
+
return /* @__PURE__ */ React70.createElement("div", { className: "bank-input" }, /* @__PURE__ */ React70.createElement("div", { className: `form-item ${theme.colorMode}` }, /* @__PURE__ */ React70.createElement("span", { className: "label" }, "IBAN:"), /* @__PURE__ */ React70.createElement(
|
|
5240
5517
|
"input",
|
|
5241
5518
|
{
|
|
5242
5519
|
className: "kima-address-input",
|
|
@@ -5244,7 +5521,7 @@ var BankInput = () => {
|
|
|
5244
5521
|
value: bankDetails.iban,
|
|
5245
5522
|
onChange: (e) => dispatch(setBankDetails({ ...bankDetails, iban: e.target.value }))
|
|
5246
5523
|
}
|
|
5247
|
-
)), /* @__PURE__ */
|
|
5524
|
+
)), /* @__PURE__ */ React70.createElement("div", { className: `form-item ${theme.colorMode}` }, /* @__PURE__ */ React70.createElement("span", { className: "label" }, "Recipient:"), /* @__PURE__ */ React70.createElement(
|
|
5248
5525
|
"input",
|
|
5249
5526
|
{
|
|
5250
5527
|
className: "kima-address-input",
|
|
@@ -5259,7 +5536,7 @@ var BankInput = () => {
|
|
|
5259
5536
|
var BankInput_default = BankInput;
|
|
5260
5537
|
|
|
5261
5538
|
// src/components/reusable/TxButton.tsx
|
|
5262
|
-
import
|
|
5539
|
+
import React71 from "react";
|
|
5263
5540
|
import { useDispatch as useDispatch13 } from "react-redux";
|
|
5264
5541
|
import { useSelector as useSelector30 } from "react-redux";
|
|
5265
5542
|
var TxButton = ({ theme }) => {
|
|
@@ -5268,14 +5545,14 @@ var TxButton = ({ theme }) => {
|
|
|
5268
5545
|
dispatch(setPendingTxPopup(true));
|
|
5269
5546
|
};
|
|
5270
5547
|
const txCount = useSelector30(selectPendingTxs);
|
|
5271
|
-
return /* @__PURE__ */
|
|
5548
|
+
return /* @__PURE__ */ React71.createElement(
|
|
5272
5549
|
"button",
|
|
5273
5550
|
{
|
|
5274
5551
|
className: `secondary-button tx-button ${theme.colorMode}`,
|
|
5275
5552
|
onClick: handleClick
|
|
5276
5553
|
},
|
|
5277
5554
|
txCount,
|
|
5278
|
-
/* @__PURE__ */
|
|
5555
|
+
/* @__PURE__ */ React71.createElement(
|
|
5279
5556
|
ring_default,
|
|
5280
5557
|
{
|
|
5281
5558
|
height: 16,
|
|
@@ -5311,43 +5588,25 @@ var emptyStatus = {
|
|
|
5311
5588
|
kimaTxHash: "",
|
|
5312
5589
|
failReason: ""
|
|
5313
5590
|
};
|
|
5314
|
-
var
|
|
5315
|
-
if (
|
|
5316
|
-
const data2 = response.data.liquidity_transaction_data;
|
|
5317
|
-
if (!data2) return emptyStatus;
|
|
5318
|
-
return {
|
|
5319
|
-
status: data2.txstatus,
|
|
5320
|
-
sourceChain: data2.chain,
|
|
5321
|
-
targetChain: data2.chain,
|
|
5322
|
-
tssPullHash: data2.releasehash,
|
|
5323
|
-
tssReleaseHash: data2.releasehash,
|
|
5324
|
-
tssRefundHash: data2.refundhash,
|
|
5325
|
-
failReason: data2.failreason,
|
|
5326
|
-
amount: data2.amount,
|
|
5327
|
-
sourceSymbol: data2.symbol,
|
|
5328
|
-
targetSymbol: data2.symbol,
|
|
5329
|
-
kimaTxHash: data2.kimahash
|
|
5330
|
-
};
|
|
5331
|
-
}
|
|
5332
|
-
const data = response.data.transaction_data;
|
|
5333
|
-
if (!data) return emptyStatus;
|
|
5591
|
+
var parseTxData = (raw) => {
|
|
5592
|
+
if (!raw) return emptyStatus;
|
|
5334
5593
|
return {
|
|
5335
|
-
status:
|
|
5336
|
-
sourceChain:
|
|
5337
|
-
targetChain:
|
|
5338
|
-
tssPullHash:
|
|
5339
|
-
tssReleaseHash:
|
|
5340
|
-
tssRefundHash:
|
|
5341
|
-
failReason:
|
|
5342
|
-
amount:
|
|
5343
|
-
sourceSymbol:
|
|
5344
|
-
targetSymbol:
|
|
5345
|
-
kimaTxHash:
|
|
5594
|
+
status: raw.txstatus,
|
|
5595
|
+
sourceChain: raw.originchain,
|
|
5596
|
+
targetChain: raw.targetchain,
|
|
5597
|
+
tssPullHash: raw.pullhash,
|
|
5598
|
+
tssReleaseHash: raw.releasehash,
|
|
5599
|
+
tssRefundHash: raw.refundhash,
|
|
5600
|
+
failReason: raw.failreason,
|
|
5601
|
+
amount: raw.amount,
|
|
5602
|
+
sourceSymbol: raw.originsymbol,
|
|
5603
|
+
targetSymbol: raw.targetsymbol,
|
|
5604
|
+
kimaTxHash: raw.kimahash
|
|
5346
5605
|
};
|
|
5347
5606
|
};
|
|
5348
5607
|
var isFinished = (data) => {
|
|
5349
5608
|
if (!data) return false;
|
|
5350
|
-
return
|
|
5609
|
+
return [
|
|
5351
5610
|
"Completed" /* COMPLETED */,
|
|
5352
5611
|
"FailedToPull" /* FAILEDTOPULL */,
|
|
5353
5612
|
"FailedToPay" /* FAILEDTOPAY */,
|
|
@@ -5369,11 +5628,11 @@ var getTxData = async ({
|
|
|
5369
5628
|
`${backendUrl}/${path}/${txId}/status`
|
|
5370
5629
|
);
|
|
5371
5630
|
if (typeof response === "string") throw new Error(response);
|
|
5372
|
-
const
|
|
5373
|
-
|
|
5374
|
-
);
|
|
5375
|
-
refPollForUpdates.current = !isFinished(
|
|
5376
|
-
return
|
|
5631
|
+
const res = response;
|
|
5632
|
+
const raw = isLP ? res.data.liquidity_transaction_data : res.data.transaction_data;
|
|
5633
|
+
const parsed = parseTxData(raw);
|
|
5634
|
+
refPollForUpdates.current = !isFinished(parsed);
|
|
5635
|
+
return parsed;
|
|
5377
5636
|
} catch (error) {
|
|
5378
5637
|
logger_default.error(`Error fetching transaction ${txId} data:`, error);
|
|
5379
5638
|
throw new Error(
|
|
@@ -5402,17 +5661,17 @@ var useGetTxData = (txId, dAppOption, backendUrl) => {
|
|
|
5402
5661
|
var useGetTxData_default = useGetTxData;
|
|
5403
5662
|
|
|
5404
5663
|
// src/components/reusable/TransactionStatusMessage.tsx
|
|
5405
|
-
import
|
|
5664
|
+
import React72 from "react";
|
|
5406
5665
|
var TransactionStatusMessage = ({
|
|
5407
5666
|
isCompleted,
|
|
5408
5667
|
transactionId
|
|
5409
5668
|
}) => {
|
|
5410
|
-
return /* @__PURE__ */
|
|
5669
|
+
return /* @__PURE__ */ React72.createElement("div", { className: "transaction-status-message" }, /* @__PURE__ */ React72.createElement("h2", null, isCompleted !== "Completed" /* COMPLETED */ && "Your transaction is currently being processed.", " ", "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."), /* @__PURE__ */ React72.createElement("span", { className: "transaction-copy" }, /* @__PURE__ */ React72.createElement("h3", null, transactionId), /* @__PURE__ */ React72.createElement(CopyButton_default, { text: transactionId })));
|
|
5411
5670
|
};
|
|
5412
5671
|
var TransactionStatusMessage_default = TransactionStatusMessage;
|
|
5413
5672
|
|
|
5414
5673
|
// src/components/reusable/TransactionSearch.tsx
|
|
5415
|
-
import
|
|
5674
|
+
import React73, { useRef as useRef3, useState as useState10 } from "react";
|
|
5416
5675
|
import { useSelector as useSelector31 } from "react-redux";
|
|
5417
5676
|
import { useDispatch as useDispatch14 } from "react-redux";
|
|
5418
5677
|
import toast2 from "react-hot-toast";
|
|
@@ -5425,7 +5684,7 @@ var TransactionSearch = () => {
|
|
|
5425
5684
|
const handleSearch = async () => {
|
|
5426
5685
|
if (transactionId.length <= 0)
|
|
5427
5686
|
return toast2.error("You must provide a valid transaction id", {
|
|
5428
|
-
icon: /* @__PURE__ */
|
|
5687
|
+
icon: /* @__PURE__ */ React73.createElement(Error_default, null)
|
|
5429
5688
|
});
|
|
5430
5689
|
try {
|
|
5431
5690
|
const data = await getTxData({
|
|
@@ -5442,11 +5701,11 @@ var TransactionSearch = () => {
|
|
|
5442
5701
|
logger_default.error("Error searching transaction: ", error);
|
|
5443
5702
|
return toast2.error(
|
|
5444
5703
|
"Transaction not found. Please check for the proper transaction id.",
|
|
5445
|
-
{ icon: /* @__PURE__ */
|
|
5704
|
+
{ icon: /* @__PURE__ */ React73.createElement(Error_default, null) }
|
|
5446
5705
|
);
|
|
5447
5706
|
}
|
|
5448
5707
|
};
|
|
5449
|
-
return /* @__PURE__ */
|
|
5708
|
+
return /* @__PURE__ */ React73.createElement("div", { className: "form-item transaction-search" }, /* @__PURE__ */ React73.createElement("div", { className: "transaction-input" }, /* @__PURE__ */ React73.createElement("span", { className: "label" }, "Search Transaction:"), /* @__PURE__ */ React73.createElement(
|
|
5450
5709
|
"input",
|
|
5451
5710
|
{
|
|
5452
5711
|
className: `${theme.colorMode}`,
|
|
@@ -5456,7 +5715,7 @@ var TransactionSearch = () => {
|
|
|
5456
5715
|
onChange: (e) => setTransactionId(e.target.value),
|
|
5457
5716
|
spellCheck: false
|
|
5458
5717
|
}
|
|
5459
|
-
)), /* @__PURE__ */
|
|
5718
|
+
)), /* @__PURE__ */ React73.createElement(SecondaryButton_default, { clickHandler: handleSearch }, "Search"));
|
|
5460
5719
|
};
|
|
5461
5720
|
var TransactionSearch_default = TransactionSearch;
|
|
5462
5721
|
|
|
@@ -5468,7 +5727,9 @@ var TransactionWidget = ({ theme }) => {
|
|
|
5468
5727
|
const [errorMessage, setErrorMessage] = useState11("");
|
|
5469
5728
|
const [loadingStep, setLoadingStep] = useState11(-1);
|
|
5470
5729
|
const [minimized, setMinimized] = useState11(false);
|
|
5730
|
+
const [isComplete, setIsComplete] = useState11(false);
|
|
5471
5731
|
const dispatch = useDispatch15();
|
|
5732
|
+
const explorerUrl = useSelector32(selectKimaExplorer);
|
|
5472
5733
|
const mode = useSelector32(selectMode);
|
|
5473
5734
|
const feeDeduct = useSelector32(selectFeeDeduct);
|
|
5474
5735
|
const amount = useSelector32(selectAmount);
|
|
@@ -5485,6 +5746,10 @@ var TransactionWidget = ({ theme }) => {
|
|
|
5485
5746
|
const { successHandler, closeHandler } = useKimaContext();
|
|
5486
5747
|
const backendUrl = useSelector32(selectBackendUrl);
|
|
5487
5748
|
const { data, error } = useGetTxData_default(txId, dAppOption, backendUrl);
|
|
5749
|
+
const { width: windowWidth, updateWidth } = useWidth_default();
|
|
5750
|
+
useEffect15(() => {
|
|
5751
|
+
windowWidth === 0 && updateWidth(window.innerWidth);
|
|
5752
|
+
}, []);
|
|
5488
5753
|
const transactionSourceChain = useMemo12(
|
|
5489
5754
|
() => networks.find(
|
|
5490
5755
|
(network) => network.shortName === (mode === "status" /* status */ ? data?.sourceChain === "FIAT" ? "CC" : data?.sourceChain : sourceChain.shortName)
|
|
@@ -5511,12 +5776,18 @@ var TransactionWidget = ({ theme }) => {
|
|
|
5511
5776
|
txId
|
|
5512
5777
|
});
|
|
5513
5778
|
}, [data]);
|
|
5779
|
+
useEffect15(() => {
|
|
5780
|
+
if (!data) return;
|
|
5781
|
+
if (data.status === "Completed" /* COMPLETED */) {
|
|
5782
|
+
setIsComplete(true);
|
|
5783
|
+
}
|
|
5784
|
+
}, [data, setIsComplete]);
|
|
5514
5785
|
useEffect15(() => {
|
|
5515
5786
|
if (error)
|
|
5516
5787
|
toast3.error(
|
|
5517
5788
|
"The provided transaction id is not valid, please use a different one or contact support for further assistance",
|
|
5518
5789
|
{
|
|
5519
|
-
icon: /* @__PURE__ */
|
|
5790
|
+
icon: /* @__PURE__ */ React74.createElement(Error_default, null)
|
|
5520
5791
|
}
|
|
5521
5792
|
);
|
|
5522
5793
|
}, [error]);
|
|
@@ -5540,7 +5811,7 @@ var TransactionWidget = ({ theme }) => {
|
|
|
5540
5811
|
setErrorStep(1);
|
|
5541
5812
|
setLoadingStep(-1);
|
|
5542
5813
|
logger_default.error("transaction failed:", data.failReason);
|
|
5543
|
-
toast3.error("Unavailable", { icon: /* @__PURE__ */
|
|
5814
|
+
toast3.error("Unavailable", { icon: /* @__PURE__ */ React74.createElement(Error_default, null) });
|
|
5544
5815
|
setErrorMessage("Unavailable");
|
|
5545
5816
|
} else if (status === "Paid" /* PAID */) {
|
|
5546
5817
|
setStep(3);
|
|
@@ -5551,7 +5822,7 @@ var TransactionWidget = ({ theme }) => {
|
|
|
5551
5822
|
toast3.error(
|
|
5552
5823
|
"Failed to release tokens to target! Starting refund process.",
|
|
5553
5824
|
{
|
|
5554
|
-
icon: /* @__PURE__ */
|
|
5825
|
+
icon: /* @__PURE__ */ React74.createElement(Error_default, null)
|
|
5555
5826
|
}
|
|
5556
5827
|
);
|
|
5557
5828
|
setErrorMessage(
|
|
@@ -5562,7 +5833,7 @@ var TransactionWidget = ({ theme }) => {
|
|
|
5562
5833
|
setErrorStep(3);
|
|
5563
5834
|
setLoadingStep(-1);
|
|
5564
5835
|
toast3.error("Failed to refund tokens to source!", {
|
|
5565
|
-
icon: /* @__PURE__ */
|
|
5836
|
+
icon: /* @__PURE__ */ React74.createElement(Error_default, null)
|
|
5566
5837
|
});
|
|
5567
5838
|
setErrorMessage("Failed to refund tokens to source!");
|
|
5568
5839
|
} else if (status === "RefundCompleted" /* REFUNDCOMPLETED */) {
|
|
@@ -5570,7 +5841,7 @@ var TransactionWidget = ({ theme }) => {
|
|
|
5570
5841
|
setErrorStep(3);
|
|
5571
5842
|
setLoadingStep(-1);
|
|
5572
5843
|
toast3.success("Refund completed!", {
|
|
5573
|
-
icon: /* @__PURE__ */
|
|
5844
|
+
icon: /* @__PURE__ */ React74.createElement(Error_default, null)
|
|
5574
5845
|
});
|
|
5575
5846
|
setErrorMessage("Refund completed!");
|
|
5576
5847
|
} else if (status === "FailedToPay" /* FAILEDTOPAY */) {
|
|
@@ -5579,7 +5850,7 @@ var TransactionWidget = ({ theme }) => {
|
|
|
5579
5850
|
setLoadingStep(-1);
|
|
5580
5851
|
logger_default.error("transaction failed:", data.failReason);
|
|
5581
5852
|
toast3.error("Failed to release tokens to target!", {
|
|
5582
|
-
icon: /* @__PURE__ */
|
|
5853
|
+
icon: /* @__PURE__ */ React74.createElement(Error_default, null)
|
|
5583
5854
|
});
|
|
5584
5855
|
setErrorMessage("Failed to release tokens to target!");
|
|
5585
5856
|
} else if (status === "FailedToPull" /* FAILEDTOPULL */) {
|
|
@@ -5587,7 +5858,7 @@ var TransactionWidget = ({ theme }) => {
|
|
|
5587
5858
|
setErrorStep(1);
|
|
5588
5859
|
setLoadingStep(-1);
|
|
5589
5860
|
logger_default.error("transaction failed:", data.failReason);
|
|
5590
|
-
toast3.error("Failed to pull tokens from source!", { icon: /* @__PURE__ */
|
|
5861
|
+
toast3.error("Failed to pull tokens from source!", { icon: /* @__PURE__ */ React74.createElement(Error_default, null) });
|
|
5591
5862
|
setErrorMessage("Failed to pull tokens from source!");
|
|
5592
5863
|
} else if (status === "Completed" /* COMPLETED */) {
|
|
5593
5864
|
setStep(4);
|
|
@@ -5600,7 +5871,7 @@ var TransactionWidget = ({ theme }) => {
|
|
|
5600
5871
|
}
|
|
5601
5872
|
}, [data?.status]);
|
|
5602
5873
|
const resetForm = () => {
|
|
5603
|
-
|
|
5874
|
+
setIsComplete(false);
|
|
5604
5875
|
dispatch(resetServiceFee());
|
|
5605
5876
|
if (mode === "light" /* light */) {
|
|
5606
5877
|
dispatch(setMode("light" /* light */));
|
|
@@ -5642,41 +5913,76 @@ var TransactionWidget = ({ theme }) => {
|
|
|
5642
5913
|
dispatch(
|
|
5643
5914
|
setMode(transactionOption ? "payment" /* payment */ : "bridge" /* bridge */)
|
|
5644
5915
|
);
|
|
5645
|
-
dispatch(setAmount(""));
|
|
5916
|
+
dispatch(setAmount(transactionOption?.amount.toString() || ""));
|
|
5646
5917
|
dispatch(setCCTransactionId(""));
|
|
5647
5918
|
dispatch(setCCTransactionStatus("idle"));
|
|
5648
5919
|
dispatch(setTxId(-1));
|
|
5649
5920
|
dispatch(setSubmitted(false));
|
|
5650
5921
|
};
|
|
5651
|
-
return /* @__PURE__ */
|
|
5922
|
+
return /* @__PURE__ */ React74.createElement(Provider2, { store }, /* @__PURE__ */ React74.createElement(
|
|
5652
5923
|
"div",
|
|
5653
5924
|
{
|
|
5654
|
-
className: `kima-card transaction-card ${theme.colorMode} ${minimized ? "minimized" : ""}`,
|
|
5925
|
+
className: `kima-card transaction-card ${isComplete ? "transaction-complete" : ""} ${theme.colorMode} ${minimized ? "minimized" : ""}`,
|
|
5655
5926
|
style: {
|
|
5656
5927
|
background: theme.colorMode === "light" /* light */ ? theme.backgroundColorLight : theme.backgroundColorDark
|
|
5657
5928
|
}
|
|
5658
5929
|
},
|
|
5659
|
-
/* @__PURE__ */
|
|
5930
|
+
/* @__PURE__ */ React74.createElement("div", { className: "kima-card-header" }, /* @__PURE__ */ React74.createElement("div", { className: "topbar" }, !isComplete && /* @__PURE__ */ React74.createElement("div", { className: "title" }, isValidTxId && !error ? /* @__PURE__ */ React74.createElement("div", { className: "transaction-title" }, mode !== "status" /* status */ ? data?.status === "Completed" /* COMPLETED */ ? "Transferred " : "Transfering " : isEmptyStatus ? "Fetching transaction status " : data?.status === "Completed" /* COMPLETED */ ? "Transferred " : "Transfering ", mode !== "status" /* status */ ? Number(amount) !== 0 ? transactionSourceChain?.shortName === "CC" ? bigIntToNumber(txValues.allowanceAmount).toFixed(2) : formatBigInt(txValues.allowanceAmount) : "" : data?.amount || "", " ", mode !== "status" /* status */ ? `${sourceSymbol} ` : isEmptyStatus ? "" : `${data?.sourceSymbol}`, mode !== "status" /* status */ ? `\u2192 ` : isEmptyStatus ? "" : `\u2192 `, mode !== "status" /* status */ ? Number(amount) !== 0 ? transactionSourceChain?.shortName === "CC" ? bigIntToNumber(txValues.submitAmount).toFixed(2) : formatBigInt(txValues.submitAmount) : "" : data?.amount || "", " ", mode !== "status" /* status */ ? `${targetSymbol}${" "}` : isEmptyStatus ? "" : `${data?.targetSymbol}${" "}`) : /* @__PURE__ */ React74.createElement("div", null, /* @__PURE__ */ React74.createElement("h3", { className: "transaction" }, "Transaction Status"))), !minimized ? /* @__PURE__ */ React74.createElement(
|
|
5931
|
+
"div",
|
|
5932
|
+
{
|
|
5933
|
+
className: `control-buttons ${isComplete ? "complete" : ""}`
|
|
5934
|
+
},
|
|
5935
|
+
isComplete && /* @__PURE__ */ React74.createElement(
|
|
5936
|
+
"button",
|
|
5937
|
+
{
|
|
5938
|
+
className: "menu-button",
|
|
5939
|
+
style: { marginRight: "auto" },
|
|
5940
|
+
onClick: () => {
|
|
5941
|
+
setIsComplete(false);
|
|
5942
|
+
}
|
|
5943
|
+
},
|
|
5944
|
+
"< Back"
|
|
5945
|
+
),
|
|
5946
|
+
/* @__PURE__ */ React74.createElement(
|
|
5947
|
+
"button",
|
|
5948
|
+
{
|
|
5949
|
+
className: "icon-button minimize",
|
|
5950
|
+
onClick: () => {
|
|
5951
|
+
setMinimized(true);
|
|
5952
|
+
}
|
|
5953
|
+
},
|
|
5954
|
+
/* @__PURE__ */ React74.createElement(Minimize_default, null)
|
|
5955
|
+
),
|
|
5956
|
+
!isValidTxId || loadingStep < 0 || error && dAppOption !== "none" /* None */ ? /* @__PURE__ */ React74.createElement("button", { className: "reset-button", onClick: resetForm }, "Reset") : null,
|
|
5957
|
+
closeHandler && /* @__PURE__ */ React74.createElement(
|
|
5958
|
+
"button",
|
|
5959
|
+
{
|
|
5960
|
+
className: "cross-icon-button",
|
|
5961
|
+
onClick: () => {
|
|
5962
|
+
resetForm();
|
|
5963
|
+
closeHandler(0);
|
|
5964
|
+
}
|
|
5965
|
+
},
|
|
5966
|
+
/* @__PURE__ */ React74.createElement(Cross_default, null)
|
|
5967
|
+
)
|
|
5968
|
+
) : /* @__PURE__ */ React74.createElement("div", { className: "control-buttons" }, /* @__PURE__ */ React74.createElement("div", { className: "maximize", onClick: () => setMinimized(false) }, "View"))), data && !isComplete && /* @__PURE__ */ React74.createElement("div", { className: "header-network-labels" }, /* @__PURE__ */ React74.createElement("div", { className: `kima-card-network-label ${theme.colorMode}` }, /* @__PURE__ */ React74.createElement(
|
|
5660
5969
|
ChainIcon,
|
|
5661
5970
|
{
|
|
5662
5971
|
symbol: transactionSourceChain?.shortName
|
|
5663
5972
|
}
|
|
5664
|
-
)
|
|
5973
|
+
), windowWidth > 450 && /* @__PURE__ */ React74.createElement("h3", null, transactionSourceChain?.name)), /* @__PURE__ */ React74.createElement(
|
|
5974
|
+
"div",
|
|
5975
|
+
{
|
|
5976
|
+
style: { display: "inline-block", transform: "rotate(-90deg)" }
|
|
5977
|
+
},
|
|
5978
|
+
/* @__PURE__ */ React74.createElement(Arrow_default, { width: 25, height: 25 })
|
|
5979
|
+
), /* @__PURE__ */ React74.createElement("div", { className: `kima-card-network-label ${theme.colorMode}` }, /* @__PURE__ */ React74.createElement(
|
|
5665
5980
|
ChainIcon,
|
|
5666
5981
|
{
|
|
5667
5982
|
symbol: transactionTargetChain?.shortName
|
|
5668
5983
|
}
|
|
5669
|
-
)
|
|
5670
|
-
|
|
5671
|
-
{
|
|
5672
|
-
className: "icon-button minimize",
|
|
5673
|
-
onClick: () => {
|
|
5674
|
-
setMinimized(true);
|
|
5675
|
-
}
|
|
5676
|
-
},
|
|
5677
|
-
/* @__PURE__ */ React73.createElement(Minimize_default, null)
|
|
5678
|
-
), !isValidTxId || loadingStep < 0 || error ? /* @__PURE__ */ React73.createElement("button", { className: "reset-button", onClick: resetForm }, "Reset") : null) : /* @__PURE__ */ React73.createElement("div", { className: "control-buttons" }, /* @__PURE__ */ React73.createElement("div", { className: "maximize", onClick: () => setMinimized(false) }, "View")))),
|
|
5679
|
-
isValidTxId && !error ? /* @__PURE__ */ React73.createElement("div", { className: "kima-card-content" }, /* @__PURE__ */ React73.createElement("div", { className: "transaction-content" }, /* @__PURE__ */ React73.createElement(
|
|
5984
|
+
), windowWidth > 450 && /* @__PURE__ */ React74.createElement("h3", null, transactionTargetChain?.name)))),
|
|
5985
|
+
isValidTxId && !error ? /* @__PURE__ */ React74.createElement("div", { className: "kima-card-content" }, !isComplete ? /* @__PURE__ */ React74.createElement("div", { className: "transaction-content" }, /* @__PURE__ */ React74.createElement(
|
|
5680
5986
|
Progressbar_default,
|
|
5681
5987
|
{
|
|
5682
5988
|
step,
|
|
@@ -5685,7 +5991,7 @@ var TransactionWidget = ({ theme }) => {
|
|
|
5685
5991
|
setFocus,
|
|
5686
5992
|
loadingStep
|
|
5687
5993
|
}
|
|
5688
|
-
), /* @__PURE__ */
|
|
5994
|
+
), /* @__PURE__ */ React74.createElement(
|
|
5689
5995
|
StepBox_default,
|
|
5690
5996
|
{
|
|
5691
5997
|
step,
|
|
@@ -5693,14 +5999,67 @@ var TransactionWidget = ({ theme }) => {
|
|
|
5693
5999
|
loadingStep,
|
|
5694
6000
|
data
|
|
5695
6001
|
}
|
|
5696
|
-
)),
|
|
6002
|
+
)) : /* @__PURE__ */ React74.createElement("div", { className: "transaction-content transaction-complete" }, /* @__PURE__ */ React74.createElement(TransactionComplete_default, null), /* @__PURE__ */ React74.createElement("h2", null, "Transaction Complete"), /* @__PURE__ */ React74.createElement("div", { className: "kima-stepbox" }, /* @__PURE__ */ React74.createElement(
|
|
6003
|
+
"div",
|
|
6004
|
+
{
|
|
6005
|
+
className: `content-wrapper transaction-complete ${theme.colorMode}`
|
|
6006
|
+
},
|
|
6007
|
+
/* @__PURE__ */ React74.createElement("p", null, "You just transferred ", data?.amount, " ", data?.sourceSymbol),
|
|
6008
|
+
/* @__PURE__ */ React74.createElement("div", { className: "header-network-labels" }, /* @__PURE__ */ React74.createElement(
|
|
6009
|
+
"div",
|
|
6010
|
+
{
|
|
6011
|
+
className: `kima-card-network-label ${theme.colorMode}`
|
|
6012
|
+
},
|
|
6013
|
+
/* @__PURE__ */ React74.createElement(
|
|
6014
|
+
ChainIcon,
|
|
6015
|
+
{
|
|
6016
|
+
symbol: transactionSourceChain?.shortName
|
|
6017
|
+
}
|
|
6018
|
+
),
|
|
6019
|
+
windowWidth > 450 && /* @__PURE__ */ React74.createElement("h3", null, transactionSourceChain?.name)
|
|
6020
|
+
), /* @__PURE__ */ React74.createElement(
|
|
6021
|
+
"div",
|
|
6022
|
+
{
|
|
6023
|
+
style: {
|
|
6024
|
+
display: "inline-block",
|
|
6025
|
+
transform: "rotate(-90deg)"
|
|
6026
|
+
}
|
|
6027
|
+
},
|
|
6028
|
+
/* @__PURE__ */ React74.createElement(Arrow_default, { width: 25, height: 25 })
|
|
6029
|
+
), /* @__PURE__ */ React74.createElement(
|
|
6030
|
+
"div",
|
|
6031
|
+
{
|
|
6032
|
+
className: `kima-card-network-label ${theme.colorMode}`
|
|
6033
|
+
},
|
|
6034
|
+
/* @__PURE__ */ React74.createElement(
|
|
6035
|
+
ChainIcon,
|
|
6036
|
+
{
|
|
6037
|
+
symbol: transactionTargetChain?.shortName
|
|
6038
|
+
}
|
|
6039
|
+
),
|
|
6040
|
+
windowWidth > 450 && /* @__PURE__ */ React74.createElement("h3", null, transactionTargetChain?.name)
|
|
6041
|
+
))
|
|
6042
|
+
)), /* @__PURE__ */ React74.createElement("div", { className: "transaction-buttons" }, /* @__PURE__ */ React74.createElement(
|
|
6043
|
+
SecondaryButton_default,
|
|
6044
|
+
{
|
|
6045
|
+
clickHandler: resetForm,
|
|
6046
|
+
theme: theme.colorMode
|
|
6047
|
+
},
|
|
6048
|
+
"New Transaction"
|
|
6049
|
+
), /* @__PURE__ */ React74.createElement(
|
|
6050
|
+
ExternalLink_default,
|
|
6051
|
+
{
|
|
6052
|
+
to: `${explorerUrl}/transactions/?tx=${data?.kimaTxHash}`
|
|
6053
|
+
},
|
|
6054
|
+
/* @__PURE__ */ React74.createElement(PrimaryButton_default, null, "View Details")
|
|
6055
|
+
))), !error && !isEmptyStatus && !isComplete && /* @__PURE__ */ React74.createElement(
|
|
5697
6056
|
TransactionStatusMessage_default,
|
|
5698
6057
|
{
|
|
5699
6058
|
isCompleted: data?.status,
|
|
5700
6059
|
transactionId: txId.toString()
|
|
5701
6060
|
}
|
|
5702
|
-
)) : /* @__PURE__ */
|
|
5703
|
-
/* @__PURE__ */
|
|
6061
|
+
)) : /* @__PURE__ */ React74.createElement("div", { className: "kima-card-content" }, /* @__PURE__ */ React74.createElement("h4", { className: "subtitle" }, "You can follow the status of a previous submitted transaction by entering the provided transaction id"), /* @__PURE__ */ React74.createElement("div", { className: "single-form" }, /* @__PURE__ */ React74.createElement(TransactionSearch_default, null))),
|
|
6062
|
+
/* @__PURE__ */ React74.createElement(
|
|
5704
6063
|
Toaster,
|
|
5705
6064
|
{
|
|
5706
6065
|
position: "top-right",
|
|
@@ -5727,21 +6086,27 @@ var TransactionWidget = ({ theme }) => {
|
|
|
5727
6086
|
}
|
|
5728
6087
|
}
|
|
5729
6088
|
),
|
|
5730
|
-
/* @__PURE__ */
|
|
6089
|
+
/* @__PURE__ */ React74.createElement(
|
|
6090
|
+
"div",
|
|
6091
|
+
{
|
|
6092
|
+
className: `floating-footer ${isComplete ? "complete" : "status"}`
|
|
6093
|
+
},
|
|
6094
|
+
/* @__PURE__ */ React74.createElement("div", { className: `items ${theme.colorMode}` }, /* @__PURE__ */ React74.createElement("span", null, "Powered by"), /* @__PURE__ */ React74.createElement(KimaNetwork_default, null))
|
|
6095
|
+
)
|
|
5731
6096
|
));
|
|
5732
6097
|
};
|
|
5733
6098
|
|
|
5734
6099
|
// src/components/TransferWidget.tsx
|
|
5735
|
-
import
|
|
6100
|
+
import React85, { useEffect as useEffect21, useState as useState15, useRef as useRef8, useMemo as useMemo21, useCallback as useCallback3 } from "react";
|
|
5736
6101
|
import { useDispatch as useDispatch26, useSelector as useSelector45 } from "react-redux";
|
|
5737
6102
|
|
|
5738
6103
|
// src/components/reusable/SingleForm.tsx
|
|
5739
|
-
import
|
|
6104
|
+
import React76, { useEffect as useEffect17, useMemo as useMemo14, useState as useState13 } from "react";
|
|
5740
6105
|
import { toast as toast4 } from "react-hot-toast";
|
|
5741
6106
|
import { useDispatch as useDispatch17, useSelector as useSelector35 } from "react-redux";
|
|
5742
6107
|
|
|
5743
6108
|
// src/components/primary/NetworkSelector.tsx
|
|
5744
|
-
import
|
|
6109
|
+
import React75, { useState as useState12, useMemo as useMemo13, useRef as useRef4, useEffect as useEffect16 } from "react";
|
|
5745
6110
|
import { useSelector as useSelector33, useDispatch as useDispatch16 } from "react-redux";
|
|
5746
6111
|
var NetworkSelector = ({
|
|
5747
6112
|
type,
|
|
@@ -5753,6 +6118,8 @@ var NetworkSelector = ({
|
|
|
5753
6118
|
const dispatch = useDispatch16();
|
|
5754
6119
|
const theme = useSelector33(selectTheme);
|
|
5755
6120
|
const networkOptions3 = useSelector33(selectNetworks);
|
|
6121
|
+
const transactionOption = useSelector33(selectTransactionOption);
|
|
6122
|
+
const dAppOption = useSelector33(selectDappOption);
|
|
5756
6123
|
const mode = useSelector33(selectMode);
|
|
5757
6124
|
const sourceNetwork = useSelector33(selectSourceChain);
|
|
5758
6125
|
const sourceSymbol = useSelector33(selectSourceCurrency);
|
|
@@ -5761,6 +6128,8 @@ var NetworkSelector = ({
|
|
|
5761
6128
|
const isOriginSelector = type === "origin";
|
|
5762
6129
|
const networks = useMemo13(() => {
|
|
5763
6130
|
return networkOptions3.filter((network) => {
|
|
6131
|
+
if (dAppOption !== "none" /* None */ && network.shortName === "CC")
|
|
6132
|
+
return false;
|
|
5764
6133
|
const isSameAsSource = isOriginSelector ? false : network.shortName === sourceNetwork.shortName;
|
|
5765
6134
|
const isAllowedInLightMode = mode !== "light" /* light */ || lightDemoNetworks.includes(network.shortName);
|
|
5766
6135
|
const sourceToken = sourceNetwork.supportedTokens.find(
|
|
@@ -5774,8 +6143,18 @@ var NetworkSelector = ({
|
|
|
5774
6143
|
}
|
|
5775
6144
|
return network.supportedLocations.includes(type) && !isSameAsSource && supportsSourceCurrency && isAllowedInLightMode;
|
|
5776
6145
|
});
|
|
5777
|
-
}, [networkOptions3, sourceNetwork, sourceSymbol, type, mode]);
|
|
6146
|
+
}, [networkOptions3, sourceNetwork, sourceSymbol, type, mode, dAppOption]);
|
|
6147
|
+
const shouldLockSourceNetwork = isOriginSelector && mode === "payment" /* payment */ && dAppOption !== "none" /* None */ && !!transactionOption?.targetChain;
|
|
5778
6148
|
const selectedNetwork = useMemo13(() => {
|
|
6149
|
+
if (shouldLockSourceNetwork) {
|
|
6150
|
+
const forcedNetwork = networks.find(
|
|
6151
|
+
(n) => n.shortName === transactionOption.targetChain
|
|
6152
|
+
);
|
|
6153
|
+
return forcedNetwork || {
|
|
6154
|
+
shortName: "",
|
|
6155
|
+
name: "Invalid Source Network"
|
|
6156
|
+
};
|
|
6157
|
+
}
|
|
5779
6158
|
if (initialSelection) {
|
|
5780
6159
|
return {
|
|
5781
6160
|
shortName: "",
|
|
@@ -5792,7 +6171,32 @@ var NetworkSelector = ({
|
|
|
5792
6171
|
sourceNetwork,
|
|
5793
6172
|
targetNetwork,
|
|
5794
6173
|
isOriginSelector,
|
|
5795
|
-
initialSelection
|
|
6174
|
+
initialSelection,
|
|
6175
|
+
shouldLockSourceNetwork,
|
|
6176
|
+
transactionOption?.targetChain
|
|
6177
|
+
]);
|
|
6178
|
+
useEffect16(() => {
|
|
6179
|
+
if (shouldLockSourceNetwork && isOriginSelector && transactionOption?.targetChain) {
|
|
6180
|
+
const forcedNetwork = networks.find(
|
|
6181
|
+
(n) => n.shortName === transactionOption.targetChain
|
|
6182
|
+
);
|
|
6183
|
+
if (forcedNetwork && forcedNetwork.id !== sourceNetwork.id) {
|
|
6184
|
+
dispatch(setSourceChain(forcedNetwork));
|
|
6185
|
+
setInitialSelection({
|
|
6186
|
+
sourceSelection: false,
|
|
6187
|
+
targetSelection: false
|
|
6188
|
+
});
|
|
6189
|
+
switchChainHandler && switchChainHandler(forcedNetwork);
|
|
6190
|
+
}
|
|
6191
|
+
}
|
|
6192
|
+
}, [
|
|
6193
|
+
shouldLockSourceNetwork,
|
|
6194
|
+
transactionOption?.targetChain,
|
|
6195
|
+
sourceNetwork.id,
|
|
6196
|
+
isOriginSelector,
|
|
6197
|
+
networks,
|
|
6198
|
+
dispatch,
|
|
6199
|
+
switchChainHandler
|
|
5796
6200
|
]);
|
|
5797
6201
|
useEffect16(() => {
|
|
5798
6202
|
if (!networks.length || selectedNetwork.shortName) return;
|
|
@@ -5847,20 +6251,24 @@ var NetworkSelector = ({
|
|
|
5847
6251
|
dispatch(setTargetAddress(lightDemoAccounts.TRX));
|
|
5848
6252
|
}
|
|
5849
6253
|
}, [sourceNetwork, targetNetwork, mode]);
|
|
5850
|
-
return /* @__PURE__ */
|
|
6254
|
+
return /* @__PURE__ */ React75.createElement(
|
|
5851
6255
|
"div",
|
|
5852
6256
|
{
|
|
5853
|
-
className: `network-dropdown ${theme?.colorMode ?? ""} ${collapsed ? "collapsed" : "toggled"}`,
|
|
5854
|
-
onClick: () =>
|
|
6257
|
+
className: `network-dropdown ${theme?.colorMode ?? ""} ${collapsed ? "collapsed" : "toggled"} ${shouldLockSourceNetwork ? "disabled" : ""}`,
|
|
6258
|
+
onClick: () => {
|
|
6259
|
+
if (!shouldLockSourceNetwork) {
|
|
6260
|
+
setCollapsed((prev) => !prev);
|
|
6261
|
+
}
|
|
6262
|
+
},
|
|
5855
6263
|
ref
|
|
5856
6264
|
},
|
|
5857
|
-
/* @__PURE__ */
|
|
5858
|
-
/* @__PURE__ */
|
|
6265
|
+
/* @__PURE__ */ React75.createElement("div", { className: "network-wrapper" }, /* @__PURE__ */ React75.createElement(ChainIcon, { symbol: selectedNetwork.shortName }), /* @__PURE__ */ React75.createElement("span", null, selectedNetwork.name)),
|
|
6266
|
+
/* @__PURE__ */ React75.createElement(
|
|
5859
6267
|
"div",
|
|
5860
6268
|
{
|
|
5861
6269
|
className: `network-menu custom-scrollbar ${theme?.colorMode ?? ""} ${collapsed ? "collapsed" : "toggled"}`
|
|
5862
6270
|
},
|
|
5863
|
-
networks.filter((network) => network.shortName !== selectedNetwork.shortName).map((network) => /* @__PURE__ */
|
|
6271
|
+
networks.filter((network) => network.shortName !== selectedNetwork.shortName).map((network) => /* @__PURE__ */ React75.createElement(
|
|
5864
6272
|
"div",
|
|
5865
6273
|
{
|
|
5866
6274
|
key: network.id,
|
|
@@ -5872,15 +6280,15 @@ var NetworkSelector = ({
|
|
|
5872
6280
|
}
|
|
5873
6281
|
}
|
|
5874
6282
|
},
|
|
5875
|
-
network.disabled ? /* @__PURE__ */
|
|
5876
|
-
/* @__PURE__ */
|
|
5877
|
-
network.disabled && /* @__PURE__ */
|
|
6283
|
+
network.disabled ? /* @__PURE__ */ React75.createElement(Warning_default, { width: 25, height: 25 }) : /* @__PURE__ */ React75.createElement(ChainIcon, { symbol: network.shortName }),
|
|
6284
|
+
/* @__PURE__ */ React75.createElement("p", null, network.name),
|
|
6285
|
+
network.disabled && /* @__PURE__ */ React75.createElement("span", { className: "tooltip" }, "Temporarily unavailable")
|
|
5878
6286
|
))
|
|
5879
6287
|
),
|
|
5880
|
-
/* @__PURE__ */
|
|
6288
|
+
!shouldLockSourceNetwork && /* @__PURE__ */ React75.createElement("div", { className: `dropdown-icon ${collapsed ? "toggled" : "collapsed"}` }, /* @__PURE__ */ React75.createElement(Arrow_default, { fill: "none" }))
|
|
5881
6289
|
);
|
|
5882
6290
|
};
|
|
5883
|
-
var NetworkSelector_default =
|
|
6291
|
+
var NetworkSelector_default = React75.memo(NetworkSelector);
|
|
5884
6292
|
|
|
5885
6293
|
// src/components/reusable/SingleForm.tsx
|
|
5886
6294
|
import { parseUnits as parseUnits2 } from "viem";
|
|
@@ -6000,6 +6408,7 @@ var SingleForm = ({
|
|
|
6000
6408
|
const theme = useSelector35(selectTheme);
|
|
6001
6409
|
const feeDeduct = useSelector35(selectFeeDeduct);
|
|
6002
6410
|
const { totalFee } = useSelector35(selectServiceFee);
|
|
6411
|
+
const dAppOption = useSelector35(selectDappOption);
|
|
6003
6412
|
const compliantOption = useSelector35(selectCompliantOption);
|
|
6004
6413
|
const targetCompliant = useSelector35(selectTargetCompliant);
|
|
6005
6414
|
const sourceAddress = useSelector35(selectSourceAddress);
|
|
@@ -6087,9 +6496,12 @@ var SingleForm = ({
|
|
|
6087
6496
|
dispatch(setAmount(truncated));
|
|
6088
6497
|
};
|
|
6089
6498
|
const isConnected = useMemo14(() => {
|
|
6499
|
+
if (mode === "payment" /* payment */ && dAppOption !== "none" /* None */) {
|
|
6500
|
+
return isReady;
|
|
6501
|
+
}
|
|
6090
6502
|
return isReady && !initialSelection.sourceSelection;
|
|
6091
|
-
}, [isReady, initialSelection]);
|
|
6092
|
-
return /* @__PURE__ */
|
|
6503
|
+
}, [isReady, initialSelection, mode, dAppOption]);
|
|
6504
|
+
return /* @__PURE__ */ React76.createElement("div", { className: "single-form" }, /* @__PURE__ */ React76.createElement("div", { className: "form-item" }, /* @__PURE__ */ React76.createElement("span", { className: "label" }, dAppOption === "none" /* None */ && "Source", " Network:"), /* @__PURE__ */ React76.createElement("div", { className: "items" }, /* @__PURE__ */ React76.createElement(
|
|
6093
6505
|
NetworkSelector_default,
|
|
6094
6506
|
{
|
|
6095
6507
|
type: "origin",
|
|
@@ -6098,20 +6510,20 @@ var SingleForm = ({
|
|
|
6098
6510
|
setInitialSelection
|
|
6099
6511
|
}
|
|
6100
6512
|
}
|
|
6101
|
-
), /* @__PURE__ */
|
|
6513
|
+
), /* @__PURE__ */ React76.createElement(CoinDropdown_default, null))), /* @__PURE__ */ React76.createElement(
|
|
6102
6514
|
"div",
|
|
6103
6515
|
{
|
|
6104
6516
|
className: `dynamic-area ${sourceNetwork.shortName === "FIAT" /* FIAT */ ? "reverse" : "1"}`
|
|
6105
6517
|
},
|
|
6106
|
-
sourceNetwork.compatibility !== "CC" /* CC */ && /* @__PURE__ */
|
|
6518
|
+
sourceNetwork.compatibility !== "CC" /* CC */ && /* @__PURE__ */ React76.createElement(
|
|
6107
6519
|
"div",
|
|
6108
6520
|
{
|
|
6109
6521
|
className: `form-item wallet-button-item ${isConnected && "connected"}`
|
|
6110
6522
|
},
|
|
6111
|
-
/* @__PURE__ */
|
|
6112
|
-
/* @__PURE__ */
|
|
6523
|
+
/* @__PURE__ */ React76.createElement("span", { className: "label" }, "Wallet:"),
|
|
6524
|
+
/* @__PURE__ */ React76.createElement(WalletButton_default, { initialSelection: initialSelection.sourceSelection })
|
|
6113
6525
|
),
|
|
6114
|
-
mode !== "payment" /* payment */ && /* @__PURE__ */
|
|
6526
|
+
mode !== "payment" /* payment */ && /* @__PURE__ */ React76.createElement("div", { className: "form-item" }, /* @__PURE__ */ React76.createElement("span", { className: "label" }, "Target Network:"), /* @__PURE__ */ React76.createElement("div", { className: "items" }, /* @__PURE__ */ React76.createElement(
|
|
6115
6527
|
NetworkSelector_default,
|
|
6116
6528
|
{
|
|
6117
6529
|
type: "target",
|
|
@@ -6120,38 +6532,39 @@ var SingleForm = ({
|
|
|
6120
6532
|
setInitialSelection
|
|
6121
6533
|
}
|
|
6122
6534
|
}
|
|
6123
|
-
), /* @__PURE__ */
|
|
6124
|
-
), mode === "bridge" /* bridge */ && sourceNetwork.shortName !== "FIAT" /* FIAT */ ? targetNetwork.shortName === "FIAT" /* FIAT */ ? /* @__PURE__ */
|
|
6535
|
+
), /* @__PURE__ */ React76.createElement(CoinDropdown_default, { isSourceChain: false })))
|
|
6536
|
+
), mode === "bridge" /* bridge */ && sourceNetwork.shortName !== "FIAT" /* FIAT */ ? targetNetwork.shortName === "FIAT" /* FIAT */ ? /* @__PURE__ */ React76.createElement(BankInput_default, null) : /* @__PURE__ */ React76.createElement("div", { className: `form-item ${theme.colorMode}` }, /* @__PURE__ */ React76.createElement("span", { className: "label" }, "Target Address:"), /* @__PURE__ */ React76.createElement(
|
|
6125
6537
|
AddressInput_default,
|
|
6126
6538
|
{
|
|
6127
6539
|
theme: theme.colorMode,
|
|
6128
6540
|
placeholder: "Target address",
|
|
6129
6541
|
initialSelection
|
|
6130
6542
|
}
|
|
6131
|
-
)) : null, mode === "light" /* light */ && /* @__PURE__ */
|
|
6543
|
+
)) : null, mode === "light" /* light */ && /* @__PURE__ */ React76.createElement(
|
|
6132
6544
|
"div",
|
|
6133
6545
|
{
|
|
6134
6546
|
className: `form-item wallet-button-item ${!initialSelection.targetSelection && "connected"}`,
|
|
6135
6547
|
style: { display: "flex", alignItems: "center" }
|
|
6136
6548
|
},
|
|
6137
|
-
/* @__PURE__ */
|
|
6138
|
-
/* @__PURE__ */
|
|
6549
|
+
/* @__PURE__ */ React76.createElement("span", { className: "label" }, "Target Wallet:"),
|
|
6550
|
+
/* @__PURE__ */ React76.createElement(
|
|
6139
6551
|
WalletButton_default,
|
|
6140
6552
|
{
|
|
6141
6553
|
initialSelection: initialSelection.targetSelection,
|
|
6142
6554
|
placeholder: true
|
|
6143
6555
|
}
|
|
6144
6556
|
)
|
|
6145
|
-
),
|
|
6557
|
+
), /* @__PURE__ */ React76.createElement("div", { className: `form-item ${theme.colorMode}` }, /* @__PURE__ */ React76.createElement("span", { className: "label" }, "Amount:"), /* @__PURE__ */ React76.createElement("div", { className: `amount-label-container items ${theme.colorMode}` }, /* @__PURE__ */ React76.createElement(
|
|
6146
6558
|
"input",
|
|
6147
6559
|
{
|
|
6148
6560
|
className: `${theme.colorMode}`,
|
|
6149
6561
|
type: "text",
|
|
6150
6562
|
placeholder: "Enter amount",
|
|
6151
6563
|
value: amountValue || "",
|
|
6152
|
-
onChange: (e) => onAmountChange(e.target.value)
|
|
6564
|
+
onChange: (e) => onAmountChange(e.target.value),
|
|
6565
|
+
disabled: mode === "payment" /* payment */
|
|
6153
6566
|
}
|
|
6154
|
-
), /* @__PURE__ */
|
|
6567
|
+
), /* @__PURE__ */ React76.createElement("div", { className: "max-disclaimer" }, sourceNetwork.shortName !== "CC" && mode !== "payment" /* payment */ && /* @__PURE__ */ React76.createElement("span", { className: "max-button", onClick: onMaxClick }, "Max"), +totalFee !== -1 && dAppOption === "none" /* None */ && !initialSelection.sourceSelection && !initialSelection.targetSelection && /* @__PURE__ */ React76.createElement("p", { className: "fee-amount" }, "Est fees:", " ", /* @__PURE__ */ React76.createElement("span", { className: `${isLoadingFees ? "loading" : ""}` }, " ", isLoadingFees ? "" : `$ ${formatBigInt(totalFee)} ${feeCurrency}`))))));
|
|
6155
6568
|
};
|
|
6156
6569
|
var SingleForm_default = SingleForm;
|
|
6157
6570
|
|
|
@@ -6200,11 +6613,11 @@ function useAllowance2({
|
|
|
6200
6613
|
import { toast as toast5, Toaster as Toaster2 } from "react-hot-toast";
|
|
6201
6614
|
|
|
6202
6615
|
// plugins/solana/components/SolanaWalletConnectModal.tsx
|
|
6203
|
-
import
|
|
6616
|
+
import React79 from "react";
|
|
6204
6617
|
import { useDispatch as useDispatch20, useSelector as useSelector38 } from "react-redux";
|
|
6205
6618
|
|
|
6206
6619
|
// plugins/solana/components/SolanaWalletSelect.tsx
|
|
6207
|
-
import
|
|
6620
|
+
import React77, { useCallback as useCallback2, useEffect as useEffect18, useMemo as useMemo15, useRef as useRef5 } from "react";
|
|
6208
6621
|
import { useDispatch as useDispatch18, useSelector as useSelector36 } from "react-redux";
|
|
6209
6622
|
import { useWallet as useWallet7 } from "@solana/wallet-adapter-react";
|
|
6210
6623
|
import { WalletReadyState } from "@solana/wallet-adapter-base";
|
|
@@ -6278,28 +6691,28 @@ var SolanaWalletSelect = () => {
|
|
|
6278
6691
|
}
|
|
6279
6692
|
dispatch(setSolanaConnectModal(false));
|
|
6280
6693
|
}, [wallet, sourceChain]);
|
|
6281
|
-
return /* @__PURE__ */
|
|
6694
|
+
return /* @__PURE__ */ React77.createElement("div", { className: `wallet-select` }, /* @__PURE__ */ React77.createElement("div", { className: "slide-area hide-scrollbar", ref: sliderRef }, /* @__PURE__ */ React77.createElement("div", { className: "wallet-container" }, detected.map((wallet2, index) => /* @__PURE__ */ React77.createElement(
|
|
6282
6695
|
"div",
|
|
6283
6696
|
{
|
|
6284
6697
|
className: `card-item ${theme.colorMode}`,
|
|
6285
6698
|
onClick: () => handleWalletClick(wallet2.adapter.name),
|
|
6286
6699
|
key: `${wallet2.adapter.name}-${index}`
|
|
6287
6700
|
},
|
|
6288
|
-
/* @__PURE__ */
|
|
6289
|
-
)), undetected.map((wallet2, index) => /* @__PURE__ */
|
|
6701
|
+
/* @__PURE__ */ React77.createElement("div", { className: "wallet-item" }, /* @__PURE__ */ React77.createElement("img", { src: wallet2.adapter.icon, alt: wallet2.adapter.name }), /* @__PURE__ */ React77.createElement("span", null, wallet2.adapter.name))
|
|
6702
|
+
)), undetected.map((wallet2, index) => /* @__PURE__ */ React77.createElement(
|
|
6290
6703
|
ExternalLink_default,
|
|
6291
6704
|
{
|
|
6292
6705
|
to: wallet2.adapter.url,
|
|
6293
6706
|
className: `card-item ${theme.colorMode}`,
|
|
6294
6707
|
key: `${wallet2.adapter.name}-${index}`
|
|
6295
6708
|
},
|
|
6296
|
-
/* @__PURE__ */
|
|
6709
|
+
/* @__PURE__ */ React77.createElement("div", { className: "wallet-item" }, /* @__PURE__ */ React77.createElement("img", { src: wallet2.adapter.icon, alt: wallet2.adapter.name }), /* @__PURE__ */ React77.createElement("span", null, "Install ", wallet2.adapter.name))
|
|
6297
6710
|
)))));
|
|
6298
6711
|
};
|
|
6299
6712
|
var SolanaWalletSelect_default = SolanaWalletSelect;
|
|
6300
6713
|
|
|
6301
6714
|
// plugins/solana/components/AccountDetailsModal.tsx
|
|
6302
|
-
import
|
|
6715
|
+
import React78, { useMemo as useMemo16 } from "react";
|
|
6303
6716
|
import { useDispatch as useDispatch19, useSelector as useSelector37 } from "react-redux";
|
|
6304
6717
|
import { useWallet as useSolanaWallet3 } from "@solana/wallet-adapter-react";
|
|
6305
6718
|
var AccountDetailsModal = () => {
|
|
@@ -6320,25 +6733,25 @@ var AccountDetailsModal = () => {
|
|
|
6320
6733
|
dispatch(setAccountDetailsModal(false));
|
|
6321
6734
|
};
|
|
6322
6735
|
if (sourceChain.shortName !== "SOL") return;
|
|
6323
|
-
return /* @__PURE__ */
|
|
6736
|
+
return /* @__PURE__ */ React78.createElement(
|
|
6324
6737
|
"div",
|
|
6325
6738
|
{
|
|
6326
6739
|
className: `kima-modal ${theme.colorMode} ${accountDetailsModal && "open"}`
|
|
6327
6740
|
},
|
|
6328
|
-
/* @__PURE__ */
|
|
6329
|
-
/* @__PURE__ */
|
|
6741
|
+
/* @__PURE__ */ React78.createElement("div", { className: "modal-overlay" }),
|
|
6742
|
+
/* @__PURE__ */ React78.createElement("div", { className: `modal-content-container ${theme.colorMode}` }, /* @__PURE__ */ React78.createElement("div", { className: "kima-card-header" }, /* @__PURE__ */ React78.createElement("div", { className: "topbar" }, /* @__PURE__ */ React78.createElement("div", { className: "title" }, /* @__PURE__ */ React78.createElement("h3", null, "Account Details")), /* @__PURE__ */ React78.createElement("div", { className: "control-buttons" }, /* @__PURE__ */ React78.createElement(
|
|
6330
6743
|
"button",
|
|
6331
6744
|
{
|
|
6332
6745
|
className: "cross-icon-button",
|
|
6333
6746
|
onClick: () => dispatch(setAccountDetailsModal(false))
|
|
6334
6747
|
},
|
|
6335
|
-
/* @__PURE__ */
|
|
6748
|
+
/* @__PURE__ */ React78.createElement(
|
|
6336
6749
|
Cross_default,
|
|
6337
6750
|
{
|
|
6338
6751
|
fill: theme.colorMode === "light" ? "black" : "white"
|
|
6339
6752
|
}
|
|
6340
6753
|
)
|
|
6341
|
-
)))), /* @__PURE__ */
|
|
6754
|
+
)))), /* @__PURE__ */ React78.createElement("div", { className: "modal-content" }, /* @__PURE__ */ React78.createElement("div", { className: "summary" }, networkDetails && /* @__PURE__ */ React78.createElement(networkDetails.icon, { width: 60, height: 60 }), /* @__PURE__ */ React78.createElement("div", { className: "address" }, /* @__PURE__ */ React78.createElement("h2", null, getShortenedAddress(walletAddress || "")), /* @__PURE__ */ React78.createElement(CopyButton_default, { text: walletAddress })), /* @__PURE__ */ React78.createElement("h3", null, formatterFloat.format(Number(solBalance)), " $SOL")), /* @__PURE__ */ React78.createElement(SecondaryButton_default, { className: "block-explorer" }, /* @__PURE__ */ React78.createElement(ExternalLink_default, { className: "link", to: explorerUrl }, /* @__PURE__ */ React78.createElement(Explorer_default, { fill: "#778DA3" }), /* @__PURE__ */ React78.createElement("p", null, "Block explorer"), /* @__PURE__ */ React78.createElement(ExternalUrl_default, { fill: "#778DA3" }))), /* @__PURE__ */ React78.createElement(PrimaryButton_default, { clickHandler: handleDisconnect }, "Discconect")))
|
|
6342
6755
|
);
|
|
6343
6756
|
};
|
|
6344
6757
|
var AccountDetailsModal_default = AccountDetailsModal;
|
|
@@ -6348,18 +6761,18 @@ var SolanaWalletConnectModal = () => {
|
|
|
6348
6761
|
const dispatch = useDispatch20();
|
|
6349
6762
|
const theme = useSelector38(selectTheme);
|
|
6350
6763
|
const connectModal = useSelector38(selectSolanaConnectModal);
|
|
6351
|
-
return /* @__PURE__ */
|
|
6764
|
+
return /* @__PURE__ */ React79.createElement("div", null, /* @__PURE__ */ React79.createElement(AccountDetailsModal_default, null), /* @__PURE__ */ React79.createElement(
|
|
6352
6765
|
"div",
|
|
6353
6766
|
{
|
|
6354
6767
|
className: `kima-modal wallet-connect ${connectModal ? "open" : ""}`
|
|
6355
6768
|
},
|
|
6356
|
-
/* @__PURE__ */
|
|
6769
|
+
/* @__PURE__ */ React79.createElement("div", { className: `modal-content-container ${theme.colorMode}` }, /* @__PURE__ */ React79.createElement("div", { className: "kima-card-header" }, /* @__PURE__ */ React79.createElement("div", { className: "topbar" }, /* @__PURE__ */ React79.createElement("div", { className: "title" }, /* @__PURE__ */ React79.createElement("h3", null, "Connect Wallet")), /* @__PURE__ */ React79.createElement("div", { className: "control-buttons" }, /* @__PURE__ */ React79.createElement(
|
|
6357
6770
|
"button",
|
|
6358
6771
|
{
|
|
6359
6772
|
className: "cross-icon-button",
|
|
6360
6773
|
onClick: () => dispatch(setSolanaConnectModal(false))
|
|
6361
6774
|
},
|
|
6362
|
-
/* @__PURE__ */
|
|
6775
|
+
/* @__PURE__ */ React79.createElement(
|
|
6363
6776
|
Cross_default,
|
|
6364
6777
|
{
|
|
6365
6778
|
width: 30,
|
|
@@ -6367,17 +6780,17 @@ var SolanaWalletConnectModal = () => {
|
|
|
6367
6780
|
fill: theme.colorMode === "light" ? "black" : "white"
|
|
6368
6781
|
}
|
|
6369
6782
|
)
|
|
6370
|
-
)))), /* @__PURE__ */
|
|
6783
|
+
)))), /* @__PURE__ */ React79.createElement("div", { className: "modal-content" }, /* @__PURE__ */ React79.createElement(SolanaWalletSelect_default, null)))
|
|
6371
6784
|
));
|
|
6372
6785
|
};
|
|
6373
6786
|
var SolanaWalletConnectModal_default = SolanaWalletConnectModal;
|
|
6374
6787
|
|
|
6375
6788
|
// plugins/tron/components/TronWalletConnectModal.tsx
|
|
6376
|
-
import
|
|
6789
|
+
import React82 from "react";
|
|
6377
6790
|
import { useDispatch as useDispatch23, useSelector as useSelector41 } from "react-redux";
|
|
6378
6791
|
|
|
6379
6792
|
// plugins/tron/components/AccountDetailsModal.tsx
|
|
6380
|
-
import
|
|
6793
|
+
import React80, { useMemo as useMemo17 } from "react";
|
|
6381
6794
|
import { useDispatch as useDispatch21, useSelector as useSelector39 } from "react-redux";
|
|
6382
6795
|
import { useWallet as useTronWallet3 } from "@tronweb3/tronwallet-adapter-react-hooks";
|
|
6383
6796
|
var AccountDetailsModal2 = () => {
|
|
@@ -6402,31 +6815,31 @@ var AccountDetailsModal2 = () => {
|
|
|
6402
6815
|
dispatch(setAccountDetailsModal(false));
|
|
6403
6816
|
};
|
|
6404
6817
|
if (sourcheChain.shortName !== "TRX") return;
|
|
6405
|
-
return /* @__PURE__ */
|
|
6818
|
+
return /* @__PURE__ */ React80.createElement(
|
|
6406
6819
|
"div",
|
|
6407
6820
|
{
|
|
6408
6821
|
className: `kima-modal ${theme.colorMode} ${accountDetailsModal && "open"}`
|
|
6409
6822
|
},
|
|
6410
|
-
/* @__PURE__ */
|
|
6411
|
-
/* @__PURE__ */
|
|
6823
|
+
/* @__PURE__ */ React80.createElement("div", { className: "modal-overlay" }),
|
|
6824
|
+
/* @__PURE__ */ React80.createElement("div", { className: `modal-content-container ${theme.colorMode}` }, /* @__PURE__ */ React80.createElement("div", { className: "kima-card-header" }, /* @__PURE__ */ React80.createElement("div", { className: "topbar" }, /* @__PURE__ */ React80.createElement("div", { className: "title" }, /* @__PURE__ */ React80.createElement("h3", null, "Account Details")), /* @__PURE__ */ React80.createElement("div", { className: "control-buttons" }, /* @__PURE__ */ React80.createElement(
|
|
6412
6825
|
"button",
|
|
6413
6826
|
{
|
|
6414
6827
|
className: "cross-icon-button",
|
|
6415
6828
|
onClick: () => dispatch(setAccountDetailsModal(false))
|
|
6416
6829
|
},
|
|
6417
|
-
/* @__PURE__ */
|
|
6830
|
+
/* @__PURE__ */ React80.createElement(
|
|
6418
6831
|
Cross_default,
|
|
6419
6832
|
{
|
|
6420
6833
|
fill: theme.colorMode === "light" ? "black" : "white"
|
|
6421
6834
|
}
|
|
6422
6835
|
)
|
|
6423
|
-
)))), /* @__PURE__ */
|
|
6836
|
+
)))), /* @__PURE__ */ React80.createElement("div", { className: "modal-content" }, /* @__PURE__ */ React80.createElement("div", { className: "summary" }, networkDetails && /* @__PURE__ */ React80.createElement(networkDetails.icon, { width: 60, height: 60 }), /* @__PURE__ */ React80.createElement("div", { className: "address" }, /* @__PURE__ */ React80.createElement("h2", null, getShortenedAddress(connectedAddress || "")), /* @__PURE__ */ React80.createElement(CopyButton_default, { text: connectedAddress })), /* @__PURE__ */ React80.createElement("h3", null, formatterFloat.format(Number(tronBalance)), " ", selectedNetwork.shortName)), /* @__PURE__ */ React80.createElement(SecondaryButton_default, { className: "block-explorer" }, /* @__PURE__ */ React80.createElement(ExternalLink_default, { className: "link", to: explorerUrl }, /* @__PURE__ */ React80.createElement(Explorer_default, { fill: "#778DA3" }), /* @__PURE__ */ React80.createElement("p", null, "Block explorer"), /* @__PURE__ */ React80.createElement(ExternalUrl_default, { fill: "#778DA3" }))), /* @__PURE__ */ React80.createElement(PrimaryButton_default, { clickHandler: handleDisconnect }, "Disconnect")))
|
|
6424
6837
|
);
|
|
6425
6838
|
};
|
|
6426
6839
|
var AccountDetailsModal_default2 = AccountDetailsModal2;
|
|
6427
6840
|
|
|
6428
6841
|
// plugins/tron/components/TronWalletSelect.tsx
|
|
6429
|
-
import
|
|
6842
|
+
import React81, { useEffect as useEffect19, useMemo as useMemo18, useRef as useRef6 } from "react";
|
|
6430
6843
|
import { useDispatch as useDispatch22, useSelector as useSelector40 } from "react-redux";
|
|
6431
6844
|
import { useWallet as useWallet8 } from "@tronweb3/tronwallet-adapter-react-hooks";
|
|
6432
6845
|
import { AdapterState } from "@tronweb3/tronwallet-abstract-adapter";
|
|
@@ -6485,22 +6898,22 @@ var TronWalletSelect = () => {
|
|
|
6485
6898
|
const connectWallet = async (walletName) => {
|
|
6486
6899
|
currentWallet?.adapter.name === walletName ? await connect() : select(walletName);
|
|
6487
6900
|
};
|
|
6488
|
-
return /* @__PURE__ */
|
|
6901
|
+
return /* @__PURE__ */ React81.createElement("div", { className: `wallet-select` }, /* @__PURE__ */ React81.createElement("div", { className: "slide-area hide-scrollbar", ref: sliderRef }, /* @__PURE__ */ React81.createElement("div", { className: "wallet-container" }, detected.map((wallet, index) => /* @__PURE__ */ React81.createElement(
|
|
6489
6902
|
"div",
|
|
6490
6903
|
{
|
|
6491
6904
|
className: `card-item ${theme.colorMode}`,
|
|
6492
6905
|
onClick: () => connectWallet(wallet.adapter.name),
|
|
6493
6906
|
key: `${wallet.adapter.name}-${index}`
|
|
6494
6907
|
},
|
|
6495
|
-
/* @__PURE__ */
|
|
6496
|
-
)), undetected.map((wallet, index) => /* @__PURE__ */
|
|
6908
|
+
/* @__PURE__ */ React81.createElement("div", { className: "wallet-item" }, /* @__PURE__ */ React81.createElement("img", { src: wallet.adapter.icon, alt: wallet.adapter.name }), /* @__PURE__ */ React81.createElement("span", null, wallet.adapter.name))
|
|
6909
|
+
)), undetected.map((wallet, index) => /* @__PURE__ */ React81.createElement(
|
|
6497
6910
|
ExternalLink_default,
|
|
6498
6911
|
{
|
|
6499
6912
|
to: wallet.adapter.url,
|
|
6500
6913
|
className: `card-item ${theme.colorMode}`,
|
|
6501
6914
|
key: `${wallet.adapter.name}-${index}`
|
|
6502
6915
|
},
|
|
6503
|
-
/* @__PURE__ */
|
|
6916
|
+
/* @__PURE__ */ React81.createElement("div", { className: "wallet-item" }, /* @__PURE__ */ React81.createElement("img", { src: wallet.adapter.icon, alt: wallet.adapter.name }), /* @__PURE__ */ React81.createElement("span", null, "Install ", wallet.adapter.name))
|
|
6504
6917
|
)))));
|
|
6505
6918
|
};
|
|
6506
6919
|
var TronWalletSelect_default = TronWalletSelect;
|
|
@@ -6510,25 +6923,25 @@ var TronWalletConnectModal = () => {
|
|
|
6510
6923
|
const dispatch = useDispatch23();
|
|
6511
6924
|
const theme = useSelector41(selectTheme);
|
|
6512
6925
|
const connectModal = useSelector41(selectTronConnectModal);
|
|
6513
|
-
return /* @__PURE__ */
|
|
6926
|
+
return /* @__PURE__ */ React82.createElement("div", null, /* @__PURE__ */ React82.createElement(AccountDetailsModal_default2, null), /* @__PURE__ */ React82.createElement(
|
|
6514
6927
|
"div",
|
|
6515
6928
|
{
|
|
6516
6929
|
className: `kima-modal wallet-connect ${theme.colorMode} ${connectModal ? "open" : ""}`
|
|
6517
6930
|
},
|
|
6518
|
-
/* @__PURE__ */
|
|
6519
|
-
/* @__PURE__ */
|
|
6931
|
+
/* @__PURE__ */ React82.createElement("div", { className: "modal-overlay" }),
|
|
6932
|
+
/* @__PURE__ */ React82.createElement("div", { className: `modal-content-container ${theme.colorMode}` }, /* @__PURE__ */ React82.createElement("div", { className: "kima-card-header" }, /* @__PURE__ */ React82.createElement("div", { className: "topbar" }, /* @__PURE__ */ React82.createElement("div", { className: "title" }, /* @__PURE__ */ React82.createElement("h3", null, "Connect Wallet")), /* @__PURE__ */ React82.createElement("div", { className: "control-buttons" }, /* @__PURE__ */ React82.createElement(
|
|
6520
6933
|
"button",
|
|
6521
6934
|
{
|
|
6522
6935
|
className: "icon-button",
|
|
6523
6936
|
onClick: () => dispatch(setTronConnectModal(false))
|
|
6524
6937
|
},
|
|
6525
|
-
/* @__PURE__ */
|
|
6938
|
+
/* @__PURE__ */ React82.createElement(
|
|
6526
6939
|
Cross_default,
|
|
6527
6940
|
{
|
|
6528
6941
|
fill: theme.colorMode === "light" ? "black" : "white"
|
|
6529
6942
|
}
|
|
6530
6943
|
)
|
|
6531
|
-
)))), /* @__PURE__ */
|
|
6944
|
+
)))), /* @__PURE__ */ React82.createElement("div", { className: "modal-content" }, /* @__PURE__ */ React82.createElement(TronWalletSelect_default, null)))
|
|
6532
6945
|
));
|
|
6533
6946
|
};
|
|
6534
6947
|
var TronWalletConnectModal_default = TronWalletConnectModal;
|
|
@@ -6622,7 +7035,7 @@ var useValidateTransaction = (inputs) => {
|
|
|
6622
7035
|
};
|
|
6623
7036
|
}
|
|
6624
7037
|
if (compliantOption) {
|
|
6625
|
-
if (!sourceCompliant?.isCompliant) {
|
|
7038
|
+
if (!sourceCompliant?.isCompliant && sourceChain !== "CC") {
|
|
6626
7039
|
return {
|
|
6627
7040
|
error: "ValidationError" /* Error */,
|
|
6628
7041
|
message: "Source address compliance check failed"
|
|
@@ -6680,8 +7093,7 @@ var useValidateTransaction_default = useValidateTransaction;
|
|
|
6680
7093
|
// src/hooks/useSubmitTransaction.tsx
|
|
6681
7094
|
import { useDispatch as useDispatch24, useSelector as useSelector43 } from "react-redux";
|
|
6682
7095
|
import { useMutation } from "@tanstack/react-query";
|
|
6683
|
-
|
|
6684
|
-
var useSubmitTransaction = () => {
|
|
7096
|
+
var useSubmitTransaction = (isSubmitting, setIsSubmitting) => {
|
|
6685
7097
|
const dispatch = useDispatch24();
|
|
6686
7098
|
const backendUrl = useSelector43(selectBackendUrl);
|
|
6687
7099
|
const mode = useSelector43(selectMode);
|
|
@@ -6690,7 +7102,6 @@ var useSubmitTransaction = () => {
|
|
|
6690
7102
|
const txValues = feeDeduct ? transactionValues.feeFromTarget : transactionValues.feeFromOrigin;
|
|
6691
7103
|
const ccTransactionIdSeed = useSelector43(selectCCTransactionIdSeed);
|
|
6692
7104
|
const submitted = useSelector43(selectSubmitted);
|
|
6693
|
-
const [isSubmitting, setIsSubmitting] = useState14(false);
|
|
6694
7105
|
const mutation = useMutation({
|
|
6695
7106
|
mutationFn: async (signature) => {
|
|
6696
7107
|
setIsSubmitting(true);
|
|
@@ -6789,6 +7200,8 @@ var getCompliance = async (walletAddress, compliantOption, backendUrl) => {
|
|
|
6789
7200
|
|
|
6790
7201
|
// src/hooks/useComplianceCheck.tsx
|
|
6791
7202
|
var useComplianceCheck = (walletAddress, compliantOption, backendUrl) => {
|
|
7203
|
+
const enabled = !!walletAddress && walletAddress.length >= 34 && // debounce for a minimum of characters (tron length)
|
|
7204
|
+
!!compliantOption && compliantOption && !!backendUrl;
|
|
6792
7205
|
const {
|
|
6793
7206
|
data: complianceData,
|
|
6794
7207
|
error,
|
|
@@ -6798,9 +7211,7 @@ var useComplianceCheck = (walletAddress, compliantOption, backendUrl) => {
|
|
|
6798
7211
|
queryFn: async () => {
|
|
6799
7212
|
return await getCompliance(walletAddress, compliantOption, backendUrl);
|
|
6800
7213
|
},
|
|
6801
|
-
enabled
|
|
6802
|
-
!!compliantOption && compliantOption && !!backendUrl,
|
|
6803
|
-
// Only fetch when valid inputs exist
|
|
7214
|
+
enabled,
|
|
6804
7215
|
retry: 1
|
|
6805
7216
|
// Retry once on failure
|
|
6806
7217
|
});
|
|
@@ -6845,7 +7256,7 @@ function useDisconnectWallet5() {
|
|
|
6845
7256
|
}
|
|
6846
7257
|
|
|
6847
7258
|
// src/components/reusable/WarningModal.tsx
|
|
6848
|
-
import
|
|
7259
|
+
import React83 from "react";
|
|
6849
7260
|
var WarningModal = ({
|
|
6850
7261
|
message,
|
|
6851
7262
|
cancelButtonText = "Cancel",
|
|
@@ -6853,14 +7264,14 @@ var WarningModal = ({
|
|
|
6853
7264
|
onAcknowledge,
|
|
6854
7265
|
onCancel
|
|
6855
7266
|
}) => {
|
|
6856
|
-
return /* @__PURE__ */
|
|
7267
|
+
return /* @__PURE__ */ React83.createElement("div", { className: "warning-modal-overlay" }, /* @__PURE__ */ React83.createElement("div", { className: "warning-modal" }, /* @__PURE__ */ React83.createElement("h3", null, "Warning"), /* @__PURE__ */ React83.createElement("p", null, message), /* @__PURE__ */ React83.createElement("div", { className: "warning-modal-buttons" }, /* @__PURE__ */ React83.createElement(
|
|
6857
7268
|
SecondaryButton_default,
|
|
6858
7269
|
{
|
|
6859
7270
|
className: "warning-modal-cancel",
|
|
6860
7271
|
clickHandler: onCancel
|
|
6861
7272
|
},
|
|
6862
7273
|
cancelButtonText
|
|
6863
|
-
), /* @__PURE__ */
|
|
7274
|
+
), /* @__PURE__ */ React83.createElement(
|
|
6864
7275
|
PrimaryButton_default,
|
|
6865
7276
|
{
|
|
6866
7277
|
className: "warning-modal-acknowledge",
|
|
@@ -6872,7 +7283,7 @@ var WarningModal = ({
|
|
|
6872
7283
|
var WarningModal_default = WarningModal;
|
|
6873
7284
|
|
|
6874
7285
|
// src/components/reusable/CCWidget.tsx
|
|
6875
|
-
import
|
|
7286
|
+
import React84, { useEffect as useEffect20, useMemo as useMemo20, useRef as useRef7, useState as useState14 } from "react";
|
|
6876
7287
|
import { useSelector as useSelector44, useDispatch as useDispatch25 } from "react-redux";
|
|
6877
7288
|
import { v4 as uuidv4 } from "uuid";
|
|
6878
7289
|
|
|
@@ -6929,7 +7340,7 @@ var CCWidget = ({ submitCallback }) => {
|
|
|
6929
7340
|
() => formatBigInt(txValues.allowanceAmount),
|
|
6930
7341
|
[txValues]
|
|
6931
7342
|
);
|
|
6932
|
-
const [isLoading, setIsLoading] =
|
|
7343
|
+
const [isLoading, setIsLoading] = useState14(true);
|
|
6933
7344
|
const baseUrl = useMemo20(
|
|
6934
7345
|
() => `https://widget${networkOption === "testnet" /* testnet */ ? "-sandbox" : ""}.depasify.com`,
|
|
6935
7346
|
[networkOption]
|
|
@@ -6958,7 +7369,7 @@ var CCWidget = ({ submitCallback }) => {
|
|
|
6958
7369
|
useEffect20(() => {
|
|
6959
7370
|
if (error) dispatch(setCCTransactionStatus("error-id"));
|
|
6960
7371
|
}, [dispatch, error]);
|
|
6961
|
-
return /* @__PURE__ */
|
|
7372
|
+
return /* @__PURE__ */ React84.createElement("div", { className: `cc-widget ${isLoading ? "loading" : ""}` }, (isLoading || isTransactionIdLoading || isEnvLoading || ccTransactionStatus === "success") && /* @__PURE__ */ React84.createElement("div", { className: "cc-widget-loader" }, /* @__PURE__ */ React84.createElement(ring_default, { width: 50, height: 50, fill: "#86b8ce" })), /* @__PURE__ */ React84.createElement(
|
|
6962
7373
|
"iframe",
|
|
6963
7374
|
{
|
|
6964
7375
|
width: isLoading || isTransactionIdLoading || ccTransactionStatus === "success" || error ? 0 : "100%",
|
|
@@ -6988,10 +7399,11 @@ var TransferWidget = ({
|
|
|
6988
7399
|
}) => {
|
|
6989
7400
|
const dispatch = useDispatch26();
|
|
6990
7401
|
const mainRef = useRef8(null);
|
|
6991
|
-
const [signature, setSignature2] =
|
|
6992
|
-
const [
|
|
6993
|
-
const [
|
|
6994
|
-
const [
|
|
7402
|
+
const [signature, setSignature2] = useState15("");
|
|
7403
|
+
const [isSubmitting, setIsSubmitting] = useState15(false);
|
|
7404
|
+
const [formStep, setFormStep] = useState15(0);
|
|
7405
|
+
const [warningModalOpen, setWarningModalOpen] = useState15(null);
|
|
7406
|
+
const [resetModalOpen, setResetModalOpen] = useState15(false);
|
|
6995
7407
|
const networkOption = useSelector45(selectNetworkOption);
|
|
6996
7408
|
const dAppOption = useSelector45(selectDappOption);
|
|
6997
7409
|
const mode = useSelector45(selectMode);
|
|
@@ -7010,11 +7422,11 @@ var TransferWidget = ({
|
|
|
7010
7422
|
const feeDeduct = useSelector45(selectFeeDeduct);
|
|
7011
7423
|
const txValues = feeDeduct ? transactionValues.feeFromTarget : transactionValues.feeFromOrigin;
|
|
7012
7424
|
const { keplrHandler, closeHandler } = useKimaContext();
|
|
7013
|
-
const [isCancellingApprove, setCancellingApprove] =
|
|
7014
|
-
const [isApproving, setApproving] =
|
|
7015
|
-
const [isSigning, setSigning] =
|
|
7016
|
-
const [feeOptionDisabled, setFeeOptionDisabled] =
|
|
7017
|
-
const [initialSelection, setInitialSelection] =
|
|
7425
|
+
const [isCancellingApprove, setCancellingApprove] = useState15(false);
|
|
7426
|
+
const [isApproving, setApproving] = useState15(false);
|
|
7427
|
+
const [isSigning, setSigning] = useState15(false);
|
|
7428
|
+
const [feeOptionDisabled, setFeeOptionDisabled] = useState15(false);
|
|
7429
|
+
const [initialSelection, setInitialSelection] = useState15({
|
|
7018
7430
|
sourceSelection: true,
|
|
7019
7431
|
targetSelection: true
|
|
7020
7432
|
});
|
|
@@ -7024,6 +7436,10 @@ var TransferWidget = ({
|
|
|
7024
7436
|
const ccTransactionStatus = useSelector45(selectCCTransactionStatus);
|
|
7025
7437
|
const { width: windowWidth } = useWidth_default();
|
|
7026
7438
|
const { disconnectWallet } = useDisconnectWallet5();
|
|
7439
|
+
const { submitTransaction } = useSubmitTransaction_default(
|
|
7440
|
+
isSubmitting,
|
|
7441
|
+
setIsSubmitting
|
|
7442
|
+
);
|
|
7027
7443
|
const { allowance, balance, isApproved, approve, decimals, signMessage } = useAllowance2({
|
|
7028
7444
|
setApproving,
|
|
7029
7445
|
setCancellingApprove
|
|
@@ -7087,7 +7503,6 @@ var TransferWidget = ({
|
|
|
7087
7503
|
setInitialSelection((prev) => ({ ...prev, targetSelection: false }));
|
|
7088
7504
|
}
|
|
7089
7505
|
}, [fees, mode, transactionOption, dispatch]);
|
|
7090
|
-
const { submitTransaction, isSubmitting } = useSubmitTransaction_default();
|
|
7091
7506
|
const isBackButtonEnabled = useMemo21(() => {
|
|
7092
7507
|
if (formStep !== 0) {
|
|
7093
7508
|
if (sourceChain.shortName === "CC") {
|
|
@@ -7108,21 +7523,22 @@ var TransferWidget = ({
|
|
|
7108
7523
|
try {
|
|
7109
7524
|
await submitTransaction(signature);
|
|
7110
7525
|
} catch (err) {
|
|
7111
|
-
toast5.error("Failed to submit transaction", { icon: /* @__PURE__ */
|
|
7526
|
+
toast5.error("Failed to submit transaction", { icon: /* @__PURE__ */ React85.createElement(Error_default, null) });
|
|
7112
7527
|
dispatch(setCCTransactionStatus("error-generic"));
|
|
7113
7528
|
}
|
|
7114
7529
|
}, [signature, submitTransaction]);
|
|
7115
7530
|
const handleSubmit = async () => {
|
|
7116
7531
|
const { error: error2, message: validationMessage } = validate(true);
|
|
7117
7532
|
if (error2 === "ValidationError" /* Error */) {
|
|
7118
|
-
return toast5.error(validationMessage, { icon: /* @__PURE__ */
|
|
7533
|
+
return toast5.error(validationMessage, { icon: /* @__PURE__ */ React85.createElement(Error_default, null) });
|
|
7119
7534
|
}
|
|
7120
7535
|
if (sourceChain.shortName === "CC") {
|
|
7121
7536
|
dispatch(setCCTransactionStatus("initialized"));
|
|
7122
7537
|
return;
|
|
7123
7538
|
}
|
|
7124
|
-
if (error2 === "ApprovalNeeded" /* ApprovalNeeded */ && mode !== "light" /* light */) {
|
|
7539
|
+
if (error2 === "ApprovalNeeded" /* ApprovalNeeded */ && mode !== "light" /* light */ && dAppOption === "none" /* None */) {
|
|
7125
7540
|
if (!signature) {
|
|
7541
|
+
setApproving(true);
|
|
7126
7542
|
setFeeOptionDisabled(true);
|
|
7127
7543
|
const sig2 = await signMessage?.({
|
|
7128
7544
|
targetAddress,
|
|
@@ -7131,15 +7547,17 @@ var TransferWidget = ({
|
|
|
7131
7547
|
originChain: sourceChain.shortName
|
|
7132
7548
|
});
|
|
7133
7549
|
setSignature2(sig2);
|
|
7550
|
+
setApproving(false);
|
|
7134
7551
|
}
|
|
7135
7552
|
return approve();
|
|
7136
7553
|
}
|
|
7554
|
+
setIsSubmitting(true);
|
|
7137
7555
|
if (dAppOption === "LPDrain" /* LPDrain */ || dAppOption === "LPAdd" /* LPAdd */) {
|
|
7138
|
-
keplrHandler?.(sourceAddress);
|
|
7556
|
+
await keplrHandler?.(sourceAddress);
|
|
7139
7557
|
return;
|
|
7140
7558
|
}
|
|
7141
7559
|
let sig = signature;
|
|
7142
|
-
if (!sig && mode !== "light" /* light */) {
|
|
7560
|
+
if (!sig && mode !== "light" /* light */ && dAppOption === "none" /* None */) {
|
|
7143
7561
|
setFeeOptionDisabled(true);
|
|
7144
7562
|
sig = await signMessage?.({
|
|
7145
7563
|
targetAddress,
|
|
@@ -7164,7 +7582,7 @@ var TransferWidget = ({
|
|
|
7164
7582
|
if (error2 !== "ValidationError" /* Error */ && formStep > 0) {
|
|
7165
7583
|
return handleSubmit();
|
|
7166
7584
|
}
|
|
7167
|
-
toast5.error(validationMessage, { icon: /* @__PURE__ */
|
|
7585
|
+
toast5.error(validationMessage, { icon: /* @__PURE__ */ React85.createElement(Error_default, null) });
|
|
7168
7586
|
mainRef.current?.click();
|
|
7169
7587
|
};
|
|
7170
7588
|
const onBack = () => {
|
|
@@ -7186,9 +7604,9 @@ var TransferWidget = ({
|
|
|
7186
7604
|
return "Next";
|
|
7187
7605
|
}
|
|
7188
7606
|
if (isApproved) {
|
|
7189
|
-
return isSubmitting ? "Submitting..." : "Submit";
|
|
7607
|
+
return isSubmitting ? !signature && dAppOption === "none" /* None */ ? "Signing..." : "Submitting..." : "Submit";
|
|
7190
7608
|
} else {
|
|
7191
|
-
return isApproving ? "Approving..." : "Approve";
|
|
7609
|
+
return isApproving ? !signature && dAppOption === "none" /* None */ ? "Signing..." : "Approving..." : !signature && dAppOption === "none" /* None */ ? "Sign" : "Approve";
|
|
7192
7610
|
}
|
|
7193
7611
|
}
|
|
7194
7612
|
if (isLoadingFees) {
|
|
@@ -7203,7 +7621,6 @@ var TransferWidget = ({
|
|
|
7203
7621
|
};
|
|
7204
7622
|
const resetForm = async () => {
|
|
7205
7623
|
if (isApproving || isSubmitting || isSigning) return;
|
|
7206
|
-
closeHandler && closeHandler(0);
|
|
7207
7624
|
setSignature2("");
|
|
7208
7625
|
setSigning(false);
|
|
7209
7626
|
setFormStep(0);
|
|
@@ -7239,7 +7656,7 @@ var TransferWidget = ({
|
|
|
7239
7656
|
}
|
|
7240
7657
|
await disconnectWallet();
|
|
7241
7658
|
};
|
|
7242
|
-
return /* @__PURE__ */
|
|
7659
|
+
return /* @__PURE__ */ React85.createElement(
|
|
7243
7660
|
"div",
|
|
7244
7661
|
{
|
|
7245
7662
|
className: `kima-card ${theme.colorMode}`,
|
|
@@ -7247,7 +7664,7 @@ var TransferWidget = ({
|
|
|
7247
7664
|
background: theme.colorMode === "light" /* light */ ? theme.backgroundColorLight : theme.backgroundColorDark
|
|
7248
7665
|
}
|
|
7249
7666
|
},
|
|
7250
|
-
resetModalOpen && /* @__PURE__ */
|
|
7667
|
+
resetModalOpen && /* @__PURE__ */ React85.createElement(
|
|
7251
7668
|
WarningModal_default,
|
|
7252
7669
|
{
|
|
7253
7670
|
message: "Are you sure you want to reset the widget?",
|
|
@@ -7259,7 +7676,7 @@ var TransferWidget = ({
|
|
|
7259
7676
|
onCancel: () => setResetModalOpen(false)
|
|
7260
7677
|
}
|
|
7261
7678
|
),
|
|
7262
|
-
warningModalOpen && /* @__PURE__ */
|
|
7679
|
+
warningModalOpen && /* @__PURE__ */ React85.createElement(
|
|
7263
7680
|
WarningModal_default,
|
|
7264
7681
|
{
|
|
7265
7682
|
message: warningModalOpen.message,
|
|
@@ -7273,14 +7690,14 @@ var TransferWidget = ({
|
|
|
7273
7690
|
}
|
|
7274
7691
|
}
|
|
7275
7692
|
),
|
|
7276
|
-
mode === "payment" /* payment */ && !transactionOption && /* @__PURE__ */
|
|
7277
|
-
/* @__PURE__ */
|
|
7693
|
+
mode === "payment" /* payment */ && !transactionOption && /* @__PURE__ */ React85.createElement("h2", { className: "invalid-option-banner" }, "We're unable to process your payment. Please ensure the necessary transaction details are provided. Contact support if the issue persists."),
|
|
7694
|
+
/* @__PURE__ */ React85.createElement("div", { className: "transfer-card" }, /* @__PURE__ */ React85.createElement("div", { className: "kima-card-header" }, /* @__PURE__ */ React85.createElement("div", { className: "topbar" }, /* @__PURE__ */ React85.createElement("div", { className: "title" }, /* @__PURE__ */ React85.createElement("h3", { style: { marginRight: "5px" } }, formStep === 0 ? titleOption?.initialTitle ? titleOption.initialTitle : mode === "payment" /* payment */ ? "New Purchase" : "New Transfer" : titleOption?.confirmTitle ? titleOption.confirmTitle : mode === "payment" /* payment */ ? "Confirm Purchase" : "Transfer Details")), /* @__PURE__ */ React85.createElement("div", { className: "control-buttons" }, pendingTxs > 0 ? /* @__PURE__ */ React85.createElement(TxButton_default, { theme }) : null, /* @__PURE__ */ React85.createElement(
|
|
7278
7695
|
ExternalLink_default,
|
|
7279
7696
|
{
|
|
7280
7697
|
to: helpURL ? helpURL : networkOption === "testnet" /* testnet */ ? "https://docs.kima.network/kima-network/try-kima-with-the-demo-app" : "https://support.kima.network"
|
|
7281
7698
|
},
|
|
7282
|
-
/* @__PURE__ */
|
|
7283
|
-
), sourceChain.shortName === "CC" && formStep > 0 && /* @__PURE__ */
|
|
7699
|
+
/* @__PURE__ */ React85.createElement("div", { className: "menu-button" }, "I need help")
|
|
7700
|
+
), sourceChain.shortName === "CC" && formStep > 0 && /* @__PURE__ */ React85.createElement(ExternalLink_default, { to: "https://docs.kima.network/kima-network/supported-fiat#unsupported-countries-credit-cards" }, /* @__PURE__ */ React85.createElement("div", { className: "menu-button" }, "Unsupported Countries")), formStep === 0 && mode !== "payment" /* payment */ && /* @__PURE__ */ React85.createElement(
|
|
7284
7701
|
"button",
|
|
7285
7702
|
{
|
|
7286
7703
|
className: "reset-button",
|
|
@@ -7288,7 +7705,17 @@ var TransferWidget = ({
|
|
|
7288
7705
|
disabled: isApproving || isSubmitting || isSigning
|
|
7289
7706
|
},
|
|
7290
7707
|
"Reset"
|
|
7291
|
-
)
|
|
7708
|
+
), closeHandler && /* @__PURE__ */ React85.createElement(
|
|
7709
|
+
"button",
|
|
7710
|
+
{
|
|
7711
|
+
className: "cross-icon-button",
|
|
7712
|
+
onClick: () => {
|
|
7713
|
+
resetForm();
|
|
7714
|
+
closeHandler(0);
|
|
7715
|
+
}
|
|
7716
|
+
},
|
|
7717
|
+
/* @__PURE__ */ React85.createElement(Cross_default, null)
|
|
7718
|
+
))), mode === "payment" /* payment */ && paymentTitleOption?.title && /* @__PURE__ */ React85.createElement("h4", { className: "subtitle" }, paymentTitleOption.title)), /* @__PURE__ */ React85.createElement("div", { className: "kima-card-content", ref: mainRef }, formStep === 0 ? /* @__PURE__ */ React85.createElement(
|
|
7292
7719
|
SingleForm_default,
|
|
7293
7720
|
{
|
|
7294
7721
|
...{
|
|
@@ -7301,7 +7728,7 @@ var TransferWidget = ({
|
|
|
7301
7728
|
setInitialSelection
|
|
7302
7729
|
}
|
|
7303
7730
|
}
|
|
7304
|
-
) : ccTransactionStatus !== "idle" ? /* @__PURE__ */
|
|
7731
|
+
) : ccTransactionStatus !== "idle" ? /* @__PURE__ */ React85.createElement(CCWidget_default, { submitCallback: submit }) : /* @__PURE__ */ React85.createElement(
|
|
7305
7732
|
ConfirmDetails_default,
|
|
7306
7733
|
{
|
|
7307
7734
|
...{
|
|
@@ -7309,12 +7736,12 @@ var TransferWidget = ({
|
|
|
7309
7736
|
feeOptionDisabled
|
|
7310
7737
|
}
|
|
7311
7738
|
}
|
|
7312
|
-
)), /* @__PURE__ */
|
|
7739
|
+
)), /* @__PURE__ */ React85.createElement(
|
|
7313
7740
|
"div",
|
|
7314
7741
|
{
|
|
7315
7742
|
className: `kima-card-footer ${mode === "bridge" /* bridge */ && formStep !== 0 && "confirm"}`
|
|
7316
7743
|
},
|
|
7317
|
-
/* @__PURE__ */
|
|
7744
|
+
/* @__PURE__ */ React85.createElement("div", { className: `button-group` }, isBackButtonEnabled && /* @__PURE__ */ React85.createElement(
|
|
7318
7745
|
SecondaryButton_default,
|
|
7319
7746
|
{
|
|
7320
7747
|
clickHandler: onBack,
|
|
@@ -7322,7 +7749,7 @@ var TransferWidget = ({
|
|
|
7322
7749
|
disabled: isApproving || isSubmitting || isSigning
|
|
7323
7750
|
},
|
|
7324
7751
|
formStep > 0 && ccTransactionStatus !== "initialized" ? "Back" : "Cancel"
|
|
7325
|
-
), !!allowance && allowance > 0 && formStep !== 0 && sourceChain.shortName !== "CC" && mode !== "light" /* light */ ? /* @__PURE__ */
|
|
7752
|
+
), !!allowance && allowance > 0 && formStep !== 0 && sourceChain.shortName !== "CC" && mode !== "light" /* light */ && dAppOption !== "LPDrain" /* LPDrain */ ? /* @__PURE__ */ React85.createElement(
|
|
7326
7753
|
SecondaryButton_default,
|
|
7327
7754
|
{
|
|
7328
7755
|
clickHandler: onCancelApprove,
|
|
@@ -7331,7 +7758,7 @@ var TransferWidget = ({
|
|
|
7331
7758
|
disabled: isCancellingApprove || isApproving || isSubmitting || isSigning
|
|
7332
7759
|
},
|
|
7333
7760
|
isCancellingApprove ? "Cancelling Approval" : "Cancel Approve"
|
|
7334
|
-
) : null, isSubmitButtonEnabled && /* @__PURE__ */
|
|
7761
|
+
) : null, isSubmitButtonEnabled && /* @__PURE__ */ React85.createElement(
|
|
7335
7762
|
PrimaryButton_default,
|
|
7336
7763
|
{
|
|
7337
7764
|
clickHandler: onNext,
|
|
@@ -7340,7 +7767,7 @@ var TransferWidget = ({
|
|
|
7340
7767
|
},
|
|
7341
7768
|
getButtonLabel()
|
|
7342
7769
|
))
|
|
7343
|
-
), /* @__PURE__ */
|
|
7770
|
+
), /* @__PURE__ */ React85.createElement(SolanaWalletConnectModal_default, null), /* @__PURE__ */ React85.createElement(TronWalletConnectModal_default, null), /* @__PURE__ */ React85.createElement(
|
|
7344
7771
|
Toaster2,
|
|
7345
7772
|
{
|
|
7346
7773
|
position: "top-right",
|
|
@@ -7365,7 +7792,7 @@ var TransferWidget = ({
|
|
|
7365
7792
|
}
|
|
7366
7793
|
}
|
|
7367
7794
|
}
|
|
7368
|
-
), /* @__PURE__ */
|
|
7795
|
+
), /* @__PURE__ */ React85.createElement("div", { className: "floating-footer" }, /* @__PURE__ */ React85.createElement("div", { className: `items ${theme.colorMode}` }, /* @__PURE__ */ React85.createElement("span", null, "Powered by"), /* @__PURE__ */ React85.createElement(KimaNetwork_default, null))))
|
|
7369
7796
|
);
|
|
7370
7797
|
};
|
|
7371
7798
|
|
|
@@ -7373,10 +7800,10 @@ var TransferWidget = ({
|
|
|
7373
7800
|
import { useAppKitTheme } from "@reown/appkit/react";
|
|
7374
7801
|
|
|
7375
7802
|
// src/hooks/useDebugMode.ts
|
|
7376
|
-
import { useEffect as useEffect22, useState as
|
|
7803
|
+
import { useEffect as useEffect22, useState as useState16 } from "react";
|
|
7377
7804
|
var useDebugCode = (sequence = ["D", "E", "B", "U", "G"]) => {
|
|
7378
|
-
const [debugMode, setDebugMode] =
|
|
7379
|
-
const [, setInputSequence] =
|
|
7805
|
+
const [debugMode, setDebugMode] = useState16(false);
|
|
7806
|
+
const [, setInputSequence] = useState16([]);
|
|
7380
7807
|
useEffect22(() => {
|
|
7381
7808
|
const onKeyDown = (e) => {
|
|
7382
7809
|
setInputSequence((prev) => {
|
|
@@ -7404,7 +7831,7 @@ var useDebugCode = (sequence = ["D", "E", "B", "U", "G"]) => {
|
|
|
7404
7831
|
};
|
|
7405
7832
|
|
|
7406
7833
|
// src/components/ErrorWidget.tsx
|
|
7407
|
-
import
|
|
7834
|
+
import React86 from "react";
|
|
7408
7835
|
import { useSelector as useSelector46 } from "react-redux";
|
|
7409
7836
|
var ErrorWidget = ({
|
|
7410
7837
|
theme,
|
|
@@ -7417,7 +7844,7 @@ var ErrorWidget = ({
|
|
|
7417
7844
|
const ccTransactionId = useSelector46(selectCCTransactionId);
|
|
7418
7845
|
const isCreditCardSource = sourceChain.shortName === "CC";
|
|
7419
7846
|
const isRetrying = useSelector46(selectCCTransactionRetrying);
|
|
7420
|
-
return /* @__PURE__ */
|
|
7847
|
+
return /* @__PURE__ */ React86.createElement(
|
|
7421
7848
|
"div",
|
|
7422
7849
|
{
|
|
7423
7850
|
className: `kima-card ${theme.colorMode}`,
|
|
@@ -7425,7 +7852,7 @@ var ErrorWidget = ({
|
|
|
7425
7852
|
background: theme.colorMode === "light" /* light */ ? theme.backgroundColorLight : theme.backgroundColorDark
|
|
7426
7853
|
}
|
|
7427
7854
|
},
|
|
7428
|
-
/* @__PURE__ */
|
|
7855
|
+
/* @__PURE__ */ React86.createElement("div", { className: "transfer-card" }, /* @__PURE__ */ React86.createElement("div", { className: "kima-card-header" }, /* @__PURE__ */ React86.createElement("div", { className: "topbar" }, /* @__PURE__ */ React86.createElement("div", { className: "title" }, /* @__PURE__ */ React86.createElement("h3", null, title))), /* @__PURE__ */ React86.createElement("h4", { className: "subtitle" })), /* @__PURE__ */ React86.createElement("div", { className: "kima-card-content error" }, isCreditCardSource && !isRetrying && /* @__PURE__ */ React86.createElement(Error_default, { width: 40, height: 40 }), message && message !== "" && /* @__PURE__ */ React86.createElement("h2", null, message), isCreditCardSource && /* @__PURE__ */ React86.createElement(
|
|
7429
7856
|
"div",
|
|
7430
7857
|
{
|
|
7431
7858
|
style: {
|
|
@@ -7434,8 +7861,8 @@ var ErrorWidget = ({
|
|
|
7434
7861
|
flexDirection: "column"
|
|
7435
7862
|
}
|
|
7436
7863
|
},
|
|
7437
|
-
isRetrying ? /* @__PURE__ */
|
|
7438
|
-
ccTransactionId && /* @__PURE__ */
|
|
7864
|
+
isRetrying ? /* @__PURE__ */ React86.createElement("p", null, "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__ */ React86.createElement("p", null, "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."),
|
|
7865
|
+
ccTransactionId && /* @__PURE__ */ React86.createElement(
|
|
7439
7866
|
"div",
|
|
7440
7867
|
{
|
|
7441
7868
|
style: {
|
|
@@ -7445,7 +7872,7 @@ var ErrorWidget = ({
|
|
|
7445
7872
|
justifyContent: "center"
|
|
7446
7873
|
}
|
|
7447
7874
|
},
|
|
7448
|
-
/* @__PURE__ */
|
|
7875
|
+
/* @__PURE__ */ React86.createElement(
|
|
7449
7876
|
"code",
|
|
7450
7877
|
{
|
|
7451
7878
|
style: {
|
|
@@ -7456,10 +7883,10 @@ var ErrorWidget = ({
|
|
|
7456
7883
|
},
|
|
7457
7884
|
ccTransactionId
|
|
7458
7885
|
),
|
|
7459
|
-
/* @__PURE__ */
|
|
7886
|
+
/* @__PURE__ */ React86.createElement(CopyButton_default, { text: ccTransactionId })
|
|
7460
7887
|
),
|
|
7461
|
-
isRetrying && /* @__PURE__ */
|
|
7462
|
-
)), backButtonEnabled && /* @__PURE__ */
|
|
7888
|
+
isRetrying && /* @__PURE__ */ React86.createElement(ring_default, { width: 30, height: 30, fill: "#86b8ce" })
|
|
7889
|
+
)), backButtonEnabled && /* @__PURE__ */ React86.createElement(
|
|
7463
7890
|
"div",
|
|
7464
7891
|
{
|
|
7465
7892
|
style: {
|
|
@@ -7468,8 +7895,8 @@ var ErrorWidget = ({
|
|
|
7468
7895
|
marginTop: 16
|
|
7469
7896
|
}
|
|
7470
7897
|
},
|
|
7471
|
-
/* @__PURE__ */
|
|
7472
|
-
), /* @__PURE__ */
|
|
7898
|
+
/* @__PURE__ */ React86.createElement(PrimaryButton_default, { clickHandler: backButtonFunction }, "Back")
|
|
7899
|
+
), /* @__PURE__ */ React86.createElement("div", { className: "kima-card-footer" }), /* @__PURE__ */ React86.createElement("div", { className: "floating-footer" }, /* @__PURE__ */ React86.createElement("div", { className: `items ${theme.colorMode}` }, /* @__PURE__ */ React86.createElement("span", null, "Powered by"), /* @__PURE__ */ React86.createElement(FooterLogo_default, { width: 50, fill: "black" }), /* @__PURE__ */ React86.createElement("strong", null, "Network"))))
|
|
7473
7900
|
);
|
|
7474
7901
|
};
|
|
7475
7902
|
var ErrorWidget_default = ErrorWidget;
|
|
@@ -7483,7 +7910,7 @@ var KimaWidgetWrapper = ({
|
|
|
7483
7910
|
titleOption,
|
|
7484
7911
|
paymentTitleOption,
|
|
7485
7912
|
helpURL = "",
|
|
7486
|
-
compliantOption =
|
|
7913
|
+
compliantOption = false,
|
|
7487
7914
|
transactionOption,
|
|
7488
7915
|
chainData,
|
|
7489
7916
|
envOptions
|
|
@@ -7547,9 +7974,9 @@ var KimaWidgetWrapper = ({
|
|
|
7547
7974
|
console.log("widget wrapper", submitted, ccTransactionStatus);
|
|
7548
7975
|
if (submitted) {
|
|
7549
7976
|
logger_default.debug("will return transaction widget on cc success");
|
|
7550
|
-
return /* @__PURE__ */
|
|
7977
|
+
return /* @__PURE__ */ React87.createElement(TransactionWidget, { theme });
|
|
7551
7978
|
} else if (ccTransactionStatus === "error-id") {
|
|
7552
|
-
return /* @__PURE__ */
|
|
7979
|
+
return /* @__PURE__ */ React87.createElement(
|
|
7553
7980
|
ErrorWidget_default,
|
|
7554
7981
|
{
|
|
7555
7982
|
theme,
|
|
@@ -7563,7 +7990,7 @@ var KimaWidgetWrapper = ({
|
|
|
7563
7990
|
}
|
|
7564
7991
|
);
|
|
7565
7992
|
} else if (ccTransactionStatus === "error-generic") {
|
|
7566
|
-
return /* @__PURE__ */
|
|
7993
|
+
return /* @__PURE__ */ React87.createElement(
|
|
7567
7994
|
ErrorWidget_default,
|
|
7568
7995
|
{
|
|
7569
7996
|
theme,
|
|
@@ -7577,7 +8004,7 @@ var KimaWidgetWrapper = ({
|
|
|
7577
8004
|
}
|
|
7578
8005
|
);
|
|
7579
8006
|
}
|
|
7580
|
-
return /* @__PURE__ */
|
|
8007
|
+
return /* @__PURE__ */ React87.createElement(
|
|
7581
8008
|
TransferWidget,
|
|
7582
8009
|
{
|
|
7583
8010
|
theme,
|
|
@@ -7587,7 +8014,7 @@ var KimaWidgetWrapper = ({
|
|
|
7587
8014
|
}
|
|
7588
8015
|
);
|
|
7589
8016
|
}
|
|
7590
|
-
return submitted ? /* @__PURE__ */
|
|
8017
|
+
return submitted ? /* @__PURE__ */ React87.createElement(TransactionWidget, { theme }) : /* @__PURE__ */ React87.createElement(
|
|
7591
8018
|
TransferWidget,
|
|
7592
8019
|
{
|
|
7593
8020
|
theme,
|
|
@@ -7603,9 +8030,9 @@ var KimaWidgetWrapper_default = KimaWidgetWrapper;
|
|
|
7603
8030
|
import { useDispatch as useDispatch28 } from "react-redux";
|
|
7604
8031
|
|
|
7605
8032
|
// src/SkeletonLoader.tsx
|
|
7606
|
-
import
|
|
8033
|
+
import React88 from "react";
|
|
7607
8034
|
var SkeletonLoader = ({ theme }) => {
|
|
7608
|
-
return /* @__PURE__ */
|
|
8035
|
+
return /* @__PURE__ */ React88.createElement(
|
|
7609
8036
|
"div",
|
|
7610
8037
|
{
|
|
7611
8038
|
className: `kima-card ${theme.colorMode}`,
|
|
@@ -7613,7 +8040,7 @@ var SkeletonLoader = ({ theme }) => {
|
|
|
7613
8040
|
background: theme.colorMode === "light" /* light */ ? theme.backgroundColorLight : theme.backgroundColorDark
|
|
7614
8041
|
}
|
|
7615
8042
|
},
|
|
7616
|
-
/* @__PURE__ */
|
|
8043
|
+
/* @__PURE__ */ React88.createElement("div", { className: "transfer-card" }, /* @__PURE__ */ React88.createElement("div", { className: "kima-card-header" }, /* @__PURE__ */ React88.createElement("div", { className: "topbar" }, /* @__PURE__ */ React88.createElement("div", { className: "title skeleton" }, /* @__PURE__ */ React88.createElement("h3", null))), /* @__PURE__ */ React88.createElement("h4", { className: "subtitle" })), /* @__PURE__ */ React88.createElement("div", { className: "kima-card-content skeleton" }, /* @__PURE__ */ React88.createElement("div", { className: "skeleton" }), /* @__PURE__ */ React88.createElement("div", { className: "skeleton" }), /* @__PURE__ */ React88.createElement("div", { className: "skeleton" }), /* @__PURE__ */ React88.createElement("div", { className: "skeleton" }), /* @__PURE__ */ React88.createElement("div", { className: "skeleton" })), /* @__PURE__ */ React88.createElement("div", { className: `kima-card-footer` }, /* @__PURE__ */ React88.createElement("div", { className: `button-group skeleton` }, /* @__PURE__ */ React88.createElement("div", { className: "skeleton" }))), /* @__PURE__ */ React88.createElement("div", { className: "floating-footer" }, /* @__PURE__ */ React88.createElement("div", { className: `items ${theme.colorMode}` }, /* @__PURE__ */ React88.createElement("span", null, "Powered by"), /* @__PURE__ */ React88.createElement(FooterLogo_default, { width: 50, fill: "black" }), /* @__PURE__ */ React88.createElement("strong", null, "Network"))))
|
|
7617
8044
|
);
|
|
7618
8045
|
};
|
|
7619
8046
|
var SkeletonLoader_default = SkeletonLoader;
|
|
@@ -7632,7 +8059,7 @@ var KimaTransactionWidget = ({
|
|
|
7632
8059
|
}) => {
|
|
7633
8060
|
const dispatch = useDispatch28();
|
|
7634
8061
|
const { kimaBackendUrl } = useKimaContext();
|
|
7635
|
-
const [hydrated, setHydrated] =
|
|
8062
|
+
const [hydrated, setHydrated] = useState17(false);
|
|
7636
8063
|
const {
|
|
7637
8064
|
data: envOptions,
|
|
7638
8065
|
error: envOptionsError,
|
|
@@ -7658,11 +8085,11 @@ var KimaTransactionWidget = ({
|
|
|
7658
8085
|
}
|
|
7659
8086
|
}, [theme?.colorMode]);
|
|
7660
8087
|
if (!hydrated || !theme?.colorMode)
|
|
7661
|
-
return /* @__PURE__ */
|
|
8088
|
+
return /* @__PURE__ */ React89.createElement(ring_default, { width: 20, height: 20, fill: "#86b8ce" });
|
|
7662
8089
|
if (isLoadingEnvs || isLoadingChainData)
|
|
7663
|
-
return /* @__PURE__ */
|
|
8090
|
+
return /* @__PURE__ */ React89.createElement(SkeletonLoader_default, { theme });
|
|
7664
8091
|
if (envOptionsError || !envOptions)
|
|
7665
|
-
return /* @__PURE__ */
|
|
8092
|
+
return /* @__PURE__ */ React89.createElement(
|
|
7666
8093
|
ErrorWidget_default,
|
|
7667
8094
|
{
|
|
7668
8095
|
theme,
|
|
@@ -7671,7 +8098,7 @@ var KimaTransactionWidget = ({
|
|
|
7671
8098
|
}
|
|
7672
8099
|
);
|
|
7673
8100
|
if (chainDataError || !chainData)
|
|
7674
|
-
return /* @__PURE__ */
|
|
8101
|
+
return /* @__PURE__ */ React89.createElement(
|
|
7675
8102
|
ErrorWidget_default,
|
|
7676
8103
|
{
|
|
7677
8104
|
theme,
|
|
@@ -7679,7 +8106,7 @@ var KimaTransactionWidget = ({
|
|
|
7679
8106
|
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 */
|
|
7680
8107
|
}
|
|
7681
8108
|
);
|
|
7682
|
-
return /* @__PURE__ */
|
|
8109
|
+
return /* @__PURE__ */ React89.createElement(
|
|
7683
8110
|
KimaWidgetWrapper_default,
|
|
7684
8111
|
{
|
|
7685
8112
|
...{
|