@subwallet/extension-base 1.3.20-0 → 1.3.21-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 +8 -1
- package/cjs/defaults.js +1 -1
- package/cjs/koni/background/handlers/Extension.js +519 -90
- package/cjs/packageInfo.js +1 -1
- package/cjs/services/chain-service/handler/EvmApi.js +1 -3
- package/cjs/services/chain-service/utils/patch.js +1 -1
- package/cjs/services/earning-service/handlers/liquid-staking/stella-swap.js +19 -8
- package/cjs/services/earning-service/handlers/special.js +16 -10
- package/cjs/services/history-service/helpers/recoverHistoryStatus.js +14 -5
- package/cjs/services/history-service/index.js +15 -3
- package/cjs/services/inapp-notification-service/index.js +78 -0
- package/cjs/services/inapp-notification-service/interfaces.js +2 -0
- package/cjs/services/keyring-service/context/state.js +2 -1
- package/cjs/services/request-service/handler/EvmRequestHandler.js +10 -0
- package/cjs/services/request-service/handler/SubstrateRequestHandler.js +4 -3
- package/cjs/services/request-service/index.js +2 -2
- package/cjs/services/setting-service/constants.js +5 -2
- package/cjs/services/storage-service/DatabaseService.js +98 -2
- package/cjs/services/storage-service/databases/index.js +3 -0
- package/cjs/services/storage-service/db-stores/ProcessTransaction.js +47 -0
- package/cjs/services/storage-service/db-stores/Transaction.js +2 -0
- package/cjs/services/storage-service/db-stores/index.js +8 -1
- package/cjs/services/swap-service/handler/asset-hub/handler.js +30 -11
- package/cjs/services/swap-service/handler/hydradx-handler.js +18 -10
- package/cjs/services/swap-service/index.js +3 -0
- package/cjs/services/swap-service/utils.js +1 -0
- package/cjs/services/transaction-service/index.js +218 -9
- package/cjs/types/index.js +11 -0
- package/cjs/types/setting.js +1 -0
- package/cjs/types/swap/index.js +4 -1
- package/cjs/types/transaction/index.js +11 -0
- package/cjs/types/transaction/process.js +28 -0
- package/cjs/types/yield/actions/join/submit.js +16 -1
- package/defaults.d.ts +1 -1
- package/defaults.js +1 -1
- package/koni/background/handlers/Extension.d.ts +5 -0
- package/koni/background/handlers/Extension.js +437 -12
- package/package.json +21 -6
- package/packageInfo.js +1 -1
- package/services/chain-service/handler/EvmApi.js +1 -3
- package/services/chain-service/utils/patch.js +1 -1
- package/services/earning-service/handlers/liquid-staking/stella-swap.js +19 -8
- package/services/earning-service/handlers/special.js +18 -12
- package/services/history-service/helpers/recoverHistoryStatus.js +14 -5
- package/services/history-service/index.d.ts +6 -5
- package/services/history-service/index.js +16 -5
- package/services/inapp-notification-service/index.d.ts +2 -0
- package/services/inapp-notification-service/index.js +79 -1
- package/services/inapp-notification-service/interfaces.d.ts +8 -1
- package/services/inapp-notification-service/interfaces.js +2 -0
- package/services/keyring-service/context/state.d.ts +1 -1
- package/services/keyring-service/context/state.js +3 -2
- package/services/request-service/handler/EvmRequestHandler.js +10 -0
- package/services/request-service/handler/SubstrateRequestHandler.d.ts +1 -1
- package/services/request-service/handler/SubstrateRequestHandler.js +4 -3
- package/services/request-service/index.d.ts +1 -1
- package/services/request-service/index.js +2 -2
- package/services/setting-service/constants.d.ts +1 -0
- package/services/setting-service/constants.js +3 -1
- package/services/storage-service/DatabaseService.d.ts +12 -3
- package/services/storage-service/DatabaseService.js +100 -4
- package/services/storage-service/databases/index.d.ts +2 -1
- package/services/storage-service/databases/index.js +3 -0
- package/services/storage-service/db-stores/ProcessTransaction.d.ts +14 -0
- package/services/storage-service/db-stores/ProcessTransaction.js +39 -0
- package/services/storage-service/db-stores/Transaction.js +2 -0
- package/services/storage-service/db-stores/index.d.ts +1 -0
- package/services/storage-service/db-stores/index.js +2 -1
- package/services/swap-service/handler/asset-hub/handler.js +30 -11
- package/services/swap-service/handler/hydradx-handler.js +18 -10
- package/services/swap-service/index.js +3 -0
- package/services/swap-service/utils.js +1 -0
- package/services/transaction-service/index.d.ts +19 -1
- package/services/transaction-service/index.js +220 -11
- package/services/transaction-service/types.d.ts +13 -4
- package/types/index.d.ts +1 -0
- package/types/index.js +1 -0
- package/types/setting.d.ts +3 -0
- package/types/setting.js +1 -0
- package/types/swap/index.d.ts +3 -2
- package/types/swap/index.js +4 -1
- package/types/transaction/index.d.ts +1 -0
- package/types/transaction/index.js +1 -0
- package/types/transaction/process.d.ts +84 -0
- package/types/transaction/process.js +20 -0
- package/types/transaction/request.d.ts +3 -1
- package/types/yield/actions/join/submit.d.ts +18 -3
- package/types/yield/actions/join/submit.js +11 -1
|
@@ -14,7 +14,7 @@ import { AuthUrls } from '@subwallet/extension-base/services/request-service/typ
|
|
|
14
14
|
import { CrowdloanContributionsResponse } from '@subwallet/extension-base/services/subscan-service/types';
|
|
15
15
|
import { SWTransactionResponse, SWTransactionResult } from '@subwallet/extension-base/services/transaction-service/types';
|
|
16
16
|
import { WalletConnectNotSupportRequest, WalletConnectSessionRequest } from '@subwallet/extension-base/services/wallet-connect-service/types';
|
|
17
|
-
import { AccountJson, AccountsWithCurrentAddress, AddressJson, BalanceJson, BaseRequestSign, BuyServiceInfo, BuyTokenInfo, CommonOptimalPath, CurrentAccountInfo, EarningRewardHistoryItem, EarningRewardJson, EarningStatus, HandleYieldStepParams, InternalRequestSign, LeavePoolAdditionalData, NominationPoolInfo, OptimalYieldPath, OptimalYieldPathParams, RequestAccountBatchExportV2, RequestAccountCreateSuriV2, RequestAccountNameValidate, RequestAccountProxyEdit, RequestAccountProxyForget, RequestBatchJsonGetAccountInfo, RequestBatchRestoreV2, RequestBounceableValidate, RequestChangeTonWalletContractVersion, RequestCheckCrossChainTransfer, RequestCheckPublicAndSecretKey, RequestCheckTransfer, RequestCrossChainTransfer, RequestDeriveCreateMultiple, RequestDeriveCreateV3, RequestDeriveValidateV2, RequestEarlyValidateYield, RequestExportAccountProxyMnemonic, RequestGetAllTonWalletContractVersion, RequestGetAmountForPair, RequestGetDeriveAccounts, RequestGetDeriveSuggestion, RequestGetTokensCanPayFee, RequestGetYieldPoolTargets, RequestInputAccountSubscribe, RequestJsonGetAccountInfo, RequestJsonRestoreV2, RequestMetadataHash, RequestMnemonicCreateV2, RequestMnemonicValidateV2, RequestPrivateKeyValidateV2, RequestShortenMetadata, RequestStakeCancelWithdrawal, RequestStakeClaimReward, RequestTransfer, RequestUnlockDotCheckCanMint, RequestUnlockDotSubscribeMintedData, RequestYieldLeave, RequestYieldStepSubmit, RequestYieldWithdrawal, ResponseAccountBatchExportV2, ResponseAccountCreateSuriV2, ResponseAccountNameValidate, ResponseBatchJsonGetAccountInfo, ResponseCheckPublicAndSecretKey, ResponseDeriveValidateV2, ResponseEarlyValidateYield, ResponseExportAccountProxyMnemonic, ResponseGetAllTonWalletContractVersion, ResponseGetDeriveAccounts, ResponseGetDeriveSuggestion, ResponseGetYieldPoolTargets, ResponseInputAccountSubscribe, ResponseJsonGetAccountInfo, ResponseMetadataHash, ResponseMnemonicCreateV2, ResponseMnemonicValidateV2, ResponsePrivateKeyValidateV2, ResponseShortenMetadata, StorageDataInterface, SubmitYieldStepData, SwapPair, SwapQuoteResponse, SwapRequest, SwapRequestResult, SwapSubmitParams, SwapTxData, TokenSpendingApprovalParams, UnlockDotTransactionNft, UnstakingStatus, ValidateSwapProcessParams, ValidateYieldProcessParams, YieldPoolInfo, YieldPositionInfo } from '@subwallet/extension-base/types';
|
|
17
|
+
import { AccountJson, AccountsWithCurrentAddress, AddressJson, BalanceJson, BaseRequestSign, BuyServiceInfo, BuyTokenInfo, CommonOptimalPath, CurrentAccountInfo, EarningRewardHistoryItem, EarningRewardJson, EarningStatus, HandleYieldStepParams, InternalRequestSign, LeavePoolAdditionalData, NominationPoolInfo, OptimalYieldPath, OptimalYieldPathParams, RequestAccountBatchExportV2, RequestAccountCreateSuriV2, RequestAccountNameValidate, RequestAccountProxyEdit, RequestAccountProxyForget, RequestBatchJsonGetAccountInfo, RequestBatchRestoreV2, RequestBounceableValidate, RequestChangeAllowOneSign, RequestChangeTonWalletContractVersion, RequestCheckCrossChainTransfer, RequestCheckPublicAndSecretKey, RequestCheckTransfer, RequestCrossChainTransfer, RequestDeriveCreateMultiple, RequestDeriveCreateV3, RequestDeriveValidateV2, RequestEarlyValidateYield, RequestExportAccountProxyMnemonic, RequestGetAllTonWalletContractVersion, RequestGetAmountForPair, RequestGetDeriveAccounts, RequestGetDeriveSuggestion, RequestGetTokensCanPayFee, RequestGetYieldPoolTargets, RequestInputAccountSubscribe, RequestJsonGetAccountInfo, RequestJsonRestoreV2, RequestMetadataHash, RequestMnemonicCreateV2, RequestMnemonicValidateV2, RequestPrivateKeyValidateV2, RequestShortenMetadata, RequestStakeCancelWithdrawal, RequestStakeClaimReward, RequestSubmitProcessTransaction, RequestSubscribeProcessById, RequestTransfer, RequestUnlockDotCheckCanMint, RequestUnlockDotSubscribeMintedData, RequestYieldLeave, RequestYieldStepSubmit, RequestYieldWithdrawal, ResponseAccountBatchExportV2, ResponseAccountCreateSuriV2, ResponseAccountNameValidate, ResponseBatchJsonGetAccountInfo, ResponseCheckPublicAndSecretKey, ResponseDeriveValidateV2, ResponseEarlyValidateYield, ResponseExportAccountProxyMnemonic, ResponseGetAllTonWalletContractVersion, ResponseGetDeriveAccounts, ResponseGetDeriveSuggestion, ResponseGetYieldPoolTargets, ResponseInputAccountSubscribe, ResponseJsonGetAccountInfo, ResponseMetadataHash, ResponseMnemonicCreateV2, ResponseMnemonicValidateV2, ResponsePrivateKeyValidateV2, ResponseShortenMetadata, ResponseSubscribeProcessAlive, ResponseSubscribeProcessById, StorageDataInterface, SubmitYieldStepData, SwapPair, SwapQuoteResponse, SwapRequest, SwapRequestResult, SwapSubmitParams, SwapTxData, TokenSpendingApprovalParams, UnlockDotTransactionNft, UnstakingStatus, ValidateSwapProcessParams, ValidateYieldProcessParams, YieldPoolInfo, YieldPositionInfo } from '@subwallet/extension-base/types';
|
|
18
18
|
import { RequestSubmitTransfer, RequestSubscribeTransfer, ResponseSubscribeTransfer } from '@subwallet/extension-base/types/balance/transfer';
|
|
19
19
|
import { RequestClaimBridge } from '@subwallet/extension-base/types/bridge';
|
|
20
20
|
import { GetNotificationParams, RequestIsClaimedPolygonBridge, RequestSwitchStatusParams } from '@subwallet/extension-base/types/notification';
|
|
@@ -321,6 +321,7 @@ export interface UiSettings {
|
|
|
321
321
|
enableChainPatrol: boolean;
|
|
322
322
|
notificationSetup: NotificationSetup;
|
|
323
323
|
walletReference: string;
|
|
324
|
+
allowOneSign: boolean;
|
|
324
325
|
}
|
|
325
326
|
export declare type RequestSettingsType = UiSettings;
|
|
326
327
|
export declare type RequestCameraSettings = {
|
|
@@ -557,6 +558,7 @@ export interface TransactionHistoryItem<ET extends ExtrinsicType = ExtrinsicType
|
|
|
557
558
|
startBlock?: number;
|
|
558
559
|
nonce?: number;
|
|
559
560
|
addressPrefix?: number;
|
|
561
|
+
processId?: string;
|
|
560
562
|
}
|
|
561
563
|
export interface SWWarning {
|
|
562
564
|
errorType: string;
|
|
@@ -865,6 +867,7 @@ export interface ConfirmationsQueueItemOptions {
|
|
|
865
867
|
requiredPassword?: boolean;
|
|
866
868
|
address?: string;
|
|
867
869
|
networkKey?: string;
|
|
870
|
+
isPassConfirmation?: boolean;
|
|
868
871
|
}
|
|
869
872
|
export interface ConfirmationsQueueItem<T> extends ConfirmationsQueueItemOptions, ConfirmationRequestBase {
|
|
870
873
|
payload: T;
|
|
@@ -1584,6 +1587,7 @@ export interface KoniRequestSignatures {
|
|
|
1584
1587
|
'pri(settings.savePriceCurrency)': [RequestChangePriceCurrency, boolean];
|
|
1585
1588
|
'pri(settings.saveShowZeroBalance)': [RequestChangeShowZeroBalance, boolean];
|
|
1586
1589
|
'pri(settings.saveShowBalance)': [RequestChangeShowBalance, boolean];
|
|
1590
|
+
'pri(settings.update.allowOneSign)': [RequestChangeAllowOneSign, boolean];
|
|
1587
1591
|
'pri(settings.logo.assets.subscribe)': [null, Record<string, string>, Record<string, string>];
|
|
1588
1592
|
'pri(settings.logo.chains.subscribe)': [null, Record<string, string>, Record<string, string>];
|
|
1589
1593
|
'pri(settings.saveAppConfig)': [RequestSaveAppConfig, boolean];
|
|
@@ -1711,6 +1715,9 @@ export interface KoniRequestSignatures {
|
|
|
1711
1715
|
'pri(polygonBridge.submitClaimPolygonBridge)': [RequestClaimBridge, SWTransactionResponse];
|
|
1712
1716
|
'pri(ledger.generic.allow)': [null, string[], string[]];
|
|
1713
1717
|
'pri(tokens.subscribePriority)': [null, TokenPriorityDetails, TokenPriorityDetails];
|
|
1718
|
+
'pri(process.transaction.submit)': [RequestSubmitProcessTransaction, SWTransactionResponse];
|
|
1719
|
+
'pri(process.subscribe.id)': [RequestSubscribeProcessById, ResponseSubscribeProcessById, ResponseSubscribeProcessById];
|
|
1720
|
+
'pri(process.subscribe.alive)': [null, ResponseSubscribeProcessAlive, ResponseSubscribeProcessAlive];
|
|
1714
1721
|
}
|
|
1715
1722
|
export interface ApplicationMetadataType {
|
|
1716
1723
|
version: string;
|
package/cjs/defaults.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.PORT_MOBILE = exports.PORT_EXTENSION = exports.PORT_CONTENT = exports.PH
|
|
|
7
7
|
// Copyright 2019-2022 @polkadot/extension-base authors & contributors
|
|
8
8
|
// SPDX-License-Identifier: Apache-2.0
|
|
9
9
|
|
|
10
|
-
const ALLOWED_PATH = ['/', '/settings/security', '/accounts/connect-ledger', '/accounts/restore-json', '/accounts/detail', '/accounts/new-seed-phrase'];
|
|
10
|
+
const ALLOWED_PATH = ['/', '/settings/security', '/transaction-submission', '/accounts/connect-ledger', '/accounts/restore-json', '/accounts/detail', '/accounts/new-seed-phrase'];
|
|
11
11
|
exports.ALLOWED_PATH = ALLOWED_PATH;
|
|
12
12
|
const PHISHING_PAGE_REDIRECT = '/phishing-page-detected';
|
|
13
13
|
exports.PHISHING_PAGE_REDIRECT = PHISHING_PAGE_REDIRECT;
|