@kimafinance/kima-transaction-widget 1.2.61-beta.1 → 1.2.62-beta.1
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.js +13 -10
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +13 -10
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7940,7 +7940,7 @@ function output(out, instance) {
|
|
|
7940
7940
|
exports.output = output;
|
|
7941
7941
|
const assert = { number, bool, bytes, hash, exists, output };
|
|
7942
7942
|
exports.default = assert;
|
|
7943
|
-
|
|
7943
|
+
|
|
7944
7944
|
});
|
|
7945
7945
|
|
|
7946
7946
|
unwrapExports(_assert);
|
|
@@ -7949,7 +7949,7 @@ var crypto = createCommonjsModule(function (module, exports) {
|
|
|
7949
7949
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7950
7950
|
exports.crypto = void 0;
|
|
7951
7951
|
exports.crypto = typeof globalThis === 'object' && 'crypto' in globalThis ? globalThis.crypto : undefined;
|
|
7952
|
-
|
|
7952
|
+
|
|
7953
7953
|
});
|
|
7954
7954
|
|
|
7955
7955
|
unwrapExports(crypto);
|
|
@@ -8151,7 +8151,7 @@ function randomBytes(bytesLength = 32) {
|
|
|
8151
8151
|
throw new Error('crypto.getRandomValues must be defined');
|
|
8152
8152
|
}
|
|
8153
8153
|
exports.randomBytes = randomBytes;
|
|
8154
|
-
|
|
8154
|
+
|
|
8155
8155
|
});
|
|
8156
8156
|
|
|
8157
8157
|
unwrapExports(utils);
|
|
@@ -8273,7 +8273,7 @@ class SHA2 extends utils.Hash {
|
|
|
8273
8273
|
}
|
|
8274
8274
|
}
|
|
8275
8275
|
exports.SHA2 = SHA2;
|
|
8276
|
-
|
|
8276
|
+
|
|
8277
8277
|
});
|
|
8278
8278
|
|
|
8279
8279
|
unwrapExports(_sha2);
|
|
@@ -8406,7 +8406,7 @@ class SHA224 extends SHA256 {
|
|
|
8406
8406
|
*/
|
|
8407
8407
|
exports.sha256 = (0, utils.wrapConstructor)(() => new SHA256());
|
|
8408
8408
|
exports.sha224 = (0, utils.wrapConstructor)(() => new SHA224());
|
|
8409
|
-
|
|
8409
|
+
|
|
8410
8410
|
});
|
|
8411
8411
|
|
|
8412
8412
|
unwrapExports(sha256);
|
|
@@ -11874,7 +11874,8 @@ var TransferWidget = function TransferWidget(_ref) {
|
|
|
11874
11874
|
var errorHandler = reactRedux.useSelector(selectErrorHandler);
|
|
11875
11875
|
var keplrHandler = reactRedux.useSelector(selectKeplrHandler);
|
|
11876
11876
|
var closeHandler = reactRedux.useSelector(selectCloseHandler);
|
|
11877
|
-
var
|
|
11877
|
+
var sourceCurrency = reactRedux.useSelector(selectSourceCurrency);
|
|
11878
|
+
var targetCurrency = reactRedux.useSelector(selectTargetCurrency);
|
|
11878
11879
|
var backendUrl = reactRedux.useSelector(selectBackendUrl);
|
|
11879
11880
|
var nodeProviderQuery = reactRedux.useSelector(selectNodeProviderQuery);
|
|
11880
11881
|
var bankDetails = reactRedux.useSelector(selectBankDetails);
|
|
@@ -12016,11 +12017,11 @@ var TransferWidget = function TransferWidget(_ref) {
|
|
|
12016
12017
|
for (var i = 0; i < poolBalance.length; i++) {
|
|
12017
12018
|
if (poolBalance[i].chainName === targetChain) {
|
|
12018
12019
|
for (var j = 0; j < poolBalance[i].balance.length; j++) {
|
|
12019
|
-
if (poolBalance[i].balance[j].tokenSymbol !==
|
|
12020
|
+
if (poolBalance[i].balance[j].tokenSymbol !== sourceCurrency) continue;
|
|
12020
12021
|
if (+poolBalance[i].balance[j].amount >= +amount + fee) {
|
|
12021
12022
|
return true;
|
|
12022
12023
|
}
|
|
12023
|
-
var symbol =
|
|
12024
|
+
var symbol = sourceCurrency;
|
|
12024
12025
|
var errorString = "Tried to transfer " + amount + " " + symbol + ", but " + CHAIN_NAMES_TO_STRING[targetChain] + " pool has only " + +poolBalance[i].balance[j].amount + " " + symbol;
|
|
12025
12026
|
console.log(errorString);
|
|
12026
12027
|
toast.toast.error(errorString);
|
|
@@ -12197,7 +12198,8 @@ var TransferWidget = function TransferWidget(_ref) {
|
|
|
12197
12198
|
originChain: sourceChain,
|
|
12198
12199
|
targetAddress: mode === exports.ModeOptions.payment ? transactionOption === null || transactionOption === void 0 ? void 0 : transactionOption.targetAddress : targetAddress,
|
|
12199
12200
|
targetChain: targetChain,
|
|
12200
|
-
|
|
12201
|
+
originSymbol: sourceCurrency,
|
|
12202
|
+
targetSymbol: targetCurrency,
|
|
12201
12203
|
amount: feeDeduct ? (+amount - fee).toFixed(8) : amount,
|
|
12202
12204
|
fee: feeParam,
|
|
12203
12205
|
htlcCreationHash: btcHash,
|
|
@@ -12212,7 +12214,8 @@ var TransferWidget = function TransferWidget(_ref) {
|
|
|
12212
12214
|
originChain: sourceChain,
|
|
12213
12215
|
targetAddress: mode === exports.ModeOptions.payment ? transactionOption === null || transactionOption === void 0 ? void 0 : transactionOption.targetAddress : targetAddress,
|
|
12214
12216
|
targetChain: targetChain,
|
|
12215
|
-
|
|
12217
|
+
originSymbol: sourceCurrency,
|
|
12218
|
+
targetSymbol: targetCurrency,
|
|
12216
12219
|
amount: feeDeduct ? (+amount - fee).toFixed(8) : amount,
|
|
12217
12220
|
fee: feeParam,
|
|
12218
12221
|
htlcCreationHash: '',
|