@subwallet/extension-base 1.3.7-0 → 1.3.9-0
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/background/KoniTypes.d.ts +11 -5
- package/background/KoniTypes.js +1 -1
- package/cjs/background/KoniTypes.js +1 -1
- package/cjs/core/logic-validation/transfer.js +35 -24
- package/cjs/core/substrate/system-pallet.js +1 -1
- package/cjs/core/substrate/xcm-parser.js +16 -2
- package/cjs/core/utils.js +2 -2
- package/cjs/koni/api/contract-handler/utils/index.js +15 -1
- package/cjs/koni/background/handlers/Extension.js +158 -86
- package/cjs/koni/background/handlers/State.js +11 -2
- package/cjs/packageInfo.js +1 -1
- package/cjs/services/balance-service/index.js +24 -2
- package/cjs/services/balance-service/transfer/smart-contract.js +16 -5
- package/cjs/services/balance-service/transfer/xcm/index.js +31 -1
- package/cjs/services/balance-service/transfer/xcm/polygonBridge.js +108 -0
- package/cjs/services/chain-online-service/constants.js +32 -0
- package/cjs/services/chain-online-service/index.js +190 -0
- package/cjs/services/chain-service/constants.js +3 -1
- package/cjs/services/chain-service/index.js +87 -127
- package/cjs/services/chain-service/utils/index.js +0 -2
- package/cjs/services/chain-service/utils/patch.js +7 -3
- package/cjs/services/fee-service/utils/index.js +14 -0
- package/cjs/services/inapp-notification-service/consts.js +6 -4
- package/cjs/services/inapp-notification-service/index.js +110 -6
- package/cjs/services/inapp-notification-service/interfaces.js +9 -1
- package/cjs/services/inapp-notification-service/utils/avail.js +88 -0
- package/cjs/services/inapp-notification-service/{utils.js → utils/common.js} +1 -84
- package/cjs/services/inapp-notification-service/utils/index.js +38 -0
- package/cjs/services/inapp-notification-service/utils/polygon.js +66 -0
- package/cjs/services/migration-service/scripts/MigrateTransactionHistoryBridge.js +37 -0
- package/cjs/services/migration-service/scripts/index.js +3 -1
- package/cjs/services/setting-service/SettingService.js +8 -0
- package/cjs/services/setting-service/constants.js +2 -1
- package/cjs/services/storage-service/DatabaseService.js +3 -0
- package/cjs/services/transaction-service/index.js +1 -1
- package/cjs/stores/ChainlistStore.js +18 -0
- package/cjs/types/index.js +11 -0
- package/cjs/types/transaction/error.js +1 -0
- package/cjs/utils/account/transform.js +1 -1
- package/core/logic-validation/transfer.d.ts +2 -1
- package/core/logic-validation/transfer.js +36 -25
- package/core/substrate/system-pallet.js +1 -1
- package/core/substrate/xcm-parser.d.ts +1 -0
- package/core/substrate/xcm-parser.js +15 -2
- package/core/types.d.ts +1 -0
- package/core/utils.js +2 -2
- package/koni/api/contract-handler/utils/index.d.ts +2 -0
- package/koni/api/contract-handler/utils/index.js +12 -0
- package/koni/api/contract-handler/utils/polygon_bridge_abi.json +1004 -0
- package/koni/background/handlers/Extension.d.ts +4 -0
- package/koni/background/handlers/Extension.js +93 -22
- package/koni/background/handlers/State.d.ts +2 -0
- package/koni/background/handlers/State.js +11 -2
- package/package.json +56 -14
- package/packageInfo.js +1 -1
- package/services/balance-service/index.d.ts +3 -0
- package/services/balance-service/index.js +21 -2
- package/services/balance-service/transfer/smart-contract.js +16 -5
- package/services/balance-service/transfer/xcm/index.d.ts +1 -0
- package/services/balance-service/transfer/xcm/index.js +29 -1
- package/services/balance-service/transfer/xcm/polygonBridge.d.ts +22 -0
- package/services/balance-service/transfer/xcm/polygonBridge.js +95 -0
- package/services/chain-online-service/constants.d.ts +4 -0
- package/services/chain-online-service/constants.js +23 -0
- package/services/chain-online-service/index.d.ts +22 -0
- package/services/chain-online-service/index.js +182 -0
- package/services/chain-service/constants.d.ts +1 -0
- package/services/chain-service/constants.js +1 -0
- package/services/chain-service/index.d.ts +6 -7
- package/services/chain-service/index.js +78 -116
- package/services/chain-service/utils/index.js +0 -2
- package/services/chain-service/utils/patch.d.ts +16 -1
- package/services/chain-service/utils/patch.js +7 -3
- package/services/fee-service/utils/index.js +14 -0
- package/services/inapp-notification-service/consts.d.ts +3 -1
- package/services/inapp-notification-service/consts.js +6 -4
- package/services/inapp-notification-service/index.d.ts +10 -2
- package/services/inapp-notification-service/index.js +111 -7
- package/services/inapp-notification-service/interfaces.d.ts +27 -3
- package/services/inapp-notification-service/interfaces.js +7 -0
- package/services/inapp-notification-service/utils/avail.d.ts +40 -0
- package/services/inapp-notification-service/utils/avail.js +73 -0
- package/services/inapp-notification-service/utils/common.d.ts +11 -0
- package/services/inapp-notification-service/{utils.js → utils/common.js} +1 -72
- package/services/inapp-notification-service/utils/index.d.ts +3 -0
- package/services/inapp-notification-service/utils/index.js +6 -0
- package/services/inapp-notification-service/utils/polygon.d.ts +71 -0
- package/services/inapp-notification-service/utils/polygon.js +54 -0
- package/services/migration-service/scripts/MigrateTransactionHistoryBridge.d.ts +4 -0
- package/services/migration-service/scripts/MigrateTransactionHistoryBridge.js +29 -0
- package/services/migration-service/scripts/index.js +3 -1
- package/services/setting-service/SettingService.d.ts +4 -0
- package/services/setting-service/SettingService.js +8 -0
- package/services/setting-service/constants.js +2 -1
- package/services/storage-service/DatabaseService.d.ts +1 -0
- package/services/storage-service/DatabaseService.js +3 -0
- package/services/transaction-service/index.js +1 -1
- package/stores/ChainlistStore.d.ts +7 -0
- package/stores/ChainlistStore.js +10 -0
- package/types/{avail-bridge → bridge}/index.d.ts +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.js +1 -0
- package/types/notification/index.d.ts +5 -0
- package/types/transaction/error.d.ts +2 -1
- package/types/transaction/error.js +1 -0
- package/utils/account/transform.js +1 -1
- package/services/inapp-notification-service/utils.d.ts +0 -55
- /package/cjs/types/{avail-bridge → bridge}/index.js +0 -0
- /package/types/{avail-bridge → bridge}/index.js +0 -0
|
@@ -33,12 +33,12 @@ var _token = require("@subwallet/extension-base/services/balance-service/transfe
|
|
|
33
33
|
var _tonTransfer = require("@subwallet/extension-base/services/balance-service/transfer/ton-transfer");
|
|
34
34
|
var _xcm = require("@subwallet/extension-base/services/balance-service/transfer/xcm");
|
|
35
35
|
var _availBridge = require("@subwallet/extension-base/services/balance-service/transfer/xcm/availBridge");
|
|
36
|
+
var _polygonBridge = require("@subwallet/extension-base/services/balance-service/transfer/xcm/polygonBridge");
|
|
36
37
|
var _constants2 = require("@subwallet/extension-base/services/chain-service/constants");
|
|
37
38
|
var _types2 = require("@subwallet/extension-base/services/chain-service/types");
|
|
38
39
|
var _utils4 = require("@subwallet/extension-base/services/chain-service/utils");
|
|
39
40
|
var _constants3 = require("@subwallet/extension-base/services/request-service/constants");
|
|
40
41
|
var _constants4 = require("@subwallet/extension-base/services/setting-service/constants");
|
|
41
|
-
var _constants5 = require("@subwallet/extension-base/services/wallet-connect-service/constants");
|
|
42
42
|
var _helpers2 = require("@subwallet/extension-base/services/wallet-connect-service/helpers");
|
|
43
43
|
var _storage = require("@subwallet/extension-base/storage");
|
|
44
44
|
var _stores = require("@subwallet/extension-base/stores");
|
|
@@ -1218,35 +1218,41 @@ class KoniExtension {
|
|
|
1218
1218
|
}
|
|
1219
1219
|
const transferNativeAmount = isTransferNativeToken ? transferAmount.value : '0';
|
|
1220
1220
|
const additionalValidator = async inputTransaction => {
|
|
1221
|
-
let
|
|
1222
|
-
let
|
|
1221
|
+
let senderSendingTokenTransferable;
|
|
1222
|
+
let receiverSystemAccountInfo;
|
|
1223
|
+
if (!(0, _utils4._isChainSubstrateCompatible)(chainInfo)) {
|
|
1224
|
+
return undefined;
|
|
1225
|
+
}
|
|
1223
1226
|
|
|
1224
1227
|
// Check ed for sender
|
|
1225
1228
|
if (!isTransferNativeToken) {
|
|
1226
|
-
const [
|
|
1229
|
+
const [_senderSendingTokenTransferable, _receiverNativeTotal] = await Promise.all([this.getAddressTransferableBalance({
|
|
1227
1230
|
address: from,
|
|
1228
1231
|
networkKey,
|
|
1229
1232
|
token: tokenSlug,
|
|
1230
1233
|
extrinsicType
|
|
1231
|
-
}), this.
|
|
1234
|
+
}), this.getAddressTotalBalance({
|
|
1232
1235
|
address: to,
|
|
1233
1236
|
networkKey,
|
|
1234
1237
|
token: nativeTokenSlug,
|
|
1235
1238
|
extrinsicType: _KoniTypes.ExtrinsicType.TRANSFER_BALANCE
|
|
1236
1239
|
})]);
|
|
1237
|
-
|
|
1238
|
-
|
|
1240
|
+
senderSendingTokenTransferable = BigInt(_senderSendingTokenTransferable.value);
|
|
1241
|
+
receiverSystemAccountInfo = _receiverNativeTotal.metadata;
|
|
1239
1242
|
}
|
|
1240
1243
|
const {
|
|
1241
|
-
value:
|
|
1242
|
-
} = await this.
|
|
1244
|
+
value: _receiverSendingTokenKeepAliveBalance
|
|
1245
|
+
} = await this.getAddressTotalBalance({
|
|
1243
1246
|
address: to,
|
|
1244
1247
|
networkKey,
|
|
1245
1248
|
token: tokenSlug,
|
|
1246
1249
|
extrinsicType
|
|
1247
1250
|
}); // todo: shouldn't be just transferable, locked also counts
|
|
1248
|
-
|
|
1249
|
-
const
|
|
1251
|
+
const receiverSendingTokenKeepAliveBalance = BigInt(_receiverSendingTokenKeepAliveBalance);
|
|
1252
|
+
const amount = BigInt(transferAmount.value);
|
|
1253
|
+
const substrateApi = this.#koniState.getSubstrateApi(networkKey);
|
|
1254
|
+
const isSendingTokenSufficient = await this.isSufficientToken(transferTokenInfo, substrateApi);
|
|
1255
|
+
const [warnings, errors] = (0, _transfer.additionalValidateTransferForRecipient)(transferTokenInfo, nativeTokenInfo, extrinsicType, receiverSendingTokenKeepAliveBalance, amount, senderSendingTokenTransferable, receiverSystemAccountInfo, isSendingTokenSufficient);
|
|
1250
1256
|
warnings.length && inputTransaction.warnings.push(...warnings);
|
|
1251
1257
|
errors.length && inputTransaction.errors.push(...errors);
|
|
1252
1258
|
};
|
|
@@ -1295,6 +1301,7 @@ class KoniExtension {
|
|
|
1295
1301
|
const isAvailBridgeFromEvm = (0, _utils4._isPureEvmChain)(chainInfoMap[originNetworkKey]) && (0, _availBridge.isAvailChainBridge)(destinationNetworkKey);
|
|
1296
1302
|
const isAvailBridgeFromAvail = (0, _availBridge.isAvailChainBridge)(originNetworkKey) && (0, _utils4._isPureEvmChain)(chainInfoMap[destinationNetworkKey]);
|
|
1297
1303
|
const isSnowBridgeEvmTransfer = (0, _utils4._isPureEvmChain)(chainInfoMap[originNetworkKey]) && (0, _xcmParser._isSnowBridgeXcm)(chainInfoMap[originNetworkKey], chainInfoMap[destinationNetworkKey]) && !isAvailBridgeFromEvm;
|
|
1304
|
+
const isPolygonBridgeTransfer = (0, _polygonBridge._isPolygonChainBridge)(originNetworkKey, destinationNetworkKey);
|
|
1298
1305
|
let additionalValidator;
|
|
1299
1306
|
let eventsHandler;
|
|
1300
1307
|
if (fromKeyPair && destinationTokenInfo) {
|
|
@@ -1311,7 +1318,9 @@ class KoniExtension {
|
|
|
1311
1318
|
evmApi
|
|
1312
1319
|
};
|
|
1313
1320
|
let funcCreateExtrinsic;
|
|
1314
|
-
if (
|
|
1321
|
+
if (isPolygonBridgeTransfer) {
|
|
1322
|
+
funcCreateExtrinsic = _xcm.createPolygonBridgeExtrinsic;
|
|
1323
|
+
} else if (isSnowBridgeEvmTransfer) {
|
|
1315
1324
|
funcCreateExtrinsic = _xcm.createSnowBridgeExtrinsic;
|
|
1316
1325
|
} else if (isAvailBridgeFromEvm) {
|
|
1317
1326
|
funcCreateExtrinsic = _xcm.createAvailBridgeTxFromEth;
|
|
@@ -1376,7 +1385,7 @@ class KoniExtension {
|
|
|
1376
1385
|
transaction: extrinsic,
|
|
1377
1386
|
data: inputData,
|
|
1378
1387
|
extrinsicType: _KoniTypes.ExtrinsicType.TRANSFER_XCM,
|
|
1379
|
-
chainType: !isSnowBridgeEvmTransfer && !isAvailBridgeFromEvm ? _KoniTypes.ChainType.SUBSTRATE : _KoniTypes.ChainType.EVM,
|
|
1388
|
+
chainType: !isSnowBridgeEvmTransfer && !isAvailBridgeFromEvm && !isPolygonBridgeTransfer ? _KoniTypes.ChainType.SUBSTRATE : _KoniTypes.ChainType.EVM,
|
|
1380
1389
|
transferNativeAmount: (0, _utils4._isNativeToken)(originTokenInfo) ? value : '0',
|
|
1381
1390
|
ignoreWarnings,
|
|
1382
1391
|
isTransferAll: transferAll,
|
|
@@ -1504,6 +1513,25 @@ class KoniExtension {
|
|
|
1504
1513
|
};
|
|
1505
1514
|
}
|
|
1506
1515
|
}
|
|
1516
|
+
async isSufficientToken(tokenInfo, substrateApi) {
|
|
1517
|
+
let metadata;
|
|
1518
|
+
if (_constants2.SUFFICIENT_CHAIN.includes(tokenInfo.originChain) && tokenInfo.assetType !== _types._AssetType.NATIVE) {
|
|
1519
|
+
const assetId = (0, _utils4._isBridgedToken)(tokenInfo) ? (0, _utils4._getXcmAssetMultilocation)(tokenInfo) : (0, _utils4._getTokenOnChainAssetId)(tokenInfo);
|
|
1520
|
+
const queryParams = {
|
|
1521
|
+
section: 'query',
|
|
1522
|
+
module: 'foreignAssets',
|
|
1523
|
+
method: 'asset',
|
|
1524
|
+
args: [assetId]
|
|
1525
|
+
};
|
|
1526
|
+
if (!(0, _utils4._isBridgedToken)(tokenInfo)) {
|
|
1527
|
+
queryParams.module = 'assets';
|
|
1528
|
+
}
|
|
1529
|
+
metadata = await substrateApi.makeRpcQuery(queryParams);
|
|
1530
|
+
} else {
|
|
1531
|
+
return false;
|
|
1532
|
+
}
|
|
1533
|
+
return metadata.isSufficient;
|
|
1534
|
+
}
|
|
1507
1535
|
async deleteCustomAsset(assetSlug) {
|
|
1508
1536
|
const assetInfo = this.#koniState.getAssetBySlug(assetSlug);
|
|
1509
1537
|
if (assetInfo && (0, _utils4._isCustomAsset)(assetSlug)) {
|
|
@@ -1534,14 +1562,23 @@ class KoniExtension {
|
|
|
1534
1562
|
}
|
|
1535
1563
|
return await this.#koniState.balanceService.getTransferableBalance(address, networkKey, token, extrinsicType);
|
|
1536
1564
|
}
|
|
1537
|
-
async
|
|
1565
|
+
async getAddressTotalBalance(_ref30) {
|
|
1566
|
+
let {
|
|
1567
|
+
address,
|
|
1568
|
+
extrinsicType,
|
|
1569
|
+
networkKey,
|
|
1570
|
+
token
|
|
1571
|
+
} = _ref30;
|
|
1572
|
+
return await this.#koniState.balanceService.getTotalBalance(address, networkKey, token, extrinsicType);
|
|
1573
|
+
}
|
|
1574
|
+
async getMaxTransferable(_ref31) {
|
|
1538
1575
|
let {
|
|
1539
1576
|
address,
|
|
1540
1577
|
destChain,
|
|
1541
1578
|
isXcmTransfer,
|
|
1542
1579
|
networkKey,
|
|
1543
1580
|
token
|
|
1544
|
-
} =
|
|
1581
|
+
} = _ref31;
|
|
1545
1582
|
const tokenInfo = token ? this.#koniState.chainService.getAssetBySlug(token) : this.#koniState.chainService.getNativeTokenInfo(networkKey);
|
|
1546
1583
|
if (!(0, _utils4._isNativeToken)(tokenInfo)) {
|
|
1547
1584
|
return await this.getAddressTransferableBalance({
|
|
@@ -1599,13 +1636,13 @@ class KoniExtension {
|
|
|
1599
1636
|
const bnMaxTransferable = new _bignumber.default(value);
|
|
1600
1637
|
return bnMaxTransferable.minus(mockTxFee);
|
|
1601
1638
|
}
|
|
1602
|
-
async subscribeAddressTransferableBalance(
|
|
1639
|
+
async subscribeAddressTransferableBalance(_ref32, id, port) {
|
|
1603
1640
|
let {
|
|
1604
1641
|
address,
|
|
1605
1642
|
extrinsicType,
|
|
1606
1643
|
networkKey,
|
|
1607
1644
|
token
|
|
1608
|
-
} =
|
|
1645
|
+
} = _ref32;
|
|
1609
1646
|
const cb = (0, _subscriptions.createSubscription)(id, port);
|
|
1610
1647
|
const convertData = data => {
|
|
1611
1648
|
return {
|
|
@@ -1656,11 +1693,11 @@ class KoniExtension {
|
|
|
1656
1693
|
isSendingSelf
|
|
1657
1694
|
};
|
|
1658
1695
|
}
|
|
1659
|
-
async enableChains(
|
|
1696
|
+
async enableChains(_ref33) {
|
|
1660
1697
|
let {
|
|
1661
1698
|
chainSlugs,
|
|
1662
1699
|
enableTokens
|
|
1663
|
-
} =
|
|
1700
|
+
} = _ref33;
|
|
1664
1701
|
try {
|
|
1665
1702
|
await Promise.all(chainSlugs.map(chainSlug => this.enableChain({
|
|
1666
1703
|
chainSlug,
|
|
@@ -1781,30 +1818,30 @@ class KoniExtension {
|
|
|
1781
1818
|
|
|
1782
1819
|
// Parse transaction
|
|
1783
1820
|
|
|
1784
|
-
parseSubstrateTransaction(
|
|
1821
|
+
parseSubstrateTransaction(_ref34) {
|
|
1785
1822
|
let {
|
|
1786
1823
|
data,
|
|
1787
1824
|
networkKey
|
|
1788
|
-
} =
|
|
1825
|
+
} = _ref34;
|
|
1789
1826
|
const apiProps = this.#koniState.getSubstrateApi(networkKey);
|
|
1790
1827
|
const apiPromise = apiProps.api;
|
|
1791
1828
|
return (0, _parseTransaction.parseSubstrateTransaction)(data, apiPromise);
|
|
1792
1829
|
}
|
|
1793
|
-
async parseEVMRLP(
|
|
1830
|
+
async parseEVMRLP(_ref35) {
|
|
1794
1831
|
let {
|
|
1795
1832
|
data
|
|
1796
|
-
} =
|
|
1833
|
+
} = _ref35;
|
|
1797
1834
|
return await (0, _parseTransaction2.parseEvmRlp)(data, this.#koniState.getChainInfoMap(), this.#koniState.getEvmApiMap());
|
|
1798
1835
|
}
|
|
1799
1836
|
|
|
1800
1837
|
// Sign
|
|
1801
1838
|
|
|
1802
|
-
qrSignSubstrate(
|
|
1839
|
+
qrSignSubstrate(_ref36) {
|
|
1803
1840
|
let {
|
|
1804
1841
|
address,
|
|
1805
1842
|
data,
|
|
1806
1843
|
networkKey
|
|
1807
|
-
} =
|
|
1844
|
+
} = _ref36;
|
|
1808
1845
|
const pair = _uiKeyring.keyring.getPair(address);
|
|
1809
1846
|
(0, _util.assert)(pair, (0, _i18next.t)('Unable to find account'));
|
|
1810
1847
|
if (pair.isLocked) {
|
|
@@ -1821,13 +1858,13 @@ class KoniExtension {
|
|
|
1821
1858
|
signature: signed
|
|
1822
1859
|
};
|
|
1823
1860
|
}
|
|
1824
|
-
async qrSignEVM(
|
|
1861
|
+
async qrSignEVM(_ref37) {
|
|
1825
1862
|
let {
|
|
1826
1863
|
address,
|
|
1827
1864
|
chainId,
|
|
1828
1865
|
message,
|
|
1829
1866
|
type
|
|
1830
|
-
} =
|
|
1867
|
+
} = _ref37;
|
|
1831
1868
|
let signed;
|
|
1832
1869
|
const network = this.getNetworkJsonByChainId(chainId);
|
|
1833
1870
|
if (!network) {
|
|
@@ -1911,11 +1948,11 @@ class KoniExtension {
|
|
|
1911
1948
|
});
|
|
1912
1949
|
return this.#koniState.getNominatorMetadata();
|
|
1913
1950
|
}
|
|
1914
|
-
async getBondingOptions(
|
|
1951
|
+
async getBondingOptions(_ref38) {
|
|
1915
1952
|
let {
|
|
1916
1953
|
chain,
|
|
1917
1954
|
type
|
|
1918
|
-
} =
|
|
1955
|
+
} = _ref38;
|
|
1919
1956
|
const apiProps = this.#koniState.getSubstrateApi(chain);
|
|
1920
1957
|
const chainInfo = this.#koniState.getChainInfo(chain);
|
|
1921
1958
|
const chainStakingMetadata = await this.#koniState.getStakingMetadataByChain(chain, type);
|
|
@@ -2105,12 +2142,12 @@ class KoniExtension {
|
|
|
2105
2142
|
}
|
|
2106
2143
|
|
|
2107
2144
|
// EVM Transaction
|
|
2108
|
-
async parseContractInput(
|
|
2145
|
+
async parseContractInput(_ref39) {
|
|
2109
2146
|
let {
|
|
2110
2147
|
chainId,
|
|
2111
2148
|
contract,
|
|
2112
2149
|
data
|
|
2113
|
-
} =
|
|
2150
|
+
} = _ref39;
|
|
2114
2151
|
const network = this.getNetworkJsonByChainId(chainId);
|
|
2115
2152
|
return await (0, _parseTransaction2.parseContractInput)(data, contract, network);
|
|
2116
2153
|
}
|
|
@@ -2210,10 +2247,10 @@ class KoniExtension {
|
|
|
2210
2247
|
|
|
2211
2248
|
// Unlock wallet
|
|
2212
2249
|
|
|
2213
|
-
keyringUnlock(
|
|
2250
|
+
keyringUnlock(_ref40) {
|
|
2214
2251
|
let {
|
|
2215
2252
|
password
|
|
2216
|
-
} =
|
|
2253
|
+
} = _ref40;
|
|
2217
2254
|
try {
|
|
2218
2255
|
_uiKeyring.keyring.unlockKeyring(password);
|
|
2219
2256
|
// this.#koniState.initMantaPay(password)
|
|
@@ -2244,11 +2281,11 @@ class KoniExtension {
|
|
|
2244
2281
|
|
|
2245
2282
|
// Export mnemonic
|
|
2246
2283
|
|
|
2247
|
-
keyringExportMnemonic(
|
|
2284
|
+
keyringExportMnemonic(_ref41) {
|
|
2248
2285
|
let {
|
|
2249
2286
|
address,
|
|
2250
2287
|
password
|
|
2251
|
-
} =
|
|
2288
|
+
} = _ref41;
|
|
2252
2289
|
const pair = _uiKeyring.keyring.getPair(address);
|
|
2253
2290
|
const result = pair.exportMnemonic(password);
|
|
2254
2291
|
return {
|
|
@@ -2258,10 +2295,10 @@ class KoniExtension {
|
|
|
2258
2295
|
|
|
2259
2296
|
// Reset wallet
|
|
2260
2297
|
|
|
2261
|
-
async resetWallet(
|
|
2298
|
+
async resetWallet(_ref42) {
|
|
2262
2299
|
let {
|
|
2263
2300
|
resetAll
|
|
2264
|
-
} =
|
|
2301
|
+
} = _ref42;
|
|
2265
2302
|
try {
|
|
2266
2303
|
await this.#koniState.resetWallet(resetAll);
|
|
2267
2304
|
return {
|
|
@@ -2277,10 +2314,10 @@ class KoniExtension {
|
|
|
2277
2314
|
}
|
|
2278
2315
|
|
|
2279
2316
|
/// Signing substrate request
|
|
2280
|
-
async signingApprovePasswordV2(
|
|
2317
|
+
async signingApprovePasswordV2(_ref43) {
|
|
2281
2318
|
let {
|
|
2282
2319
|
id
|
|
2283
|
-
} =
|
|
2320
|
+
} = _ref43;
|
|
2284
2321
|
const queued = this.#koniState.getSignRequest(id);
|
|
2285
2322
|
(0, _util.assert)(queued, (0, _i18next.t)('Unable to proceed. Please try again'));
|
|
2286
2323
|
const {
|
|
@@ -2486,10 +2523,10 @@ class KoniExtension {
|
|
|
2486
2523
|
getSupportedSmartContractTypes() {
|
|
2487
2524
|
return this.#koniState.getSupportedSmartContractTypes();
|
|
2488
2525
|
}
|
|
2489
|
-
getTransaction(
|
|
2526
|
+
getTransaction(_ref44) {
|
|
2490
2527
|
let {
|
|
2491
2528
|
id
|
|
2492
|
-
} =
|
|
2529
|
+
} = _ref44;
|
|
2493
2530
|
const {
|
|
2494
2531
|
transaction,
|
|
2495
2532
|
...transactionResult
|
|
@@ -2499,8 +2536,8 @@ class KoniExtension {
|
|
|
2499
2536
|
subscribeTransactions(id, port) {
|
|
2500
2537
|
const cb = (0, _subscriptions.createSubscription)(id, port);
|
|
2501
2538
|
function convertRs(rs) {
|
|
2502
|
-
return Object.fromEntries(Object.entries(rs).map(
|
|
2503
|
-
let [key, value] =
|
|
2539
|
+
return Object.fromEntries(Object.entries(rs).map(_ref45 => {
|
|
2540
|
+
let [key, value] = _ref45;
|
|
2504
2541
|
const {
|
|
2505
2542
|
additionalValidator,
|
|
2506
2543
|
eventsHandler,
|
|
@@ -2532,10 +2569,10 @@ class KoniExtension {
|
|
|
2532
2569
|
});
|
|
2533
2570
|
return notificationSubject.value;
|
|
2534
2571
|
}
|
|
2535
|
-
async reloadCron(
|
|
2572
|
+
async reloadCron(_ref46) {
|
|
2536
2573
|
let {
|
|
2537
2574
|
data
|
|
2538
|
-
} =
|
|
2575
|
+
} = _ref46;
|
|
2539
2576
|
if (data === 'nft') {
|
|
2540
2577
|
return await this.#koniState.reloadNft();
|
|
2541
2578
|
} else if (data === 'staking') {
|
|
@@ -2578,10 +2615,10 @@ class KoniExtension {
|
|
|
2578
2615
|
}
|
|
2579
2616
|
|
|
2580
2617
|
// Phishing detect
|
|
2581
|
-
async passPhishingPage(
|
|
2618
|
+
async passPhishingPage(_ref47) {
|
|
2582
2619
|
let {
|
|
2583
2620
|
url
|
|
2584
|
-
} =
|
|
2621
|
+
} = _ref47;
|
|
2585
2622
|
return await this.#koniState.approvePassPhishingPage(url);
|
|
2586
2623
|
}
|
|
2587
2624
|
|
|
@@ -2602,10 +2639,10 @@ class KoniExtension {
|
|
|
2602
2639
|
/// Wallet connect
|
|
2603
2640
|
|
|
2604
2641
|
// Connect
|
|
2605
|
-
async connectWalletConnect(
|
|
2642
|
+
async connectWalletConnect(_ref48) {
|
|
2606
2643
|
let {
|
|
2607
2644
|
uri
|
|
2608
|
-
} =
|
|
2645
|
+
} = _ref48;
|
|
2609
2646
|
await this.#koniState.walletConnectService.connect(uri);
|
|
2610
2647
|
return true;
|
|
2611
2648
|
}
|
|
@@ -2618,11 +2655,11 @@ class KoniExtension {
|
|
|
2618
2655
|
});
|
|
2619
2656
|
return this.#koniState.requestService.allConnectWCRequests;
|
|
2620
2657
|
}
|
|
2621
|
-
async approveWalletConnectSession(
|
|
2658
|
+
async approveWalletConnectSession(_ref49) {
|
|
2622
2659
|
let {
|
|
2623
2660
|
accounts: selectedAccounts,
|
|
2624
2661
|
id
|
|
2625
|
-
} =
|
|
2662
|
+
} = _ref49;
|
|
2626
2663
|
const request = this.#koniState.requestService.getConnectWCRequest(id);
|
|
2627
2664
|
if ((0, _helpers2.isProposalExpired)(request.request.params)) {
|
|
2628
2665
|
throw new Error('The proposal has been expired');
|
|
@@ -2634,8 +2671,8 @@ class KoniExtension {
|
|
|
2634
2671
|
const availableNamespaces = {};
|
|
2635
2672
|
const namespaces = {};
|
|
2636
2673
|
const chainInfoMap = this.#koniState.getChainInfoMap();
|
|
2637
|
-
Object.entries(requiredNamespaces).forEach(
|
|
2638
|
-
let [key, namespace] =
|
|
2674
|
+
Object.entries(requiredNamespaces).forEach(_ref50 => {
|
|
2675
|
+
let [key, namespace] = _ref50;
|
|
2639
2676
|
if ((0, _helpers2.isSupportWalletConnectNamespace)(key)) {
|
|
2640
2677
|
if (namespace.chains) {
|
|
2641
2678
|
const unSupportChains = namespace.chains.filter(chain => !(0, _helpers2.isSupportWalletConnectChain)(chain, chainInfoMap));
|
|
@@ -2648,8 +2685,8 @@ class KoniExtension {
|
|
|
2648
2685
|
throw new Error((0, _utils6.getSdkError)('UNSUPPORTED_NAMESPACE_KEY').message + ' ' + key);
|
|
2649
2686
|
}
|
|
2650
2687
|
});
|
|
2651
|
-
Object.entries(optionalNamespaces).forEach(
|
|
2652
|
-
let [key, namespace] =
|
|
2688
|
+
Object.entries(optionalNamespaces).forEach(_ref51 => {
|
|
2689
|
+
let [key, namespace] = _ref51;
|
|
2653
2690
|
if ((0, _helpers2.isSupportWalletConnectNamespace)(key)) {
|
|
2654
2691
|
if (namespace.chains) {
|
|
2655
2692
|
const supportChains = namespace.chains.filter(chain => (0, _helpers2.isSupportWalletConnectChain)(chain, chainInfoMap)) || [];
|
|
@@ -2673,14 +2710,14 @@ class KoniExtension {
|
|
|
2673
2710
|
}
|
|
2674
2711
|
}
|
|
2675
2712
|
});
|
|
2676
|
-
Object.entries(availableNamespaces).forEach(
|
|
2677
|
-
let [key, namespace] =
|
|
2713
|
+
Object.entries(availableNamespaces).forEach(_ref52 => {
|
|
2714
|
+
let [key, namespace] = _ref52;
|
|
2678
2715
|
if (namespace.chains) {
|
|
2679
|
-
const accounts =
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
accounts.push(...selectedAccounts.filter(address => (0, _utilCrypto.isEthereumAddress)(address) === (key === _constants5.WALLET_CONNECT_EIP155_NAMESPACE)).map(address => `${chain}:${address}`));
|
|
2716
|
+
const accounts = selectedAccounts.filter(address => {
|
|
2717
|
+
const [_namespace] = address.split(':');
|
|
2718
|
+
return _namespace === key;
|
|
2683
2719
|
});
|
|
2720
|
+
const chains = (0, _utils5.uniqueStringArray)(namespace.chains);
|
|
2684
2721
|
namespaces[key] = {
|
|
2685
2722
|
accounts,
|
|
2686
2723
|
methods: namespace.methods,
|
|
@@ -2698,10 +2735,10 @@ class KoniExtension {
|
|
|
2698
2735
|
request.resolve();
|
|
2699
2736
|
return true;
|
|
2700
2737
|
}
|
|
2701
|
-
async rejectWalletConnectSession(
|
|
2738
|
+
async rejectWalletConnectSession(_ref53) {
|
|
2702
2739
|
let {
|
|
2703
2740
|
id
|
|
2704
|
-
} =
|
|
2741
|
+
} = _ref53;
|
|
2705
2742
|
const request = this.#koniState.requestService.getConnectWCRequest(id);
|
|
2706
2743
|
const wcId = request.request.id;
|
|
2707
2744
|
if ((0, _helpers2.isProposalExpired)(request.request.params)) {
|
|
@@ -2723,10 +2760,10 @@ class KoniExtension {
|
|
|
2723
2760
|
});
|
|
2724
2761
|
return this.#koniState.walletConnectService.sessions;
|
|
2725
2762
|
}
|
|
2726
|
-
async disconnectWalletConnectSession(
|
|
2763
|
+
async disconnectWalletConnectSession(_ref54) {
|
|
2727
2764
|
let {
|
|
2728
2765
|
topic
|
|
2729
|
-
} =
|
|
2766
|
+
} = _ref54;
|
|
2730
2767
|
await this.#koniState.walletConnectService.disconnect(topic);
|
|
2731
2768
|
return true;
|
|
2732
2769
|
}
|
|
@@ -2739,18 +2776,18 @@ class KoniExtension {
|
|
|
2739
2776
|
});
|
|
2740
2777
|
return this.#koniState.requestService.allNotSupportWCRequests;
|
|
2741
2778
|
}
|
|
2742
|
-
approveWalletConnectNotSupport(
|
|
2779
|
+
approveWalletConnectNotSupport(_ref55) {
|
|
2743
2780
|
let {
|
|
2744
2781
|
id
|
|
2745
|
-
} =
|
|
2782
|
+
} = _ref55;
|
|
2746
2783
|
const request = this.#koniState.requestService.getNotSupportWCRequest(id);
|
|
2747
2784
|
request.resolve();
|
|
2748
2785
|
return true;
|
|
2749
2786
|
}
|
|
2750
|
-
rejectWalletConnectNotSupport(
|
|
2787
|
+
rejectWalletConnectNotSupport(_ref56) {
|
|
2751
2788
|
let {
|
|
2752
2789
|
id
|
|
2753
|
-
} =
|
|
2790
|
+
} = _ref56;
|
|
2754
2791
|
const request = this.#koniState.requestService.getNotSupportWCRequest(id);
|
|
2755
2792
|
request.reject(new Error('USER_REJECTED'));
|
|
2756
2793
|
return true;
|
|
@@ -2758,11 +2795,11 @@ class KoniExtension {
|
|
|
2758
2795
|
|
|
2759
2796
|
/// Manta
|
|
2760
2797
|
|
|
2761
|
-
async enableMantaPay(
|
|
2798
|
+
async enableMantaPay(_ref57) {
|
|
2762
2799
|
let {
|
|
2763
2800
|
address,
|
|
2764
2801
|
password
|
|
2765
|
-
} =
|
|
2802
|
+
} = _ref57;
|
|
2766
2803
|
// always takes the current account
|
|
2767
2804
|
function timeout() {
|
|
2768
2805
|
return new Promise(resolve => setTimeout(resolve, 1500));
|
|
@@ -2852,11 +2889,11 @@ class KoniExtension {
|
|
|
2852
2889
|
async disableMantaPay(address) {
|
|
2853
2890
|
return this.#koniState.disableMantaPay(address);
|
|
2854
2891
|
}
|
|
2855
|
-
async isTonBounceableAddress(
|
|
2892
|
+
async isTonBounceableAddress(_ref58) {
|
|
2856
2893
|
let {
|
|
2857
2894
|
address,
|
|
2858
2895
|
chain
|
|
2859
|
-
} =
|
|
2896
|
+
} = _ref58;
|
|
2860
2897
|
try {
|
|
2861
2898
|
const tonApi = this.#koniState.getTonApi(chain);
|
|
2862
2899
|
const state = await tonApi.getAccountState(address);
|
|
@@ -2902,10 +2939,10 @@ class KoniExtension {
|
|
|
2902
2939
|
|
|
2903
2940
|
/* Metadata */
|
|
2904
2941
|
|
|
2905
|
-
async findRawMetadata(
|
|
2942
|
+
async findRawMetadata(_ref59) {
|
|
2906
2943
|
let {
|
|
2907
2944
|
genesisHash
|
|
2908
|
-
} =
|
|
2945
|
+
} = _ref59;
|
|
2909
2946
|
const {
|
|
2910
2947
|
metadata,
|
|
2911
2948
|
specVersion,
|
|
@@ -2919,20 +2956,20 @@ class KoniExtension {
|
|
|
2919
2956
|
userExtensions
|
|
2920
2957
|
};
|
|
2921
2958
|
}
|
|
2922
|
-
async calculateMetadataHash(
|
|
2959
|
+
async calculateMetadataHash(_ref60) {
|
|
2923
2960
|
let {
|
|
2924
2961
|
chain
|
|
2925
|
-
} =
|
|
2962
|
+
} = _ref60;
|
|
2926
2963
|
const hash = await this.#koniState.calculateMetadataHash(chain);
|
|
2927
2964
|
return {
|
|
2928
2965
|
metadataHash: hash || ''
|
|
2929
2966
|
};
|
|
2930
2967
|
}
|
|
2931
|
-
async shortenMetadata(
|
|
2968
|
+
async shortenMetadata(_ref61) {
|
|
2932
2969
|
let {
|
|
2933
2970
|
chain,
|
|
2934
2971
|
txBlob
|
|
2935
|
-
} =
|
|
2972
|
+
} = _ref61;
|
|
2936
2973
|
const shorten = await this.#koniState.shortenMetadata(chain, txBlob);
|
|
2937
2974
|
return {
|
|
2938
2975
|
txMetadata: shorten || ''
|
|
@@ -3178,18 +3215,18 @@ class KoniExtension {
|
|
|
3178
3215
|
|
|
3179
3216
|
/* Campaign */
|
|
3180
3217
|
|
|
3181
|
-
unlockDotCheckCanMint(
|
|
3218
|
+
unlockDotCheckCanMint(_ref62) {
|
|
3182
3219
|
let {
|
|
3183
3220
|
address,
|
|
3184
3221
|
network,
|
|
3185
3222
|
slug
|
|
3186
|
-
} =
|
|
3223
|
+
} = _ref62;
|
|
3187
3224
|
return this.#koniState.mintCampaignService.unlockDotCampaign.canMint(address, slug, network);
|
|
3188
3225
|
}
|
|
3189
|
-
unlockDotSubscribeMintedData(id, port,
|
|
3226
|
+
unlockDotSubscribeMintedData(id, port, _ref63) {
|
|
3190
3227
|
let {
|
|
3191
3228
|
transactionId
|
|
3192
|
-
} =
|
|
3229
|
+
} = _ref63;
|
|
3193
3230
|
const cb = (0, _subscriptions.createSubscription)(id, port);
|
|
3194
3231
|
const subscription = this.#koniState.mintCampaignService.unlockDotCampaign.subscribeMintedNft(transactionId, cb);
|
|
3195
3232
|
this.createUnsubscriptionHandle(id, subscription.unsubscribe);
|
|
@@ -3221,10 +3258,10 @@ class KoniExtension {
|
|
|
3221
3258
|
});
|
|
3222
3259
|
return filterBanner(await this.#koniState.campaignService.getProcessingCampaign());
|
|
3223
3260
|
}
|
|
3224
|
-
async completeCampaignBanner(
|
|
3261
|
+
async completeCampaignBanner(_ref64) {
|
|
3225
3262
|
let {
|
|
3226
3263
|
slug
|
|
3227
|
-
} =
|
|
3264
|
+
} = _ref64;
|
|
3228
3265
|
const campaign = await this.#koniState.dbService.getCampaign(slug);
|
|
3229
3266
|
if (campaign) {
|
|
3230
3267
|
await this.#koniState.dbService.upsertCampaign({
|
|
@@ -3452,7 +3489,7 @@ class KoniExtension {
|
|
|
3452
3489
|
chain,
|
|
3453
3490
|
notification
|
|
3454
3491
|
} = data;
|
|
3455
|
-
const extrinsicType = _KoniTypes.ExtrinsicType.
|
|
3492
|
+
const extrinsicType = _KoniTypes.ExtrinsicType.CLAIM_BRIDGE;
|
|
3456
3493
|
let transaction = null;
|
|
3457
3494
|
let chainType;
|
|
3458
3495
|
if ((0, _keyring.isSubstrateAddress)(address)) {
|
|
@@ -3473,6 +3510,32 @@ class KoniExtension {
|
|
|
3473
3510
|
chainType
|
|
3474
3511
|
});
|
|
3475
3512
|
}
|
|
3513
|
+
async getIsClaimedPolygonBridge(data) {
|
|
3514
|
+
const evmApi = this.#koniState.getEvmApi(data.chainslug);
|
|
3515
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
3516
|
+
const isClaimed = await (0, _polygonBridge.isClaimedPolygonBridge)(data.chainslug, data.counter, data.sourceNetwork, evmApi);
|
|
3517
|
+
return isClaimed;
|
|
3518
|
+
}
|
|
3519
|
+
async submitClaimPolygonBridge(data) {
|
|
3520
|
+
const {
|
|
3521
|
+
address,
|
|
3522
|
+
chain,
|
|
3523
|
+
notification
|
|
3524
|
+
} = data;
|
|
3525
|
+
const extrinsicType = _KoniTypes.ExtrinsicType.CLAIM_BRIDGE;
|
|
3526
|
+
let transaction = null;
|
|
3527
|
+
const evmApi = this.#koniState.getEvmApi(chain);
|
|
3528
|
+
transaction = await (0, _polygonBridge.getClaimPolygonBridge)(chain, notification, evmApi);
|
|
3529
|
+
const chainType = _KoniTypes.ChainType.EVM;
|
|
3530
|
+
return await this.#koniState.transactionService.handleTransaction({
|
|
3531
|
+
address,
|
|
3532
|
+
chain,
|
|
3533
|
+
transaction,
|
|
3534
|
+
data,
|
|
3535
|
+
extrinsicType,
|
|
3536
|
+
chainType
|
|
3537
|
+
});
|
|
3538
|
+
}
|
|
3476
3539
|
|
|
3477
3540
|
/* Ledger */
|
|
3478
3541
|
|
|
@@ -4060,6 +4123,8 @@ class KoniExtension {
|
|
|
4060
4123
|
return this.fetchInappNotifications(request);
|
|
4061
4124
|
case 'pri(inappNotification.get)':
|
|
4062
4125
|
return this.getInappNotification(request);
|
|
4126
|
+
case 'pri(inappNotification.isClaimedPolygonBridge)':
|
|
4127
|
+
return this.getIsClaimedPolygonBridge(request);
|
|
4063
4128
|
/* Notification service */
|
|
4064
4129
|
|
|
4065
4130
|
/* Avail Bridge */
|
|
@@ -4067,6 +4132,13 @@ class KoniExtension {
|
|
|
4067
4132
|
return this.submitClaimAvailBridge(request);
|
|
4068
4133
|
/* Avail Bridge */
|
|
4069
4134
|
|
|
4135
|
+
/* Polygon Bridge */
|
|
4136
|
+
|
|
4137
|
+
case 'pri(polygonBridge.submitClaimPolygonBridge)':
|
|
4138
|
+
return this.submitClaimPolygonBridge(request);
|
|
4139
|
+
|
|
4140
|
+
/* Polygon Bridge */
|
|
4141
|
+
|
|
4070
4142
|
/* Ledger */
|
|
4071
4143
|
case 'pri(ledger.generic.allow)':
|
|
4072
4144
|
return this.subscribeLedgerGenericAllowChains(id, port);
|
|
@@ -15,6 +15,7 @@ var _balanceService = require("@subwallet/extension-base/services/balance-servic
|
|
|
15
15
|
var _types = require("@subwallet/extension-base/services/base/types");
|
|
16
16
|
var _buyService = _interopRequireDefault(require("@subwallet/extension-base/services/buy-service"));
|
|
17
17
|
var _campaignService = _interopRequireDefault(require("@subwallet/extension-base/services/campaign-service"));
|
|
18
|
+
var _chainOnlineService = require("@subwallet/extension-base/services/chain-online-service");
|
|
18
19
|
var _chainService = require("@subwallet/extension-base/services/chain-service");
|
|
19
20
|
var _constants2 = require("@subwallet/extension-base/services/chain-service/constants");
|
|
20
21
|
var _utils = require("@subwallet/extension-base/services/chain-service/utils");
|
|
@@ -112,6 +113,7 @@ class KoniState {
|
|
|
112
113
|
this.feeService = new _service2.default(this);
|
|
113
114
|
this.swapService = new _swapService.SwapService(this);
|
|
114
115
|
this.inappNotificationService = new _inappNotificationService.InappNotificationService(this.dbService, this.keyringService, this.eventService, this.chainService);
|
|
116
|
+
this.chainOnlineService = new _chainOnlineService.ChainOnlineService(this.chainService, this.settingService, this.eventService, this.dbService);
|
|
115
117
|
this.subscription = new _subscription.KoniSubscription(this, this.dbService);
|
|
116
118
|
this.cron = new _cron.KoniCron(this, this.subscription, this.dbService);
|
|
117
119
|
this.logger = (0, _util.logger)('State');
|
|
@@ -206,7 +208,6 @@ class KoniState {
|
|
|
206
208
|
async init() {
|
|
207
209
|
await this.eventService.waitCryptoReady;
|
|
208
210
|
await this.chainService.init();
|
|
209
|
-
this.afterChainServiceInit();
|
|
210
211
|
await this.migrationService.run();
|
|
211
212
|
this.campaignService.init();
|
|
212
213
|
this.mktCampaignService.init();
|
|
@@ -222,7 +223,11 @@ class KoniState {
|
|
|
222
223
|
// TODO: consider moving this to a separate service
|
|
223
224
|
await this.dbService.stores.crowdloan.removeEndedCrowdloans();
|
|
224
225
|
await this.startSubscription();
|
|
226
|
+
this.chainOnlineService.checkLatestData();
|
|
225
227
|
this.chainService.checkLatestData();
|
|
228
|
+
this.chainService.subscribeChainInfoMap().subscribe(() => {
|
|
229
|
+
this.afterChainServiceInit();
|
|
230
|
+
});
|
|
226
231
|
}
|
|
227
232
|
async initMantaPay(password) {
|
|
228
233
|
var _this$chainService, _this$chainService$ma;
|
|
@@ -792,6 +797,7 @@ class KoniState {
|
|
|
792
797
|
return this.chainService.stopAllChainApis();
|
|
793
798
|
}
|
|
794
799
|
async resumeAllNetworks() {
|
|
800
|
+
this.chainOnlineService.checkLatestData();
|
|
795
801
|
return this.chainService.resumeAllChainApis();
|
|
796
802
|
}
|
|
797
803
|
publishCrowdloan(reset) {
|
|
@@ -1351,8 +1357,11 @@ class KoniState {
|
|
|
1351
1357
|
this.chainService.resetWallet(resetAll);
|
|
1352
1358
|
await this.walletConnectService.resetWallet(resetAll);
|
|
1353
1359
|
await this.chainService.init();
|
|
1354
|
-
this.
|
|
1360
|
+
this.chainOnlineService.checkLatestData();
|
|
1355
1361
|
this.chainService.checkLatestData();
|
|
1362
|
+
this.chainService.subscribeChainInfoMap().subscribe(() => {
|
|
1363
|
+
this.afterChainServiceInit();
|
|
1364
|
+
});
|
|
1356
1365
|
}
|
|
1357
1366
|
async enableMantaPay(updateStore, address, password, seedPhrase) {
|
|
1358
1367
|
var _this$chainService3, _this$chainService3$m, _this$chainService4, _this$chainService4$m, _this$chainService4$m2, _this$chainService11, _this$chainService11$, _this$chainService11$2;
|