@kimafinance/kima-transaction-widget 1.3.11 → 1.3.12
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 +14 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +18 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +14 -6
- 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.cjs
CHANGED
|
@@ -2750,12 +2750,14 @@ function useEvmAllowance() {
|
|
|
2750
2750
|
const appkitAccountInfo = (0, import_react79.useAppKitAccount)();
|
|
2751
2751
|
const sourceChain = (0, import_react_redux5.useSelector)(selectSourceChain);
|
|
2752
2752
|
const networkOption = (0, import_react_redux5.useSelector)(selectNetworkOption);
|
|
2753
|
-
const { totalFeeUsd, allowanceAmount, decimals } = (0, import_react_redux5.useSelector)(selectServiceFee);
|
|
2753
|
+
const { totalFeeUsd, allowanceAmount, submitAmount, decimals } = (0, import_react_redux5.useSelector)(selectServiceFee);
|
|
2754
2754
|
const selectedCoin = (0, import_react_redux5.useSelector)(selectSourceCurrency);
|
|
2755
2755
|
const tokenOptions = (0, import_react_redux5.useSelector)(selectTokenOptions);
|
|
2756
2756
|
const backendUrl = (0, import_react_redux5.useSelector)(selectBackendUrl);
|
|
2757
2757
|
const feeDeduct = (0, import_react_redux5.useSelector)(selectFeeDeduct);
|
|
2758
|
-
const allowanceNumber = Number(
|
|
2758
|
+
const allowanceNumber = Number(
|
|
2759
|
+
(0, import_ethers6.formatUnits)(feeDeduct ? submitAmount : allowanceAmount ?? "0", decimals)
|
|
2760
|
+
);
|
|
2759
2761
|
const amount = (0, import_react_redux5.useSelector)(selectAmount);
|
|
2760
2762
|
const { pools } = useGetPools_default(backendUrl, networkOption);
|
|
2761
2763
|
const walletAddress = externalProvider?.signer?.address || appkitAccountInfo?.address;
|
|
@@ -3057,10 +3059,13 @@ var import_web38 = require("@solana/web3.js");
|
|
|
3057
3059
|
var import_ethers7 = require("ethers");
|
|
3058
3060
|
function useSolanaAllowance() {
|
|
3059
3061
|
const sourceChain = (0, import_react_redux7.useSelector)(selectSourceChain);
|
|
3060
|
-
const { allowanceAmount, decimals } = (0, import_react_redux7.useSelector)(selectServiceFee);
|
|
3062
|
+
const { allowanceAmount, submitAmount, decimals } = (0, import_react_redux7.useSelector)(selectServiceFee);
|
|
3063
|
+
const feeDeduct = (0, import_react_redux7.useSelector)(selectFeeDeduct);
|
|
3061
3064
|
const backendUrl = (0, import_react_redux7.useSelector)(selectBackendUrl);
|
|
3062
3065
|
const networkOption = (0, import_react_redux7.useSelector)(selectNetworkOption);
|
|
3063
|
-
const allowanceNumber = Number(
|
|
3066
|
+
const allowanceNumber = Number(
|
|
3067
|
+
(0, import_ethers7.formatUnits)(feeDeduct ? submitAmount : allowanceAmount ?? "0", decimals)
|
|
3068
|
+
);
|
|
3064
3069
|
const { externalProvider } = useKimaContext();
|
|
3065
3070
|
const { connection: internalConnection } = (0, import_wallet_adapter_react3.useConnection)();
|
|
3066
3071
|
const {
|
|
@@ -3644,11 +3649,14 @@ function useTronAllowance() {
|
|
|
3644
3649
|
const sourceChain = (0, import_react_redux11.useSelector)(selectSourceChain);
|
|
3645
3650
|
const networkOption = (0, import_react_redux11.useSelector)(selectNetworkOption);
|
|
3646
3651
|
const backendUrl = (0, import_react_redux11.useSelector)(selectBackendUrl);
|
|
3647
|
-
const { allowanceAmount, decimals } = (0, import_react_redux11.useSelector)(selectServiceFee);
|
|
3652
|
+
const { allowanceAmount, submitAmount, decimals } = (0, import_react_redux11.useSelector)(selectServiceFee);
|
|
3648
3653
|
(0, import_tronwallet_adapter_react_hooks3.useWallet)();
|
|
3649
3654
|
const selectedCoin = (0, import_react_redux11.useSelector)(selectSourceCurrency);
|
|
3650
3655
|
const tokenOptions = (0, import_react_redux11.useSelector)(selectTokenOptions);
|
|
3651
|
-
const
|
|
3656
|
+
const feeDeduct = (0, import_react_redux11.useSelector)(selectFeeDeduct);
|
|
3657
|
+
const allowanceNumber = Number(
|
|
3658
|
+
(0, import_ethers9.formatUnits)(feeDeduct ? submitAmount : allowanceAmount ?? "0", decimals)
|
|
3659
|
+
);
|
|
3652
3660
|
const { pools } = useGetPools_default(backendUrl, networkOption);
|
|
3653
3661
|
const {
|
|
3654
3662
|
address: internalUserAddress,
|