@kimafinance/kima-transaction-widget 1.3.6 → 1.3.7
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 +222 -115
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +90 -33
- package/dist/index.css.map +1 -1
- package/dist/index.js +211 -104
- package/dist/index.js.map +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2644,6 +2644,12 @@ var checkPoolBalance = ({
|
|
|
2644
2644
|
const targetToken = poolTokens.find(
|
|
2645
2645
|
(token) => token.tokenSymbol === finalTargetCurrency
|
|
2646
2646
|
);
|
|
2647
|
+
if (!targetToken) {
|
|
2648
|
+
return {
|
|
2649
|
+
isPoolAvailable: false,
|
|
2650
|
+
error: `${CHAIN_NAMES_TO_STRING[targetChain]} has no ${targetCurrency} pool!`
|
|
2651
|
+
};
|
|
2652
|
+
}
|
|
2647
2653
|
const { amount: targetTokenBalance } = targetToken;
|
|
2648
2654
|
if (parseFloat(amount) > parseFloat(targetTokenBalance))
|
|
2649
2655
|
return {
|
|
@@ -2798,6 +2804,34 @@ function useEvmAllowance() {
|
|
|
2798
2804
|
refetchInterval: 60 * 1e3,
|
|
2799
2805
|
enabled
|
|
2800
2806
|
});
|
|
2807
|
+
const signMessage = async (data) => {
|
|
2808
|
+
if (!walletProvider) {
|
|
2809
|
+
console.error("No available provider");
|
|
2810
|
+
return;
|
|
2811
|
+
}
|
|
2812
|
+
if (!allowanceData?.decimals) {
|
|
2813
|
+
console.warn("useEvmAllowance: Missing required data");
|
|
2814
|
+
return;
|
|
2815
|
+
}
|
|
2816
|
+
try {
|
|
2817
|
+
const walletClient = createWalletClient({
|
|
2818
|
+
account: walletAddress,
|
|
2819
|
+
chain: sourceChain,
|
|
2820
|
+
transport: custom(window.ethereum)
|
|
2821
|
+
// WARNING: NEED TO MAKE SURE THIS USING THE ETHEREUM OBJECT IS STABLE ENOUGH
|
|
2822
|
+
});
|
|
2823
|
+
return await walletClient.signMessage({
|
|
2824
|
+
account: walletAddress,
|
|
2825
|
+
message: `Amount: ${allowanceNumber}
|
|
2826
|
+
Target Address: ${data.targetAddress}
|
|
2827
|
+
Target Chain: ${data.targetChain}
|
|
2828
|
+
Target Symbol: ${data.targetSymbol}`
|
|
2829
|
+
});
|
|
2830
|
+
} catch (error) {
|
|
2831
|
+
console.error("useEvmAllowance: Error on signing message:", error);
|
|
2832
|
+
throw new Error("Error on signing message");
|
|
2833
|
+
}
|
|
2834
|
+
};
|
|
2801
2835
|
const approveErc20TokenTransfer = async (isCancel = false) => {
|
|
2802
2836
|
if (!walletProvider) {
|
|
2803
2837
|
console.error("No available provider");
|
|
@@ -2863,6 +2897,7 @@ function useEvmAllowance() {
|
|
|
2863
2897
|
isApproved: allowanceData?.allowance ? allowanceData.allowance >= allowanceNumber : false,
|
|
2864
2898
|
approve: approveErc20TokenTransfer,
|
|
2865
2899
|
isLoading,
|
|
2900
|
+
signMessage,
|
|
2866
2901
|
refetch
|
|
2867
2902
|
};
|
|
2868
2903
|
}
|
|
@@ -2956,6 +2991,7 @@ var WalletProvider2 = ({
|
|
|
2956
2991
|
return /* @__PURE__ */ React73.createElement(ConnectionProvider, { endpoint }, /* @__PURE__ */ React73.createElement(
|
|
2957
2992
|
SolanaWalletProvider,
|
|
2958
2993
|
{
|
|
2994
|
+
autoConnect: false,
|
|
2959
2995
|
wallets: [
|
|
2960
2996
|
new PhantomWalletAdapter(),
|
|
2961
2997
|
new SolflareWalletAdapter(),
|
|
@@ -3069,7 +3105,8 @@ function useSolanaAllowance() {
|
|
|
3069
3105
|
const { connection: internalConnection } = useConnection2();
|
|
3070
3106
|
const {
|
|
3071
3107
|
publicKey: internalPublicKey,
|
|
3072
|
-
signTransaction: internalSignTransaction
|
|
3108
|
+
signTransaction: internalSignTransaction,
|
|
3109
|
+
signMessage: internalSignMessage
|
|
3073
3110
|
} = useWallet2();
|
|
3074
3111
|
const selectedCoin = useSelector6(selectSourceCurrency);
|
|
3075
3112
|
const tokenOptions = useSelector6(selectTokenOptions);
|
|
@@ -3078,6 +3115,7 @@ function useSolanaAllowance() {
|
|
|
3078
3115
|
const isSolanaProvider = sourceChain.shortName === "SOL" && externalProvider?.type === "solana" && externalProvider.provider && externalProvider.signer instanceof PublicKey5;
|
|
3079
3116
|
const userPublicKey = isSolanaProvider ? externalProvider.signer : sourceChain.shortName === "SOL" ? internalPublicKey : void 0;
|
|
3080
3117
|
const signTransaction = isSolanaProvider && externalProvider.provider.signTransaction ? externalProvider.provider.signTransaction : sourceChain.shortName === "SOL" ? internalSignTransaction : void 0;
|
|
3118
|
+
const signMessage = isSolanaProvider && externalProvider.provider.signMessage ? externalProvider.provider.signMessage : sourceChain.shortName === "SOL" ? internalSignMessage : void 0;
|
|
3081
3119
|
const connection = isSolanaProvider && externalProvider.provider.connection ? externalProvider.provider.connection : sourceChain.shortName === "SOL" ? internalConnection : void 0;
|
|
3082
3120
|
const {
|
|
3083
3121
|
data: allowanceData,
|
|
@@ -3106,6 +3144,24 @@ function useSolanaAllowance() {
|
|
|
3106
3144
|
staleTime: 1e3 * 60
|
|
3107
3145
|
// 1 min
|
|
3108
3146
|
});
|
|
3147
|
+
const signSolanaMessage = async (data) => {
|
|
3148
|
+
if (!signMessage) {
|
|
3149
|
+
console.warn("useSolanaAllowance: Missing Solana provider setup");
|
|
3150
|
+
return;
|
|
3151
|
+
}
|
|
3152
|
+
try {
|
|
3153
|
+
const message = `Amount: ${allowanceNumber}
|
|
3154
|
+
Target Address: ${data.targetAddress}
|
|
3155
|
+
Target Chain: ${data.targetChain}
|
|
3156
|
+
Target Symbol: ${data.targetSymbol}`;
|
|
3157
|
+
const encodedMessage = new TextEncoder().encode(message);
|
|
3158
|
+
const signature = await signMessage(encodedMessage);
|
|
3159
|
+
return signature;
|
|
3160
|
+
} catch (error2) {
|
|
3161
|
+
console.error("Error signing message:", error2);
|
|
3162
|
+
throw error2;
|
|
3163
|
+
}
|
|
3164
|
+
};
|
|
3109
3165
|
const approveSPLTokenTransfer = async (isCancel = false) => {
|
|
3110
3166
|
if (!allowanceAmount) {
|
|
3111
3167
|
console.warn("useSolanaAllowance: Missing allowance amount");
|
|
@@ -3163,7 +3219,8 @@ function useSolanaAllowance() {
|
|
|
3163
3219
|
return {
|
|
3164
3220
|
...allowanceData,
|
|
3165
3221
|
isApproved: allowanceData?.allowance ? allowanceData.allowance >= allowanceNumber : false,
|
|
3166
|
-
approve: approveSPLTokenTransfer
|
|
3222
|
+
approve: approveSPLTokenTransfer,
|
|
3223
|
+
signMessage: signSolanaMessage
|
|
3167
3224
|
};
|
|
3168
3225
|
}
|
|
3169
3226
|
|
|
@@ -3293,7 +3350,8 @@ var WalletProvider3 = ({ children, networkOption }) => {
|
|
|
3293
3350
|
{
|
|
3294
3351
|
adapters,
|
|
3295
3352
|
onError,
|
|
3296
|
-
onChainChanged
|
|
3353
|
+
onChainChanged,
|
|
3354
|
+
autoConnect: false
|
|
3297
3355
|
},
|
|
3298
3356
|
children
|
|
3299
3357
|
);
|
|
@@ -3643,7 +3701,8 @@ function useTronAllowance() {
|
|
|
3643
3701
|
const { pools } = useGetPools_default(backendUrl, networkOption);
|
|
3644
3702
|
const {
|
|
3645
3703
|
address: internalUserAddress,
|
|
3646
|
-
signTransaction: internalSignTronTransaction
|
|
3704
|
+
signTransaction: internalSignTronTransaction,
|
|
3705
|
+
signMessage: internalSignMessage
|
|
3647
3706
|
} = useWallet5();
|
|
3648
3707
|
const [approvalsCount, setApprovalsCount] = useState4(0);
|
|
3649
3708
|
const isTronProvider2 = sourceChain.shortName === "TRX" && externalProvider?.type === "tron" && externalProvider.provider.tronWeb instanceof TronWeb3 && typeof externalProvider.signer === "string";
|
|
@@ -3655,6 +3714,7 @@ function useTronAllowance() {
|
|
|
3655
3714
|
isTronProvider2 && tronWeb.setAddress(TRON_USDK_OWNER_ADDRESS);
|
|
3656
3715
|
const userAddress = isTronProvider2 ? externalProvider.signer : internalUserAddress;
|
|
3657
3716
|
const signTronTransaction = isTronProvider2 ? externalProvider.provider.signTransaction : internalSignTronTransaction;
|
|
3717
|
+
const signMessage = isTronProvider2 ? externalProvider.provider.signMessage : internalSignMessage;
|
|
3658
3718
|
const {
|
|
3659
3719
|
data: allowanceData,
|
|
3660
3720
|
isLoading,
|
|
@@ -3675,6 +3735,23 @@ function useTronAllowance() {
|
|
|
3675
3735
|
staleTime: 1e3 * 60
|
|
3676
3736
|
// 1 min
|
|
3677
3737
|
});
|
|
3738
|
+
const signTronMessage = async (data) => {
|
|
3739
|
+
if (!tronWeb) {
|
|
3740
|
+
console.warn("TronWeb not initialized");
|
|
3741
|
+
return;
|
|
3742
|
+
}
|
|
3743
|
+
try {
|
|
3744
|
+
const message = `Amount: ${allowanceNumber}
|
|
3745
|
+
Target Address: ${data.targetAddress}
|
|
3746
|
+
Target Chain: ${data.targetChain}
|
|
3747
|
+
Target Symbol: ${data.targetSymbol}`;
|
|
3748
|
+
const signedMessage = await signMessage(message);
|
|
3749
|
+
return signedMessage;
|
|
3750
|
+
} catch (error2) {
|
|
3751
|
+
console.error("Error signing message:", error2);
|
|
3752
|
+
throw error2;
|
|
3753
|
+
}
|
|
3754
|
+
};
|
|
3678
3755
|
const approveTrc20TokenTransfer = async (isCancel = false) => {
|
|
3679
3756
|
if (!userAddress || !pools || !tronWeb || !tokenOptions || !selectedCoin || !allowanceAmount) {
|
|
3680
3757
|
console.warn("Missing required data for approveTrc20TokenTransfer");
|
|
@@ -3713,7 +3790,8 @@ function useTronAllowance() {
|
|
|
3713
3790
|
return {
|
|
3714
3791
|
...allowanceData,
|
|
3715
3792
|
isApproved: allowanceData?.allowance ? allowanceData.allowance >= allowanceNumber : false,
|
|
3716
|
-
approve: approveTrc20TokenTransfer
|
|
3793
|
+
approve: approveTrc20TokenTransfer,
|
|
3794
|
+
signMessage: signTronMessage
|
|
3717
3795
|
};
|
|
3718
3796
|
}
|
|
3719
3797
|
|
|
@@ -3880,10 +3958,10 @@ var KimaProvider = ({
|
|
|
3880
3958
|
var KimaProvider_default = KimaProvider;
|
|
3881
3959
|
|
|
3882
3960
|
// src/components/KimaTransactionWidget.tsx
|
|
3883
|
-
import
|
|
3961
|
+
import React113, { useEffect as useEffect20 } from "react";
|
|
3884
3962
|
|
|
3885
3963
|
// src/components/KimaWidgetWrapper.tsx
|
|
3886
|
-
import
|
|
3964
|
+
import React112, { useEffect as useEffect19 } from "react";
|
|
3887
3965
|
import { useDispatch as useDispatch26, useSelector as useSelector38 } from "react-redux";
|
|
3888
3966
|
|
|
3889
3967
|
// src/components/TransactionWidget.tsx
|
|
@@ -4640,12 +4718,13 @@ var AddressInput = ({
|
|
|
4640
4718
|
const targetChain = useSelector21(selectTargetChain);
|
|
4641
4719
|
const { walletAddress: sourceAddress, isReady } = useIsWalletReady4();
|
|
4642
4720
|
const targetAddress = useSelector21(selectTargetAddress);
|
|
4643
|
-
const
|
|
4644
|
-
return
|
|
4721
|
+
const isCompatible = (sourceChain2, targetChain2) => {
|
|
4722
|
+
return sourceChain2.compatibility === targetChain2.compatibility;
|
|
4645
4723
|
};
|
|
4646
4724
|
useEffect12(() => {
|
|
4647
4725
|
if (mode === "payment" /* payment */) return;
|
|
4648
|
-
if (
|
|
4726
|
+
if (isCompatible(sourceChain, targetChain)) {
|
|
4727
|
+
if (targetAddress !== "") return;
|
|
4649
4728
|
dispatch(setTargetAddress(isReady && sourceAddress ? sourceAddress : ""));
|
|
4650
4729
|
return;
|
|
4651
4730
|
}
|
|
@@ -5198,7 +5277,7 @@ var TransactionWidget = ({ theme }) => {
|
|
|
5198
5277
|
};
|
|
5199
5278
|
|
|
5200
5279
|
// src/components/TransferWidget.tsx
|
|
5201
|
-
import
|
|
5280
|
+
import React111, { useEffect as useEffect18, useState as useState14, useRef as useRef7 } from "react";
|
|
5202
5281
|
import { useDispatch as useDispatch25, useSelector as useSelector37 } from "react-redux";
|
|
5203
5282
|
|
|
5204
5283
|
// src/components/reusable/SingleForm.tsx
|
|
@@ -5369,18 +5448,8 @@ var NetworkSelector_default = React102.memo(NetworkSelector);
|
|
|
5369
5448
|
|
|
5370
5449
|
// src/components/reusable/SingleForm.tsx
|
|
5371
5450
|
var SingleForm = ({
|
|
5372
|
-
allowance,
|
|
5373
5451
|
balance,
|
|
5374
|
-
decimals
|
|
5375
|
-
formStep,
|
|
5376
|
-
onBack,
|
|
5377
|
-
onCancelApprove,
|
|
5378
|
-
onNext,
|
|
5379
|
-
getButtonLabel,
|
|
5380
|
-
isApproving,
|
|
5381
|
-
isSigning,
|
|
5382
|
-
isSubmitting,
|
|
5383
|
-
isCancellingApprove
|
|
5452
|
+
decimals
|
|
5384
5453
|
}) => {
|
|
5385
5454
|
const dispatch = useDispatch17();
|
|
5386
5455
|
const mode = useSelector30(selectMode);
|
|
@@ -5389,7 +5458,6 @@ var SingleForm = ({
|
|
|
5389
5458
|
const { totalFeeUsd } = useSelector30(selectServiceFee);
|
|
5390
5459
|
const compliantOption = useSelector30(selectCompliantOption);
|
|
5391
5460
|
const targetCompliant = useSelector30(selectTargetCompliant);
|
|
5392
|
-
const transactionOption = useSelector30(selectTransactionOption);
|
|
5393
5461
|
const sourceNetwork = useSelector30(selectSourceChain);
|
|
5394
5462
|
const targetNetwork = useSelector30(selectTargetChain);
|
|
5395
5463
|
const { isReady } = useIsWalletReady4();
|
|
@@ -5423,23 +5491,16 @@ var SingleForm = ({
|
|
|
5423
5491
|
const maxValue = useMemo15(() => {
|
|
5424
5492
|
if (!balance) return 0;
|
|
5425
5493
|
if (totalFeeUsd < 0) return balance;
|
|
5426
|
-
|
|
5427
|
-
return amountMinusFees > 0 ? amountMinusFees : 0;
|
|
5494
|
+
return preciseSubtraction(balance, totalFeeUsd);
|
|
5428
5495
|
}, [balance, totalFeeUsd, feeDeduct]);
|
|
5429
5496
|
useEffect15(() => {
|
|
5430
5497
|
if (!errorMessage) return;
|
|
5431
5498
|
toast4.error(errorMessage);
|
|
5432
5499
|
}, [errorMessage]);
|
|
5433
5500
|
useEffect15(() => {
|
|
5434
|
-
if (amountValue && amount
|
|
5501
|
+
if (amountValue && amount !== "") return;
|
|
5435
5502
|
setAmountValue(amount);
|
|
5436
5503
|
}, [amount]);
|
|
5437
|
-
useEffect15(() => {
|
|
5438
|
-
if (!feeDeduct && maxValue < +amountValue) {
|
|
5439
|
-
setAmountValue(maxValue.toString());
|
|
5440
|
-
dispatch(setAmount(maxValue.toString()));
|
|
5441
|
-
}
|
|
5442
|
-
}, [feeDeduct]);
|
|
5443
5504
|
return /* @__PURE__ */ React103.createElement("div", { className: "single-form" }, /* @__PURE__ */ React103.createElement("div", { className: "form-item" }, /* @__PURE__ */ React103.createElement("span", { className: "label" }, "Source Network:"), /* @__PURE__ */ React103.createElement("div", { className: "items" }, /* @__PURE__ */ React103.createElement(NetworkSelector_default, { type: "source" }), /* @__PURE__ */ React103.createElement(CoinDropdown_default, null))), /* @__PURE__ */ React103.createElement(
|
|
5444
5505
|
"div",
|
|
5445
5506
|
{
|
|
@@ -5460,27 +5521,21 @@ var SingleForm = ({
|
|
|
5460
5521
|
theme: theme.colorMode,
|
|
5461
5522
|
placeholder: "Target address"
|
|
5462
5523
|
}
|
|
5463
|
-
)) : null,
|
|
5524
|
+
)) : null, /* @__PURE__ */ React103.createElement("div", { className: `form-item ${theme.colorMode}` }, /* @__PURE__ */ React103.createElement("span", { className: "label" }, "Amount:"), /* @__PURE__ */ React103.createElement("div", { className: `amount-label-container items ${theme.colorMode}` }, /* @__PURE__ */ React103.createElement(
|
|
5464
5525
|
"input",
|
|
5465
5526
|
{
|
|
5466
5527
|
className: `${theme.colorMode}`,
|
|
5467
5528
|
type: "text",
|
|
5468
|
-
placeholder: "
|
|
5529
|
+
placeholder: "Enter amount",
|
|
5469
5530
|
value: amountValue || "",
|
|
5470
5531
|
onChange: (e) => {
|
|
5471
5532
|
const value = e.target.value;
|
|
5472
5533
|
const maskedValue = value.replace(/[^0-9.]/g, "").replace(/(\..*?)\..*/g, "$1").replace(new RegExp(`(\\.\\d{${decimals}})\\d+`), "$1");
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
setAmountValue(maxValue.toString());
|
|
5476
|
-
dispatch(setAmount(maxValue.toString()));
|
|
5477
|
-
} else {
|
|
5478
|
-
setAmountValue(maskedValue);
|
|
5479
|
-
dispatch(setAmount(maskedValue));
|
|
5480
|
-
}
|
|
5534
|
+
setAmountValue(maskedValue);
|
|
5535
|
+
dispatch(setAmount(maskedValue));
|
|
5481
5536
|
}
|
|
5482
5537
|
}
|
|
5483
|
-
), /* @__PURE__ */ React103.createElement(
|
|
5538
|
+
), /* @__PURE__ */ React103.createElement("div", { className: "max-disclaimer" }, /* @__PURE__ */ React103.createElement(
|
|
5484
5539
|
"span",
|
|
5485
5540
|
{
|
|
5486
5541
|
className: "max-button",
|
|
@@ -5490,22 +5545,7 @@ var SingleForm = ({
|
|
|
5490
5545
|
}
|
|
5491
5546
|
},
|
|
5492
5547
|
"Max"
|
|
5493
|
-
)
|
|
5494
|
-
"input",
|
|
5495
|
-
{
|
|
5496
|
-
className: `${theme.colorMode}`,
|
|
5497
|
-
type: "number",
|
|
5498
|
-
placeholder: "Amount",
|
|
5499
|
-
value: transactionOption?.amount || amountValue || "",
|
|
5500
|
-
onChange: (e) => {
|
|
5501
|
-
let _amount = +e.target.value;
|
|
5502
|
-
const decimal = sourceNetwork.shortName === "BTC" /* BTC */ || targetNetwork.shortName === "BTC" /* BTC */ ? 8 : 2;
|
|
5503
|
-
setAmountValue(e.target.value);
|
|
5504
|
-
dispatch(setAmount(_amount.toFixed(decimal)));
|
|
5505
|
-
},
|
|
5506
|
-
disabled: transactionOption?.amount !== void 0
|
|
5507
|
-
}
|
|
5508
|
-
), /* @__PURE__ */ React103.createElement("div", { className: `coin-wrapper ${theme.colorMode}` }, /* @__PURE__ */ React103.createElement("div", { className: "icon-wrapper" }, /* @__PURE__ */ React103.createElement(TargetIcon, null)), targetCurrency))));
|
|
5548
|
+
), totalFeeUsd !== -1 && /* @__PURE__ */ React103.createElement("p", null, "Est fees: $ ", totalFeeUsd, " USD")))));
|
|
5509
5549
|
};
|
|
5510
5550
|
var SingleForm_default = SingleForm;
|
|
5511
5551
|
|
|
@@ -5564,6 +5604,7 @@ import { useWallet as useWallet7 } from "@solana/wallet-adapter-react";
|
|
|
5564
5604
|
import { WalletReadyState } from "@solana/wallet-adapter-base";
|
|
5565
5605
|
var SolanaWalletSelect = () => {
|
|
5566
5606
|
const theme = useSelector31(selectTheme);
|
|
5607
|
+
const sourceChain = useSelector31(selectSourceChain);
|
|
5567
5608
|
const dispatch = useDispatch18();
|
|
5568
5609
|
const sliderRef = useRef5();
|
|
5569
5610
|
const { wallet, wallets, select, connect, connected } = useWallet7();
|
|
@@ -5607,17 +5648,30 @@ var SolanaWalletSelect = () => {
|
|
|
5607
5648
|
}, []);
|
|
5608
5649
|
const handleWalletClick = useCallback2(
|
|
5609
5650
|
(walletName) => {
|
|
5651
|
+
console.log(
|
|
5652
|
+
"SolanaWalletSelect: handleWalletClick: walletName: ",
|
|
5653
|
+
walletName
|
|
5654
|
+
);
|
|
5610
5655
|
select(walletName);
|
|
5611
5656
|
},
|
|
5612
5657
|
[select]
|
|
5613
5658
|
);
|
|
5614
5659
|
useEffect16(() => {
|
|
5615
|
-
|
|
5616
|
-
if (wallet)
|
|
5617
|
-
|
|
5618
|
-
|
|
5660
|
+
console.log("SolanaWalletSelect: useEffect: wallet: ", wallet);
|
|
5661
|
+
if (!wallet) return;
|
|
5662
|
+
if (sourceChain.shortName !== "SOL") {
|
|
5663
|
+
console.log("SolanaWalletSelect: source chain is not sol...");
|
|
5664
|
+
return;
|
|
5665
|
+
}
|
|
5666
|
+
if (!connected) {
|
|
5667
|
+
console.log(
|
|
5668
|
+
"SolanaWalletSelect: Wallet exists but not connected, connecting wallet:",
|
|
5669
|
+
wallet
|
|
5670
|
+
);
|
|
5671
|
+
connect().catch((err) => console.error("Solana connect error:", err));
|
|
5619
5672
|
}
|
|
5620
|
-
|
|
5673
|
+
dispatch(setSolanaConnectModal(false));
|
|
5674
|
+
}, [wallet, sourceChain]);
|
|
5621
5675
|
return /* @__PURE__ */ React104.createElement("div", { className: `wallet-select` }, /* @__PURE__ */ React104.createElement("div", { className: "slide-area hide-scrollbar", ref: sliderRef }, /* @__PURE__ */ React104.createElement("div", { className: "wallet-container" }, detected.map((wallet2, index) => /* @__PURE__ */ React104.createElement(
|
|
5622
5676
|
"div",
|
|
5623
5677
|
{
|
|
@@ -5659,7 +5713,7 @@ var AccountDetailsModal = () => {
|
|
|
5659
5713
|
solanaWalletDisconnect();
|
|
5660
5714
|
dispatch(setAccountDetailsModal(false));
|
|
5661
5715
|
};
|
|
5662
|
-
if (sourceChain !== "SOL") return;
|
|
5716
|
+
if (sourceChain.shortName !== "SOL") return;
|
|
5663
5717
|
return /* @__PURE__ */ React105.createElement(
|
|
5664
5718
|
"div",
|
|
5665
5719
|
{
|
|
@@ -5731,7 +5785,7 @@ var AccountDetailsModal2 = () => {
|
|
|
5731
5785
|
const { balance: tronBalance } = useGetTrxBalance_default();
|
|
5732
5786
|
const selectedNetwork = useSelector34(selectSourceChain);
|
|
5733
5787
|
const networkDetails = useMemo18(
|
|
5734
|
-
() => networkOptions.find(({ id }) => id === selectedNetwork),
|
|
5788
|
+
() => networkOptions.find(({ id }) => id === selectedNetwork.shortName),
|
|
5735
5789
|
[selectedNetwork]
|
|
5736
5790
|
);
|
|
5737
5791
|
const explorerUrl = useMemo18(() => {
|
|
@@ -5741,7 +5795,7 @@ var AccountDetailsModal2 = () => {
|
|
|
5741
5795
|
tronWalletDisconnect();
|
|
5742
5796
|
dispatch(setAccountDetailsModal(false));
|
|
5743
5797
|
};
|
|
5744
|
-
if (sourcheChain !== "TRX") return;
|
|
5798
|
+
if (sourcheChain.shortName !== "TRX") return;
|
|
5745
5799
|
return /* @__PURE__ */ React107.createElement(
|
|
5746
5800
|
"div",
|
|
5747
5801
|
{
|
|
@@ -5760,7 +5814,7 @@ var AccountDetailsModal2 = () => {
|
|
|
5760
5814
|
fill: theme.colorMode === "light" ? "black" : "white"
|
|
5761
5815
|
}
|
|
5762
5816
|
)
|
|
5763
|
-
)))), /* @__PURE__ */ React107.createElement("div", { className: "modal-content" }, /* @__PURE__ */ React107.createElement("div", { className: "summary" }, networkDetails && /* @__PURE__ */ React107.createElement(networkDetails.icon, { width: 60, height: 60 }), /* @__PURE__ */ React107.createElement("div", { className: "address" }, /* @__PURE__ */ React107.createElement("h2", null, getShortenedAddress(walletAddress || "")), /* @__PURE__ */ React107.createElement(CopyButton_default, { text: walletAddress })), /* @__PURE__ */ React107.createElement("h3", null, tronBalance, " ", selectedNetwork)), /* @__PURE__ */ React107.createElement(SecondaryButton_default, { className: "block-explorer" }, /* @__PURE__ */ React107.createElement(ExternalLink_default, { className: "link", to: explorerUrl }, /* @__PURE__ */ React107.createElement(Explorer_default, { fill: "#778DA3" }), /* @__PURE__ */ React107.createElement("p", null, "Block explorer"), /* @__PURE__ */ React107.createElement(ExternalUrl_default, { fill: "#778DA3" }))), /* @__PURE__ */ React107.createElement(PrimaryButton_default, { clickHandler: handleDisconnect }, "Disconnect")))
|
|
5817
|
+
)))), /* @__PURE__ */ React107.createElement("div", { className: "modal-content" }, /* @__PURE__ */ React107.createElement("div", { className: "summary" }, networkDetails && /* @__PURE__ */ React107.createElement(networkDetails.icon, { width: 60, height: 60 }), /* @__PURE__ */ React107.createElement("div", { className: "address" }, /* @__PURE__ */ React107.createElement("h2", null, getShortenedAddress(walletAddress || "")), /* @__PURE__ */ React107.createElement(CopyButton_default, { text: walletAddress })), /* @__PURE__ */ React107.createElement("h3", null, tronBalance, " ", selectedNetwork.shortName)), /* @__PURE__ */ React107.createElement(SecondaryButton_default, { className: "block-explorer" }, /* @__PURE__ */ React107.createElement(ExternalLink_default, { className: "link", to: explorerUrl }, /* @__PURE__ */ React107.createElement(Explorer_default, { fill: "#778DA3" }), /* @__PURE__ */ React107.createElement("p", null, "Block explorer"), /* @__PURE__ */ React107.createElement(ExternalUrl_default, { fill: "#778DA3" }))), /* @__PURE__ */ React107.createElement(PrimaryButton_default, { clickHandler: handleDisconnect }, "Disconnect")))
|
|
5764
5818
|
);
|
|
5765
5819
|
};
|
|
5766
5820
|
var AccountDetailsModal_default2 = AccountDetailsModal2;
|
|
@@ -5891,7 +5945,8 @@ var useValidateTransaction = ({
|
|
|
5891
5945
|
sourceCompliant,
|
|
5892
5946
|
targetCompliant,
|
|
5893
5947
|
mode,
|
|
5894
|
-
pools
|
|
5948
|
+
pools,
|
|
5949
|
+
formStep
|
|
5895
5950
|
}) => {
|
|
5896
5951
|
const maxValue = useMemo20(() => {
|
|
5897
5952
|
if (!balance) return 0;
|
|
@@ -5939,24 +5994,22 @@ var useValidateTransaction = ({
|
|
|
5939
5994
|
};
|
|
5940
5995
|
}
|
|
5941
5996
|
}
|
|
5942
|
-
|
|
5943
|
-
console.log("useValidate:maxValue ", maxValue);
|
|
5944
|
-
if (+amount < totalFeeUsd) {
|
|
5997
|
+
if (+amount > balance && formStep === 0) {
|
|
5945
5998
|
return {
|
|
5946
|
-
error: "
|
|
5947
|
-
message: "
|
|
5999
|
+
error: "Warning" /* Warning */,
|
|
6000
|
+
message: "The entered amount exceeds your available balance. This transaction is likely to fail. Proceed with caution."
|
|
5948
6001
|
};
|
|
5949
6002
|
}
|
|
5950
|
-
if (+amount > maxValue) {
|
|
6003
|
+
if (+amount > maxValue && formStep === 0) {
|
|
5951
6004
|
return {
|
|
5952
|
-
error: "
|
|
5953
|
-
message:
|
|
6005
|
+
error: "Warning" /* Warning */,
|
|
6006
|
+
message: "The entered amount exceeds the maximum transferable amount (available balance minus transaction fees). Reduce the amount or allow fees to be deducted from the transferred amount. Otherwise, your transaction may fail. Proceed with caution."
|
|
5954
6007
|
};
|
|
5955
6008
|
}
|
|
5956
|
-
if (
|
|
6009
|
+
if (+amount < totalFeeUsd && formStep === 0) {
|
|
5957
6010
|
return {
|
|
5958
|
-
error: "
|
|
5959
|
-
message: "
|
|
6011
|
+
error: "Warning" /* Warning */,
|
|
6012
|
+
message: "Transaction fees exceed the transfer amount. This may result in an ineffective transaction. Proceed with caution."
|
|
5960
6013
|
};
|
|
5961
6014
|
}
|
|
5962
6015
|
if (!isApproved && isSubmitting) {
|
|
@@ -6001,7 +6054,7 @@ var useSubmitTransaction = ({
|
|
|
6001
6054
|
}) => {
|
|
6002
6055
|
const dispatch = useDispatch24();
|
|
6003
6056
|
const [isSubmitting, setSubmitting] = useState13(false);
|
|
6004
|
-
const submitTransaction = async () => {
|
|
6057
|
+
const submitTransaction = async (signature) => {
|
|
6005
6058
|
try {
|
|
6006
6059
|
setSubmitting(true);
|
|
6007
6060
|
const params = JSON.stringify({
|
|
@@ -6018,7 +6071,8 @@ var useSubmitTransaction = ({
|
|
|
6018
6071
|
htlcCreationVout: 0,
|
|
6019
6072
|
htlcExpirationTimestamp: "0",
|
|
6020
6073
|
htlcVersion: "",
|
|
6021
|
-
senderPubKey: ""
|
|
6074
|
+
senderPubKey: "",
|
|
6075
|
+
options: signature
|
|
6022
6076
|
});
|
|
6023
6077
|
const transactionResult = await fetchWrapper.post(
|
|
6024
6078
|
`${backendUrl}/submit`,
|
|
@@ -6110,6 +6164,31 @@ function useDisconnectWallet4() {
|
|
|
6110
6164
|
return mainConnection ? { disconnectWallet: mainConnection.disconnectWallet } : defaultDisconnect;
|
|
6111
6165
|
}
|
|
6112
6166
|
|
|
6167
|
+
// src/components/reusable/WarningModal.tsx
|
|
6168
|
+
import React110 from "react";
|
|
6169
|
+
var WarningModal = ({
|
|
6170
|
+
message,
|
|
6171
|
+
onAcknowledge,
|
|
6172
|
+
onCancel
|
|
6173
|
+
}) => {
|
|
6174
|
+
return /* @__PURE__ */ React110.createElement("div", { className: "warning-modal-overlay" }, /* @__PURE__ */ React110.createElement("div", { className: "warning-modal" }, /* @__PURE__ */ React110.createElement("h3", null, "Warning"), /* @__PURE__ */ React110.createElement("p", null, message), /* @__PURE__ */ React110.createElement("div", { className: "warning-modal-buttons" }, /* @__PURE__ */ React110.createElement(
|
|
6175
|
+
SecondaryButton_default,
|
|
6176
|
+
{
|
|
6177
|
+
className: "warning-modal-cancel",
|
|
6178
|
+
clickHandler: onCancel
|
|
6179
|
+
},
|
|
6180
|
+
"Cancel"
|
|
6181
|
+
), /* @__PURE__ */ React110.createElement(
|
|
6182
|
+
PrimaryButton_default,
|
|
6183
|
+
{
|
|
6184
|
+
className: "warning-modal-acknowledge",
|
|
6185
|
+
clickHandler: onAcknowledge
|
|
6186
|
+
},
|
|
6187
|
+
"Acknowledge"
|
|
6188
|
+
))));
|
|
6189
|
+
};
|
|
6190
|
+
var WarningModal_default = WarningModal;
|
|
6191
|
+
|
|
6113
6192
|
// src/components/TransferWidget.tsx
|
|
6114
6193
|
var TransferWidget = ({
|
|
6115
6194
|
theme,
|
|
@@ -6120,6 +6199,7 @@ var TransferWidget = ({
|
|
|
6120
6199
|
const dispatch = useDispatch25();
|
|
6121
6200
|
const mainRef = useRef7(null);
|
|
6122
6201
|
const [formStep, setFormStep] = useState14(0);
|
|
6202
|
+
const [warningModalOpen, setWarningModalOpen] = useState14(null);
|
|
6123
6203
|
const dAppOption = useSelector37(selectDappOption);
|
|
6124
6204
|
const mode = useSelector37(selectMode);
|
|
6125
6205
|
const transactionOption = useSelector37(selectTransactionOption);
|
|
@@ -6150,7 +6230,7 @@ var TransferWidget = ({
|
|
|
6150
6230
|
const { width: windowWidth } = useWidth_default();
|
|
6151
6231
|
const { disconnectWallet } = useDisconnectWallet4();
|
|
6152
6232
|
const { balance } = useBalance2();
|
|
6153
|
-
const { allowance, isApproved, approve, decimals } = useAllowance({
|
|
6233
|
+
const { allowance, isApproved, approve, decimals, signMessage } = useAllowance({
|
|
6154
6234
|
setApproving,
|
|
6155
6235
|
setCancellingApprove
|
|
6156
6236
|
});
|
|
@@ -6181,7 +6261,8 @@ var TransferWidget = ({
|
|
|
6181
6261
|
compliantOption,
|
|
6182
6262
|
mode,
|
|
6183
6263
|
pools,
|
|
6184
|
-
feeDeduct
|
|
6264
|
+
feeDeduct,
|
|
6265
|
+
formStep
|
|
6185
6266
|
});
|
|
6186
6267
|
const { submitTransaction, isSubmitting } = useSubmitTransaction_default({
|
|
6187
6268
|
amount: BigInt(submitAmount ?? "0"),
|
|
@@ -6198,7 +6279,7 @@ var TransferWidget = ({
|
|
|
6198
6279
|
const handleSubmit = async () => {
|
|
6199
6280
|
const { error, message: validationMessage } = validate(true);
|
|
6200
6281
|
if (error === "ValidationError" /* Error */) {
|
|
6201
|
-
return toast5.error(validationMessage, { icon: /* @__PURE__ */
|
|
6282
|
+
return toast5.error(validationMessage, { icon: /* @__PURE__ */ React111.createElement(Error_default, null) });
|
|
6202
6283
|
}
|
|
6203
6284
|
if (error === "ApprovalNeeded" /* ApprovalNeeded */) {
|
|
6204
6285
|
return approve();
|
|
@@ -6207,18 +6288,30 @@ var TransferWidget = ({
|
|
|
6207
6288
|
keplrHandler && keplrHandler(sourceAddress);
|
|
6208
6289
|
return;
|
|
6209
6290
|
}
|
|
6210
|
-
const
|
|
6211
|
-
|
|
6291
|
+
const signature = await signMessage?.({
|
|
6292
|
+
targetAddress,
|
|
6293
|
+
targetChain: targetChain.shortName,
|
|
6294
|
+
targetSymbol: targetCurrency
|
|
6295
|
+
});
|
|
6296
|
+
const { success, message: submitMessage } = await submitTransaction(
|
|
6297
|
+
JSON.stringify({ signature })
|
|
6298
|
+
);
|
|
6299
|
+
if (!success) return toast5.error(submitMessage, { icon: /* @__PURE__ */ React111.createElement(Error_default, null) });
|
|
6212
6300
|
};
|
|
6213
6301
|
const onNext = () => {
|
|
6214
|
-
const { error, message } = validate();
|
|
6302
|
+
const { error, message: validationMessage } = validate();
|
|
6303
|
+
if (error === "Warning" /* Warning */ && formStep === 0) {
|
|
6304
|
+
console.log("validationError: Warning: ", validationMessage);
|
|
6305
|
+
setWarningModalOpen({ message: validationMessage });
|
|
6306
|
+
return;
|
|
6307
|
+
}
|
|
6215
6308
|
if (error !== "ValidationError" /* Error */ && !formStep) {
|
|
6216
6309
|
return setFormStep(1);
|
|
6217
6310
|
}
|
|
6218
6311
|
if (error !== "ValidationError" /* Error */ && formStep > 0) {
|
|
6219
6312
|
return handleSubmit();
|
|
6220
6313
|
}
|
|
6221
|
-
toast5.error(
|
|
6314
|
+
toast5.error(validationMessage, { icon: /* @__PURE__ */ React111.createElement(Error_default, null) });
|
|
6222
6315
|
mainRef.current?.click();
|
|
6223
6316
|
};
|
|
6224
6317
|
const onBack = () => {
|
|
@@ -6278,7 +6371,7 @@ var TransferWidget = ({
|
|
|
6278
6371
|
useEffect18(() => {
|
|
6279
6372
|
dispatch(setTheme(theme));
|
|
6280
6373
|
}, [theme]);
|
|
6281
|
-
return /* @__PURE__ */
|
|
6374
|
+
return /* @__PURE__ */ React111.createElement(
|
|
6282
6375
|
"div",
|
|
6283
6376
|
{
|
|
6284
6377
|
className: `kima-card ${theme.colorMode}`,
|
|
@@ -6286,14 +6379,28 @@ var TransferWidget = ({
|
|
|
6286
6379
|
background: theme.colorMode === "light" /* light */ ? theme.backgroundColorLight : theme.backgroundColorDark
|
|
6287
6380
|
}
|
|
6288
6381
|
},
|
|
6289
|
-
|
|
6290
|
-
|
|
6382
|
+
warningModalOpen && /* @__PURE__ */ React111.createElement(
|
|
6383
|
+
WarningModal_default,
|
|
6384
|
+
{
|
|
6385
|
+
message: warningModalOpen.message,
|
|
6386
|
+
onAcknowledge: () => {
|
|
6387
|
+
setWarningModalOpen(null);
|
|
6388
|
+
setFormStep(1);
|
|
6389
|
+
},
|
|
6390
|
+
onCancel: () => {
|
|
6391
|
+
setWarningModalOpen(null);
|
|
6392
|
+
setFormStep(0);
|
|
6393
|
+
}
|
|
6394
|
+
}
|
|
6395
|
+
),
|
|
6396
|
+
mode === "payment" /* payment */ && !transactionOption && /* @__PURE__ */ React111.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."),
|
|
6397
|
+
/* @__PURE__ */ React111.createElement("div", { className: "transfer-card" }, /* @__PURE__ */ React111.createElement("div", { className: "kima-card-header" }, /* @__PURE__ */ React111.createElement("div", { className: "topbar" }, /* @__PURE__ */ React111.createElement("div", { className: "title" }, /* @__PURE__ */ React111.createElement("h3", null, 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__ */ React111.createElement("div", { className: "control-buttons" }, pendingTxs > 0 ? /* @__PURE__ */ React111.createElement(TxButton_default, { theme }) : null, /* @__PURE__ */ React111.createElement(
|
|
6291
6398
|
ExternalLink_default,
|
|
6292
6399
|
{
|
|
6293
6400
|
to: helpURL ? helpURL : "https://docs.kima.network/kima-network/try-kima-with-the-demo-app"
|
|
6294
6401
|
},
|
|
6295
|
-
/* @__PURE__ */
|
|
6296
|
-
), formStep === 0 && mode !== "payment" /* payment */ && /* @__PURE__ */
|
|
6402
|
+
/* @__PURE__ */ React111.createElement("div", { className: "menu-button" }, "I need help")
|
|
6403
|
+
), formStep === 0 && mode !== "payment" /* payment */ && /* @__PURE__ */ React111.createElement(
|
|
6297
6404
|
"button",
|
|
6298
6405
|
{
|
|
6299
6406
|
className: "reset-button",
|
|
@@ -6301,7 +6408,7 @@ var TransferWidget = ({
|
|
|
6301
6408
|
disabled: isApproving || isSubmitting || isSigning
|
|
6302
6409
|
},
|
|
6303
6410
|
"Reset"
|
|
6304
|
-
))), mode === "payment" /* payment */ && paymentTitleOption?.title && /* @__PURE__ */
|
|
6411
|
+
))), mode === "payment" /* payment */ && paymentTitleOption?.title && /* @__PURE__ */ React111.createElement("h4", { className: "subtitle" }, paymentTitleOption.title)), /* @__PURE__ */ React111.createElement("div", { className: "kima-card-content", ref: mainRef }, formStep === 0 ? /* @__PURE__ */ React111.createElement(
|
|
6305
6412
|
SingleForm_default,
|
|
6306
6413
|
{
|
|
6307
6414
|
...{
|
|
@@ -6319,7 +6426,7 @@ var TransferWidget = ({
|
|
|
6319
6426
|
isCancellingApprove
|
|
6320
6427
|
}
|
|
6321
6428
|
}
|
|
6322
|
-
) : /* @__PURE__ */
|
|
6429
|
+
) : /* @__PURE__ */ React111.createElement(
|
|
6323
6430
|
ConfirmDetails_default,
|
|
6324
6431
|
{
|
|
6325
6432
|
...{
|
|
@@ -6338,12 +6445,12 @@ var TransferWidget = ({
|
|
|
6338
6445
|
isApproved
|
|
6339
6446
|
}
|
|
6340
6447
|
}
|
|
6341
|
-
)), /* @__PURE__ */
|
|
6448
|
+
)), /* @__PURE__ */ React111.createElement(
|
|
6342
6449
|
"div",
|
|
6343
6450
|
{
|
|
6344
6451
|
className: `kima-card-footer ${mode === "bridge" /* bridge */ && formStep !== 0 && "confirm"}`
|
|
6345
6452
|
},
|
|
6346
|
-
/* @__PURE__ */
|
|
6453
|
+
/* @__PURE__ */ React111.createElement("div", { className: `button-group` }, formStep !== 0 && /* @__PURE__ */ React111.createElement(
|
|
6347
6454
|
SecondaryButton_default,
|
|
6348
6455
|
{
|
|
6349
6456
|
clickHandler: onBack,
|
|
@@ -6351,7 +6458,7 @@ var TransferWidget = ({
|
|
|
6351
6458
|
disabled: isApproving || isSubmitting || isSigning
|
|
6352
6459
|
},
|
|
6353
6460
|
formStep > 0 ? "Back" : "Cancel"
|
|
6354
|
-
), allowance > 0 && formStep !== 0 ? /* @__PURE__ */
|
|
6461
|
+
), allowance > 0 && formStep !== 0 ? /* @__PURE__ */ React111.createElement(
|
|
6355
6462
|
SecondaryButton_default,
|
|
6356
6463
|
{
|
|
6357
6464
|
clickHandler: onCancelApprove,
|
|
@@ -6360,7 +6467,7 @@ var TransferWidget = ({
|
|
|
6360
6467
|
disabled: isCancellingApprove || isApproving || isSubmitting || isSigning
|
|
6361
6468
|
},
|
|
6362
6469
|
isCancellingApprove ? "Cancelling Approval" : "Cancel Approve"
|
|
6363
|
-
) : null, /* @__PURE__ */
|
|
6470
|
+
) : null, /* @__PURE__ */ React111.createElement(
|
|
6364
6471
|
PrimaryButton_default,
|
|
6365
6472
|
{
|
|
6366
6473
|
clickHandler: onNext,
|
|
@@ -6369,7 +6476,7 @@ var TransferWidget = ({
|
|
|
6369
6476
|
},
|
|
6370
6477
|
getButtonLabel()
|
|
6371
6478
|
))
|
|
6372
|
-
), /* @__PURE__ */
|
|
6479
|
+
), /* @__PURE__ */ React111.createElement(SolanaWalletConnectModal_default, null), /* @__PURE__ */ React111.createElement(TronWalletConnectModal_default, null), /* @__PURE__ */ React111.createElement(
|
|
6373
6480
|
Toaster2,
|
|
6374
6481
|
{
|
|
6375
6482
|
position: "top-right",
|
|
@@ -6394,7 +6501,7 @@ var TransferWidget = ({
|
|
|
6394
6501
|
}
|
|
6395
6502
|
}
|
|
6396
6503
|
}
|
|
6397
|
-
), /* @__PURE__ */
|
|
6504
|
+
), /* @__PURE__ */ React111.createElement("div", { className: "floating-footer" }, /* @__PURE__ */ React111.createElement("div", { className: `items ${theme.colorMode}` }, /* @__PURE__ */ React111.createElement("span", null, "Powered by"), /* @__PURE__ */ React111.createElement(FooterLogo_default, { width: 50, fill: "black" }), /* @__PURE__ */ React111.createElement("strong", null, "Network"))))
|
|
6398
6505
|
);
|
|
6399
6506
|
};
|
|
6400
6507
|
|
|
@@ -6468,7 +6575,7 @@ var KimaWidgetWrapper = ({
|
|
|
6468
6575
|
if (!chainData?.length) return;
|
|
6469
6576
|
indexPluginsByChain(chainData);
|
|
6470
6577
|
}, [chainData]);
|
|
6471
|
-
return submitted ? /* @__PURE__ */
|
|
6578
|
+
return submitted ? /* @__PURE__ */ React112.createElement(TransactionWidget, { theme }) : /* @__PURE__ */ React112.createElement(
|
|
6472
6579
|
TransferWidget,
|
|
6473
6580
|
{
|
|
6474
6581
|
theme,
|
|
@@ -6507,7 +6614,7 @@ var KimaTransactionWidget = ({
|
|
|
6507
6614
|
dispatch(setTargetChain(chainData[1]));
|
|
6508
6615
|
}
|
|
6509
6616
|
}, [chainData]);
|
|
6510
|
-
return isLoadingEnvs || isLoadingChainData ? /* @__PURE__ */
|
|
6617
|
+
return isLoadingEnvs || isLoadingChainData ? /* @__PURE__ */ React113.createElement(ring_default, null) : /* @__PURE__ */ React113.createElement(
|
|
6511
6618
|
KimaWidgetWrapper_default,
|
|
6512
6619
|
{
|
|
6513
6620
|
...{
|