@subwallet/extension-base 1.3.59-1 → 1.3.60-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/cjs/koni/api/staking/bonding/utils.js +5 -4
- package/cjs/packageInfo.js +1 -1
- package/cjs/services/chain-service/constants.js +7 -2
- package/cjs/services/chain-service/utils/patch.js +1 -1
- package/cjs/services/earning-service/constants/chains.js +1 -1
- package/cjs/services/earning-service/handlers/native-staking/energy.js +5 -4
- package/cjs/services/earning-service/handlers/native-staking/relay-chain.js +1 -1
- package/cjs/services/transaction-service/utils.js +3 -3
- package/koni/api/staking/bonding/utils.d.ts +1 -1
- package/koni/api/staking/bonding/utils.js +5 -4
- package/package.json +6 -6
- package/packageInfo.js +1 -1
- package/services/chain-service/constants.js +7 -3
- package/services/chain-service/utils/patch.d.ts +1 -1
- package/services/chain-service/utils/patch.js +1 -1
- package/services/earning-service/constants/chains.js +1 -1
- package/services/earning-service/handlers/native-staking/energy.js +5 -4
- package/services/earning-service/handlers/native-staking/relay-chain.js +1 -1
- package/services/transaction-service/utils.js +3 -3
|
@@ -488,13 +488,14 @@ function getRelayEraRewardMap(eraRewardPointArray, startEraForPoints) {
|
|
|
488
488
|
}
|
|
489
489
|
return eraRewardMap;
|
|
490
490
|
}
|
|
491
|
-
async function getRelayMaxNominations(substrateApi) {
|
|
491
|
+
async function getRelayMaxNominations(substrateApi, chain) {
|
|
492
492
|
var _substrateApi$api$con, _substrateApi$api$con2, _substrateApi$api$cal;
|
|
493
493
|
await substrateApi.isReady;
|
|
494
|
-
const maxNominations = (
|
|
495
|
-
const _maxNominationsByNominationQuota = await ((_substrateApi$api$cal = substrateApi.api.call.stakingApi) === null || _substrateApi$api$cal === void 0 ? void 0 : _substrateApi$api$cal.nominationsQuota(0));
|
|
494
|
+
const maxNominations = (_substrateApi$api$con = substrateApi.api.consts.staking) === null || _substrateApi$api$con === void 0 ? void 0 : (_substrateApi$api$con2 = _substrateApi$api$con.maxNominations) === null || _substrateApi$api$con2 === void 0 ? void 0 : _substrateApi$api$con2.toString();
|
|
495
|
+
const _maxNominationsByNominationQuota = await ((_substrateApi$api$cal = substrateApi.api.call.stakingApi) === null || _substrateApi$api$cal === void 0 ? void 0 : _substrateApi$api$cal.nominationsQuota(0));
|
|
496
496
|
const maxNominationsByNominationQuota = _maxNominationsByNominationQuota === null || _maxNominationsByNominationQuota === void 0 ? void 0 : _maxNominationsByNominationQuota.toString();
|
|
497
|
-
|
|
497
|
+
const fallbackMaxNominations = ['zkverify_testnet', 'zkverify'].includes(chain) ? '10' : '16';
|
|
498
|
+
return maxNominationsByNominationQuota || maxNominations || fallbackMaxNominations;
|
|
498
499
|
}
|
|
499
500
|
const getMinStakeErrorMessage = (chainInfo, bnMinStake) => {
|
|
500
501
|
const tokenInfo = (0, _utils._getChainNativeTokenBasicInfo)(chainInfo);
|
package/cjs/packageInfo.js
CHANGED
|
@@ -123,7 +123,10 @@ const _STAKING_ERA_LENGTH_MAP = {
|
|
|
123
123
|
mythos: 24,
|
|
124
124
|
energy_web_x_testnet: 22 * 12 / 3600,
|
|
125
125
|
// 22 blocks per era, 1 block per 12s
|
|
126
|
-
energy_web_x: 7200 * 12 / 3600
|
|
126
|
+
energy_web_x: 7200 * 12 / 3600,
|
|
127
|
+
// 24 hours, 7200 blocks per era, 1 block per 12s,
|
|
128
|
+
zkverify_testnet: 6,
|
|
129
|
+
zkverify: 6
|
|
127
130
|
};
|
|
128
131
|
exports._STAKING_ERA_LENGTH_MAP = _STAKING_ERA_LENGTH_MAP;
|
|
129
132
|
const _EXPECTED_BLOCK_TIME = {
|
|
@@ -161,7 +164,9 @@ const _EXPECTED_BLOCK_TIME = {
|
|
|
161
164
|
muse_testnet: 6,
|
|
162
165
|
mythos: 6,
|
|
163
166
|
energy_web_x_testnet: 12,
|
|
164
|
-
energy_web_x: 12
|
|
167
|
+
energy_web_x: 12,
|
|
168
|
+
zkverify: 6,
|
|
169
|
+
zkverify_testnet: 6
|
|
165
170
|
};
|
|
166
171
|
exports._EXPECTED_BLOCK_TIME = _EXPECTED_BLOCK_TIME;
|
|
167
172
|
const _PARACHAIN_INFLATION_DISTRIBUTION = {
|
|
@@ -12,7 +12,7 @@ const PRODUCTION_BRANCHES = ['master', 'webapp', 'webapp-dev'];
|
|
|
12
12
|
const branchName = process.env.BRANCH_NAME || 'subwallet-dev';
|
|
13
13
|
const fetchDomain = process.env.PATCH_CHAIN_LIST_URL || (PRODUCTION_BRANCHES.indexOf(branchName) > -1 ? 'https://chain-list-assets.subwallet.app' : 'https://dev.sw-chain-list-assets.pages.dev');
|
|
14
14
|
const fetchFile = PRODUCTION_BRANCHES.indexOf(branchName) > -1 ? 'list.json' : 'preview.json';
|
|
15
|
-
const ChainListVersion = '0.2.
|
|
15
|
+
const ChainListVersion = '0.2.117'; // update this when build chain-list
|
|
16
16
|
|
|
17
17
|
// todo: move this interface to chainlist
|
|
18
18
|
exports.ChainListVersion = ChainListVersion;
|
|
@@ -8,7 +8,7 @@ exports._STAKING_CHAIN_GROUP = exports.TON_CHAINS = exports.ST_LIQUID_TOKEN_ABI
|
|
|
8
8
|
// SPDX-License-Identifier: Apache-2.0
|
|
9
9
|
|
|
10
10
|
const _STAKING_CHAIN_GROUP = {
|
|
11
|
-
relay: ['polkadot', 'kusama', 'aleph', 'polkadex', 'ternoa', 'alephTest', 'polkadexTest', 'westend', 'kate', 'edgeware', 'creditcoin', 'vara_network', 'goldberg_testnet', 'availTuringTest', 'avail_mainnet', 'vara_testnet', 'dentnet', 'cere', 'statemine', 'statemint', 'westend_assethub'],
|
|
11
|
+
relay: ['polkadot', 'kusama', 'aleph', 'polkadex', 'ternoa', 'alephTest', 'polkadexTest', 'westend', 'kate', 'edgeware', 'creditcoin', 'vara_network', 'goldberg_testnet', 'availTuringTest', 'avail_mainnet', 'vara_testnet', 'dentnet', 'cere', 'statemine', 'statemint', 'westend_assethub', 'zkverify', 'zkverify_testnet'],
|
|
12
12
|
assetHub: ['statemine', 'statemint', 'westend_assethub'],
|
|
13
13
|
para: ['moonbeam', 'moonriver', 'moonbase', 'turing', 'turingStaging', 'bifrost', 'bifrost_testnet', 'calamari_test', 'calamari', 'manta_network', 'polimec'],
|
|
14
14
|
astar: ['astar', 'shiden', 'shibuya'],
|
|
@@ -320,10 +320,11 @@ class EnergyNativeStakingPoolHandler extends _basePara.default {
|
|
|
320
320
|
const apiPromise = await this.substrateApi.isReady;
|
|
321
321
|
const binaryAmount = new _util.BN(amount);
|
|
322
322
|
const selectedCollatorInfo = selectedValidators[0];
|
|
323
|
+
const onchainCollatorInfo = (await apiPromise.api.query.parachainStaking.candidateInfo(selectedValidators[0].address)).toPrimitive();
|
|
323
324
|
const {
|
|
324
|
-
address: selectedCollatorAddress
|
|
325
|
-
nominatorCount: selectedCollatorNominatorCount
|
|
325
|
+
address: selectedCollatorAddress
|
|
326
326
|
} = selectedCollatorInfo;
|
|
327
|
+
const onchainSelectedCollatorNominatorCount = onchainCollatorInfo.nominationCount;
|
|
327
328
|
const compoundResult = extrinsic => {
|
|
328
329
|
return Promise.resolve([extrinsic, {
|
|
329
330
|
slug: this.nativeToken.slug,
|
|
@@ -331,7 +332,7 @@ class EnergyNativeStakingPoolHandler extends _basePara.default {
|
|
|
331
332
|
}]);
|
|
332
333
|
};
|
|
333
334
|
if (!positionInfo) {
|
|
334
|
-
const extrinsic = apiPromise.api.tx.parachainStaking.nominate(selectedCollatorAddress, binaryAmount, new _util.BN(
|
|
335
|
+
const extrinsic = apiPromise.api.tx.parachainStaking.nominate(selectedCollatorAddress, binaryAmount, new _util.BN(onchainSelectedCollatorNominatorCount), 0);
|
|
335
336
|
return compoundResult(extrinsic);
|
|
336
337
|
}
|
|
337
338
|
const {
|
|
@@ -340,7 +341,7 @@ class EnergyNativeStakingPoolHandler extends _basePara.default {
|
|
|
340
341
|
} = (0, _utils.getBondedValidators)(positionInfo.nominations);
|
|
341
342
|
const parsedSelectedCollatorAddress = (0, _utils3.reformatAddress)(selectedCollatorInfo.address, 0);
|
|
342
343
|
if (!bondedValidators.includes(parsedSelectedCollatorAddress)) {
|
|
343
|
-
const extrinsic = apiPromise.api.tx.parachainStaking.nominate(selectedCollatorAddress, binaryAmount, new _util.BN(
|
|
344
|
+
const extrinsic = apiPromise.api.tx.parachainStaking.nominate(selectedCollatorAddress, binaryAmount, new _util.BN(onchainSelectedCollatorNominatorCount), nominationCount);
|
|
344
345
|
return compoundResult(extrinsic);
|
|
345
346
|
} else {
|
|
346
347
|
const extrinsic = apiPromise.api.tx.parachainStaking.bondExtra(selectedCollatorAddress, binaryAmount);
|
|
@@ -67,7 +67,7 @@ class RelayNativeStakingPoolHandler extends _base.default {
|
|
|
67
67
|
}
|
|
68
68
|
const unlimitedNominatorRewarded = substrateApi.api.consts.staking.maxExposurePageSize !== undefined;
|
|
69
69
|
const maxNominatorRewarded = (_substrateApi$api$con = substrateApi.api.consts.staking.maxNominatorRewardedPerValidator) === null || _substrateApi$api$con === void 0 ? void 0 : _substrateApi$api$con.toString();
|
|
70
|
-
const maxNominations = await (0, _utils.getRelayMaxNominations)(substrateApi);
|
|
70
|
+
const maxNominations = await (0, _utils.getRelayMaxNominations)(substrateApi, this.chain);
|
|
71
71
|
const currentEra = _currentEra.toString();
|
|
72
72
|
const maxUnlockingChunks = substrateApi.api.consts.staking.maxUnlockingChunks.toString();
|
|
73
73
|
const unlockingEras = substrateApi.api.consts.staking.bondingDuration.toString();
|
|
@@ -60,6 +60,9 @@ function getBlockExplorerAccountRoute(explorerLink) {
|
|
|
60
60
|
if (explorerLink.includes('uniquescan.io')) {
|
|
61
61
|
return 'account';
|
|
62
62
|
}
|
|
63
|
+
if (explorerLink.includes('node.xode.net')) {
|
|
64
|
+
return 'account';
|
|
65
|
+
}
|
|
63
66
|
if (explorerLink.includes('tonviewer.com')) {
|
|
64
67
|
return '';
|
|
65
68
|
}
|
|
@@ -124,9 +127,6 @@ function getExplorerLink(chainInfo, value, type) {
|
|
|
124
127
|
const address = (0, _util.u8aToHex)((0, _utilCrypto.decodeAddress)(value));
|
|
125
128
|
return `${explorerLink}${explorerLink.endsWith('/') ? '' : '/'}${route}/${address}`;
|
|
126
129
|
}
|
|
127
|
-
if (chainInfo.slug === 'xode') {
|
|
128
|
-
return undefined;
|
|
129
|
-
}
|
|
130
130
|
return `${explorerLink}${explorerLink.endsWith('/') ? '' : '/'}${route}/${value}`;
|
|
131
131
|
}
|
|
132
132
|
if (explorerLink && (0, _util.isHex)((0, _util.hexAddPrefix)(value))) {
|
|
@@ -166,7 +166,7 @@ export declare function getRelayTopValidatorByPoints(validatorPointsList: Record
|
|
|
166
166
|
export declare function getRelayBlockedValidatorList(validators: any[]): string[];
|
|
167
167
|
export declare function getRelayWaitingValidatorList(validators: any[]): string[];
|
|
168
168
|
export declare function getRelayEraRewardMap(eraRewardPointArray: Codec[], startEraForPoints: number): Record<string, PalletStakingEraRewardPoints>;
|
|
169
|
-
export declare function getRelayMaxNominations(substrateApi: _SubstrateApi): Promise<string>;
|
|
169
|
+
export declare function getRelayMaxNominations(substrateApi: _SubstrateApi, chain: string): Promise<string>;
|
|
170
170
|
export declare const getMinStakeErrorMessage: (chainInfo: _ChainInfo, bnMinStake: BN) => string;
|
|
171
171
|
export declare const getMaxValidatorErrorMessage: (chainInfo: _ChainInfo, max: number) => string;
|
|
172
172
|
export declare const getExistUnstakeErrorMessage: (chain: string, type?: StakingType, isStakeMore?: boolean) => string;
|
|
@@ -443,13 +443,14 @@ export function getRelayEraRewardMap(eraRewardPointArray, startEraForPoints) {
|
|
|
443
443
|
}
|
|
444
444
|
return eraRewardMap;
|
|
445
445
|
}
|
|
446
|
-
export async function getRelayMaxNominations(substrateApi) {
|
|
446
|
+
export async function getRelayMaxNominations(substrateApi, chain) {
|
|
447
447
|
var _substrateApi$api$con, _substrateApi$api$con2, _substrateApi$api$cal;
|
|
448
448
|
await substrateApi.isReady;
|
|
449
|
-
const maxNominations = (
|
|
450
|
-
const _maxNominationsByNominationQuota = await ((_substrateApi$api$cal = substrateApi.api.call.stakingApi) === null || _substrateApi$api$cal === void 0 ? void 0 : _substrateApi$api$cal.nominationsQuota(0));
|
|
449
|
+
const maxNominations = (_substrateApi$api$con = substrateApi.api.consts.staking) === null || _substrateApi$api$con === void 0 ? void 0 : (_substrateApi$api$con2 = _substrateApi$api$con.maxNominations) === null || _substrateApi$api$con2 === void 0 ? void 0 : _substrateApi$api$con2.toString();
|
|
450
|
+
const _maxNominationsByNominationQuota = await ((_substrateApi$api$cal = substrateApi.api.call.stakingApi) === null || _substrateApi$api$cal === void 0 ? void 0 : _substrateApi$api$cal.nominationsQuota(0));
|
|
451
451
|
const maxNominationsByNominationQuota = _maxNominationsByNominationQuota === null || _maxNominationsByNominationQuota === void 0 ? void 0 : _maxNominationsByNominationQuota.toString();
|
|
452
|
-
|
|
452
|
+
const fallbackMaxNominations = ['zkverify_testnet', 'zkverify'].includes(chain) ? '10' : '16';
|
|
453
|
+
return maxNominationsByNominationQuota || maxNominations || fallbackMaxNominations;
|
|
453
454
|
}
|
|
454
455
|
export const getMinStakeErrorMessage = (chainInfo, bnMinStake) => {
|
|
455
456
|
const tokenInfo = _getChainNativeTokenBasicInfo(chainInfo);
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"./cjs/detectPackage.js"
|
|
18
18
|
],
|
|
19
19
|
"type": "module",
|
|
20
|
-
"version": "1.3.
|
|
20
|
+
"version": "1.3.60-1",
|
|
21
21
|
"main": "./cjs/index.js",
|
|
22
22
|
"module": "./index.js",
|
|
23
23
|
"types": "./index.d.ts",
|
|
@@ -2878,11 +2878,11 @@
|
|
|
2878
2878
|
"@sora-substrate/type-definitions": "^1.17.7",
|
|
2879
2879
|
"@substrate/connect": "^0.8.9",
|
|
2880
2880
|
"@subwallet-monorepos/subwallet-services-sdk": "^0.1.8",
|
|
2881
|
-
"@subwallet/chain-list": "0.2.
|
|
2882
|
-
"@subwallet/extension-base": "^1.3.
|
|
2883
|
-
"@subwallet/extension-chains": "^1.3.
|
|
2884
|
-
"@subwallet/extension-dapp": "^1.3.
|
|
2885
|
-
"@subwallet/extension-inject": "^1.3.
|
|
2881
|
+
"@subwallet/chain-list": "0.2.117",
|
|
2882
|
+
"@subwallet/extension-base": "^1.3.60-1",
|
|
2883
|
+
"@subwallet/extension-chains": "^1.3.60-1",
|
|
2884
|
+
"@subwallet/extension-dapp": "^1.3.60-1",
|
|
2885
|
+
"@subwallet/extension-inject": "^1.3.60-1",
|
|
2886
2886
|
"@subwallet/keyring": "^0.1.13",
|
|
2887
2887
|
"@subwallet/ui-keyring": "^0.1.13",
|
|
2888
2888
|
"@ton/core": "^0.56.3",
|
package/packageInfo.js
CHANGED
|
@@ -7,5 +7,5 @@ export const packageInfo = {
|
|
|
7
7
|
name: '@subwallet/extension-base',
|
|
8
8
|
path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',
|
|
9
9
|
type: 'esm',
|
|
10
|
-
version: '1.3.
|
|
10
|
+
version: '1.3.60-1'
|
|
11
11
|
};
|
|
@@ -110,9 +110,11 @@ export const _STAKING_ERA_LENGTH_MAP = {
|
|
|
110
110
|
mythos: 24,
|
|
111
111
|
energy_web_x_testnet: 22 * 12 / 3600,
|
|
112
112
|
// 22 blocks per era, 1 block per 12s
|
|
113
|
-
energy_web_x: 7200 * 12 / 3600
|
|
113
|
+
energy_web_x: 7200 * 12 / 3600,
|
|
114
|
+
// 24 hours, 7200 blocks per era, 1 block per 12s,
|
|
115
|
+
zkverify_testnet: 6,
|
|
116
|
+
zkverify: 6
|
|
114
117
|
};
|
|
115
|
-
|
|
116
118
|
export const _EXPECTED_BLOCK_TIME = {
|
|
117
119
|
// in seconds
|
|
118
120
|
alephTest: 1,
|
|
@@ -148,7 +150,9 @@ export const _EXPECTED_BLOCK_TIME = {
|
|
|
148
150
|
muse_testnet: 6,
|
|
149
151
|
mythos: 6,
|
|
150
152
|
energy_web_x_testnet: 12,
|
|
151
|
-
energy_web_x: 12
|
|
153
|
+
energy_web_x: 12,
|
|
154
|
+
zkverify: 6,
|
|
155
|
+
zkverify_testnet: 6
|
|
152
156
|
};
|
|
153
157
|
export const _PARACHAIN_INFLATION_DISTRIBUTION = {
|
|
154
158
|
moonbeam: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ChainAsset, _ChainInfo, _MultiChainAsset } from '@subwallet/chain-list/types';
|
|
2
|
-
export declare const ChainListVersion = "0.2.
|
|
2
|
+
export declare const ChainListVersion = "0.2.117";
|
|
3
3
|
export interface PatchInfo {
|
|
4
4
|
patchVersion: string;
|
|
5
5
|
appliedVersion: string;
|
|
@@ -5,7 +5,7 @@ const PRODUCTION_BRANCHES = ['master', 'webapp', 'webapp-dev'];
|
|
|
5
5
|
const branchName = process.env.BRANCH_NAME || 'subwallet-dev';
|
|
6
6
|
const fetchDomain = process.env.PATCH_CHAIN_LIST_URL || (PRODUCTION_BRANCHES.indexOf(branchName) > -1 ? 'https://chain-list-assets.subwallet.app' : 'https://dev.sw-chain-list-assets.pages.dev');
|
|
7
7
|
const fetchFile = PRODUCTION_BRANCHES.indexOf(branchName) > -1 ? 'list.json' : 'preview.json';
|
|
8
|
-
export const ChainListVersion = '0.2.
|
|
8
|
+
export const ChainListVersion = '0.2.117'; // update this when build chain-list
|
|
9
9
|
|
|
10
10
|
// todo: move this interface to chainlist
|
|
11
11
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
export const _STAKING_CHAIN_GROUP = {
|
|
5
|
-
relay: ['polkadot', 'kusama', 'aleph', 'polkadex', 'ternoa', 'alephTest', 'polkadexTest', 'westend', 'kate', 'edgeware', 'creditcoin', 'vara_network', 'goldberg_testnet', 'availTuringTest', 'avail_mainnet', 'vara_testnet', 'dentnet', 'cere', 'statemine', 'statemint', 'westend_assethub'],
|
|
5
|
+
relay: ['polkadot', 'kusama', 'aleph', 'polkadex', 'ternoa', 'alephTest', 'polkadexTest', 'westend', 'kate', 'edgeware', 'creditcoin', 'vara_network', 'goldberg_testnet', 'availTuringTest', 'avail_mainnet', 'vara_testnet', 'dentnet', 'cere', 'statemine', 'statemint', 'westend_assethub', 'zkverify', 'zkverify_testnet'],
|
|
6
6
|
assetHub: ['statemine', 'statemint', 'westend_assethub'],
|
|
7
7
|
para: ['moonbeam', 'moonriver', 'moonbase', 'turing', 'turingStaging', 'bifrost', 'bifrost_testnet', 'calamari_test', 'calamari', 'manta_network', 'polimec'],
|
|
8
8
|
astar: ['astar', 'shiden', 'shibuya'],
|
|
@@ -313,10 +313,11 @@ export default class EnergyNativeStakingPoolHandler extends BaseParaNativeStakin
|
|
|
313
313
|
const apiPromise = await this.substrateApi.isReady;
|
|
314
314
|
const binaryAmount = new BN(amount);
|
|
315
315
|
const selectedCollatorInfo = selectedValidators[0];
|
|
316
|
+
const onchainCollatorInfo = (await apiPromise.api.query.parachainStaking.candidateInfo(selectedValidators[0].address)).toPrimitive();
|
|
316
317
|
const {
|
|
317
|
-
address: selectedCollatorAddress
|
|
318
|
-
nominatorCount: selectedCollatorNominatorCount
|
|
318
|
+
address: selectedCollatorAddress
|
|
319
319
|
} = selectedCollatorInfo;
|
|
320
|
+
const onchainSelectedCollatorNominatorCount = onchainCollatorInfo.nominationCount;
|
|
320
321
|
const compoundResult = extrinsic => {
|
|
321
322
|
return Promise.resolve([extrinsic, {
|
|
322
323
|
slug: this.nativeToken.slug,
|
|
@@ -324,7 +325,7 @@ export default class EnergyNativeStakingPoolHandler extends BaseParaNativeStakin
|
|
|
324
325
|
}]);
|
|
325
326
|
};
|
|
326
327
|
if (!positionInfo) {
|
|
327
|
-
const extrinsic = apiPromise.api.tx.parachainStaking.nominate(selectedCollatorAddress, binaryAmount, new BN(
|
|
328
|
+
const extrinsic = apiPromise.api.tx.parachainStaking.nominate(selectedCollatorAddress, binaryAmount, new BN(onchainSelectedCollatorNominatorCount), 0);
|
|
328
329
|
return compoundResult(extrinsic);
|
|
329
330
|
}
|
|
330
331
|
const {
|
|
@@ -333,7 +334,7 @@ export default class EnergyNativeStakingPoolHandler extends BaseParaNativeStakin
|
|
|
333
334
|
} = getBondedValidators(positionInfo.nominations);
|
|
334
335
|
const parsedSelectedCollatorAddress = reformatAddress(selectedCollatorInfo.address, 0);
|
|
335
336
|
if (!bondedValidators.includes(parsedSelectedCollatorAddress)) {
|
|
336
|
-
const extrinsic = apiPromise.api.tx.parachainStaking.nominate(selectedCollatorAddress, binaryAmount, new BN(
|
|
337
|
+
const extrinsic = apiPromise.api.tx.parachainStaking.nominate(selectedCollatorAddress, binaryAmount, new BN(onchainSelectedCollatorNominatorCount), nominationCount);
|
|
337
338
|
return compoundResult(extrinsic);
|
|
338
339
|
} else {
|
|
339
340
|
const extrinsic = apiPromise.api.tx.parachainStaking.bondExtra(selectedCollatorAddress, binaryAmount);
|
|
@@ -60,7 +60,7 @@ export default class RelayNativeStakingPoolHandler extends BaseNativeStakingPool
|
|
|
60
60
|
}
|
|
61
61
|
const unlimitedNominatorRewarded = substrateApi.api.consts.staking.maxExposurePageSize !== undefined;
|
|
62
62
|
const maxNominatorRewarded = (_substrateApi$api$con = substrateApi.api.consts.staking.maxNominatorRewardedPerValidator) === null || _substrateApi$api$con === void 0 ? void 0 : _substrateApi$api$con.toString();
|
|
63
|
-
const maxNominations = await getRelayMaxNominations(substrateApi);
|
|
63
|
+
const maxNominations = await getRelayMaxNominations(substrateApi, this.chain);
|
|
64
64
|
const currentEra = _currentEra.toString();
|
|
65
65
|
const maxUnlockingChunks = substrateApi.api.consts.staking.maxUnlockingChunks.toString();
|
|
66
66
|
const unlockingEras = substrateApi.api.consts.staking.bondingDuration.toString();
|
|
@@ -52,6 +52,9 @@ function getBlockExplorerAccountRoute(explorerLink) {
|
|
|
52
52
|
if (explorerLink.includes('uniquescan.io')) {
|
|
53
53
|
return 'account';
|
|
54
54
|
}
|
|
55
|
+
if (explorerLink.includes('node.xode.net')) {
|
|
56
|
+
return 'account';
|
|
57
|
+
}
|
|
55
58
|
if (explorerLink.includes('tonviewer.com')) {
|
|
56
59
|
return '';
|
|
57
60
|
}
|
|
@@ -116,9 +119,6 @@ export function getExplorerLink(chainInfo, value, type) {
|
|
|
116
119
|
const address = u8aToHex(decodeAddress(value));
|
|
117
120
|
return `${explorerLink}${explorerLink.endsWith('/') ? '' : '/'}${route}/${address}`;
|
|
118
121
|
}
|
|
119
|
-
if (chainInfo.slug === 'xode') {
|
|
120
|
-
return undefined;
|
|
121
|
-
}
|
|
122
122
|
return `${explorerLink}${explorerLink.endsWith('/') ? '' : '/'}${route}/${value}`;
|
|
123
123
|
}
|
|
124
124
|
if (explorerLink && isHex(hexAddPrefix(value))) {
|