@subwallet/extension-base 1.3.57-0 → 1.3.59-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.
@@ -13,6 +13,6 @@ const packageInfo = {
13
13
  name: '@subwallet/extension-base',
14
14
  path: typeof __dirname === 'string' ? __dirname : 'auto',
15
15
  type: 'cjs',
16
- version: '1.3.57-0'
16
+ version: '1.3.59-0'
17
17
  };
18
18
  exports.packageInfo = packageInfo;
@@ -73,6 +73,8 @@ const createSubstrateExtrinsic = async _ref => {
73
73
 
74
74
  transfer = transaction.extrinsic;
75
75
  transferAmount = value;
76
+ } else if ((0, _utils3._isGigaToken)(tokenInfo) && api.tx.currencies) {
77
+ transfer = api.tx.currencies.transfer(to, (0, _utils3._getTokenOnChainAssetId)(tokenInfo), value);
76
78
  } else if (_constants._TRANSFER_CHAIN_GROUP.acala.includes(networkKey)) {
77
79
  if (!(0, _utils3._isNativeToken)(tokenInfo)) {
78
80
  if (isTxCurrenciesSupported) {
@@ -40,8 +40,8 @@ const _BALANCE_CHAIN_GROUP = {
40
40
  kintsugi: ['kintsugi', 'interlay', 'kintsugi_test', 'mangatax_para'],
41
41
  genshiro: ['genshiro_testnet', 'genshiro'],
42
42
  equilibrium_parachain: ['equilibrium_parachain'],
43
- bifrost: ['bifrost', 'acala', 'karura', 'acala_testnet', 'pioneer', 'bitcountry', 'bifrost_dot', 'hydradx_main', 'hydradx_rococo', 'pendulum', 'amplitude', 'continuum_network', 'truth_network', 'jamton'],
44
- statemine: ['statemine', 'astar', 'shiden', 'statemint', 'crabParachain', 'darwinia2', 'parallel', 'calamari', 'manta_network', 'rococo_assethub', 'liberlandTest', 'liberland', 'dentnet', 'pangolin', 'crust', 'phala', 'shibuya', 'dbcchain', 'westend_assethub', 'chainflip_assethub', 'origintrail'],
43
+ bifrost: ['bifrost', 'acala', 'karura', 'acala_testnet', 'pioneer', 'bitcountry', 'bifrost_dot', 'hydradx_main', 'hydradx_rococo', 'pendulum', 'amplitude', 'continuum_network', 'truth_network', 'jamton', 'hydradx_hollarnet'],
44
+ statemine: ['statemine', 'astar', 'shiden', 'statemint', 'crabParachain', 'darwinia2', 'parallel', 'calamari', 'manta_network', 'rococo_assethub', 'liberlandTest', 'liberland', 'dentnet', 'pangolin', 'crust', 'phala', 'shibuya', 'dbcchain', 'westend_assethub', 'chainflip_assethub', 'origintrail', 'xode'],
45
45
  kusama: ['kusama', 'kintsugi', 'kintsugi_test', 'interlay', 'acala', 'statemint', 'karura', 'bifrost'],
46
46
  // perhaps there are some runtime updates
47
47
  centrifuge: ['centrifuge'],
@@ -278,11 +278,11 @@ const _TRANSFER_CHAIN_GROUP = {
278
278
  genshiro: ['genshiro_testnet', 'genshiro', 'equilibrium_parachain'],
279
279
  // crab: ['crab', 'pangolin'],
280
280
  bitcountry: ['pioneer', 'bitcountry'],
281
- statemine: ['statemint', 'statemine', 'darwinia2', 'astar', 'shiden', 'shibuya', 'parallel', 'liberland', 'liberlandTest', 'dentnet', 'dbcchain', 'westend_assethub', 'chainflip_assethub', 'origintrail'],
281
+ statemine: ['statemint', 'statemine', 'darwinia2', 'astar', 'shiden', 'shibuya', 'parallel', 'liberland', 'liberlandTest', 'dentnet', 'dbcchain', 'westend_assethub', 'chainflip_assethub', 'origintrail', 'xode'],
282
282
  riochain: ['riochain'],
283
283
  sora_substrate: ['sora_substrate'],
284
284
  avail: ['kate', 'goldberg_testnet'],
285
- pendulum: ['pendulum', 'amplitude', 'amplitude_test', 'hydradx_main', 'bifrost', 'bifrost_dot', 'jamton'],
285
+ pendulum: ['pendulum', 'amplitude', 'amplitude_test', 'hydradx_main', 'bifrost', 'bifrost_dot', 'jamton', 'hydradx_hollarnet'],
286
286
  centrifuge: ['centrifuge'],
287
287
  disable_transfer: ['crab', 'pangolin'],
288
288
  truth: ['truth_network']
@@ -34,6 +34,7 @@ var _exportNames = {
34
34
  _isChainTonCompatible: true,
35
35
  _isChainCardanoCompatible: true,
36
36
  _isNativeToken: true,
37
+ _isGigaToken: true,
37
38
  _isNativeTokenBySlug: true,
38
39
  _isSmartContractToken: true,
39
40
  _isChainSubstrateCompatible: true,
@@ -176,6 +177,7 @@ exports._isCustomChain = _isCustomChain;
176
177
  exports._isCustomProvider = _isCustomProvider;
177
178
  exports._isEqualContractAddress = _isEqualContractAddress;
178
179
  exports._isEqualSmartContractAsset = _isEqualSmartContractAsset;
180
+ exports._isGigaToken = _isGigaToken;
179
181
  exports._isJettonToken = _isJettonToken;
180
182
  exports._isLocalToken = _isLocalToken;
181
183
  exports._isMantaZkAsset = _isMantaZkAsset;
@@ -205,7 +207,8 @@ exports._isXcmPathSupported = _isXcmPathSupported;
205
207
  exports._parseAssetRefKey = _parseAssetRefKey;
206
208
  exports._parseMetadataForAssetId = _parseMetadataForAssetId;
207
209
  exports._parseMetadataForSmartContractAsset = _parseMetadataForSmartContractAsset;
208
- exports.findChainInfoByHalfGenesisHash = exports.findChainInfoByChainId = void 0;
210
+ exports.findChainInfoByChainId = void 0;
211
+ exports.findChainInfoByHalfGenesisHash = void 0;
209
212
  exports.randomizeProvider = randomizeProvider;
210
213
  exports.updateLatestChainInfo = updateLatestChainInfo;
211
214
  var _types = require("@subwallet/chain-list/types");
@@ -382,6 +385,10 @@ function _isChainCardanoCompatible(chainInfo) {
382
385
  function _isNativeToken(tokenInfo) {
383
386
  return tokenInfo.assetType === _types._AssetType.NATIVE;
384
387
  }
388
+ function _isGigaToken(tokenInfo) {
389
+ var _tokenInfo$metadata8;
390
+ return (_tokenInfo$metadata8 = tokenInfo.metadata) === null || _tokenInfo$metadata8 === void 0 ? void 0 : _tokenInfo$metadata8.isGigaToken;
391
+ }
385
392
  function _isNativeTokenBySlug(tokenSlug) {
386
393
  return tokenSlug.includes(_types._AssetType.NATIVE);
387
394
  }
@@ -581,16 +588,16 @@ function _isXcmPathSupported(originTokenSlug, destinationTokenSlug, assetRefMap)
581
588
  return assetRef.path === _types._AssetRefPath.XCM;
582
589
  }
583
590
  function _getXcmAssetType(tokenInfo) {
584
- var _tokenInfo$metadata8;
585
- return ((_tokenInfo$metadata8 = tokenInfo.metadata) === null || _tokenInfo$metadata8 === void 0 ? void 0 : _tokenInfo$metadata8.assetType) || '';
591
+ var _tokenInfo$metadata9;
592
+ return ((_tokenInfo$metadata9 = tokenInfo.metadata) === null || _tokenInfo$metadata9 === void 0 ? void 0 : _tokenInfo$metadata9.assetType) || '';
586
593
  }
587
594
  function _getXcmAssetId(tokenInfo) {
588
- var _tokenInfo$metadata9;
589
- return ((_tokenInfo$metadata9 = tokenInfo.metadata) === null || _tokenInfo$metadata9 === void 0 ? void 0 : _tokenInfo$metadata9.assetId) || '-1';
595
+ var _tokenInfo$metadata10;
596
+ return ((_tokenInfo$metadata10 = tokenInfo.metadata) === null || _tokenInfo$metadata10 === void 0 ? void 0 : _tokenInfo$metadata10.assetId) || '-1';
590
597
  }
591
598
  function _getXcmAssetMultilocation(tokenInfo) {
592
- var _tokenInfo$metadata10;
593
- return (_tokenInfo$metadata10 = tokenInfo.metadata) === null || _tokenInfo$metadata10 === void 0 ? void 0 : _tokenInfo$metadata10.multilocation;
599
+ var _tokenInfo$metadata11;
600
+ return (_tokenInfo$metadata11 = tokenInfo.metadata) === null || _tokenInfo$metadata11 === void 0 ? void 0 : _tokenInfo$metadata11.multilocation;
594
601
  }
595
602
  function _getXcmTransferType(originChainInfo, destinationChainInfo) {
596
603
  var _originChainInfo$subs, _destinationChainInfo;
@@ -12,7 +12,7 @@ const PRODUCTION_BRANCHES = ['master', 'webapp', 'webapp-dev'];
12
12
  const branchName = process.env.BRANCH_NAME || 'subwallet-dev';
13
13
  const fetchDomain = process.env.PATCH_CHAIN_LIST_URL || (PRODUCTION_BRANCHES.indexOf(branchName) > -1 ? 'https://chain-list-assets.subwallet.app' : 'https://dev.sw-chain-list-assets.pages.dev');
14
14
  const fetchFile = PRODUCTION_BRANCHES.indexOf(branchName) > -1 ? 'list.json' : 'preview.json';
15
- const ChainListVersion = '0.2.114'; // update this when build chain-list
15
+ const ChainListVersion = '0.2.115'; // update this when build chain-list
16
16
 
17
17
  // todo: move this interface to chainlist
18
18
  exports.ChainListVersion = ChainListVersion;
@@ -124,6 +124,9 @@ function getExplorerLink(chainInfo, value, type) {
124
124
  const address = (0, _util.u8aToHex)((0, _utilCrypto.decodeAddress)(value));
125
125
  return `${explorerLink}${explorerLink.endsWith('/') ? '' : '/'}${route}/${address}`;
126
126
  }
127
+ if (chainInfo.slug === 'xode') {
128
+ return undefined;
129
+ }
127
130
  return `${explorerLink}${explorerLink.endsWith('/') ? '' : '/'}${route}/${value}`;
128
131
  }
129
132
  if (explorerLink && (0, _util.isHex)((0, _util.hexAddPrefix)(value))) {
@@ -131,6 +134,9 @@ function getExplorerLink(chainInfo, value, type) {
131
134
  if (chainInfo.slug === 'tangle') {
132
135
  return `${explorerLink}${explorerLink.endsWith('/') ? '' : '/'}extrinsic/${value}${route}/${value}`;
133
136
  }
137
+ if (chainInfo.slug === 'xode') {
138
+ return `${explorerLink}${explorerLink.endsWith('/') ? '' : '/'}polkadot-chain-transaction?search=${value}`;
139
+ }
134
140
  if (chainInfo.slug === 'truth_network') {
135
141
  // getTransactionId(value)
136
142
  // .then((transactionId) => {
@@ -6,18 +6,18 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.setupApiSDK = setupApiSDK;
8
8
  var _constants = require("@subwallet/extension-base/constants");
9
- var _utils = require("@subwallet/extension-base/services/chain-service/utils");
10
9
  var _subwalletServicesSdk = _interopRequireDefault(require("@subwallet-monorepos/subwallet-services-sdk"));
11
10
  var _environment = require("./environment");
12
11
  // Copyright 2019-2022 @subwallet/extension-koni authors & contributors
13
12
  // SPDX-License-Identifier: Apache-2.0
14
13
 
14
+ const CHAIN_LIST_VERSION = process.env.CHAIN_LIST_VERSION;
15
15
  function setupApiSDK() {
16
16
  _subwalletServicesSdk.default.updateConfig({
17
17
  appVersion: _constants.APP_VERSION,
18
18
  baseUrl: _constants.BACKEND_API_URL,
19
19
  platform: _environment.TARGET_ENV,
20
- chainListVersion: _utils.ChainListVersion
20
+ chainListVersion: CHAIN_LIST_VERSION
21
21
  });
22
22
 
23
23
  // Custom the price history API with other different base URL
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "./cjs/detectPackage.js"
18
18
  ],
19
19
  "type": "module",
20
- "version": "1.3.57-0",
20
+ "version": "1.3.59-0",
21
21
  "main": "./cjs/index.js",
22
22
  "module": "./index.js",
23
23
  "types": "./index.d.ts",
@@ -2878,11 +2878,11 @@
2878
2878
  "@sora-substrate/type-definitions": "^1.17.7",
2879
2879
  "@substrate/connect": "^0.8.9",
2880
2880
  "@subwallet-monorepos/subwallet-services-sdk": "^0.1.8",
2881
- "@subwallet/chain-list": "0.2.114",
2882
- "@subwallet/extension-base": "^1.3.57-0",
2883
- "@subwallet/extension-chains": "^1.3.57-0",
2884
- "@subwallet/extension-dapp": "^1.3.57-0",
2885
- "@subwallet/extension-inject": "^1.3.57-0",
2881
+ "@subwallet/chain-list": "0.2.115",
2882
+ "@subwallet/extension-base": "^1.3.59-0",
2883
+ "@subwallet/extension-chains": "^1.3.59-0",
2884
+ "@subwallet/extension-dapp": "^1.3.59-0",
2885
+ "@subwallet/extension-inject": "^1.3.59-0",
2886
2886
  "@subwallet/keyring": "^0.1.13",
2887
2887
  "@subwallet/ui-keyring": "^0.1.13",
2888
2888
  "@ton/core": "^0.56.3",
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.3.57-0'
10
+ version: '1.3.59-0'
11
11
  };
@@ -7,7 +7,7 @@ import { getPSP22ContractPromise } from '@subwallet/extension-base/koni/api/cont
7
7
  import { getWasmContractGasLimit } from '@subwallet/extension-base/koni/api/contract-handler/wasm/utils';
8
8
  import { estimateTonTxFee } from '@subwallet/extension-base/services/balance-service/helpers/subscribe/ton/utils';
9
9
  import { _TRANSFER_CHAIN_GROUP } from '@subwallet/extension-base/services/chain-service/constants';
10
- import { _getContractAddressOfToken, _getTokenOnChainAssetId, _getTokenOnChainInfo, _getXcmAssetMultilocation, _isBridgedToken, _isChainEvmCompatible, _isChainTonCompatible, _isNativeToken, _isTokenGearSmartContract, _isTokenTransferredByEvm, _isTokenTransferredByTon, _isTokenWasmSmartContract } from '@subwallet/extension-base/services/chain-service/utils';
10
+ import { _getContractAddressOfToken, _getTokenOnChainAssetId, _getTokenOnChainInfo, _getXcmAssetMultilocation, _isBridgedToken, _isChainEvmCompatible, _isChainTonCompatible, _isGigaToken, _isNativeToken, _isTokenGearSmartContract, _isTokenTransferredByEvm, _isTokenTransferredByTon, _isTokenWasmSmartContract } from '@subwallet/extension-base/services/chain-service/utils';
11
11
  import { calculateGasFeeParams } from '@subwallet/extension-base/services/fee-service/utils';
12
12
  import { combineEthFee, getGRC20ContractPromise, getVFTContractPromise } from '@subwallet/extension-base/utils';
13
13
  import { keyring } from '@subwallet/ui-keyring';
@@ -65,6 +65,8 @@ export const createSubstrateExtrinsic = async ({
65
65
 
66
66
  transfer = transaction.extrinsic;
67
67
  transferAmount = value;
68
+ } else if (_isGigaToken(tokenInfo) && api.tx.currencies) {
69
+ transfer = api.tx.currencies.transfer(to, _getTokenOnChainAssetId(tokenInfo), value);
68
70
  } else if (_TRANSFER_CHAIN_GROUP.acala.includes(networkKey)) {
69
71
  if (!_isNativeToken(tokenInfo)) {
70
72
  if (isTxCurrenciesSupported) {
@@ -29,8 +29,8 @@ export const _BALANCE_CHAIN_GROUP = {
29
29
  kintsugi: ['kintsugi', 'interlay', 'kintsugi_test', 'mangatax_para'],
30
30
  genshiro: ['genshiro_testnet', 'genshiro'],
31
31
  equilibrium_parachain: ['equilibrium_parachain'],
32
- bifrost: ['bifrost', 'acala', 'karura', 'acala_testnet', 'pioneer', 'bitcountry', 'bifrost_dot', 'hydradx_main', 'hydradx_rococo', 'pendulum', 'amplitude', 'continuum_network', 'truth_network', 'jamton'],
33
- statemine: ['statemine', 'astar', 'shiden', 'statemint', 'crabParachain', 'darwinia2', 'parallel', 'calamari', 'manta_network', 'rococo_assethub', 'liberlandTest', 'liberland', 'dentnet', 'pangolin', 'crust', 'phala', 'shibuya', 'dbcchain', 'westend_assethub', 'chainflip_assethub', 'origintrail'],
32
+ bifrost: ['bifrost', 'acala', 'karura', 'acala_testnet', 'pioneer', 'bitcountry', 'bifrost_dot', 'hydradx_main', 'hydradx_rococo', 'pendulum', 'amplitude', 'continuum_network', 'truth_network', 'jamton', 'hydradx_hollarnet'],
33
+ statemine: ['statemine', 'astar', 'shiden', 'statemint', 'crabParachain', 'darwinia2', 'parallel', 'calamari', 'manta_network', 'rococo_assethub', 'liberlandTest', 'liberland', 'dentnet', 'pangolin', 'crust', 'phala', 'shibuya', 'dbcchain', 'westend_assethub', 'chainflip_assethub', 'origintrail', 'xode'],
34
34
  kusama: ['kusama', 'kintsugi', 'kintsugi_test', 'interlay', 'acala', 'statemint', 'karura', 'bifrost'],
35
35
  // perhaps there are some runtime updates
36
36
  centrifuge: ['centrifuge'],
@@ -261,11 +261,11 @@ export const _TRANSFER_CHAIN_GROUP = {
261
261
  genshiro: ['genshiro_testnet', 'genshiro', 'equilibrium_parachain'],
262
262
  // crab: ['crab', 'pangolin'],
263
263
  bitcountry: ['pioneer', 'bitcountry'],
264
- statemine: ['statemint', 'statemine', 'darwinia2', 'astar', 'shiden', 'shibuya', 'parallel', 'liberland', 'liberlandTest', 'dentnet', 'dbcchain', 'westend_assethub', 'chainflip_assethub', 'origintrail'],
264
+ statemine: ['statemint', 'statemine', 'darwinia2', 'astar', 'shiden', 'shibuya', 'parallel', 'liberland', 'liberlandTest', 'dentnet', 'dbcchain', 'westend_assethub', 'chainflip_assethub', 'origintrail', 'xode'],
265
265
  riochain: ['riochain'],
266
266
  sora_substrate: ['sora_substrate'],
267
267
  avail: ['kate', 'goldberg_testnet'],
268
- pendulum: ['pendulum', 'amplitude', 'amplitude_test', 'hydradx_main', 'bifrost', 'bifrost_dot', 'jamton'],
268
+ pendulum: ['pendulum', 'amplitude', 'amplitude_test', 'hydradx_main', 'bifrost', 'bifrost_dot', 'jamton', 'hydradx_hollarnet'],
269
269
  centrifuge: ['centrifuge'],
270
270
  disable_transfer: ['crab', 'pangolin'],
271
271
  truth: ['truth_network']
@@ -46,6 +46,7 @@ export declare function _isChainBitcoinCompatible(chainInfo: _ChainInfo): boolea
46
46
  export declare function _isChainTonCompatible(chainInfo: _ChainInfo): boolean;
47
47
  export declare function _isChainCardanoCompatible(chainInfo: _ChainInfo): boolean;
48
48
  export declare function _isNativeToken(tokenInfo: _ChainAsset): boolean;
49
+ export declare function _isGigaToken(tokenInfo: _ChainAsset): boolean | undefined;
49
50
  export declare function _isNativeTokenBySlug(tokenSlug: string): boolean;
50
51
  export declare function _isSmartContractToken(tokenInfo: _ChainAsset): boolean;
51
52
  export declare function _isChainSubstrateCompatible(chainInfo: _ChainInfo): boolean;
@@ -160,6 +160,10 @@ export function _isChainCardanoCompatible(chainInfo) {
160
160
  export function _isNativeToken(tokenInfo) {
161
161
  return tokenInfo.assetType === _AssetType.NATIVE;
162
162
  }
163
+ export function _isGigaToken(tokenInfo) {
164
+ var _tokenInfo$metadata8;
165
+ return (_tokenInfo$metadata8 = tokenInfo.metadata) === null || _tokenInfo$metadata8 === void 0 ? void 0 : _tokenInfo$metadata8.isGigaToken;
166
+ }
163
167
  export function _isNativeTokenBySlug(tokenSlug) {
164
168
  return tokenSlug.includes(_AssetType.NATIVE);
165
169
  }
@@ -358,16 +362,16 @@ export function _isXcmPathSupported(originTokenSlug, destinationTokenSlug, asset
358
362
  return assetRef.path === _AssetRefPath.XCM;
359
363
  }
360
364
  export function _getXcmAssetType(tokenInfo) {
361
- var _tokenInfo$metadata8;
362
- return ((_tokenInfo$metadata8 = tokenInfo.metadata) === null || _tokenInfo$metadata8 === void 0 ? void 0 : _tokenInfo$metadata8.assetType) || '';
365
+ var _tokenInfo$metadata9;
366
+ return ((_tokenInfo$metadata9 = tokenInfo.metadata) === null || _tokenInfo$metadata9 === void 0 ? void 0 : _tokenInfo$metadata9.assetType) || '';
363
367
  }
364
368
  export function _getXcmAssetId(tokenInfo) {
365
- var _tokenInfo$metadata9;
366
- return ((_tokenInfo$metadata9 = tokenInfo.metadata) === null || _tokenInfo$metadata9 === void 0 ? void 0 : _tokenInfo$metadata9.assetId) || '-1';
369
+ var _tokenInfo$metadata10;
370
+ return ((_tokenInfo$metadata10 = tokenInfo.metadata) === null || _tokenInfo$metadata10 === void 0 ? void 0 : _tokenInfo$metadata10.assetId) || '-1';
367
371
  }
368
372
  export function _getXcmAssetMultilocation(tokenInfo) {
369
- var _tokenInfo$metadata10;
370
- return (_tokenInfo$metadata10 = tokenInfo.metadata) === null || _tokenInfo$metadata10 === void 0 ? void 0 : _tokenInfo$metadata10.multilocation;
373
+ var _tokenInfo$metadata11;
374
+ return (_tokenInfo$metadata11 = tokenInfo.metadata) === null || _tokenInfo$metadata11 === void 0 ? void 0 : _tokenInfo$metadata11.multilocation;
371
375
  }
372
376
  export function _getXcmTransferType(originChainInfo, destinationChainInfo) {
373
377
  var _originChainInfo$subs, _destinationChainInfo;
@@ -1,5 +1,5 @@
1
1
  import { _ChainAsset, _ChainInfo, _MultiChainAsset } from '@subwallet/chain-list/types';
2
- export declare const ChainListVersion = "0.2.114";
2
+ export declare const ChainListVersion = "0.2.115";
3
3
  export interface PatchInfo {
4
4
  patchVersion: string;
5
5
  appliedVersion: string;
@@ -5,7 +5,7 @@ const PRODUCTION_BRANCHES = ['master', 'webapp', 'webapp-dev'];
5
5
  const branchName = process.env.BRANCH_NAME || 'subwallet-dev';
6
6
  const fetchDomain = process.env.PATCH_CHAIN_LIST_URL || (PRODUCTION_BRANCHES.indexOf(branchName) > -1 ? 'https://chain-list-assets.subwallet.app' : 'https://dev.sw-chain-list-assets.pages.dev');
7
7
  const fetchFile = PRODUCTION_BRANCHES.indexOf(branchName) > -1 ? 'list.json' : 'preview.json';
8
- export const ChainListVersion = '0.2.114'; // update this when build chain-list
8
+ export const ChainListVersion = '0.2.115'; // update this when build chain-list
9
9
 
10
10
  // todo: move this interface to chainlist
11
11
 
@@ -116,6 +116,9 @@ export function getExplorerLink(chainInfo, value, type) {
116
116
  const address = u8aToHex(decodeAddress(value));
117
117
  return `${explorerLink}${explorerLink.endsWith('/') ? '' : '/'}${route}/${address}`;
118
118
  }
119
+ if (chainInfo.slug === 'xode') {
120
+ return undefined;
121
+ }
119
122
  return `${explorerLink}${explorerLink.endsWith('/') ? '' : '/'}${route}/${value}`;
120
123
  }
121
124
  if (explorerLink && isHex(hexAddPrefix(value))) {
@@ -123,6 +126,9 @@ export function getExplorerLink(chainInfo, value, type) {
123
126
  if (chainInfo.slug === 'tangle') {
124
127
  return `${explorerLink}${explorerLink.endsWith('/') ? '' : '/'}extrinsic/${value}${route}/${value}`;
125
128
  }
129
+ if (chainInfo.slug === 'xode') {
130
+ return `${explorerLink}${explorerLink.endsWith('/') ? '' : '/'}polkadot-chain-transaction?search=${value}`;
131
+ }
126
132
  if (chainInfo.slug === 'truth_network') {
127
133
  // getTransactionId(value)
128
134
  // .then((transactionId) => {
@@ -2,15 +2,15 @@
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
4
  import { APP_VERSION, BACKEND_API_URL, BACKEND_PRICE_HISTORY_URL } from '@subwallet/extension-base/constants';
5
- import { ChainListVersion } from '@subwallet/extension-base/services/chain-service/utils';
6
5
  import subwalletApiSdk from '@subwallet-monorepos/subwallet-services-sdk';
7
6
  import { TARGET_ENV } from "./environment.js";
7
+ const CHAIN_LIST_VERSION = process.env.CHAIN_LIST_VERSION;
8
8
  export function setupApiSDK() {
9
9
  subwalletApiSdk.updateConfig({
10
10
  appVersion: APP_VERSION,
11
11
  baseUrl: BACKEND_API_URL,
12
12
  platform: TARGET_ENV,
13
- chainListVersion: ChainListVersion
13
+ chainListVersion: CHAIN_LIST_VERSION
14
14
  });
15
15
 
16
16
  // Custom the price history API with other different base URL