@subwallet/extension-base 1.3.7-0 → 1.3.9-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/background/KoniTypes.d.ts +11 -5
- package/background/KoniTypes.js +1 -1
- package/cjs/background/KoniTypes.js +1 -1
- package/cjs/core/logic-validation/transfer.js +35 -24
- package/cjs/core/substrate/system-pallet.js +1 -1
- package/cjs/core/substrate/xcm-parser.js +16 -2
- package/cjs/core/utils.js +2 -2
- package/cjs/koni/api/contract-handler/utils/index.js +15 -1
- package/cjs/koni/background/handlers/Extension.js +158 -86
- package/cjs/koni/background/handlers/State.js +11 -2
- package/cjs/packageInfo.js +1 -1
- package/cjs/services/balance-service/index.js +24 -2
- package/cjs/services/balance-service/transfer/smart-contract.js +16 -5
- package/cjs/services/balance-service/transfer/xcm/index.js +31 -1
- package/cjs/services/balance-service/transfer/xcm/polygonBridge.js +108 -0
- package/cjs/services/chain-online-service/constants.js +32 -0
- package/cjs/services/chain-online-service/index.js +190 -0
- package/cjs/services/chain-service/constants.js +3 -1
- package/cjs/services/chain-service/index.js +87 -127
- package/cjs/services/chain-service/utils/index.js +0 -2
- package/cjs/services/chain-service/utils/patch.js +7 -3
- package/cjs/services/fee-service/utils/index.js +14 -0
- package/cjs/services/inapp-notification-service/consts.js +6 -4
- package/cjs/services/inapp-notification-service/index.js +110 -6
- package/cjs/services/inapp-notification-service/interfaces.js +9 -1
- package/cjs/services/inapp-notification-service/utils/avail.js +88 -0
- package/cjs/services/inapp-notification-service/{utils.js → utils/common.js} +1 -84
- package/cjs/services/inapp-notification-service/utils/index.js +38 -0
- package/cjs/services/inapp-notification-service/utils/polygon.js +66 -0
- package/cjs/services/migration-service/scripts/MigrateTransactionHistoryBridge.js +37 -0
- package/cjs/services/migration-service/scripts/index.js +3 -1
- package/cjs/services/setting-service/SettingService.js +8 -0
- package/cjs/services/setting-service/constants.js +2 -1
- package/cjs/services/storage-service/DatabaseService.js +3 -0
- package/cjs/services/transaction-service/index.js +1 -1
- package/cjs/stores/ChainlistStore.js +18 -0
- package/cjs/types/index.js +11 -0
- package/cjs/types/transaction/error.js +1 -0
- package/cjs/utils/account/transform.js +1 -1
- package/core/logic-validation/transfer.d.ts +2 -1
- package/core/logic-validation/transfer.js +36 -25
- package/core/substrate/system-pallet.js +1 -1
- package/core/substrate/xcm-parser.d.ts +1 -0
- package/core/substrate/xcm-parser.js +15 -2
- package/core/types.d.ts +1 -0
- package/core/utils.js +2 -2
- package/koni/api/contract-handler/utils/index.d.ts +2 -0
- package/koni/api/contract-handler/utils/index.js +12 -0
- package/koni/api/contract-handler/utils/polygon_bridge_abi.json +1004 -0
- package/koni/background/handlers/Extension.d.ts +4 -0
- package/koni/background/handlers/Extension.js +93 -22
- package/koni/background/handlers/State.d.ts +2 -0
- package/koni/background/handlers/State.js +11 -2
- package/package.json +56 -14
- package/packageInfo.js +1 -1
- package/services/balance-service/index.d.ts +3 -0
- package/services/balance-service/index.js +21 -2
- package/services/balance-service/transfer/smart-contract.js +16 -5
- package/services/balance-service/transfer/xcm/index.d.ts +1 -0
- package/services/balance-service/transfer/xcm/index.js +29 -1
- package/services/balance-service/transfer/xcm/polygonBridge.d.ts +22 -0
- package/services/balance-service/transfer/xcm/polygonBridge.js +95 -0
- package/services/chain-online-service/constants.d.ts +4 -0
- package/services/chain-online-service/constants.js +23 -0
- package/services/chain-online-service/index.d.ts +22 -0
- package/services/chain-online-service/index.js +182 -0
- package/services/chain-service/constants.d.ts +1 -0
- package/services/chain-service/constants.js +1 -0
- package/services/chain-service/index.d.ts +6 -7
- package/services/chain-service/index.js +78 -116
- package/services/chain-service/utils/index.js +0 -2
- package/services/chain-service/utils/patch.d.ts +16 -1
- package/services/chain-service/utils/patch.js +7 -3
- package/services/fee-service/utils/index.js +14 -0
- package/services/inapp-notification-service/consts.d.ts +3 -1
- package/services/inapp-notification-service/consts.js +6 -4
- package/services/inapp-notification-service/index.d.ts +10 -2
- package/services/inapp-notification-service/index.js +111 -7
- package/services/inapp-notification-service/interfaces.d.ts +27 -3
- package/services/inapp-notification-service/interfaces.js +7 -0
- package/services/inapp-notification-service/utils/avail.d.ts +40 -0
- package/services/inapp-notification-service/utils/avail.js +73 -0
- package/services/inapp-notification-service/utils/common.d.ts +11 -0
- package/services/inapp-notification-service/{utils.js → utils/common.js} +1 -72
- package/services/inapp-notification-service/utils/index.d.ts +3 -0
- package/services/inapp-notification-service/utils/index.js +6 -0
- package/services/inapp-notification-service/utils/polygon.d.ts +71 -0
- package/services/inapp-notification-service/utils/polygon.js +54 -0
- package/services/migration-service/scripts/MigrateTransactionHistoryBridge.d.ts +4 -0
- package/services/migration-service/scripts/MigrateTransactionHistoryBridge.js +29 -0
- package/services/migration-service/scripts/index.js +3 -1
- package/services/setting-service/SettingService.d.ts +4 -0
- package/services/setting-service/SettingService.js +8 -0
- package/services/setting-service/constants.js +2 -1
- package/services/storage-service/DatabaseService.d.ts +1 -0
- package/services/storage-service/DatabaseService.js +3 -0
- package/services/transaction-service/index.js +1 -1
- package/stores/ChainlistStore.d.ts +7 -0
- package/stores/ChainlistStore.js +10 -0
- package/types/{avail-bridge → bridge}/index.d.ts +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.js +1 -0
- package/types/notification/index.d.ts +5 -0
- package/types/transaction/error.d.ts +2 -1
- package/types/transaction/error.js +1 -0
- package/utils/account/transform.js +1 -1
- package/services/inapp-notification-service/utils.d.ts +0 -55
- /package/cjs/types/{avail-bridge → bridge}/index.js +0 -0
- /package/types/{avail-bridge → bridge}/index.js +0 -0
|
@@ -41,4 +41,5 @@ export let TransferTxErrorType;
|
|
|
41
41
|
TransferTxErrorType["INVALID_TOKEN"] = "INVALID_TOKEN";
|
|
42
42
|
TransferTxErrorType["TRANSFER_ERROR"] = "TRANSFER_ERROR";
|
|
43
43
|
TransferTxErrorType["RECEIVER_NOT_ENOUGH_EXISTENTIAL_DEPOSIT"] = "RECEIVER_NOT_ENOUGH_EXISTENTIAL_DEPOSIT";
|
|
44
|
+
TransferTxErrorType["RECEIVER_ACCOUNT_INACTIVE"] = "RECEIVER_ACCOUNT_INACTIVE";
|
|
44
45
|
})(TransferTxErrorType || (TransferTxErrorType = {}));
|
|
@@ -135,7 +135,7 @@ const EARN_QDOT_ACTIONS = [ExtrinsicType.MINT_QDOT, ExtrinsicType.REDEEM_QDOT, E
|
|
|
135
135
|
const EARN_STDOT_ACTIONS = [ExtrinsicType.MINT_STDOT, ExtrinsicType.REDEEM_STDOT, ExtrinsicType.UNSTAKE_STDOT];
|
|
136
136
|
const EARN_VMANTA_ACTIONS = [ExtrinsicType.MINT_VMANTA, ExtrinsicType.REDEEM_VMANTA, ExtrinsicType.UNSTAKE_VMANTA];
|
|
137
137
|
const EVM_ACTIONS = [ExtrinsicType.TOKEN_SPENDING_APPROVAL, ExtrinsicType.EVM_EXECUTE];
|
|
138
|
-
const CLAIM_AVAIL_BRIDGE = [ExtrinsicType.
|
|
138
|
+
const CLAIM_AVAIL_BRIDGE = [ExtrinsicType.CLAIM_BRIDGE];
|
|
139
139
|
const OTHER_ACTIONS = [ExtrinsicType.TRANSFER_XCM, ExtrinsicType.SEND_NFT, ExtrinsicType.SWAP, ExtrinsicType.CROWDLOAN];
|
|
140
140
|
export const getAccountTransactionActions = (signMode, networkType, type, _meta, _specialNetwork) => {
|
|
141
141
|
if ([AccountSignMode.PASSWORD, AccountSignMode.INJECTED].includes(signMode)) {
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { _ChainAsset } from '@subwallet/chain-list/types';
|
|
2
|
-
import { _BaseNotificationInfo, NotificationTab } from '@subwallet/extension-base/services/inapp-notification-service/interfaces';
|
|
3
|
-
import { EarningRewardItem, UnstakingInfo, YieldPoolType } from '@subwallet/extension-base/types';
|
|
4
|
-
export declare function getWithdrawDescription(amount: string, symbol: string, stakingType: YieldPoolType): string;
|
|
5
|
-
export declare function getClaimDescription(amount: string, symbol: string): string;
|
|
6
|
-
export declare function getSendDescription(amount: string, symbol: string): string;
|
|
7
|
-
export declare function getReceiveDescription(amount: string, symbol: string): string;
|
|
8
|
-
export declare function getAvailBridgeClaimDescription(amount: string, symbol: string): string;
|
|
9
|
-
export declare function getIsTabRead(notificationTab: NotificationTab): boolean | undefined;
|
|
10
|
-
export declare function createWithdrawNotifications(unstakingInfos: UnstakingInfo[], tokenInfo: _ChainAsset, address: string, stakingSlug: string, stakingType: YieldPoolType): _BaseNotificationInfo[];
|
|
11
|
-
export declare function createClaimNotification(claimItemInfo: EarningRewardItem, tokenInfo: _ChainAsset): _BaseNotificationInfo;
|
|
12
|
-
export declare const AVAIL_BRIDGE_INDEXER: {
|
|
13
|
-
AVAIL_MAINNET: string;
|
|
14
|
-
AVAIL_TESTNET: string;
|
|
15
|
-
};
|
|
16
|
-
export declare const AVAIL_BRIDGE_API: {
|
|
17
|
-
AVAIL_MAINNET: string;
|
|
18
|
-
AVAIL_TESTNET: string;
|
|
19
|
-
};
|
|
20
|
-
interface AvailBridgeTransactionsResponse {
|
|
21
|
-
data: {
|
|
22
|
-
paginationData: {
|
|
23
|
-
hasNextPage: boolean;
|
|
24
|
-
page: number;
|
|
25
|
-
pageSize: number;
|
|
26
|
-
totalCount: number;
|
|
27
|
-
};
|
|
28
|
-
result: AvailBridgeTransaction[];
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
export interface AvailBridgeTransaction {
|
|
32
|
-
messageId: string;
|
|
33
|
-
sourceChain: AvailBridgeSourceChain;
|
|
34
|
-
sourceTransactionHash: string;
|
|
35
|
-
depositorAddress: string;
|
|
36
|
-
receiverAddress: string;
|
|
37
|
-
amount: string;
|
|
38
|
-
sourceBlockHash: string;
|
|
39
|
-
sourceTransactionIndex: string;
|
|
40
|
-
status: AvailBridgeTransactionStatus;
|
|
41
|
-
}
|
|
42
|
-
export declare enum AvailBridgeTransactionStatus {
|
|
43
|
-
READY_TO_CLAIM = "READY_TO_CLAIM",
|
|
44
|
-
CLAIMED = "CLAIMED",
|
|
45
|
-
BRIDGED = "BRIDGED"
|
|
46
|
-
}
|
|
47
|
-
export declare enum AvailBridgeSourceChain {
|
|
48
|
-
AVAIL = "AVAIL",
|
|
49
|
-
ETHEREUM = "ETHEREUM"
|
|
50
|
-
}
|
|
51
|
-
export declare function fetchAllAvailBridgeClaimable(address: string, sourceChain: AvailBridgeSourceChain, isTestnet: boolean): Promise<AvailBridgeTransaction[]>;
|
|
52
|
-
export declare function fetchAvailBridgeTransactions(userAddress: string, sourceChain: AvailBridgeSourceChain, status: AvailBridgeTransactionStatus, pageSize: number | undefined, page: number | undefined, isTestnet: boolean): Promise<AvailBridgeTransactionsResponse | undefined>;
|
|
53
|
-
export declare function filterClaimableOfAddress(address: string, transactions: AvailBridgeTransaction[]): AvailBridgeTransaction[];
|
|
54
|
-
export declare function hrsToMillisecond(hours: number): number;
|
|
55
|
-
export {};
|
|
File without changes
|
|
File without changes
|