@kimafinance/kima-transaction-widget 1.4.1 → 1.4.3
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 +27 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +34 -3
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +1 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.js +27 -34
- 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.d.cts
CHANGED
|
@@ -200,9 +200,7 @@ interface Props {
|
|
|
200
200
|
helpURL?: string;
|
|
201
201
|
transactionOption?: TransactionOption;
|
|
202
202
|
paymentTitleOption?: PaymentTitleOption;
|
|
203
|
-
excludedSourceNetworks?: Array<ChainName>;
|
|
204
|
-
excludedTargetNetworks?: Array<ChainName>;
|
|
205
203
|
}
|
|
206
|
-
declare const KimaTransactionWidget: ({ mode, txId, dAppOption, theme, titleOption, paymentTitleOption, helpURL, compliantOption, transactionOption
|
|
204
|
+
declare const KimaTransactionWidget: ({ mode, txId, dAppOption, theme, titleOption, paymentTitleOption, helpURL, compliantOption, transactionOption }: Props) => react__default.JSX.Element;
|
|
207
205
|
|
|
208
206
|
export { type BigintAmount, CHAIN_NAMES_TO_STRING, CHAIN_STRING_TO_NAME, ColorModeOptions, type CompliantOption, CurrencyOptions, DAppOptions, type ExternalProvider, type FeeResponse, type FeeResult, type FeeTransactionValues, KimaProvider, KimaTransactionWidget, ModeOptions, NetworkOptions, type Option, type PaymentTitleOption, type ServiceFee, type SolProvider, ChainName as SupportNetworks, type ThemeOptions, type TitleOption, type TransactionData, type TransactionOption, type TransactionValues, type TronProvider, type Web3ModalAccountInfo };
|
package/dist/index.d.ts
CHANGED
|
@@ -200,9 +200,7 @@ interface Props {
|
|
|
200
200
|
helpURL?: string;
|
|
201
201
|
transactionOption?: TransactionOption;
|
|
202
202
|
paymentTitleOption?: PaymentTitleOption;
|
|
203
|
-
excludedSourceNetworks?: Array<ChainName>;
|
|
204
|
-
excludedTargetNetworks?: Array<ChainName>;
|
|
205
203
|
}
|
|
206
|
-
declare const KimaTransactionWidget: ({ mode, txId, dAppOption, theme, titleOption, paymentTitleOption, helpURL, compliantOption, transactionOption
|
|
204
|
+
declare const KimaTransactionWidget: ({ mode, txId, dAppOption, theme, titleOption, paymentTitleOption, helpURL, compliantOption, transactionOption }: Props) => react__default.JSX.Element;
|
|
207
205
|
|
|
208
206
|
export { type BigintAmount, CHAIN_NAMES_TO_STRING, CHAIN_STRING_TO_NAME, ColorModeOptions, type CompliantOption, CurrencyOptions, DAppOptions, type ExternalProvider, type FeeResponse, type FeeResult, type FeeTransactionValues, KimaProvider, KimaTransactionWidget, ModeOptions, NetworkOptions, type Option, type PaymentTitleOption, type ServiceFee, type SolProvider, ChainName as SupportNetworks, type ThemeOptions, type TitleOption, type TransactionData, type TransactionOption, type TransactionValues, type TronProvider, type Web3ModalAccountInfo };
|
package/dist/index.js
CHANGED
|
@@ -1378,21 +1378,21 @@ import {
|
|
|
1378
1378
|
polygonZkEvmCardona,
|
|
1379
1379
|
sepolia
|
|
1380
1380
|
} from "@reown/appkit/networks";
|
|
1381
|
-
var ChainName = /* @__PURE__ */ ((
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
return
|
|
1381
|
+
var ChainName = /* @__PURE__ */ ((ChainName3) => {
|
|
1382
|
+
ChainName3["ETHEREUM"] = "ETH";
|
|
1383
|
+
ChainName3["POLYGON"] = "POL";
|
|
1384
|
+
ChainName3["AVALANCHE"] = "AVX";
|
|
1385
|
+
ChainName3["SOLANA"] = "SOL";
|
|
1386
|
+
ChainName3["BASE"] = "BASE";
|
|
1387
|
+
ChainName3["BSC"] = "BSC";
|
|
1388
|
+
ChainName3["ARBITRUM"] = "ARB";
|
|
1389
|
+
ChainName3["OPTIMISM"] = "OPT";
|
|
1390
|
+
ChainName3["POLYGON_ZKEVM"] = "ZKE";
|
|
1391
|
+
ChainName3["TRON"] = "TRX";
|
|
1392
|
+
ChainName3["FIAT"] = "FIAT";
|
|
1393
|
+
ChainName3["BTC"] = "BTC";
|
|
1394
|
+
ChainName3["BERA"] = "BERA";
|
|
1395
|
+
return ChainName3;
|
|
1396
1396
|
})(ChainName || {});
|
|
1397
1397
|
var CHAIN_NAMES_TO_APPKIT_NETWORK_MAINNET = {
|
|
1398
1398
|
["ETH" /* ETHEREUM */]: mainnet,
|
|
@@ -1662,7 +1662,6 @@ var initialState = {
|
|
|
1662
1662
|
compliantOption: true,
|
|
1663
1663
|
sourceCompliant: null,
|
|
1664
1664
|
targetCompliant: null,
|
|
1665
|
-
useFIAT: false,
|
|
1666
1665
|
bankDetails: {
|
|
1667
1666
|
iban: "",
|
|
1668
1667
|
recipient: ""
|
|
@@ -1806,9 +1805,6 @@ var optionSlice = createSlice({
|
|
|
1806
1805
|
setTargetCompliant: (state, action) => {
|
|
1807
1806
|
state.targetCompliant = action.payload;
|
|
1808
1807
|
},
|
|
1809
|
-
setUseFIAT: (state, action) => {
|
|
1810
|
-
state.useFIAT = action.payload;
|
|
1811
|
-
},
|
|
1812
1808
|
setBankDetails: (state, action) => {
|
|
1813
1809
|
state.bankDetails = action.payload;
|
|
1814
1810
|
},
|
|
@@ -1874,7 +1870,6 @@ var {
|
|
|
1874
1870
|
setCompliantOption,
|
|
1875
1871
|
setSourceCompliant,
|
|
1876
1872
|
setTargetCompliant,
|
|
1877
|
-
setUseFIAT,
|
|
1878
1873
|
setBankDetails,
|
|
1879
1874
|
setTargetChainFetching,
|
|
1880
1875
|
setSignature,
|
|
@@ -3902,7 +3897,7 @@ function useBalance3() {
|
|
|
3902
3897
|
const { tronWeb, userAddress: walletAddress } = useTronProvider();
|
|
3903
3898
|
const userAddress = mode === "light" /* light */ ? lightDemoAccounts.TRX : walletAddress;
|
|
3904
3899
|
const { data: allowanceData } = useQuery9({
|
|
3905
|
-
queryKey: ["tronAllowance", userAddress],
|
|
3900
|
+
queryKey: ["tronAllowance", userAddress, selectedCoin],
|
|
3906
3901
|
queryFn: async () => await getTokenAllowance3({
|
|
3907
3902
|
tokenOptions,
|
|
3908
3903
|
selectedCoin,
|
|
@@ -5847,7 +5842,8 @@ var NetworkSelector = ({
|
|
|
5847
5842
|
}
|
|
5848
5843
|
},
|
|
5849
5844
|
/* @__PURE__ */ React106.createElement(ChainIcon, { symbol: network.shortName }),
|
|
5850
|
-
/* @__PURE__ */ React106.createElement("p", null, network.name)
|
|
5845
|
+
/* @__PURE__ */ React106.createElement("p", null, network.name),
|
|
5846
|
+
network.disabled && /* @__PURE__ */ React106.createElement("span", { className: "tooltip" }, "Temporarily unavailable")
|
|
5851
5847
|
))
|
|
5852
5848
|
),
|
|
5853
5849
|
/* @__PURE__ */ React106.createElement("div", { className: `dropdown-icon ${collapsed ? "toggled" : "collapsed"}` }, /* @__PURE__ */ React106.createElement(Arrow_default, { fill: "none" }))
|
|
@@ -7041,7 +7037,13 @@ var TransferWidget = ({
|
|
|
7041
7037
|
if (fees) {
|
|
7042
7038
|
dispatch(setServiceFee(fees));
|
|
7043
7039
|
}
|
|
7044
|
-
|
|
7040
|
+
if (transactionOption?.sourceChain) {
|
|
7041
|
+
setInitialSelection((prev) => ({ ...prev, sourceSelection: false }));
|
|
7042
|
+
}
|
|
7043
|
+
if (mode === "payment" /* payment */ || transactionOption?.targetChain) {
|
|
7044
|
+
setInitialSelection((prev) => ({ ...prev, targetSelection: false }));
|
|
7045
|
+
}
|
|
7046
|
+
}, [fees, mode, transactionOption, dispatch]);
|
|
7045
7047
|
const { submitTransaction, isSubmitting } = useSubmitTransaction_default();
|
|
7046
7048
|
const isBackButtonEnabled = useMemo21(() => {
|
|
7047
7049
|
if (formStep !== 0) {
|
|
@@ -7358,9 +7360,6 @@ var useDebugCode = (sequence = ["D", "E", "B", "U", "G"]) => {
|
|
|
7358
7360
|
return debugMode;
|
|
7359
7361
|
};
|
|
7360
7362
|
|
|
7361
|
-
// src/components/KimaWidgetWrapper.tsx
|
|
7362
|
-
import log3 from "loglevel";
|
|
7363
|
-
|
|
7364
7363
|
// src/components/ErrorWidget.tsx
|
|
7365
7364
|
import React117 from "react";
|
|
7366
7365
|
import { useSelector as useSelector46 } from "react-redux";
|
|
@@ -7443,8 +7442,6 @@ var KimaWidgetWrapper = ({
|
|
|
7443
7442
|
helpURL = "",
|
|
7444
7443
|
compliantOption = true,
|
|
7445
7444
|
transactionOption,
|
|
7446
|
-
excludedSourceNetworks = [],
|
|
7447
|
-
excludedTargetNetworks = [],
|
|
7448
7445
|
chainData,
|
|
7449
7446
|
envOptions
|
|
7450
7447
|
}) => {
|
|
@@ -7506,7 +7503,7 @@ var KimaWidgetWrapper = ({
|
|
|
7506
7503
|
if (sourceChain.shortName === "CC") {
|
|
7507
7504
|
console.log("widget wrapper", submitted, ccTransactionStatus);
|
|
7508
7505
|
if (submitted) {
|
|
7509
|
-
|
|
7506
|
+
logger_default.debug("will return transaction widget on cc success");
|
|
7510
7507
|
return /* @__PURE__ */ React118.createElement(TransactionWidget, { theme });
|
|
7511
7508
|
} else if (ccTransactionStatus === "error-id") {
|
|
7512
7509
|
return /* @__PURE__ */ React118.createElement(
|
|
@@ -7588,9 +7585,7 @@ var KimaTransactionWidget = ({
|
|
|
7588
7585
|
paymentTitleOption,
|
|
7589
7586
|
helpURL = "",
|
|
7590
7587
|
compliantOption = false,
|
|
7591
|
-
transactionOption
|
|
7592
|
-
excludedSourceNetworks = [],
|
|
7593
|
-
excludedTargetNetworks = []
|
|
7588
|
+
transactionOption
|
|
7594
7589
|
}) => {
|
|
7595
7590
|
const dispatch = useDispatch28();
|
|
7596
7591
|
const { kimaBackendUrl } = useKimaContext();
|
|
@@ -7654,8 +7649,6 @@ var KimaTransactionWidget = ({
|
|
|
7654
7649
|
helpURL,
|
|
7655
7650
|
compliantOption,
|
|
7656
7651
|
transactionOption,
|
|
7657
|
-
excludedSourceNetworks,
|
|
7658
|
-
excludedTargetNetworks,
|
|
7659
7652
|
chainData,
|
|
7660
7653
|
envOptions
|
|
7661
7654
|
}
|