@subwallet/extension-base 1.3.3-0 → 1.3.5-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 +14 -1
- package/background/KoniTypes.js +1 -0
- package/cjs/background/KoniTypes.js +1 -0
- package/cjs/constants/blocked-actions-list.js +1 -2
- package/cjs/constants/index.js +16 -1
- package/cjs/constants/remind-notification-time.js +14 -0
- package/cjs/core/logic-validation/transfer.js +12 -6
- package/cjs/core/substrate/xcm-parser.js +13 -1
- package/cjs/koni/api/contract-handler/utils/index.js +20 -1
- package/cjs/koni/api/nft/config.js +1 -1
- package/cjs/koni/api/nft/index.js +9 -0
- package/cjs/koni/api/nft/rari/index.js +87 -0
- package/cjs/koni/api/yield/helper/utils.js +1 -1
- package/cjs/koni/background/handlers/Extension.js +110 -23
- package/cjs/koni/background/handlers/State.js +5 -2
- package/cjs/packageInfo.js +1 -1
- package/cjs/services/balance-service/helpers/process.js +2 -1
- package/cjs/services/balance-service/helpers/subscribe/index.js +5 -0
- package/cjs/services/balance-service/index.js +1 -1
- package/cjs/services/balance-service/transfer/xcm/availBridge.js +198 -0
- package/cjs/services/balance-service/transfer/xcm/index.js +50 -5
- package/cjs/services/chain-service/constants.js +2 -1
- package/cjs/services/chain-service/handler/EvmApi.js +12 -21
- package/cjs/services/chain-service/handler/EvmChainHandler.js +0 -2
- package/cjs/services/chain-service/handler/SubstrateChainHandler.js +73 -40
- package/cjs/services/chain-service/index.js +44 -13
- package/cjs/services/chain-service/utils/index.js +20 -0
- package/cjs/services/earning-service/handlers/base.js +12 -3
- package/cjs/services/earning-service/handlers/native-staking/amplitude.js +11 -3
- package/cjs/services/earning-service/handlers/native-staking/astar.js +1 -1
- package/cjs/services/earning-service/handlers/native-staking/para-chain.js +3 -1
- package/cjs/services/earning-service/handlers/native-staking/relay-chain.js +3 -1
- package/cjs/services/earning-service/handlers/native-staking/tao.js +11 -3
- package/cjs/services/earning-service/handlers/nomination-pool/index.js +14 -12
- package/cjs/services/earning-service/service.js +5 -0
- package/cjs/services/inapp-notification-service/consts.js +31 -0
- package/cjs/services/inapp-notification-service/index.js +260 -0
- package/cjs/services/inapp-notification-service/interfaces.js +32 -0
- package/cjs/services/inapp-notification-service/utils.js +197 -0
- package/cjs/services/keyring-service/context/account-context.js +9 -0
- package/cjs/services/keyring-service/context/state.js +4 -0
- package/cjs/services/setting-service/SettingService.js +9 -1
- package/cjs/services/setting-service/constants.js +16 -1
- package/cjs/services/storage-service/DatabaseService.js +42 -3
- package/cjs/services/storage-service/databases/index.js +3 -0
- package/cjs/services/storage-service/db-stores/InappNotification.js +81 -0
- package/cjs/services/transaction-service/index.js +18 -4
- package/cjs/types/avail-bridge/index.js +1 -0
- package/cjs/types/notification/index.js +1 -0
- package/cjs/utils/account/transform.js +9 -5
- package/cjs/utils/staticData/index.js +7 -2
- package/constants/blocked-actions-list.js +1 -2
- package/constants/index.d.ts +2 -0
- package/constants/index.js +3 -1
- package/constants/remind-notification-time.d.ts +2 -0
- package/constants/remind-notification-time.js +7 -0
- package/core/logic-validation/transfer.js +12 -6
- package/core/substrate/xcm-parser.d.ts +1 -0
- package/core/substrate/xcm-parser.js +12 -1
- package/koni/api/contract-handler/utils/avail_bridge_abi.json +1659 -0
- package/koni/api/contract-handler/utils/avail_test_bridge_abi.json +1692 -0
- package/koni/api/contract-handler/utils/index.d.ts +7 -2
- package/koni/api/contract-handler/utils/index.js +15 -0
- package/koni/api/nft/config.js +1 -1
- package/koni/api/nft/index.js +9 -0
- package/koni/api/nft/rari/index.d.ts +7 -0
- package/koni/api/nft/rari/index.js +80 -0
- package/koni/api/yield/helper/utils.js +1 -1
- package/koni/background/handlers/Extension.d.ts +7 -0
- package/koni/background/handlers/Extension.js +112 -25
- package/koni/background/handlers/State.d.ts +2 -0
- package/koni/background/handlers/State.js +5 -2
- package/package.json +59 -6
- package/packageInfo.js +1 -1
- package/services/balance-service/helpers/process.js +2 -1
- package/services/balance-service/helpers/subscribe/index.js +5 -0
- package/services/balance-service/index.js +2 -2
- package/services/balance-service/transfer/xcm/availBridge.d.ts +45 -0
- package/services/balance-service/transfer/xcm/availBridge.js +186 -0
- package/services/balance-service/transfer/xcm/index.d.ts +8 -8
- package/services/balance-service/transfer/xcm/index.js +46 -5
- package/services/chain-service/constants.d.ts +1 -0
- package/services/chain-service/constants.js +2 -1
- package/services/chain-service/handler/EvmApi.js +12 -21
- package/services/chain-service/handler/EvmChainHandler.js +0 -2
- package/services/chain-service/handler/SubstrateChainHandler.d.ts +3 -2
- package/services/chain-service/handler/SubstrateChainHandler.js +73 -40
- package/services/chain-service/index.d.ts +2 -0
- package/services/chain-service/index.js +45 -14
- package/services/chain-service/types.d.ts +2 -1
- package/services/chain-service/utils/index.d.ts +3 -0
- package/services/chain-service/utils/index.js +14 -0
- package/services/earning-service/handlers/base.d.ts +2 -0
- package/services/earning-service/handlers/base.js +9 -0
- package/services/earning-service/handlers/native-staking/amplitude.js +11 -3
- package/services/earning-service/handlers/native-staking/astar.js +1 -1
- package/services/earning-service/handlers/native-staking/para-chain.js +3 -1
- package/services/earning-service/handlers/native-staking/relay-chain.js +3 -1
- package/services/earning-service/handlers/native-staking/tao.d.ts +4 -0
- package/services/earning-service/handlers/native-staking/tao.js +6 -2
- package/services/earning-service/handlers/nomination-pool/index.d.ts +1 -1
- package/services/earning-service/handlers/nomination-pool/index.js +14 -12
- package/services/earning-service/service.d.ts +2 -0
- package/services/earning-service/service.js +5 -0
- package/services/inapp-notification-service/consts.d.ts +18 -0
- package/services/inapp-notification-service/consts.js +22 -0
- package/services/inapp-notification-service/index.d.ts +37 -0
- package/services/inapp-notification-service/index.js +252 -0
- package/services/inapp-notification-service/interfaces.d.ts +77 -0
- package/services/inapp-notification-service/interfaces.js +24 -0
- package/services/inapp-notification-service/utils.d.ts +55 -0
- package/services/inapp-notification-service/utils.js +173 -0
- package/services/keyring-service/context/account-context.d.ts +3 -0
- package/services/keyring-service/context/account-context.js +9 -0
- package/services/keyring-service/context/state.d.ts +1 -0
- package/services/keyring-service/context/state.js +4 -0
- package/services/setting-service/SettingService.js +9 -1
- package/services/setting-service/constants.d.ts +2 -0
- package/services/setting-service/constants.js +15 -0
- package/services/storage-service/DatabaseService.d.ts +15 -0
- package/services/storage-service/DatabaseService.js +42 -3
- package/services/storage-service/databases/index.d.ts +2 -0
- package/services/storage-service/databases/index.js +3 -0
- package/services/storage-service/db-stores/InappNotification.d.ts +14 -0
- package/services/storage-service/db-stores/InappNotification.js +73 -0
- package/services/transaction-service/index.js +18 -4
- package/types/avail-bridge/index.d.ts +6 -0
- package/types/avail-bridge/index.js +1 -0
- package/types/notification/index.d.ts +9 -0
- package/types/notification/index.js +1 -0
- package/utils/account/transform.js +9 -5
- package/utils/staticData/index.d.ts +5 -1
- package/utils/staticData/index.js +5 -2
- package/utils/staticData/remindNotificationTime.json +1 -0
|
@@ -63,6 +63,7 @@ export declare class ChainService {
|
|
|
63
63
|
getAssetRegistry(): Record<string, _ChainAsset>;
|
|
64
64
|
getMultiChainAssetMap(): Record<string, _MultiChainAsset>;
|
|
65
65
|
getSmartContractTokens(): Record<string, _ChainAsset>;
|
|
66
|
+
getAssetHubToken(): Record<string, _ChainAsset>;
|
|
66
67
|
getChainInfoMap(): Record<string, _ChainInfo>;
|
|
67
68
|
getEvmChainInfoMap(): Record<string, _ChainInfo>;
|
|
68
69
|
getSubstrateChainInfoMap(): Record<string, _ChainInfo>;
|
|
@@ -131,6 +132,7 @@ export declare class ChainService {
|
|
|
131
132
|
private getChainSpecByProvider;
|
|
132
133
|
private validateProvider;
|
|
133
134
|
private getSmartContractTokenInfo;
|
|
135
|
+
private getAssetIdTokenInfo;
|
|
134
136
|
validateCustomToken(data: _ValidateCustomAssetRequest): Promise<_ValidateCustomAssetResponse>;
|
|
135
137
|
private generateSlugForSmartContractAsset;
|
|
136
138
|
private generateSlugForNativeToken;
|
|
@@ -10,7 +10,7 @@ import { SubstrateChainHandler } from '@subwallet/extension-base/services/chain-
|
|
|
10
10
|
import { TonChainHandler } from '@subwallet/extension-base/services/chain-service/handler/TonChainHandler';
|
|
11
11
|
import { _CHAIN_VALIDATION_ERROR } from '@subwallet/extension-base/services/chain-service/handler/types';
|
|
12
12
|
import { _ChainConnectionStatus, _CUSTOM_PREFIX, _NFT_CONTRACT_STANDARDS, _SMART_CONTRACT_STANDARDS } from '@subwallet/extension-base/services/chain-service/types';
|
|
13
|
-
import { _isAssetAutoEnable, _isAssetCanPayTxFee, _isAssetFungibleToken, _isChainEnabled, _isCustomAsset, _isCustomChain, _isCustomProvider, _isEqualContractAddress, _isEqualSmartContractAsset, _isMantaZkAsset, _isPureEvmChain, _isPureSubstrateChain, _parseAssetRefKey, fetchPatchData, randomizeProvider, updateLatestChainInfo } from '@subwallet/extension-base/services/chain-service/utils';
|
|
13
|
+
import { _isAssetAutoEnable, _isAssetCanPayTxFee, _isAssetFungibleToken, _isChainEnabled, _isCustomAsset, _isCustomChain, _isCustomProvider, _isEqualContractAddress, _isEqualSmartContractAsset, _isLocalToken, _isMantaZkAsset, _isPureEvmChain, _isPureSubstrateChain, _parseAssetRefKey, fetchPatchData, randomizeProvider, updateLatestChainInfo } from '@subwallet/extension-base/services/chain-service/utils';
|
|
14
14
|
import AssetSettingStore from '@subwallet/extension-base/stores/AssetSetting';
|
|
15
15
|
import { addLazy, calculateMetadataHash, fetchStaticData, filterAssetsByChainAndType, getShortMetadata, MODULE_SUPPORT } from '@subwallet/extension-base/utils';
|
|
16
16
|
import { BehaviorSubject, Subject } from 'rxjs';
|
|
@@ -186,6 +186,15 @@ export class ChainService {
|
|
|
186
186
|
});
|
|
187
187
|
return filteredAssetRegistry;
|
|
188
188
|
}
|
|
189
|
+
getAssetHubToken() {
|
|
190
|
+
const assetHubToken = {};
|
|
191
|
+
Object.values(this.getAssetRegistry()).forEach(asset => {
|
|
192
|
+
if (['statemint', 'statemine'].includes(asset.originChain)) {
|
|
193
|
+
assetHubToken[asset.slug] = asset;
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
return assetHubToken;
|
|
197
|
+
}
|
|
189
198
|
getChainInfoMap() {
|
|
190
199
|
return this.dataMap.chainInfoMap;
|
|
191
200
|
}
|
|
@@ -435,7 +444,7 @@ export class ChainService {
|
|
|
435
444
|
upsertCustomToken(token) {
|
|
436
445
|
if (token.slug.length === 0) {
|
|
437
446
|
// new token
|
|
438
|
-
if (token.assetType === _AssetType.NATIVE) {
|
|
447
|
+
if (token.assetType === _AssetType.NATIVE || token.assetType === _AssetType.LOCAL) {
|
|
439
448
|
const defaultSlug = this.generateSlugForNativeToken(token.originChain, token.assetType, token.symbol);
|
|
440
449
|
token.slug = `${_CUSTOM_PREFIX}${defaultSlug}`;
|
|
441
450
|
} else {
|
|
@@ -444,7 +453,7 @@ export class ChainService {
|
|
|
444
453
|
token.slug = `${_CUSTOM_PREFIX}${defaultSlug}`;
|
|
445
454
|
}
|
|
446
455
|
}
|
|
447
|
-
if (token.originChain && _isAssetFungibleToken(token)) {
|
|
456
|
+
if (token.originChain && (_isAssetFungibleToken(token) || _isLocalToken(token))) {
|
|
448
457
|
var _this$getChainInfoByK;
|
|
449
458
|
token.hasValue = !((_this$getChainInfoByK = this.getChainInfoByKey(token.originChain)) !== null && _this$getChainInfoByK !== void 0 && _this$getChainInfoByK.isTestnet);
|
|
450
459
|
}
|
|
@@ -1510,13 +1519,35 @@ export class ChainService {
|
|
|
1510
1519
|
contractError: false
|
|
1511
1520
|
};
|
|
1512
1521
|
}
|
|
1522
|
+
async getAssetIdTokenInfo(assetId, tokenType, chain) {
|
|
1523
|
+
if ([_AssetType.LOCAL].includes(tokenType) && assetId) {
|
|
1524
|
+
return await this.substrateChainHandler.getSubstrateAssetIdTokenInfo(assetId, chain);
|
|
1525
|
+
}
|
|
1526
|
+
return {
|
|
1527
|
+
decimals: -1,
|
|
1528
|
+
name: '',
|
|
1529
|
+
symbol: '',
|
|
1530
|
+
contractError: false
|
|
1531
|
+
};
|
|
1532
|
+
}
|
|
1513
1533
|
async validateCustomToken(data) {
|
|
1514
1534
|
const assetRegistry = this.getSmartContractTokens();
|
|
1535
|
+
const asset = this.getAssetHubToken();
|
|
1515
1536
|
let existedToken;
|
|
1516
1537
|
for (const token of Object.values(assetRegistry)) {
|
|
1517
1538
|
var _token$metadata2;
|
|
1518
1539
|
const contractAddress = token === null || token === void 0 ? void 0 : (_token$metadata2 = token.metadata) === null || _token$metadata2 === void 0 ? void 0 : _token$metadata2.contractAddress;
|
|
1519
|
-
if (
|
|
1540
|
+
if (data.contractAddress) {
|
|
1541
|
+
if (_isEqualContractAddress(contractAddress, data.contractAddress) && token.assetType === data.type && token.originChain === data.originChain) {
|
|
1542
|
+
existedToken = token;
|
|
1543
|
+
break;
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
for (const token of Object.values(asset)) {
|
|
1548
|
+
var _token$metadata3;
|
|
1549
|
+
const assetId = token === null || token === void 0 ? void 0 : (_token$metadata3 = token.metadata) === null || _token$metadata3 === void 0 ? void 0 : _token$metadata3.assetId;
|
|
1550
|
+
if (assetId === data.assetId && token.assetType === data.type && token.originChain === data.originChain) {
|
|
1520
1551
|
existedToken = token;
|
|
1521
1552
|
break;
|
|
1522
1553
|
}
|
|
@@ -1532,18 +1563,18 @@ export class ChainService {
|
|
|
1532
1563
|
contractError: false
|
|
1533
1564
|
};
|
|
1534
1565
|
}
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
}
|
|
1566
|
+
let info;
|
|
1567
|
+
if (data.contractAddress) {
|
|
1568
|
+
info = await this.getSmartContractTokenInfo(data.contractAddress, data.type, data.originChain, data.contractCaller);
|
|
1569
|
+
} else {
|
|
1570
|
+
info = await this.getAssetIdTokenInfo(data.assetId, data.type, data.originChain);
|
|
1571
|
+
}
|
|
1541
1572
|
return {
|
|
1542
|
-
name,
|
|
1543
|
-
decimals,
|
|
1544
|
-
symbol,
|
|
1573
|
+
name: info.name,
|
|
1574
|
+
decimals: info.decimals,
|
|
1575
|
+
symbol: info.symbol,
|
|
1545
1576
|
isExist: !!existedToken,
|
|
1546
|
-
contractError
|
|
1577
|
+
contractError: info.contractError
|
|
1547
1578
|
};
|
|
1548
1579
|
}
|
|
1549
1580
|
generateSlugForSmartContractAsset(originChain, assetType, symbol, contractAddress) {
|
|
@@ -160,10 +160,11 @@ export interface EnableMultiChainParams {
|
|
|
160
160
|
enableTokens?: boolean;
|
|
161
161
|
}
|
|
162
162
|
export interface _ValidateCustomAssetRequest {
|
|
163
|
-
contractAddress
|
|
163
|
+
contractAddress?: string;
|
|
164
164
|
originChain: string;
|
|
165
165
|
type: _AssetType;
|
|
166
166
|
contractCaller?: string;
|
|
167
|
+
assetId?: string;
|
|
167
168
|
}
|
|
168
169
|
export interface _SmartContractTokenInfo {
|
|
169
170
|
name: string;
|
|
@@ -53,6 +53,8 @@ export declare function _isChainSupportEvmNft(chainInfo: _ChainInfo): boolean;
|
|
|
53
53
|
export declare function _isChainSupportWasmNft(chainInfo: _ChainInfo): boolean;
|
|
54
54
|
export declare function _isChainSupportEvmERC20(chainInfo: _ChainInfo): boolean;
|
|
55
55
|
export declare function _isChainSupportWasmPSP22(chainInfo: _ChainInfo): boolean;
|
|
56
|
+
export declare function _isAssetHubChain(chainInfo: _ChainInfo): boolean;
|
|
57
|
+
export declare function _isAssetHubToken(token: _ChainAsset): boolean;
|
|
56
58
|
export declare function _isChainSupportGRC20(chainInfo: _ChainInfo): boolean;
|
|
57
59
|
export declare function _isChainSupportVFT(chainInfo: _ChainInfo): boolean;
|
|
58
60
|
export declare const _isSupportOrdinal: (chain: string) => boolean;
|
|
@@ -88,6 +90,7 @@ export declare function _getChainName(chainInfo?: _ChainInfo): string;
|
|
|
88
90
|
export declare function _getAssetDecimals(assetInfo?: _ChainAsset): number;
|
|
89
91
|
export declare function _getBlockExplorerFromChain(chainInfo: _ChainInfo): string | undefined;
|
|
90
92
|
export declare function _parseMetadataForSmartContractAsset(contractAddress: string): Record<string, string>;
|
|
93
|
+
export declare function _parseMetadataForAssetId(assetId: string): Record<string, string>;
|
|
91
94
|
export declare function _isChainTestNet(chainInfo: _ChainInfo): boolean;
|
|
92
95
|
export declare function _isAssetFungibleToken(chainAsset: _ChainAsset): boolean;
|
|
93
96
|
export declare const _isAssetAutoEnable: (chainAsset: _ChainAsset) => boolean;
|
|
@@ -194,6 +194,12 @@ export function _isChainSupportWasmPSP22(chainInfo) {
|
|
|
194
194
|
var _chainInfo$substrateI10, _chainInfo$substrateI11;
|
|
195
195
|
return ((_chainInfo$substrateI10 = chainInfo.substrateInfo) === null || _chainInfo$substrateI10 === void 0 ? void 0 : (_chainInfo$substrateI11 = _chainInfo$substrateI10.supportSmartContract) === null || _chainInfo$substrateI11 === void 0 ? void 0 : _chainInfo$substrateI11.includes(_AssetType.PSP22)) || false;
|
|
196
196
|
}
|
|
197
|
+
export function _isAssetHubChain(chainInfo) {
|
|
198
|
+
return ['statemint', 'statemine'].includes(chainInfo.slug);
|
|
199
|
+
}
|
|
200
|
+
export function _isAssetHubToken(token) {
|
|
201
|
+
return ['statemint', 'statemine'].includes(token.originChain);
|
|
202
|
+
}
|
|
197
203
|
export function _isChainSupportGRC20(chainInfo) {
|
|
198
204
|
var _chainInfo$substrateI12, _chainInfo$substrateI13;
|
|
199
205
|
return ((_chainInfo$substrateI12 = chainInfo.substrateInfo) === null || _chainInfo$substrateI12 === void 0 ? void 0 : (_chainInfo$substrateI13 = _chainInfo$substrateI12.supportSmartContract) === null || _chainInfo$substrateI13 === void 0 ? void 0 : _chainInfo$substrateI13.includes(_AssetType.GRC20)) || false;
|
|
@@ -240,6 +246,9 @@ export function _getTokenTypesSupportedByChain(chainInfo) {
|
|
|
240
246
|
}
|
|
241
247
|
});
|
|
242
248
|
}
|
|
249
|
+
if (['statemint', 'statemine'].includes(chainInfo.slug)) {
|
|
250
|
+
result.push(_AssetType.LOCAL);
|
|
251
|
+
}
|
|
243
252
|
return result;
|
|
244
253
|
}
|
|
245
254
|
export function _getChainNativeTokenBasicInfo(chainInfo) {
|
|
@@ -393,6 +402,11 @@ export function _parseMetadataForSmartContractAsset(contractAddress) {
|
|
|
393
402
|
contractAddress
|
|
394
403
|
};
|
|
395
404
|
}
|
|
405
|
+
export function _parseMetadataForAssetId(assetId) {
|
|
406
|
+
return {
|
|
407
|
+
assetId
|
|
408
|
+
};
|
|
409
|
+
}
|
|
396
410
|
export function _isChainTestNet(chainInfo) {
|
|
397
411
|
return chainInfo.isTestnet || false;
|
|
398
412
|
}
|
|
@@ -45,6 +45,8 @@ export default abstract class BasePoolHandler {
|
|
|
45
45
|
protected abstract getDescription(amount?: string): string;
|
|
46
46
|
protected get maintainBalance(): string;
|
|
47
47
|
get metadataInfo(): Omit<BaseYieldPoolMetadata, 'description'>;
|
|
48
|
+
createWithdrawNotifications(unstakingInfos: UnstakingInfo[], tokenInfo: _ChainAsset, address: string): Promise<void>;
|
|
49
|
+
createClaimNotification(claimItemInfo: EarningRewardItem, tokenInfo: _ChainAsset): Promise<void>;
|
|
48
50
|
/** Can mint when haven't enough native token (use input token for fee) */
|
|
49
51
|
get isPoolSupportAlternativeFee(): boolean;
|
|
50
52
|
getPoolInfo(): Promise<YieldPoolInfo | undefined>;
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { ChainType } from '@subwallet/extension-base/background/KoniTypes';
|
|
5
5
|
import { ALL_ACCOUNT_KEY } from '@subwallet/extension-base/constants';
|
|
6
6
|
import { DEFAULT_YIELD_FIRST_STEP } from '@subwallet/extension-base/services/earning-service/constants';
|
|
7
|
+
import { createClaimNotification, createWithdrawNotifications } from '@subwallet/extension-base/services/inapp-notification-service/utils';
|
|
7
8
|
import { formatNumber, reformatAddress } from '@subwallet/extension-base/utils';
|
|
8
9
|
import { BN, BN_TEN } from '@polkadot/util';
|
|
9
10
|
|
|
@@ -93,6 +94,14 @@ export default class BasePoolHandler {
|
|
|
93
94
|
availableMethod: this.availableMethod
|
|
94
95
|
};
|
|
95
96
|
}
|
|
97
|
+
async createWithdrawNotifications(unstakingInfos, tokenInfo, address) {
|
|
98
|
+
const notifications = createWithdrawNotifications(unstakingInfos, tokenInfo, address, this.baseInfo.slug, this.type);
|
|
99
|
+
await this.state.inappNotificationService.validateAndWriteNotificationsToDB(notifications, address);
|
|
100
|
+
}
|
|
101
|
+
async createClaimNotification(claimItemInfo, tokenInfo) {
|
|
102
|
+
const notification = createClaimNotification(claimItemInfo, tokenInfo);
|
|
103
|
+
await this.state.inappNotificationService.validateAndWriteNotificationsToDB([notification], claimItemInfo.address);
|
|
104
|
+
}
|
|
96
105
|
|
|
97
106
|
/** Can mint when haven't enough native token (use input token for fee) */
|
|
98
107
|
get isPoolSupportAlternativeFee() {
|
|
@@ -159,6 +159,7 @@ export default class AmplitudeNativeStakingPoolHandler extends BaseParaNativeSta
|
|
|
159
159
|
}
|
|
160
160
|
const totalBalance = new BN(activeStake).add(new BN(unstakingBalance));
|
|
161
161
|
const stakingStatus = getEarningStatusByNominations(new BN(activeStake), nominationList);
|
|
162
|
+
await this.createWithdrawNotifications(unstakingList, this.nativeToken, address);
|
|
162
163
|
return {
|
|
163
164
|
status: stakingStatus,
|
|
164
165
|
balanceToken: this.nativeToken.slug,
|
|
@@ -244,13 +245,20 @@ export default class AmplitudeNativeStakingPoolHandler extends BaseParaNativeSta
|
|
|
244
245
|
if (cancel) {
|
|
245
246
|
return;
|
|
246
247
|
}
|
|
247
|
-
|
|
248
|
+
const earningRewardItem = {
|
|
248
249
|
...this.baseInfo,
|
|
249
250
|
address: address,
|
|
250
251
|
type: this.type,
|
|
251
252
|
unclaimedReward: _unclaimedReward.toString(),
|
|
252
253
|
state: APIItemState.READY
|
|
253
|
-
}
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
// TODO: Enable this when claim action is ready
|
|
257
|
+
// if (_unclaimedReward.toString() !== '0') {
|
|
258
|
+
// await this.createClaimNotification(earningRewardItem, this.nativeToken);
|
|
259
|
+
// }
|
|
260
|
+
|
|
261
|
+
callBack(earningRewardItem);
|
|
254
262
|
}));
|
|
255
263
|
}
|
|
256
264
|
return () => {
|
|
@@ -440,7 +448,7 @@ export default class AmplitudeNativeStakingPoolHandler extends BaseParaNativeSta
|
|
|
440
448
|
} else {
|
|
441
449
|
extrinsic = chainApi.api.tx.parachainStaking.leaveDelegators();
|
|
442
450
|
}
|
|
443
|
-
return [ExtrinsicType.
|
|
451
|
+
return [ExtrinsicType.STAKING_UNBOND, extrinsic];
|
|
444
452
|
}
|
|
445
453
|
|
|
446
454
|
/* Leave pool action */
|
|
@@ -399,7 +399,7 @@ export default class AstarNativeStakingPoolHandler extends BaseParaNativeStaking
|
|
|
399
399
|
Wasm: selectedTarget
|
|
400
400
|
};
|
|
401
401
|
const extrinsic = chainApi.api.tx.dappsStaking.unbondAndUnstake(dappParam, binaryAmount);
|
|
402
|
-
return [ExtrinsicType.
|
|
402
|
+
return [ExtrinsicType.STAKING_UNBOND, extrinsic];
|
|
403
403
|
}
|
|
404
404
|
|
|
405
405
|
/* Leave pool action */
|
|
@@ -209,6 +209,8 @@ export default class ParaNativeStakingPoolHandler extends BaseParaNativeStakingP
|
|
|
209
209
|
const totalStake = bnTotalStake.toString();
|
|
210
210
|
const activeStake = bnTotalActiveStake.toString();
|
|
211
211
|
const unstakingBalance = bnTotalUnstaking.toString();
|
|
212
|
+
const tokenInfo = this.state.chainService.getAssetBySlug(this.nativeToken.slug);
|
|
213
|
+
await this.createWithdrawNotifications(Object.values(unstakingMap), tokenInfo, address);
|
|
212
214
|
return {
|
|
213
215
|
status: stakingStatus,
|
|
214
216
|
totalStake,
|
|
@@ -470,7 +472,7 @@ export default class ParaNativeStakingPoolHandler extends BaseParaNativeStakingP
|
|
|
470
472
|
} else {
|
|
471
473
|
extrinsic = apiPromise.api.tx.parachainStaking.scheduleRevokeDelegation(selectedTarget);
|
|
472
474
|
}
|
|
473
|
-
return [ExtrinsicType.
|
|
475
|
+
return [ExtrinsicType.STAKING_UNBOND, extrinsic];
|
|
474
476
|
}
|
|
475
477
|
|
|
476
478
|
/* Leave pool action */
|
|
@@ -171,6 +171,8 @@ export default class RelayNativeStakingPoolHandler extends BaseNativeStakingPool
|
|
|
171
171
|
targetTimestampMs: targetTimestampMs
|
|
172
172
|
});
|
|
173
173
|
});
|
|
174
|
+
const tokenInfo = this.state.chainService.getAssetBySlug(this.nativeToken.slug);
|
|
175
|
+
await this.createWithdrawNotifications(unstakingList, tokenInfo, address);
|
|
174
176
|
return {
|
|
175
177
|
status: stakingStatus,
|
|
176
178
|
balanceToken: this.nativeToken.slug,
|
|
@@ -632,7 +634,7 @@ export default class RelayNativeStakingPoolHandler extends BaseNativeStakingPool
|
|
|
632
634
|
} else {
|
|
633
635
|
extrinsic = chainApi.api.tx.staking.unbond(binaryAmount);
|
|
634
636
|
}
|
|
635
|
-
return [ExtrinsicType.
|
|
637
|
+
return [ExtrinsicType.STAKING_UNBOND, extrinsic];
|
|
636
638
|
}
|
|
637
639
|
|
|
638
640
|
/* Leave pool action */
|
|
@@ -30,6 +30,10 @@ interface Validator {
|
|
|
30
30
|
}
|
|
31
31
|
export declare const BITTENSOR_API_KEY_1: string;
|
|
32
32
|
export declare const BITTENSOR_API_KEY_2: string;
|
|
33
|
+
export declare const BITTENSOR_API_KEY_3: string;
|
|
34
|
+
export declare const BITTENSOR_API_KEY_4: string;
|
|
35
|
+
export declare const BITTENSOR_API_KEY_5: string;
|
|
36
|
+
export declare const BITTENSOR_API_KEY_6: string;
|
|
33
37
|
export declare const bittensorApiKey: () => string;
|
|
34
38
|
export declare function fetchDelegates(): Promise<ValidatorResponse>;
|
|
35
39
|
export declare function fetchTaoDelegateState(address: string): Promise<RawDelegateState>;
|
|
@@ -13,13 +13,17 @@ import { BN, BN_TEN, BN_ZERO } from '@polkadot/util';
|
|
|
13
13
|
import { calculateReward } from "../../utils/index.js";
|
|
14
14
|
export const BITTENSOR_API_KEY_1 = process.env.BITTENSOR_API_KEY_1 || '';
|
|
15
15
|
export const BITTENSOR_API_KEY_2 = process.env.BITTENSOR_API_KEY_2 || '';
|
|
16
|
+
export const BITTENSOR_API_KEY_3 = process.env.BITTENSOR_API_KEY_3 || '';
|
|
17
|
+
export const BITTENSOR_API_KEY_4 = process.env.BITTENSOR_API_KEY_4 || '';
|
|
18
|
+
export const BITTENSOR_API_KEY_5 = process.env.BITTENSOR_API_KEY_5 || '';
|
|
19
|
+
export const BITTENSOR_API_KEY_6 = process.env.BITTENSOR_API_KEY_6 || '';
|
|
16
20
|
function random(...keys) {
|
|
17
21
|
const validKeys = keys.filter(key => key);
|
|
18
22
|
const randomIndex = Math.floor(Math.random() * validKeys.length);
|
|
19
23
|
return validKeys[randomIndex];
|
|
20
24
|
}
|
|
21
25
|
export const bittensorApiKey = () => {
|
|
22
|
-
return random(BITTENSOR_API_KEY_1, BITTENSOR_API_KEY_2);
|
|
26
|
+
return random(BITTENSOR_API_KEY_1, BITTENSOR_API_KEY_2, BITTENSOR_API_KEY_3, BITTENSOR_API_KEY_4, BITTENSOR_API_KEY_5, BITTENSOR_API_KEY_6);
|
|
23
27
|
};
|
|
24
28
|
|
|
25
29
|
/* Fetch data */
|
|
@@ -371,7 +375,7 @@ export default class TaoNativeStakingPoolHandler extends BaseParaStakingPoolHand
|
|
|
371
375
|
return Promise.reject(new TransactionError(BasicTxErrorType.INVALID_PARAMS));
|
|
372
376
|
}
|
|
373
377
|
const extrinsic = apiPromise.api.tx.subtensorModule.removeStake(selectedTarget, binaryAmount);
|
|
374
|
-
return [ExtrinsicType.
|
|
378
|
+
return [ExtrinsicType.STAKING_UNBOND, extrinsic];
|
|
375
379
|
}
|
|
376
380
|
|
|
377
381
|
/* Leave pool action */
|
|
@@ -15,7 +15,7 @@ export default class NominationPoolHandler extends BasePoolHandler {
|
|
|
15
15
|
constructor(state: KoniState, chain: string);
|
|
16
16
|
protected getDescription(amount?: string): string;
|
|
17
17
|
subscribePoolInfo(callback: (data: YieldPoolInfo) => void): Promise<VoidFunction>;
|
|
18
|
-
parsePoolMemberMetadata(substrateApi: _SubstrateApi, poolMemberInfo: PalletNominationPoolsPoolMember, currentEra: string, _deriveSessionProgress: DeriveSessionProgress): Promise<Omit<YieldPositionInfo, keyof BaseYieldPositionInfo>>;
|
|
18
|
+
parsePoolMemberMetadata(substrateApi: _SubstrateApi, poolMemberInfo: PalletNominationPoolsPoolMember, currentEra: string, _deriveSessionProgress: DeriveSessionProgress, address: string): Promise<Omit<YieldPositionInfo, keyof BaseYieldPositionInfo>>;
|
|
19
19
|
subscribePoolPosition(useAddresses: string[], resultCallback: (rs: YieldPositionInfo) => void): Promise<VoidFunction>;
|
|
20
20
|
getPoolReward(useAddresses: string[], callBack: (rs: EarningRewardItem) => void): Promise<VoidFunction>;
|
|
21
21
|
getPoolRewardHistory(useAddresses: string[], callBack: (rs: EarningRewardHistoryItem) => void): Promise<VoidFunction>;
|
|
@@ -145,7 +145,7 @@ export default class NominationPoolHandler extends BasePoolHandler {
|
|
|
145
145
|
|
|
146
146
|
/* Subscribe pool position */
|
|
147
147
|
|
|
148
|
-
async parsePoolMemberMetadata(substrateApi, poolMemberInfo, currentEra, _deriveSessionProgress) {
|
|
148
|
+
async parsePoolMemberMetadata(substrateApi, poolMemberInfo, currentEra, _deriveSessionProgress, address) {
|
|
149
149
|
const chainInfo = this.chainInfo;
|
|
150
150
|
const unlimitedNominatorRewarded = substrateApi.api.consts.staking.maxExposurePageSize !== undefined;
|
|
151
151
|
const _maxNominatorRewardedPerValidator = (substrateApi.api.consts.staking.maxNominatorRewardedPerValidator || 0).toString();
|
|
@@ -215,6 +215,7 @@ export default class NominationPoolHandler extends BasePoolHandler {
|
|
|
215
215
|
if (!bnActiveStake.gt(BN_ZERO)) {
|
|
216
216
|
stakingStatus = EarningStatus.NOT_EARNING;
|
|
217
217
|
}
|
|
218
|
+
await this.createWithdrawNotifications(unstakings, this.nativeToken, address);
|
|
218
219
|
return {
|
|
219
220
|
status: stakingStatus,
|
|
220
221
|
balanceToken: this.nativeToken.slug,
|
|
@@ -246,7 +247,7 @@ export default class NominationPoolHandler extends BasePoolHandler {
|
|
|
246
247
|
const poolMemberInfo = _poolMemberInfo.toPrimitive();
|
|
247
248
|
const owner = reformatAddress(useAddresses[i], 42);
|
|
248
249
|
if (poolMemberInfo) {
|
|
249
|
-
const nominatorMetadata = await this.parsePoolMemberMetadata(substrateApi, poolMemberInfo, currentEra, _deriveSessionProgress);
|
|
250
|
+
const nominatorMetadata = await this.parsePoolMemberMetadata(substrateApi, poolMemberInfo, currentEra, _deriveSessionProgress, owner);
|
|
250
251
|
resultCallback({
|
|
251
252
|
...defaultInfo,
|
|
252
253
|
...nominatorMetadata,
|
|
@@ -292,13 +293,17 @@ export default class NominationPoolHandler extends BasePoolHandler {
|
|
|
292
293
|
var _substrateApi$api$cal, _substrateApi$api$cal2;
|
|
293
294
|
const _unclaimedReward = await ((_substrateApi$api$cal = substrateApi.api.call) === null || _substrateApi$api$cal === void 0 ? void 0 : (_substrateApi$api$cal2 = _substrateApi$api$cal.nominationPoolsApi) === null || _substrateApi$api$cal2 === void 0 ? void 0 : _substrateApi$api$cal2.pendingRewards(address));
|
|
294
295
|
if (_unclaimedReward) {
|
|
295
|
-
|
|
296
|
+
const earningRewardItem = {
|
|
296
297
|
...this.baseInfo,
|
|
297
298
|
address: address,
|
|
298
299
|
type: this.type,
|
|
299
300
|
unclaimedReward: _unclaimedReward.toString(),
|
|
300
301
|
state: APIItemState.READY
|
|
301
|
-
}
|
|
302
|
+
};
|
|
303
|
+
if (_unclaimedReward.toString() !== '0') {
|
|
304
|
+
await this.createClaimNotification(earningRewardItem, this.nativeToken);
|
|
305
|
+
}
|
|
306
|
+
callBack(earningRewardItem);
|
|
302
307
|
}
|
|
303
308
|
}
|
|
304
309
|
}
|
|
@@ -467,21 +472,18 @@ export default class NominationPoolHandler extends BasePoolHandler {
|
|
|
467
472
|
const data = _data;
|
|
468
473
|
const {
|
|
469
474
|
address,
|
|
470
|
-
amount
|
|
471
|
-
selectedPool
|
|
475
|
+
amount
|
|
472
476
|
} = data;
|
|
473
477
|
const positionInfo = await this.getPoolPosition(address);
|
|
474
478
|
const [extrinsic] = await this.createJoinExtrinsic(data, positionInfo);
|
|
475
479
|
const joinPoolData = {
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
amount,
|
|
480
|
-
address
|
|
480
|
+
path,
|
|
481
|
+
data: data,
|
|
482
|
+
currentStep
|
|
481
483
|
};
|
|
482
484
|
return {
|
|
483
485
|
txChain: this.chain,
|
|
484
|
-
extrinsicType: ExtrinsicType.
|
|
486
|
+
extrinsicType: ExtrinsicType.JOIN_YIELD_POOL,
|
|
485
487
|
extrinsic,
|
|
486
488
|
txData: joinPoolData,
|
|
487
489
|
transferNativeAmount: amount,
|
|
@@ -69,6 +69,8 @@ export default class EarningService implements StoppableServiceInterface, Persis
|
|
|
69
69
|
subscribeEarningReward(): BehaviorSubject<EarningRewardJson>;
|
|
70
70
|
getEarningRewards(): EarningRewardJson;
|
|
71
71
|
earningsRewardInterval: NodeJS.Timer | undefined;
|
|
72
|
+
earningRewardReady: PromiseHandler<void>;
|
|
73
|
+
waitEarningRewardReady(): Promise<void>;
|
|
72
74
|
runSubscribeStakingRewardInterval(): void;
|
|
73
75
|
runUnsubscribeStakingRewardInterval(): void;
|
|
74
76
|
fetchPoolRewardHistory(addresses: string[], callback: (result: EarningRewardHistoryItem) => void): Promise<VoidFunction>;
|
|
@@ -516,6 +516,7 @@ export default class EarningService {
|
|
|
516
516
|
stakingRewardState.ready = true;
|
|
517
517
|
this.earningRewardSubject.next(stakingRewardState);
|
|
518
518
|
this.earningsRewardQueue = [];
|
|
519
|
+
this.earningRewardReady.resolve();
|
|
519
520
|
});
|
|
520
521
|
}
|
|
521
522
|
async getPoolReward(addresses, callback) {
|
|
@@ -553,6 +554,10 @@ export default class EarningService {
|
|
|
553
554
|
getEarningRewards() {
|
|
554
555
|
return this.earningRewardSubject.getValue();
|
|
555
556
|
}
|
|
557
|
+
earningRewardReady = createPromiseHandler();
|
|
558
|
+
waitEarningRewardReady() {
|
|
559
|
+
return this.earningRewardReady.promise;
|
|
560
|
+
}
|
|
556
561
|
runSubscribeStakingRewardInterval() {
|
|
557
562
|
const addresses = this.state.keyringService.context.getDecodedAddresses();
|
|
558
563
|
if (!addresses.length) {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { getAvailBridgeClaimDescription, getClaimDescription, getReceiveDescription, getSendDescription, getWithdrawDescription } from '@subwallet/extension-base/services/inapp-notification-service/utils';
|
|
2
|
+
export declare const NotificationTitleMap: {
|
|
3
|
+
WITHDRAW: string;
|
|
4
|
+
CLAIM: string;
|
|
5
|
+
SEND: string;
|
|
6
|
+
RECEIVE: string;
|
|
7
|
+
CLAIM_AVAIL_BRIDGE_ON_AVAIL: string;
|
|
8
|
+
CLAIM_AVAIL_BRIDGE_ON_ETHEREUM: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const NotificationDescriptionMap: {
|
|
11
|
+
WITHDRAW: typeof getWithdrawDescription;
|
|
12
|
+
CLAIM: typeof getClaimDescription;
|
|
13
|
+
SEND: typeof getSendDescription;
|
|
14
|
+
RECEIVE: typeof getReceiveDescription;
|
|
15
|
+
CLAIM_AVAIL_BRIDGE_ON_AVAIL: typeof getAvailBridgeClaimDescription;
|
|
16
|
+
CLAIM_AVAIL_BRIDGE_ON_ETHEREUM: typeof getAvailBridgeClaimDescription;
|
|
17
|
+
};
|
|
18
|
+
export declare const ONE_DAY_MILLISECOND: number;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Copyright 2019-2022 @subwallet/extension-base authors & contributors
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { NotificationActionType } from '@subwallet/extension-base/services/inapp-notification-service/interfaces';
|
|
5
|
+
import { getAvailBridgeClaimDescription, getClaimDescription, getReceiveDescription, getSendDescription, getWithdrawDescription } from '@subwallet/extension-base/services/inapp-notification-service/utils';
|
|
6
|
+
export const NotificationTitleMap = {
|
|
7
|
+
[NotificationActionType.WITHDRAW]: '[{{accountName}}] WITHDRAW {{tokenSymbol}}',
|
|
8
|
+
[NotificationActionType.CLAIM]: '[{{accountName}}] CLAIM {{tokenSymbol}}',
|
|
9
|
+
[NotificationActionType.SEND]: '[{{accountName}}] SEND {{tokenSymbol}}',
|
|
10
|
+
[NotificationActionType.RECEIVE]: '[{{accountName}}] RECEIVE {{tokenSymbol}}',
|
|
11
|
+
[NotificationActionType.CLAIM_AVAIL_BRIDGE_ON_AVAIL]: '[{{accountName}}] CLAIM {{tokenSymbol}}',
|
|
12
|
+
[NotificationActionType.CLAIM_AVAIL_BRIDGE_ON_ETHEREUM]: '[{{accountName}}] CLAIM {{tokenSymbol}}'
|
|
13
|
+
};
|
|
14
|
+
export const NotificationDescriptionMap = {
|
|
15
|
+
[NotificationActionType.WITHDRAW]: getWithdrawDescription,
|
|
16
|
+
[NotificationActionType.CLAIM]: getClaimDescription,
|
|
17
|
+
[NotificationActionType.SEND]: getSendDescription,
|
|
18
|
+
[NotificationActionType.RECEIVE]: getReceiveDescription,
|
|
19
|
+
[NotificationActionType.CLAIM_AVAIL_BRIDGE_ON_AVAIL]: getAvailBridgeClaimDescription,
|
|
20
|
+
[NotificationActionType.CLAIM_AVAIL_BRIDGE_ON_ETHEREUM]: getAvailBridgeClaimDescription
|
|
21
|
+
};
|
|
22
|
+
export const ONE_DAY_MILLISECOND = 1000 * 24 * 60 * 60;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { _ChainAsset } from '@subwallet/chain-list/types';
|
|
2
|
+
import { CronServiceInterface, ServiceStatus } from '@subwallet/extension-base/services/base/types';
|
|
3
|
+
import { ChainService } from '@subwallet/extension-base/services/chain-service';
|
|
4
|
+
import { EventService } from '@subwallet/extension-base/services/event-service';
|
|
5
|
+
import { _BaseNotificationInfo, _NotificationInfo, NotificationActionType } from '@subwallet/extension-base/services/inapp-notification-service/interfaces';
|
|
6
|
+
import { AvailBridgeTransaction } from '@subwallet/extension-base/services/inapp-notification-service/utils';
|
|
7
|
+
import { KeyringService } from '@subwallet/extension-base/services/keyring-service';
|
|
8
|
+
import DatabaseService from '@subwallet/extension-base/services/storage-service/DatabaseService';
|
|
9
|
+
import { GetNotificationParams, RequestSwitchStatusParams } from '@subwallet/extension-base/types/notification';
|
|
10
|
+
export declare class InappNotificationService implements CronServiceInterface {
|
|
11
|
+
private readonly dbService;
|
|
12
|
+
private readonly keyringService;
|
|
13
|
+
private readonly eventService;
|
|
14
|
+
private readonly chainService;
|
|
15
|
+
status: ServiceStatus;
|
|
16
|
+
private refeshAvailBridgeClaimTimeOut;
|
|
17
|
+
constructor(dbService: DatabaseService, keyringService: KeyringService, eventService: EventService, chainService: ChainService);
|
|
18
|
+
init(): Promise<void>;
|
|
19
|
+
markAllRead(proxyId: string): Promise<void>;
|
|
20
|
+
switchReadStatus(params: RequestSwitchStatusParams): Promise<void>;
|
|
21
|
+
subscribeUnreadNotificationsCountMap(callback: (data: Record<string, number>) => void): import("dexie").Subscription;
|
|
22
|
+
getUnreadNotificationsCountMap(): Promise<Record<string, number>>;
|
|
23
|
+
fetchNotificationsByParams(params: GetNotificationParams): Promise<_NotificationInfo[]>;
|
|
24
|
+
getNotificationById(id: string): Promise<_NotificationInfo | undefined>;
|
|
25
|
+
cleanUpOldNotifications(overdueTime?: number): Promise<number>;
|
|
26
|
+
passValidateNotification(candidateNotification: _BaseNotificationInfo, comparedNotifications: _NotificationInfo[], remindTimeConfigInHrs: Record<NotificationActionType, number>): boolean;
|
|
27
|
+
validateAndWriteNotificationsToDB(notifications: _BaseNotificationInfo[], address: string): Promise<void>;
|
|
28
|
+
cronCreateAvailBridgeClaimNotification(): void;
|
|
29
|
+
createAvailBridgeClaimNotification(): void;
|
|
30
|
+
processWriteAvailBridgeClaim(address: string, transactions: AvailBridgeTransaction[], token: _ChainAsset): Promise<void>;
|
|
31
|
+
start(): Promise<void>;
|
|
32
|
+
startCron(): Promise<void>;
|
|
33
|
+
stop(): Promise<void>;
|
|
34
|
+
stopCron(): Promise<void>;
|
|
35
|
+
onAccountProxyRemove(): void;
|
|
36
|
+
removeAccountNotifications(proxyId: string): void;
|
|
37
|
+
}
|