@subwallet/extension-base 1.0.2-2 → 1.0.3-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 +56 -40
- package/background/KoniTypes.js +11 -9
- package/background/errors/TransactionError.js +25 -1
- package/background/types.d.ts +10 -5
- package/cjs/background/KoniTypes.js +11 -9
- package/cjs/background/errors/TransactionError.js +24 -0
- package/cjs/constants/index.js +8 -26
- package/cjs/koni/api/dotsama/balance.js +49 -224
- package/cjs/koni/api/dotsama/transfer.js +34 -39
- package/cjs/koni/api/nft/acala_nft/index.js +7 -7
- package/cjs/koni/api/nft/bit.country/index.js +7 -6
- package/cjs/koni/api/nft/evm_nft/index.js +8 -3
- package/cjs/koni/api/nft/index.js +3 -6
- package/cjs/koni/api/nft/karura_nft/index.js +7 -6
- package/cjs/koni/api/nft/rmrk_nft/index.js +11 -1
- package/cjs/koni/api/nft/statemine_nft/index.js +7 -6
- package/cjs/koni/api/nft/unique_nft/index.js +5 -1
- package/cjs/koni/api/nft/wasm_nft/index.js +170 -111
- package/cjs/koni/api/nft/wasm_nft/utils.js +11 -7
- package/cjs/koni/api/staking/bonding/amplitude.js +13 -9
- package/cjs/koni/api/staking/bonding/astar.js +15 -13
- package/cjs/koni/api/staking/bonding/index.js +22 -10
- package/cjs/koni/api/staking/bonding/paraChain.js +85 -2
- package/cjs/koni/api/staking/bonding/relayChain.js +122 -16
- package/cjs/koni/api/staking/bonding/utils.js +27 -8
- package/cjs/koni/api/tokens/wasm/index.js +5 -4
- package/cjs/koni/api/tokens/wasm/utils.js +63 -0
- package/cjs/koni/api/xcm/polkadotXcm.js +1 -1
- package/cjs/koni/api/xcm/utils.js +18 -13
- package/cjs/koni/api/xcm/xTokens.js +1 -1
- package/cjs/koni/api/xcm/xcmPallet.js +9 -6
- package/cjs/koni/background/cron.js +171 -61
- package/cjs/koni/background/handlers/Extension.js +391 -207
- package/cjs/koni/background/handlers/State.js +49 -34
- package/cjs/koni/background/handlers/Tabs.js +50 -17
- package/cjs/koni/background/subscription.js +53 -28
- package/cjs/packageInfo.js +1 -1
- package/cjs/services/base/types.js +20 -0
- package/cjs/services/chain-service/handler/SubstrateChainHandler.js +13 -8
- package/cjs/services/chain-service/index.js +73 -49
- package/cjs/services/event-service/index.js +5 -1
- package/cjs/services/event-service/types.js +11 -1
- package/cjs/services/history-service/index.js +101 -50
- package/cjs/services/history-service/subsquid-multi-chain-history.js +13 -10
- package/cjs/services/keyring-service/index.js +11 -13
- package/cjs/services/migration-service/scripts/MigrateImportedToken.js +2 -1
- package/cjs/services/price-service/coingecko.js +0 -1
- package/cjs/services/price-service/index.js +71 -24
- package/cjs/services/request-service/handler/AuthRequestHandler.js +13 -7
- package/cjs/services/request-service/handler/EvmRequestHandler.js +8 -12
- package/cjs/services/request-service/index.js +14 -5
- package/cjs/services/storage-service/DatabaseService.js +66 -34
- package/cjs/services/storage-service/db-stores/Nft.js +7 -15
- package/cjs/services/storage-service/db-stores/Transaction.js +6 -10
- package/cjs/services/transaction-service/event-parser/index.js +20 -48
- package/cjs/services/transaction-service/index.js +104 -48
- package/cjs/services/transaction-service/utils.js +10 -8
- package/cjs/utils/address.js +10 -1
- package/cjs/utils/index.js +9 -15
- package/cjs/utils/promise.js +26 -0
- package/constants/index.d.ts +7 -13
- package/constants/index.js +7 -13
- package/koni/api/dotsama/balance.d.ts +0 -1
- package/koni/api/dotsama/balance.js +22 -197
- package/koni/api/dotsama/transfer.js +11 -16
- package/koni/api/nft/acala_nft/index.js +7 -7
- package/koni/api/nft/bit.country/index.js +7 -6
- package/koni/api/nft/evm_nft/index.js +7 -3
- package/koni/api/nft/index.d.ts +1 -2
- package/koni/api/nft/index.js +3 -6
- package/koni/api/nft/karura_nft/index.js +7 -6
- package/koni/api/nft/nft.d.ts +1 -0
- package/koni/api/nft/rmrk_nft/index.js +11 -1
- package/koni/api/nft/statemine_nft/index.js +7 -6
- package/koni/api/nft/unique_nft/index.js +5 -1
- package/koni/api/nft/wasm_nft/index.d.ts +0 -2
- package/koni/api/nft/wasm_nft/index.js +168 -109
- package/koni/api/nft/wasm_nft/utils.d.ts +7 -5
- package/koni/api/nft/wasm_nft/utils.js +7 -5
- package/koni/api/staking/bonding/amplitude.d.ts +0 -1
- package/koni/api/staking/bonding/amplitude.js +15 -10
- package/koni/api/staking/bonding/astar.js +8 -6
- package/koni/api/staking/bonding/index.d.ts +4 -1
- package/koni/api/staking/bonding/index.js +23 -13
- package/koni/api/staking/bonding/paraChain.d.ts +3 -0
- package/koni/api/staking/bonding/paraChain.js +86 -5
- package/koni/api/staking/bonding/relayChain.d.ts +5 -1
- package/koni/api/staking/bonding/relayChain.js +121 -18
- package/koni/api/staking/bonding/utils.d.ts +3 -2
- package/koni/api/staking/bonding/utils.js +27 -9
- package/koni/api/tokens/wasm/index.js +5 -4
- package/koni/api/tokens/wasm/utils.d.ts +6 -0
- package/koni/api/tokens/wasm/utils.js +54 -0
- package/koni/api/xcm/polkadotXcm.js +2 -2
- package/koni/api/xcm/utils.d.ts +5 -6
- package/koni/api/xcm/utils.js +15 -10
- package/koni/api/xcm/xTokens.js +2 -2
- package/koni/api/xcm/xcmPallet.js +10 -9
- package/koni/background/cron.d.ts +6 -1
- package/koni/background/cron.js +172 -62
- package/koni/background/handlers/Extension.d.ts +9 -3
- package/koni/background/handlers/Extension.js +306 -126
- package/koni/background/handlers/State.d.ts +5 -6
- package/koni/background/handlers/State.js +51 -34
- package/koni/background/handlers/Tabs.js +50 -17
- package/koni/background/subscription.d.ts +2 -0
- package/koni/background/subscription.js +51 -29
- package/package.json +29 -14
- package/packageInfo.js +1 -1
- package/services/base/types.d.ts +34 -0
- package/services/base/types.js +15 -0
- package/services/chain-service/handler/SubstrateChainHandler.js +14 -9
- package/services/chain-service/helper/psp22_abi.json +1041 -881
- package/services/chain-service/helper/psp34_abi.json +2963 -1807
- package/services/chain-service/index.d.ts +5 -2
- package/services/chain-service/index.js +68 -45
- package/services/chain-service/types.d.ts +1 -0
- package/services/event-service/index.js +5 -1
- package/services/event-service/types.d.ts +5 -9
- package/services/event-service/types.js +4 -1
- package/services/history-service/index.d.ts +28 -7
- package/services/history-service/index.js +101 -50
- package/services/history-service/subsquid-multi-chain-history.js +16 -12
- package/services/keyring-service/index.d.ts +4 -2
- package/services/keyring-service/index.js +11 -13
- package/services/migration-service/scripts/MigrateImportedToken.js +2 -1
- package/services/price-service/coingecko.js +0 -1
- package/services/price-service/index.d.ts +22 -1
- package/services/price-service/index.js +71 -24
- package/services/request-service/handler/AuthRequestHandler.d.ts +3 -1
- package/services/request-service/handler/AuthRequestHandler.js +13 -7
- package/services/request-service/handler/EvmRequestHandler.js +8 -12
- package/services/request-service/index.d.ts +3 -1
- package/services/request-service/index.js +14 -5
- package/services/storage-service/DatabaseService.d.ts +2 -0
- package/services/storage-service/DatabaseService.js +66 -34
- package/services/storage-service/db-stores/Nft.d.ts +2 -2
- package/services/storage-service/db-stores/Nft.js +7 -14
- package/services/storage-service/db-stores/Transaction.d.ts +2 -0
- package/services/storage-service/db-stores/Transaction.js +6 -10
- package/services/transaction-service/event-parser/index.js +21 -49
- package/services/transaction-service/index.d.ts +2 -0
- package/services/transaction-service/index.js +86 -32
- package/services/transaction-service/types.d.ts +2 -0
- package/services/transaction-service/utils.js +10 -8
- package/utils/address.d.ts +3 -0
- package/utils/address.js +8 -1
- package/utils/index.d.ts +2 -2
- package/utils/index.js +7 -13
- package/utils/promise.d.ts +6 -0
- package/utils/promise.js +20 -0
|
@@ -2,15 +2,14 @@
|
|
|
2
2
|
import { _AssetRef, _AssetType, _ChainAsset, _ChainInfo, _MultiChainAsset } from '@subwallet/chain-list/types';
|
|
3
3
|
import { TransactionError } from '@subwallet/extension-base/background/errors/TransactionError';
|
|
4
4
|
import { AuthUrls, Resolver } from '@subwallet/extension-base/background/handlers/State';
|
|
5
|
-
import { AccountAuthType, AccountJson, AuthorizeRequest, ConfirmationRequestBase, RequestAccountList, RequestAccountSubscribe, RequestAuthorizeCancel, RequestAuthorizeReject, RequestAuthorizeSubscribe, RequestAuthorizeTab, RequestCurrentAccountAddress, ResponseAuthorizeList, ResponseJsonGetAccountInfo, SeedLengths } from '@subwallet/extension-base/background/types';
|
|
5
|
+
import { AccountAuthType, AccountJson, AddressJson, AuthorizeRequest, ConfirmationRequestBase, RequestAccountList, RequestAccountSubscribe, RequestAuthorizeCancel, RequestAuthorizeReject, RequestAuthorizeSubscribe, RequestAuthorizeTab, RequestCurrentAccountAddress, ResponseAuthorizeList, ResponseJsonGetAccountInfo, SeedLengths } from '@subwallet/extension-base/background/types';
|
|
6
6
|
import { _CHAIN_VALIDATION_ERROR } from '@subwallet/extension-base/services/chain-service/handler/types';
|
|
7
7
|
import { _ChainState, _EvmApi, _NetworkUpsertParams, _SubstrateApi, _ValidateCustomAssetRequest, _ValidateCustomAssetResponse } from '@subwallet/extension-base/services/chain-service/types';
|
|
8
8
|
import { SWTransactionResponse, SWTransactionResult } from '@subwallet/extension-base/services/transaction-service/types';
|
|
9
9
|
import { InjectedAccount, MetadataDefBase } from '@subwallet/extension-inject/types';
|
|
10
10
|
import { KeyringPair$Json, KeyringPair$Meta } from '@subwallet/keyring/types';
|
|
11
|
-
import { SingleAddress } from '@subwallet/ui-keyring/observable/types';
|
|
12
11
|
import { KeyringOptions } from '@subwallet/ui-keyring/options/types';
|
|
13
|
-
import { KeyringPairs$Json } from '@subwallet/ui-keyring/types';
|
|
12
|
+
import { KeyringAddress, KeyringPairs$Json } from '@subwallet/ui-keyring/types';
|
|
14
13
|
import Web3 from 'web3';
|
|
15
14
|
import { RequestArguments, TransactionConfig } from 'web3-core';
|
|
16
15
|
import { JsonRpcPayload, JsonRpcResponse } from 'web3-core-helpers';
|
|
@@ -343,14 +342,16 @@ export interface ExtrinsicDataTypeMap {
|
|
|
343
342
|
[ExtrinsicType.STAKING_CANCEL_COMPOUNDING]: RequestTuringCancelStakeCompound;
|
|
344
343
|
[ExtrinsicType.STAKING_CANCEL_UNSTAKE]: RequestStakeCancelWithdrawal;
|
|
345
344
|
[ExtrinsicType.STAKING_POOL_WITHDRAW]: any;
|
|
346
|
-
[ExtrinsicType.EVM_EXECUTE]:
|
|
345
|
+
[ExtrinsicType.EVM_EXECUTE]: TransactionConfig;
|
|
347
346
|
[ExtrinsicType.UNKNOWN]: any;
|
|
348
347
|
}
|
|
349
348
|
export declare enum ExtrinsicStatus {
|
|
350
|
-
|
|
349
|
+
QUEUED = "queued",
|
|
350
|
+
SUBMITTING = "submitting",
|
|
351
351
|
PROCESSING = "processing",
|
|
352
352
|
SUCCESS = "success",
|
|
353
353
|
FAIL = "fail",
|
|
354
|
+
CANCELLED = "cancelled",
|
|
354
355
|
UNKNOWN = "unknown"
|
|
355
356
|
}
|
|
356
357
|
export interface TxHistoryItem {
|
|
@@ -399,6 +400,7 @@ export interface TransactionHistoryItem<ET extends ExtrinsicType = ExtrinsicType
|
|
|
399
400
|
toName?: string;
|
|
400
401
|
address: string;
|
|
401
402
|
status: ExtrinsicStatus;
|
|
403
|
+
transactionId?: string;
|
|
402
404
|
extrinsicHash: string;
|
|
403
405
|
time: number;
|
|
404
406
|
data?: string;
|
|
@@ -422,7 +424,6 @@ export interface SWWarning {
|
|
|
422
424
|
data?: unknown;
|
|
423
425
|
}
|
|
424
426
|
export declare enum BasicTxErrorType {
|
|
425
|
-
NOT_ENOUGH_FEE = "NOT_ENOUGH_FEE",
|
|
426
427
|
NOT_ENOUGH_BALANCE = "NOT_ENOUGH_BALANCE",
|
|
427
428
|
CHAIN_DISCONNECTED = "CHAIN_DISCONNECTED",
|
|
428
429
|
INVALID_PARAMS = "INVALID_PARAMS",
|
|
@@ -436,12 +437,12 @@ export declare enum BasicTxErrorType {
|
|
|
436
437
|
NOT_ENOUGH_EXISTENTIAL_DEPOSIT = "NOT_ENOUGH_EXISTENTIAL_DEPOSIT"
|
|
437
438
|
}
|
|
438
439
|
export declare enum StakingTxErrorType {
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
440
|
+
NOT_ENOUGH_MIN_STAKE = "NOT_ENOUGH_MIN_STAKE",
|
|
441
|
+
EXCEED_MAX_NOMINATIONS = "EXCEED_MAX_NOMINATIONS",
|
|
442
|
+
EXIST_UNSTAKING_REQUEST = "EXIST_UNSTAKING_REQUEST",
|
|
443
|
+
INVALID_ACTIVE_STAKE = "INVALID_ACTIVE_STAKE",
|
|
444
|
+
EXCEED_MAX_UNSTAKING = "EXCEED_MAX_UNSTAKING",
|
|
445
|
+
INACTIVE_NOMINATION_POOL = "INACTIVE_NOMINATION_POOL"
|
|
445
446
|
}
|
|
446
447
|
export declare enum TransferTxErrorType {
|
|
447
448
|
NOT_ENOUGH_VALUE = "NOT_ENOUGH_VALUE",
|
|
@@ -630,6 +631,16 @@ export interface ResponseAccountCreateWithSecretKey {
|
|
|
630
631
|
errors: AccountExternalError[];
|
|
631
632
|
success: boolean;
|
|
632
633
|
}
|
|
634
|
+
export interface AddressBookInfo {
|
|
635
|
+
addresses: AddressJson[];
|
|
636
|
+
}
|
|
637
|
+
export interface RequestEditContactAccount {
|
|
638
|
+
address: string;
|
|
639
|
+
meta: KeyringPair$Meta;
|
|
640
|
+
}
|
|
641
|
+
export interface RequestDeleteContactAccount {
|
|
642
|
+
address: string;
|
|
643
|
+
}
|
|
633
644
|
export declare enum ExternalRequestPromiseStatus {
|
|
634
645
|
PENDING = 0,
|
|
635
646
|
REJECTED = 1,
|
|
@@ -751,6 +762,13 @@ export interface RequestFreeBalance {
|
|
|
751
762
|
networkKey: string;
|
|
752
763
|
token?: string;
|
|
753
764
|
}
|
|
765
|
+
export interface RequestMaxTransferable {
|
|
766
|
+
address: string;
|
|
767
|
+
networkKey: string;
|
|
768
|
+
token?: string;
|
|
769
|
+
isXcmTransfer?: boolean;
|
|
770
|
+
destChain: string;
|
|
771
|
+
}
|
|
754
772
|
export interface RequestTransferCheckReferenceCount {
|
|
755
773
|
address: string;
|
|
756
774
|
networkKey: string;
|
|
@@ -882,6 +900,7 @@ export interface AddNetworkExternalRequest {
|
|
|
882
900
|
requestId: string;
|
|
883
901
|
}
|
|
884
902
|
export interface AddTokenRequestExternal {
|
|
903
|
+
slug?: string;
|
|
885
904
|
contractAddress: string;
|
|
886
905
|
originChain: string;
|
|
887
906
|
type: _AssetType;
|
|
@@ -1044,6 +1063,8 @@ export interface ChainStakingMetadata {
|
|
|
1044
1063
|
inflation?: number;
|
|
1045
1064
|
minJoinNominationPool?: string;
|
|
1046
1065
|
minStake: string;
|
|
1066
|
+
nominatorCount?: number;
|
|
1067
|
+
minPoolBonding?: string;
|
|
1047
1068
|
maxValidatorPerNominator: number;
|
|
1048
1069
|
maxWithdrawalRequestPerValidator: number;
|
|
1049
1070
|
allowCancelUnstaking: boolean;
|
|
@@ -1060,7 +1081,7 @@ export interface NominationInfo {
|
|
|
1060
1081
|
}
|
|
1061
1082
|
export interface PalletNominationPoolsBondedPoolInner {
|
|
1062
1083
|
points: number;
|
|
1063
|
-
state: 'Open' | 'Destroying';
|
|
1084
|
+
state: 'Open' | 'Destroying' | 'Locked';
|
|
1064
1085
|
memberCounter: number;
|
|
1065
1086
|
roles: {
|
|
1066
1087
|
depositor: string;
|
|
@@ -1089,7 +1110,8 @@ export interface UnstakingInfo {
|
|
|
1089
1110
|
export declare enum StakingStatus {
|
|
1090
1111
|
EARNING_REWARD = "EARNING_REWARD",
|
|
1091
1112
|
PARTIALLY_EARNING = "PARTIALLY_EARNING",
|
|
1092
|
-
NOT_EARNING = "NOT_EARNING"
|
|
1113
|
+
NOT_EARNING = "NOT_EARNING",
|
|
1114
|
+
WAITING = "WAITING"
|
|
1093
1115
|
}
|
|
1094
1116
|
export interface NominatorMetadata {
|
|
1095
1117
|
chain: string;
|
|
@@ -1117,28 +1139,6 @@ export interface ValidatorInfo {
|
|
|
1117
1139
|
icon?: string;
|
|
1118
1140
|
isCrowded: boolean;
|
|
1119
1141
|
}
|
|
1120
|
-
export interface NominationPoolMetadata {
|
|
1121
|
-
id: string;
|
|
1122
|
-
identity?: string;
|
|
1123
|
-
address: string;
|
|
1124
|
-
memberCount: number;
|
|
1125
|
-
bondedAmount: string;
|
|
1126
|
-
}
|
|
1127
|
-
export interface NominatorInfo {
|
|
1128
|
-
chain: string;
|
|
1129
|
-
address: string;
|
|
1130
|
-
isBondedBefore: boolean;
|
|
1131
|
-
bondedValidators: string[];
|
|
1132
|
-
bondedPool: string[];
|
|
1133
|
-
}
|
|
1134
|
-
export interface ChainBondingInfo {
|
|
1135
|
-
chain: string;
|
|
1136
|
-
estimatedReturn: number;
|
|
1137
|
-
activeNominatorCount: number;
|
|
1138
|
-
totalNominatorCount: number;
|
|
1139
|
-
unbondingPeriod: number;
|
|
1140
|
-
totalStake: string;
|
|
1141
|
-
}
|
|
1142
1142
|
export interface BondingSubmitParams extends BaseRequestSign {
|
|
1143
1143
|
chain: string;
|
|
1144
1144
|
type: StakingType;
|
|
@@ -1250,6 +1250,10 @@ export interface KeyringState {
|
|
|
1250
1250
|
hasMasterPassword: boolean;
|
|
1251
1251
|
isLocked: boolean;
|
|
1252
1252
|
}
|
|
1253
|
+
export interface AddressBookState {
|
|
1254
|
+
contacts: AddressJson[];
|
|
1255
|
+
recent: AddressJson[];
|
|
1256
|
+
}
|
|
1253
1257
|
export interface RequestChangeMasterPassword {
|
|
1254
1258
|
oldPassword?: string;
|
|
1255
1259
|
newPassword: string;
|
|
@@ -1353,6 +1357,13 @@ export interface Notification {
|
|
|
1353
1357
|
};
|
|
1354
1358
|
}
|
|
1355
1359
|
export declare type NotificationParams = Omit<Notification, 'id'>;
|
|
1360
|
+
export interface CronReloadRequest {
|
|
1361
|
+
data: 'nft' | 'staking';
|
|
1362
|
+
}
|
|
1363
|
+
export interface AllLogoMap {
|
|
1364
|
+
chainLogoMap: Record<string, string>;
|
|
1365
|
+
assetLogoMap: Record<string, string>;
|
|
1366
|
+
}
|
|
1356
1367
|
export interface KoniRequestSignatures {
|
|
1357
1368
|
'pri(staking.submitTuringCancelCompound)': [RequestTuringCancelStakeCompound, SWTransactionResponse];
|
|
1358
1369
|
'pri(staking.submitTuringCompound)': [RequestTuringStakeCompound, SWTransactionResponse];
|
|
@@ -1390,7 +1401,7 @@ export interface KoniRequestSignatures {
|
|
|
1390
1401
|
'pri(assetSetting.update)': [AssetSettingUpdateReq, boolean];
|
|
1391
1402
|
'pri(evmNft.submitTransaction)': [NftTransactionRequest, SWTransactionResponse];
|
|
1392
1403
|
'pri(evmNft.getTransaction)': [NftTransactionRequest, EvmNftTransaction];
|
|
1393
|
-
'pri(substrateNft.submitTransaction)': [
|
|
1404
|
+
'pri(substrateNft.submitTransaction)': [NftTransactionRequest, SWTransactionResponse];
|
|
1394
1405
|
'pri(substrateNft.getTransaction)': [NftTransactionRequest, SubstrateNftTransaction];
|
|
1395
1406
|
'pri(nft.getNft)': [null, NftJson];
|
|
1396
1407
|
'pri(nft.getSubscription)': [RequestSubscribeNft, NftJson, NftJson];
|
|
@@ -1433,21 +1444,25 @@ export interface KoniRequestSignatures {
|
|
|
1433
1444
|
'pri(accounts.checkPublicAndSecretKey)': [RequestCheckPublicAndSecretKey, ResponseCheckPublicAndSecretKey];
|
|
1434
1445
|
'pri(accounts.subscribeWithCurrentAddress)': [RequestAccountSubscribe, AccountsWithCurrentAddress, AccountsWithCurrentAddress];
|
|
1435
1446
|
'pri(accounts.subscribeAccountsInputAddress)': [RequestAccountSubscribe, string, OptionInputAddress];
|
|
1436
|
-
'pri(accounts.saveRecent)': [RequestSaveRecentAccount,
|
|
1437
|
-
'pri(accounts.triggerSubscription)': [null, boolean];
|
|
1447
|
+
'pri(accounts.saveRecent)': [RequestSaveRecentAccount, KeyringAddress];
|
|
1438
1448
|
'pri(accounts.get.meta)': [RequestAccountMeta, ResponseAccountMeta];
|
|
1439
1449
|
'pri(accounts.updateCurrentAddress)': [string, boolean];
|
|
1440
|
-
'pri(currentAccount.saveAddress)': [RequestCurrentAccountAddress,
|
|
1450
|
+
'pri(currentAccount.saveAddress)': [RequestCurrentAccountAddress, CurrentAccountInfo];
|
|
1451
|
+
'pri(accounts.subscribeAddresses)': [null, AddressBookInfo, AddressBookInfo];
|
|
1452
|
+
'pri(accounts.editContact)': [RequestEditContactAccount, boolean];
|
|
1453
|
+
'pri(accounts.deleteContact)': [RequestDeleteContactAccount, boolean];
|
|
1441
1454
|
'pri(settings.changeBalancesVisibility)': [null, boolean, UiSettings];
|
|
1442
1455
|
'pri(settings.subscribe)': [null, UiSettings, UiSettings];
|
|
1443
1456
|
'pri(settings.saveAccountAllLogo)': [string, boolean, UiSettings];
|
|
1444
1457
|
'pri(settings.saveTheme)': [ThemeNames, boolean, UiSettings];
|
|
1445
1458
|
'pri(settings.saveBrowserConfirmationType)': [BrowserConfirmationType, boolean, UiSettings];
|
|
1446
1459
|
'pri(settings.saveCamera)': [RequestCameraSettings, boolean];
|
|
1460
|
+
'pri(settings.getLogoMaps)': [null, AllLogoMap];
|
|
1447
1461
|
'pri(transaction.history.getSubscription)': [null, TransactionHistoryItem[], TransactionHistoryItem[]];
|
|
1448
1462
|
'pri(transfer.checkReferenceCount)': [RequestTransferCheckReferenceCount, boolean];
|
|
1449
1463
|
'pri(transfer.checkSupporting)': [RequestTransferCheckSupporting, SupportTransferResponse];
|
|
1450
1464
|
'pri(transfer.getExistentialDeposit)': [RequestTransferExistentialDeposit, string];
|
|
1465
|
+
'pri(transfer.getMaxTransferable)': [RequestMaxTransferable, AmountData];
|
|
1451
1466
|
'pri(subscription.cancel)': [string, boolean];
|
|
1452
1467
|
'pri(freeBalance.get)': [RequestFreeBalance, AmountData];
|
|
1453
1468
|
'pri(freeBalance.subscribe)': [RequestFreeBalance, AmountData, AmountData];
|
|
@@ -1486,6 +1501,7 @@ export interface KoniRequestSignatures {
|
|
|
1486
1501
|
'pri(transactions.getOne)': [RequestGetTransaction, SWTransactionResult];
|
|
1487
1502
|
'pri(transactions.subscribe)': [null, Record<string, SWTransactionResult>, Record<string, SWTransactionResult>];
|
|
1488
1503
|
'pri(notifications.subscribe)': [null, Notification[], Notification[]];
|
|
1504
|
+
'pri(cron.reload)': [CronReloadRequest, boolean];
|
|
1489
1505
|
'mobile(ping)': [null, string];
|
|
1490
1506
|
'mobile(cronAndSubscription.init)': [RequestInitCronAndSubscription, ActiveCronAndSubscriptionMap];
|
|
1491
1507
|
'mobile(cronAndSubscription.activeService.subscribe)': [null, ActiveCronAndSubscriptionMap, ActiveCronAndSubscriptionMap];
|
package/background/KoniTypes.js
CHANGED
|
@@ -82,15 +82,16 @@ export let ExtrinsicType;
|
|
|
82
82
|
})(ExtrinsicType || (ExtrinsicType = {}));
|
|
83
83
|
export let ExtrinsicStatus;
|
|
84
84
|
(function (ExtrinsicStatus) {
|
|
85
|
-
ExtrinsicStatus["
|
|
85
|
+
ExtrinsicStatus["QUEUED"] = "queued";
|
|
86
|
+
ExtrinsicStatus["SUBMITTING"] = "submitting";
|
|
86
87
|
ExtrinsicStatus["PROCESSING"] = "processing";
|
|
87
88
|
ExtrinsicStatus["SUCCESS"] = "success";
|
|
88
89
|
ExtrinsicStatus["FAIL"] = "fail";
|
|
90
|
+
ExtrinsicStatus["CANCELLED"] = "cancelled";
|
|
89
91
|
ExtrinsicStatus["UNKNOWN"] = "unknown";
|
|
90
92
|
})(ExtrinsicStatus || (ExtrinsicStatus = {}));
|
|
91
93
|
export let BasicTxErrorType;
|
|
92
94
|
(function (BasicTxErrorType) {
|
|
93
|
-
BasicTxErrorType["NOT_ENOUGH_FEE"] = "NOT_ENOUGH_FEE";
|
|
94
95
|
BasicTxErrorType["NOT_ENOUGH_BALANCE"] = "NOT_ENOUGH_BALANCE";
|
|
95
96
|
BasicTxErrorType["CHAIN_DISCONNECTED"] = "CHAIN_DISCONNECTED";
|
|
96
97
|
BasicTxErrorType["INVALID_PARAMS"] = "INVALID_PARAMS";
|
|
@@ -105,12 +106,12 @@ export let BasicTxErrorType;
|
|
|
105
106
|
})(BasicTxErrorType || (BasicTxErrorType = {}));
|
|
106
107
|
export let StakingTxErrorType;
|
|
107
108
|
(function (StakingTxErrorType) {
|
|
108
|
-
StakingTxErrorType["
|
|
109
|
-
StakingTxErrorType["
|
|
110
|
-
StakingTxErrorType["
|
|
111
|
-
StakingTxErrorType["
|
|
112
|
-
StakingTxErrorType["
|
|
113
|
-
StakingTxErrorType["
|
|
109
|
+
StakingTxErrorType["NOT_ENOUGH_MIN_STAKE"] = "NOT_ENOUGH_MIN_STAKE";
|
|
110
|
+
StakingTxErrorType["EXCEED_MAX_NOMINATIONS"] = "EXCEED_MAX_NOMINATIONS";
|
|
111
|
+
StakingTxErrorType["EXIST_UNSTAKING_REQUEST"] = "EXIST_UNSTAKING_REQUEST";
|
|
112
|
+
StakingTxErrorType["INVALID_ACTIVE_STAKE"] = "INVALID_ACTIVE_STAKE";
|
|
113
|
+
StakingTxErrorType["EXCEED_MAX_UNSTAKING"] = "EXCEED_MAX_UNSTAKING";
|
|
114
|
+
StakingTxErrorType["INACTIVE_NOMINATION_POOL"] = "INACTIVE_NOMINATION_POOL";
|
|
114
115
|
})(StakingTxErrorType || (StakingTxErrorType = {}));
|
|
115
116
|
export let TransferTxErrorType;
|
|
116
117
|
(function (TransferTxErrorType) {
|
|
@@ -132,7 +133,7 @@ export let BalanceErrorType;
|
|
|
132
133
|
})(BalanceErrorType || (BalanceErrorType = {}));
|
|
133
134
|
export let ProviderErrorType;
|
|
134
135
|
|
|
135
|
-
|
|
136
|
+
/// Manage account
|
|
136
137
|
// Export private key
|
|
137
138
|
(function (ProviderErrorType) {
|
|
138
139
|
ProviderErrorType["CHAIN_DISCONNECTED"] = "CHAIN_DISCONNECTED";
|
|
@@ -209,6 +210,7 @@ export let StakingStatus;
|
|
|
209
210
|
StakingStatus["EARNING_REWARD"] = "EARNING_REWARD";
|
|
210
211
|
StakingStatus["PARTIALLY_EARNING"] = "PARTIALLY_EARNING";
|
|
211
212
|
StakingStatus["NOT_EARNING"] = "NOT_EARNING";
|
|
213
|
+
StakingStatus["WAITING"] = "WAITING";
|
|
212
214
|
})(StakingStatus || (StakingStatus = {}));
|
|
213
215
|
export let ChainEditStandard;
|
|
214
216
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
import { SWError } from '@subwallet/extension-base/background/errors/SWError';
|
|
5
|
-
import { BasicTxErrorType } from '@subwallet/extension-base/background/KoniTypes';
|
|
5
|
+
import { BasicTxErrorType, StakingTxErrorType } from '@subwallet/extension-base/background/KoniTypes';
|
|
6
6
|
|
|
7
7
|
// Todo: finish this map in the future
|
|
8
8
|
const defaultErrorMap = {
|
|
@@ -49,6 +49,30 @@ const defaultErrorMap = {
|
|
|
49
49
|
[BasicTxErrorType.UNSUPPORTED]: {
|
|
50
50
|
message: 'This transaction is not supported',
|
|
51
51
|
code: undefined
|
|
52
|
+
},
|
|
53
|
+
[StakingTxErrorType.NOT_ENOUGH_MIN_STAKE]: {
|
|
54
|
+
message: 'Not enough min stake',
|
|
55
|
+
code: undefined
|
|
56
|
+
},
|
|
57
|
+
[StakingTxErrorType.EXCEED_MAX_NOMINATIONS]: {
|
|
58
|
+
message: 'Exceed max nominations',
|
|
59
|
+
code: undefined
|
|
60
|
+
},
|
|
61
|
+
[StakingTxErrorType.EXIST_UNSTAKING_REQUEST]: {
|
|
62
|
+
message: 'Exist unstaking request',
|
|
63
|
+
code: undefined
|
|
64
|
+
},
|
|
65
|
+
[StakingTxErrorType.INVALID_ACTIVE_STAKE]: {
|
|
66
|
+
message: 'Invalid active stake',
|
|
67
|
+
code: undefined
|
|
68
|
+
},
|
|
69
|
+
[StakingTxErrorType.EXCEED_MAX_UNSTAKING]: {
|
|
70
|
+
message: 'Exceed max unstaking',
|
|
71
|
+
code: undefined
|
|
72
|
+
},
|
|
73
|
+
[StakingTxErrorType.INACTIVE_NOMINATION_POOL]: {
|
|
74
|
+
message: 'This nomination pool is not active',
|
|
75
|
+
code: undefined
|
|
52
76
|
}
|
|
53
77
|
};
|
|
54
78
|
export class TransactionError extends SWError {
|
package/background/types.d.ts
CHANGED
|
@@ -22,8 +22,14 @@ declare type NullKeys<T> = {
|
|
|
22
22
|
[K in keyof T]: IsNull<T, K>;
|
|
23
23
|
}[keyof T];
|
|
24
24
|
export declare type SeedLengths = 12 | 24;
|
|
25
|
-
export interface
|
|
25
|
+
export interface AbstractAddressJson extends KeyringPair$Meta {
|
|
26
26
|
address: string;
|
|
27
|
+
type?: KeypairType;
|
|
28
|
+
whenCreated?: number;
|
|
29
|
+
name?: string;
|
|
30
|
+
originGenesisHash?: string | null;
|
|
31
|
+
}
|
|
32
|
+
export interface AccountJson extends AbstractAddressJson {
|
|
27
33
|
accountIndex?: number;
|
|
28
34
|
addressOffset?: number;
|
|
29
35
|
genesisHash?: string | null;
|
|
@@ -33,12 +39,11 @@ export interface AccountJson extends KeyringPair$Meta {
|
|
|
33
39
|
isMasterAccount?: boolean;
|
|
34
40
|
isMasterPassword?: boolean;
|
|
35
41
|
isReadOnly?: boolean;
|
|
36
|
-
name?: string;
|
|
37
|
-
originGenesisHash?: string | null;
|
|
38
42
|
parentAddress?: string;
|
|
39
43
|
suri?: string;
|
|
40
|
-
|
|
41
|
-
|
|
44
|
+
}
|
|
45
|
+
export interface AddressJson extends AbstractAddressJson {
|
|
46
|
+
isRecent?: boolean;
|
|
42
47
|
}
|
|
43
48
|
export interface AccountsWithCurrentAddress {
|
|
44
49
|
accounts: AccountJson[];
|
|
@@ -86,16 +86,17 @@ exports.ExtrinsicType = ExtrinsicType;
|
|
|
86
86
|
let ExtrinsicStatus;
|
|
87
87
|
exports.ExtrinsicStatus = ExtrinsicStatus;
|
|
88
88
|
(function (ExtrinsicStatus) {
|
|
89
|
-
ExtrinsicStatus["
|
|
89
|
+
ExtrinsicStatus["QUEUED"] = "queued";
|
|
90
|
+
ExtrinsicStatus["SUBMITTING"] = "submitting";
|
|
90
91
|
ExtrinsicStatus["PROCESSING"] = "processing";
|
|
91
92
|
ExtrinsicStatus["SUCCESS"] = "success";
|
|
92
93
|
ExtrinsicStatus["FAIL"] = "fail";
|
|
94
|
+
ExtrinsicStatus["CANCELLED"] = "cancelled";
|
|
93
95
|
ExtrinsicStatus["UNKNOWN"] = "unknown";
|
|
94
96
|
})(ExtrinsicStatus || (exports.ExtrinsicStatus = ExtrinsicStatus = {}));
|
|
95
97
|
let BasicTxErrorType;
|
|
96
98
|
exports.BasicTxErrorType = BasicTxErrorType;
|
|
97
99
|
(function (BasicTxErrorType) {
|
|
98
|
-
BasicTxErrorType["NOT_ENOUGH_FEE"] = "NOT_ENOUGH_FEE";
|
|
99
100
|
BasicTxErrorType["NOT_ENOUGH_BALANCE"] = "NOT_ENOUGH_BALANCE";
|
|
100
101
|
BasicTxErrorType["CHAIN_DISCONNECTED"] = "CHAIN_DISCONNECTED";
|
|
101
102
|
BasicTxErrorType["INVALID_PARAMS"] = "INVALID_PARAMS";
|
|
@@ -111,12 +112,12 @@ exports.BasicTxErrorType = BasicTxErrorType;
|
|
|
111
112
|
let StakingTxErrorType;
|
|
112
113
|
exports.StakingTxErrorType = StakingTxErrorType;
|
|
113
114
|
(function (StakingTxErrorType) {
|
|
114
|
-
StakingTxErrorType["
|
|
115
|
-
StakingTxErrorType["
|
|
116
|
-
StakingTxErrorType["
|
|
117
|
-
StakingTxErrorType["
|
|
118
|
-
StakingTxErrorType["
|
|
119
|
-
StakingTxErrorType["
|
|
115
|
+
StakingTxErrorType["NOT_ENOUGH_MIN_STAKE"] = "NOT_ENOUGH_MIN_STAKE";
|
|
116
|
+
StakingTxErrorType["EXCEED_MAX_NOMINATIONS"] = "EXCEED_MAX_NOMINATIONS";
|
|
117
|
+
StakingTxErrorType["EXIST_UNSTAKING_REQUEST"] = "EXIST_UNSTAKING_REQUEST";
|
|
118
|
+
StakingTxErrorType["INVALID_ACTIVE_STAKE"] = "INVALID_ACTIVE_STAKE";
|
|
119
|
+
StakingTxErrorType["EXCEED_MAX_UNSTAKING"] = "EXCEED_MAX_UNSTAKING";
|
|
120
|
+
StakingTxErrorType["INACTIVE_NOMINATION_POOL"] = "INACTIVE_NOMINATION_POOL";
|
|
120
121
|
})(StakingTxErrorType || (exports.StakingTxErrorType = StakingTxErrorType = {}));
|
|
121
122
|
let TransferTxErrorType;
|
|
122
123
|
exports.TransferTxErrorType = TransferTxErrorType;
|
|
@@ -139,7 +140,7 @@ exports.BalanceErrorType = BalanceErrorType;
|
|
|
139
140
|
BalanceErrorType["TIMEOUT"] = "TIMEOUT";
|
|
140
141
|
BalanceErrorType["GET_BALANCE_ERROR"] = "GET_BALANCE_ERROR";
|
|
141
142
|
})(BalanceErrorType || (exports.BalanceErrorType = BalanceErrorType = {}));
|
|
142
|
-
let ProviderErrorType;
|
|
143
|
+
let ProviderErrorType; /// Manage account
|
|
143
144
|
// Export private key
|
|
144
145
|
exports.ProviderErrorType = ProviderErrorType;
|
|
145
146
|
(function (ProviderErrorType) {
|
|
@@ -217,6 +218,7 @@ exports.StakingStatus = StakingStatus;
|
|
|
217
218
|
StakingStatus["EARNING_REWARD"] = "EARNING_REWARD";
|
|
218
219
|
StakingStatus["PARTIALLY_EARNING"] = "PARTIALLY_EARNING";
|
|
219
220
|
StakingStatus["NOT_EARNING"] = "NOT_EARNING";
|
|
221
|
+
StakingStatus["WAITING"] = "WAITING";
|
|
220
222
|
})(StakingStatus || (exports.StakingStatus = StakingStatus = {}));
|
|
221
223
|
let ChainEditStandard; // ChainService
|
|
222
224
|
// for custom network
|
|
@@ -54,6 +54,30 @@ const defaultErrorMap = {
|
|
|
54
54
|
[_KoniTypes.BasicTxErrorType.UNSUPPORTED]: {
|
|
55
55
|
message: 'This transaction is not supported',
|
|
56
56
|
code: undefined
|
|
57
|
+
},
|
|
58
|
+
[_KoniTypes.StakingTxErrorType.NOT_ENOUGH_MIN_STAKE]: {
|
|
59
|
+
message: 'Not enough min stake',
|
|
60
|
+
code: undefined
|
|
61
|
+
},
|
|
62
|
+
[_KoniTypes.StakingTxErrorType.EXCEED_MAX_NOMINATIONS]: {
|
|
63
|
+
message: 'Exceed max nominations',
|
|
64
|
+
code: undefined
|
|
65
|
+
},
|
|
66
|
+
[_KoniTypes.StakingTxErrorType.EXIST_UNSTAKING_REQUEST]: {
|
|
67
|
+
message: 'Exist unstaking request',
|
|
68
|
+
code: undefined
|
|
69
|
+
},
|
|
70
|
+
[_KoniTypes.StakingTxErrorType.INVALID_ACTIVE_STAKE]: {
|
|
71
|
+
message: 'Invalid active stake',
|
|
72
|
+
code: undefined
|
|
73
|
+
},
|
|
74
|
+
[_KoniTypes.StakingTxErrorType.EXCEED_MAX_UNSTAKING]: {
|
|
75
|
+
message: 'Exceed max unstaking',
|
|
76
|
+
code: undefined
|
|
77
|
+
},
|
|
78
|
+
[_KoniTypes.StakingTxErrorType.INACTIVE_NOMINATION_POOL]: {
|
|
79
|
+
message: 'This nomination pool is not active',
|
|
80
|
+
code: undefined
|
|
57
81
|
}
|
|
58
82
|
};
|
|
59
83
|
class TransactionError extends _SWError.SWError {
|
package/cjs/constants/index.js
CHANGED
|
@@ -5,22 +5,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {
|
|
7
7
|
CRON_REFRESH_PRICE_INTERVAL: true,
|
|
8
|
-
DOTSAMA_API_TIMEOUT: true,
|
|
9
|
-
DOTSAMA_AUTO_CONNECT_MS: true,
|
|
10
|
-
DOTSAMA_MAX_CONTINUE_RETRY: true,
|
|
11
8
|
CRON_AUTO_RECOVER_DOTSAMA_INTERVAL: true,
|
|
12
9
|
CRON_AUTO_RECOVER_WEB3_INTERVAL: true,
|
|
13
10
|
ACALA_REFRESH_CROWDLOAN_INTERVAL: true,
|
|
14
|
-
ACALA_REFRESH_BALANCE_INTERVAL: true,
|
|
15
11
|
ASTAR_REFRESH_BALANCE_INTERVAL: true,
|
|
16
12
|
SUB_TOKEN_REFRESH_BALANCE_INTERVAL: true,
|
|
17
|
-
SUBSCRIBE_BALANCE_FAST_INTERVAL: true,
|
|
18
13
|
CRON_REFRESH_NFT_INTERVAL: true,
|
|
19
14
|
CRON_REFRESH_STAKING_REWARD_INTERVAL: true,
|
|
20
15
|
CRON_REFRESH_STAKING_REWARD_FAST_INTERVAL: true,
|
|
21
16
|
CRON_REFRESH_HISTORY_INTERVAL: true,
|
|
22
17
|
CRON_GET_API_MAP_STATUS: true,
|
|
23
|
-
CRON_REFRESH_STAKING_DATA: true,
|
|
24
18
|
CRON_REFRESH_CHAIN_STAKING_METADATA: true,
|
|
25
19
|
CRON_REFRESH_CHAIN_NOMINATOR_METADATA: true,
|
|
26
20
|
ALL_ACCOUNT_KEY: true,
|
|
@@ -30,7 +24,7 @@ var _exportNames = {
|
|
|
30
24
|
IGNORE_QR_SIGNER: true,
|
|
31
25
|
DEFAULT_TIME_AUTO_LOCK: true
|
|
32
26
|
};
|
|
33
|
-
exports.SUB_TOKEN_REFRESH_BALANCE_INTERVAL = exports.
|
|
27
|
+
exports.SUB_TOKEN_REFRESH_BALANCE_INTERVAL = exports.IGNORE_QR_SIGNER = exports.IGNORE_GET_SUBSTRATE_FEATURES_LIST = exports.DEFAULT_TIME_AUTO_LOCK = exports.CRON_REFRESH_STAKING_REWARD_INTERVAL = exports.CRON_REFRESH_STAKING_REWARD_FAST_INTERVAL = exports.CRON_REFRESH_PRICE_INTERVAL = exports.CRON_REFRESH_NFT_INTERVAL = exports.CRON_REFRESH_HISTORY_INTERVAL = exports.CRON_REFRESH_CHAIN_STAKING_METADATA = exports.CRON_REFRESH_CHAIN_NOMINATOR_METADATA = exports.CRON_GET_API_MAP_STATUS = exports.CRON_AUTO_RECOVER_WEB3_INTERVAL = exports.CRON_AUTO_RECOVER_DOTSAMA_INTERVAL = exports.ASTAR_REFRESH_BALANCE_INTERVAL = exports.ALL_NETWORK_KEY = exports.ALL_GENESIS_HASH = exports.ALL_ACCOUNT_KEY = exports.ACALA_REFRESH_CROWDLOAN_INTERVAL = void 0;
|
|
34
28
|
var _staking = require("./staking");
|
|
35
29
|
Object.keys(_staking).forEach(function (key) {
|
|
36
30
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -48,41 +42,29 @@ Object.keys(_staking).forEach(function (key) {
|
|
|
48
42
|
|
|
49
43
|
const CRON_REFRESH_PRICE_INTERVAL = 30000;
|
|
50
44
|
exports.CRON_REFRESH_PRICE_INTERVAL = CRON_REFRESH_PRICE_INTERVAL;
|
|
51
|
-
const DOTSAMA_API_TIMEOUT = 30000;
|
|
52
|
-
exports.DOTSAMA_API_TIMEOUT = DOTSAMA_API_TIMEOUT;
|
|
53
|
-
const DOTSAMA_AUTO_CONNECT_MS = 3000;
|
|
54
|
-
exports.DOTSAMA_AUTO_CONNECT_MS = DOTSAMA_AUTO_CONNECT_MS;
|
|
55
|
-
const DOTSAMA_MAX_CONTINUE_RETRY = 2;
|
|
56
|
-
exports.DOTSAMA_MAX_CONTINUE_RETRY = DOTSAMA_MAX_CONTINUE_RETRY;
|
|
57
45
|
const CRON_AUTO_RECOVER_DOTSAMA_INTERVAL = 60000;
|
|
58
46
|
exports.CRON_AUTO_RECOVER_DOTSAMA_INTERVAL = CRON_AUTO_RECOVER_DOTSAMA_INTERVAL;
|
|
59
47
|
const CRON_AUTO_RECOVER_WEB3_INTERVAL = 90000;
|
|
60
48
|
exports.CRON_AUTO_RECOVER_WEB3_INTERVAL = CRON_AUTO_RECOVER_WEB3_INTERVAL;
|
|
61
49
|
const ACALA_REFRESH_CROWDLOAN_INTERVAL = 300000;
|
|
62
50
|
exports.ACALA_REFRESH_CROWDLOAN_INTERVAL = ACALA_REFRESH_CROWDLOAN_INTERVAL;
|
|
63
|
-
const
|
|
64
|
-
exports.ACALA_REFRESH_BALANCE_INTERVAL = ACALA_REFRESH_BALANCE_INTERVAL;
|
|
65
|
-
const ASTAR_REFRESH_BALANCE_INTERVAL = 30000;
|
|
51
|
+
const ASTAR_REFRESH_BALANCE_INTERVAL = 60000;
|
|
66
52
|
exports.ASTAR_REFRESH_BALANCE_INTERVAL = ASTAR_REFRESH_BALANCE_INTERVAL;
|
|
67
|
-
const SUB_TOKEN_REFRESH_BALANCE_INTERVAL =
|
|
53
|
+
const SUB_TOKEN_REFRESH_BALANCE_INTERVAL = 60000;
|
|
68
54
|
exports.SUB_TOKEN_REFRESH_BALANCE_INTERVAL = SUB_TOKEN_REFRESH_BALANCE_INTERVAL;
|
|
69
|
-
const
|
|
70
|
-
exports.SUBSCRIBE_BALANCE_FAST_INTERVAL = SUBSCRIBE_BALANCE_FAST_INTERVAL;
|
|
71
|
-
const CRON_REFRESH_NFT_INTERVAL = 900000;
|
|
55
|
+
const CRON_REFRESH_NFT_INTERVAL = 7200000;
|
|
72
56
|
exports.CRON_REFRESH_NFT_INTERVAL = CRON_REFRESH_NFT_INTERVAL;
|
|
73
57
|
const CRON_REFRESH_STAKING_REWARD_INTERVAL = 900000;
|
|
74
58
|
exports.CRON_REFRESH_STAKING_REWARD_INTERVAL = CRON_REFRESH_STAKING_REWARD_INTERVAL;
|
|
75
|
-
const CRON_REFRESH_STAKING_REWARD_FAST_INTERVAL =
|
|
59
|
+
const CRON_REFRESH_STAKING_REWARD_FAST_INTERVAL = 300000;
|
|
76
60
|
exports.CRON_REFRESH_STAKING_REWARD_FAST_INTERVAL = CRON_REFRESH_STAKING_REWARD_FAST_INTERVAL;
|
|
77
|
-
const CRON_REFRESH_HISTORY_INTERVAL =
|
|
61
|
+
const CRON_REFRESH_HISTORY_INTERVAL = 900000;
|
|
78
62
|
exports.CRON_REFRESH_HISTORY_INTERVAL = CRON_REFRESH_HISTORY_INTERVAL;
|
|
79
|
-
const CRON_GET_API_MAP_STATUS =
|
|
63
|
+
const CRON_GET_API_MAP_STATUS = 10000;
|
|
80
64
|
exports.CRON_GET_API_MAP_STATUS = CRON_GET_API_MAP_STATUS;
|
|
81
|
-
const CRON_REFRESH_STAKING_DATA = 30000;
|
|
82
|
-
exports.CRON_REFRESH_STAKING_DATA = CRON_REFRESH_STAKING_DATA;
|
|
83
65
|
const CRON_REFRESH_CHAIN_STAKING_METADATA = 900000;
|
|
84
66
|
exports.CRON_REFRESH_CHAIN_STAKING_METADATA = CRON_REFRESH_CHAIN_STAKING_METADATA;
|
|
85
|
-
const CRON_REFRESH_CHAIN_NOMINATOR_METADATA =
|
|
67
|
+
const CRON_REFRESH_CHAIN_NOMINATOR_METADATA = 1800000;
|
|
86
68
|
exports.CRON_REFRESH_CHAIN_NOMINATOR_METADATA = CRON_REFRESH_CHAIN_NOMINATOR_METADATA;
|
|
87
69
|
const ALL_ACCOUNT_KEY = 'ALL';
|
|
88
70
|
exports.ALL_ACCOUNT_KEY = ALL_ACCOUNT_KEY;
|