@subwallet/extension-base 1.1.24-2 → 1.1.24-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/constants/staking.js
CHANGED
package/cjs/packageInfo.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.parseSubscanExtrinsicData = parseSubscanExtrinsicData;
|
|
|
7
7
|
exports.parseSubscanTransferData = parseSubscanTransferData;
|
|
8
8
|
var _KoniTypes = require("@subwallet/extension-base/background/KoniTypes");
|
|
9
9
|
var _subscanExtrinsicParserHelper = require("@subwallet/extension-base/services/history-service/helpers/subscan-extrinsic-parser-helper");
|
|
10
|
+
var _utils = require("@subwallet/extension-base/utils");
|
|
10
11
|
var _utilCrypto = require("@polkadot/util-crypto");
|
|
11
12
|
// Copyright 2019-2022 @subwallet/extension-koni authors & contributors
|
|
12
13
|
// SPDX-License-Identifier: Apache-2.0
|
|
@@ -83,7 +84,7 @@ function parseSubscanTransferData(address, transferItem, chainInfo) {
|
|
|
83
84
|
chainType,
|
|
84
85
|
from,
|
|
85
86
|
fromName: transferItem.from_account_display.display,
|
|
86
|
-
direction: address
|
|
87
|
+
direction: (0, _utils.isSameAddress)(address, from) ? _KoniTypes.TransactionDirection.SEND : _KoniTypes.TransactionDirection.RECEIVED,
|
|
87
88
|
blockNumber: transferItem.block_num,
|
|
88
89
|
blockHash: '',
|
|
89
90
|
chain: chainInfo.slug,
|
package/constants/staking.js
CHANGED
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"./cjs/detectPackage.js"
|
|
18
18
|
],
|
|
19
19
|
"type": "module",
|
|
20
|
-
"version": "1.1.24-
|
|
20
|
+
"version": "1.1.24-3",
|
|
21
21
|
"main": "./cjs/index.js",
|
|
22
22
|
"module": "./index.js",
|
|
23
23
|
"types": "./index.d.ts",
|
|
@@ -1348,10 +1348,10 @@
|
|
|
1348
1348
|
"@sora-substrate/type-definitions": "^1.17.7",
|
|
1349
1349
|
"@substrate/connect": "^0.7.26",
|
|
1350
1350
|
"@subwallet/chain-list": "0.2.27",
|
|
1351
|
-
"@subwallet/extension-base": "^1.1.24-
|
|
1352
|
-
"@subwallet/extension-chains": "^1.1.24-
|
|
1353
|
-
"@subwallet/extension-dapp": "^1.1.24-
|
|
1354
|
-
"@subwallet/extension-inject": "^1.1.24-
|
|
1351
|
+
"@subwallet/extension-base": "^1.1.24-3",
|
|
1352
|
+
"@subwallet/extension-chains": "^1.1.24-3",
|
|
1353
|
+
"@subwallet/extension-dapp": "^1.1.24-3",
|
|
1354
|
+
"@subwallet/extension-inject": "^1.1.24-3",
|
|
1355
1355
|
"@subwallet/keyring": "^0.1.1",
|
|
1356
1356
|
"@subwallet/ui-keyring": "^0.1.1",
|
|
1357
1357
|
"@walletconnect/sign-client": "^2.8.4",
|
package/packageInfo.js
CHANGED
|
@@ -7,5 +7,5 @@ export const packageInfo = {
|
|
|
7
7
|
name: '@subwallet/extension-base',
|
|
8
8
|
path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',
|
|
9
9
|
type: 'esm',
|
|
10
|
-
version: '1.1.24-
|
|
10
|
+
version: '1.1.24-3'
|
|
11
11
|
};
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
import { ChainType, ExtrinsicStatus, ExtrinsicType, TransactionDirection } from '@subwallet/extension-base/background/KoniTypes';
|
|
5
5
|
import { getExtrinsicParserKey, subscanExtrinsicParserMap, supportedExtrinsicParser } from '@subwallet/extension-base/services/history-service/helpers/subscan-extrinsic-parser-helper';
|
|
6
|
+
import { isSameAddress } from '@subwallet/extension-base/utils';
|
|
6
7
|
import { decodeAddress, encodeAddress, isEthereumAddress } from '@polkadot/util-crypto';
|
|
7
8
|
function autoFormatAddress(address) {
|
|
8
9
|
try {
|
|
@@ -76,7 +77,7 @@ export function parseSubscanTransferData(address, transferItem, chainInfo) {
|
|
|
76
77
|
chainType,
|
|
77
78
|
from,
|
|
78
79
|
fromName: transferItem.from_account_display.display,
|
|
79
|
-
direction: address
|
|
80
|
+
direction: isSameAddress(address, from) ? TransactionDirection.SEND : TransactionDirection.RECEIVED,
|
|
80
81
|
blockNumber: transferItem.block_num,
|
|
81
82
|
blockHash: '',
|
|
82
83
|
chain: chainInfo.slug,
|