@subwallet/extension-base 1.2.23-0 → 1.2.24-1

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.
Files changed (97) hide show
  1. package/background/KoniTypes.d.ts +14 -0
  2. package/cjs/constants/index.js +4 -1
  3. package/cjs/core/substrate/assets-pallet.js +35 -0
  4. package/cjs/core/substrate/foreign-asset-pallet.js +13 -3
  5. package/cjs/core/substrate/nominationpools-pallet.js +4 -6
  6. package/cjs/core/substrate/ormlTokens-pallet.js +24 -0
  7. package/cjs/core/substrate/system-pallet.js +16 -18
  8. package/cjs/core/substrate/tokens-pallet.js +24 -0
  9. package/cjs/core/substrate/types.js +19 -0
  10. package/cjs/core/substrate/xcm-parser.js +16 -2
  11. package/cjs/core/utils.js +31 -0
  12. package/cjs/koni/background/cron.js +10 -0
  13. package/cjs/koni/background/handlers/Extension.js +61 -5
  14. package/cjs/koni/background/handlers/State.js +3 -0
  15. package/cjs/packageInfo.js +1 -1
  16. package/cjs/services/balance-service/helpers/subscribe/substrate/equilibrium.js +2 -2
  17. package/cjs/services/balance-service/helpers/subscribe/substrate/index.js +120 -133
  18. package/cjs/services/balance-service/transfer/xcm/index.js +2 -1
  19. package/cjs/services/balance-service/transfer/xcm/polkadotXcm.js +1 -1
  20. package/cjs/services/balance-service/transfer/xcm/utils.js +3 -2
  21. package/cjs/services/chain-service/constants.js +1 -1
  22. package/cjs/services/chain-service/handler/SubstrateApi.js +128 -34
  23. package/cjs/services/chain-service/handler/SubstrateChainHandler.js +26 -9
  24. package/cjs/services/chain-service/utils/index.js +5 -0
  25. package/cjs/services/migration-service/scripts/MigrateLedgerAccountV2.js +3 -3
  26. package/cjs/services/mkt-campaign-service/index.js +284 -0
  27. package/cjs/services/mkt-campaign-service/types.js +17 -0
  28. package/cjs/services/storage-service/DatabaseService.js +115 -0
  29. package/cjs/services/storage-service/db-stores/Balance.js +6 -0
  30. package/cjs/services/storage-service/db-stores/Crowdloan.js +8 -0
  31. package/cjs/services/storage-service/db-stores/Nft.js +12 -0
  32. package/cjs/services/storage-service/db-stores/NftCollection.js +11 -0
  33. package/cjs/services/storage-service/db-stores/YieldPositionStore.js +6 -0
  34. package/constants/index.d.ts +1 -0
  35. package/constants/index.js +1 -0
  36. package/core/substrate/assets-pallet.d.ts +4 -0
  37. package/core/substrate/assets-pallet.js +28 -0
  38. package/core/substrate/foreign-asset-pallet.d.ts +4 -8
  39. package/core/substrate/foreign-asset-pallet.js +13 -3
  40. package/core/substrate/nominationpools-pallet.d.ts +4 -10
  41. package/core/substrate/nominationpools-pallet.js +4 -5
  42. package/core/substrate/ormlTokens-pallet.d.ts +4 -0
  43. package/core/substrate/ormlTokens-pallet.js +17 -0
  44. package/core/substrate/system-pallet.d.ts +4 -24
  45. package/core/substrate/system-pallet.js +16 -21
  46. package/core/substrate/tokens-pallet.d.ts +5 -0
  47. package/core/substrate/tokens-pallet.js +16 -0
  48. package/core/substrate/types.d.ts +43 -0
  49. package/core/substrate/types.js +12 -0
  50. package/core/substrate/xcm-parser.d.ts +1 -0
  51. package/core/substrate/xcm-parser.js +15 -2
  52. package/core/utils.d.ts +4 -0
  53. package/core/utils.js +23 -0
  54. package/koni/api/staking/bonding/relayChain.d.ts +1 -1
  55. package/koni/background/cron.d.ts +1 -0
  56. package/koni/background/cron.js +11 -1
  57. package/koni/background/handlers/Extension.d.ts +3 -0
  58. package/koni/background/handlers/Extension.js +61 -5
  59. package/koni/background/handlers/State.d.ts +4 -2
  60. package/koni/background/handlers/State.js +3 -0
  61. package/package.json +41 -6
  62. package/packageInfo.js +1 -1
  63. package/services/balance-service/helpers/subscribe/substrate/equilibrium.js +2 -2
  64. package/services/balance-service/helpers/subscribe/substrate/index.js +109 -121
  65. package/services/balance-service/transfer/xcm/index.d.ts +1 -1
  66. package/services/balance-service/transfer/xcm/index.js +2 -1
  67. package/services/balance-service/transfer/xcm/polkadotXcm.js +1 -1
  68. package/services/balance-service/transfer/xcm/utils.d.ts +1 -1
  69. package/services/balance-service/transfer/xcm/utils.js +3 -2
  70. package/services/chain-service/constants.js +1 -1
  71. package/services/chain-service/handler/SubstrateApi.d.ts +5 -7
  72. package/services/chain-service/handler/SubstrateApi.js +128 -35
  73. package/services/chain-service/handler/SubstrateChainHandler.d.ts +5 -6
  74. package/services/chain-service/handler/SubstrateChainHandler.js +26 -9
  75. package/services/chain-service/index.d.ts +3 -3
  76. package/services/chain-service/types.d.ts +22 -5
  77. package/services/chain-service/utils/index.d.ts +1 -0
  78. package/services/chain-service/utils/index.js +3 -0
  79. package/services/earning-service/handlers/nomination-pool/index.d.ts +1 -1
  80. package/services/migration-service/scripts/MigrateLedgerAccountV2.js +3 -3
  81. package/services/mkt-campaign-service/index.d.ts +30 -0
  82. package/services/mkt-campaign-service/index.js +275 -0
  83. package/services/mkt-campaign-service/types.d.ts +107 -0
  84. package/services/mkt-campaign-service/types.js +11 -0
  85. package/services/storage-service/DatabaseService.d.ts +5 -0
  86. package/services/storage-service/DatabaseService.js +116 -1
  87. package/services/storage-service/db-stores/Balance.d.ts +2 -0
  88. package/services/storage-service/db-stores/Balance.js +6 -0
  89. package/services/storage-service/db-stores/Crowdloan.d.ts +2 -0
  90. package/services/storage-service/db-stores/Crowdloan.js +8 -0
  91. package/services/storage-service/db-stores/Nft.d.ts +2 -0
  92. package/services/storage-service/db-stores/Nft.js +12 -0
  93. package/services/storage-service/db-stores/NftCollection.d.ts +1 -0
  94. package/services/storage-service/db-stores/NftCollection.js +11 -0
  95. package/services/storage-service/db-stores/YieldPositionStore.d.ts +2 -0
  96. package/services/storage-service/db-stores/YieldPositionStore.js +6 -0
  97. package/types/balance/index.d.ts +2 -3
@@ -1,7 +1,7 @@
1
1
  // Copyright 2019-2022 @subwallet/extension-koni authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
 
4
- import { CRON_REFRESH_CHAIN_STAKING_METADATA, CRON_REFRESH_NFT_INTERVAL, CRON_SYNC_MANTA_PAY } from '@subwallet/extension-base/constants';
4
+ import { CRON_REFRESH_CHAIN_STAKING_METADATA, CRON_REFRESH_MKT_CAMPAIGN_INTERVAL, CRON_REFRESH_NFT_INTERVAL, CRON_SYNC_MANTA_PAY } from '@subwallet/extension-base/constants';
5
5
  import { _isChainSupportEvmNft, _isChainSupportNativeNft, _isChainSupportWasmNft } from '@subwallet/extension-base/services/chain-service/utils';
6
6
  import { waitTimeout } from '@subwallet/extension-base/utils';
7
7
  import { Subject } from 'rxjs';
@@ -54,10 +54,12 @@ export class KoniCron {
54
54
  await Promise.all([this.state.eventService.waitKeyringReady, this.state.eventService.waitAssetReady]);
55
55
  const currentAccountInfo = this.state.keyringService.currentAccount;
56
56
  const commonReloadEvents = ['account.add', 'account.remove', 'account.updateCurrent', 'chain.add', 'asset.updateState'];
57
+ const mktCampaignReloadEvents = ['account.add', 'account.remove'];
57
58
  this.eventHandler = (events, eventTypes) => {
58
59
  var _serviceInfo$currentA;
59
60
  const serviceInfo = this.state.getServiceInfo();
60
61
  const commonReload = eventTypes.some(eventType => commonReloadEvents.includes(eventType));
62
+ const mktCampaignNeedReload = eventTypes.some(eventType => mktCampaignReloadEvents.includes(eventType));
61
63
  const chainUpdated = eventTypes.includes('chain.updateState');
62
64
  const reloadMantaPay = eventTypes.includes('mantaPay.submitTransaction') || eventTypes.includes('mantaPay.enable');
63
65
  const updatedChains = [];
@@ -87,6 +89,10 @@ export class KoniCron {
87
89
  (commonReload || needUpdateNft) && this.resetNft(address);
88
90
  (commonReload || needUpdateNft) && this.removeCron('refreshNft');
89
91
  commonReload && this.removeCron('refreshPoolingStakingReward');
92
+ if (mktCampaignNeedReload) {
93
+ this.removeCron('fetchMktCampaignData');
94
+ this.addCron('fetchMktCampaignData', this.fetchMktCampaignData, CRON_REFRESH_MKT_CAMPAIGN_INTERVAL);
95
+ }
90
96
  if (chainUpdated) {
91
97
  this.stopPoolInfo();
92
98
  this.removeCron('fetchPoolInfo');
@@ -102,6 +108,7 @@ export class KoniCron {
102
108
  };
103
109
  this.state.eventService.onLazy(this.eventHandler);
104
110
  this.addCron('fetchPoolInfo', this.fetchPoolInfo, CRON_REFRESH_CHAIN_STAKING_METADATA);
111
+ this.addCron('fetchMktCampaignData', this.fetchMktCampaignData, CRON_REFRESH_MKT_CAMPAIGN_INTERVAL);
105
112
  if (!(currentAccountInfo !== null && currentAccountInfo !== void 0 && currentAccountInfo.address)) {
106
113
  return;
107
114
  }
@@ -140,6 +147,9 @@ export class KoniCron {
140
147
  fetchPoolInfo = () => {
141
148
  this.state.earningService.runSubscribePoolsInfo().catch(console.error);
142
149
  };
150
+ fetchMktCampaignData = () => {
151
+ this.state.mktCampaignService.fetchMktCampaignData();
152
+ };
143
153
  stopPoolInfo = () => {
144
154
  this.state.earningService.runUnsubscribePoolsInfo();
145
155
  };
@@ -245,6 +245,9 @@ export default class KoniExtension {
245
245
  private completeCampaignBanner;
246
246
  private subscribeCampaignPopupVisibility;
247
247
  private toggleCampaignPopup;
248
+ private subscribeAppPopupData;
249
+ private subscribeAppBannerData;
250
+ private subscribeAppConfirmationData;
248
251
  private subscribeBuyTokens;
249
252
  private subscribeBuyServices;
250
253
  private subscribeSwapPairs;
@@ -1938,7 +1938,7 @@ export default class KoniExtension {
1938
1938
  if (destinationTokenInfo) {
1939
1939
  const [bnMockFee, {
1940
1940
  value
1941
- }] = await Promise.all([getXcmMockTxFee(substrateApi, chainInfoMap, address, originTokenInfo, destinationTokenInfo), this.getAddressTransferableBalance({
1941
+ }] = await Promise.all([getXcmMockTxFee(substrateApi, chainInfoMap, originTokenInfo, destinationTokenInfo), this.getAddressTransferableBalance({
1942
1942
  extrinsicType: ExtrinsicType.TRANSFER_XCM,
1943
1943
  address,
1944
1944
  networkKey: originTokenInfo.originChain,
@@ -2123,14 +2123,15 @@ export default class KoniExtension {
2123
2123
  genesisHash,
2124
2124
  hardwareType,
2125
2125
  isAllowed,
2126
- name
2126
+ name,
2127
+ originGenesisHash
2127
2128
  }) {
2128
2129
  const key = keyring.addHardware(address, hardwareType, {
2129
2130
  accountIndex,
2130
2131
  addressOffset,
2131
2132
  genesisHash,
2132
2133
  name,
2133
- originGenesisHash: genesisHash
2134
+ originGenesisHash
2134
2135
  });
2135
2136
  const result = key.pair;
2136
2137
  const _address = result.address;
@@ -2164,7 +2165,8 @@ export default class KoniExtension {
2164
2165
  hardwareType,
2165
2166
  isEthereum,
2166
2167
  isGeneric,
2167
- name
2168
+ name,
2169
+ originGenesisHash
2168
2170
  } = account;
2169
2171
  let result;
2170
2172
  const baseMeta = {
@@ -2173,7 +2175,7 @@ export default class KoniExtension {
2173
2175
  accountIndex,
2174
2176
  addressOffset,
2175
2177
  genesisHash,
2176
- originGenesisHash: genesisHash,
2178
+ originGenesisHash,
2177
2179
  isGeneric
2178
2180
  };
2179
2181
  if (isEthereum) {
@@ -3975,6 +3977,54 @@ export default class KoniExtension {
3975
3977
  this.#koniState.campaignService.toggleCampaignPopup(value);
3976
3978
  return null;
3977
3979
  }
3980
+ subscribeAppPopupData(id, port) {
3981
+ const cb = createSubscription(id, port);
3982
+ let ready = false;
3983
+ const callback = rs => {
3984
+ if (ready) {
3985
+ cb(rs);
3986
+ }
3987
+ };
3988
+ const subscription = this.#koniState.mktCampaignService.subscribePopupsData(callback);
3989
+ this.createUnsubscriptionHandle(id, subscription.unsubscribe);
3990
+ port.onDisconnect.addListener(() => {
3991
+ this.cancelSubscription(id);
3992
+ });
3993
+ ready = true;
3994
+ return this.#koniState.mktCampaignService.getAppPopupsData();
3995
+ }
3996
+ subscribeAppBannerData(id, port) {
3997
+ const cb = createSubscription(id, port);
3998
+ let ready = false;
3999
+ const callback = rs => {
4000
+ if (ready) {
4001
+ cb(rs);
4002
+ }
4003
+ };
4004
+ const subscription = this.#koniState.mktCampaignService.subscribeBannersData(callback);
4005
+ this.createUnsubscriptionHandle(id, subscription.unsubscribe);
4006
+ port.onDisconnect.addListener(() => {
4007
+ this.cancelSubscription(id);
4008
+ });
4009
+ ready = true;
4010
+ return this.#koniState.mktCampaignService.getAppBannersData();
4011
+ }
4012
+ subscribeAppConfirmationData(id, port) {
4013
+ const cb = createSubscription(id, port);
4014
+ let ready = false;
4015
+ const callback = rs => {
4016
+ if (ready) {
4017
+ cb(rs);
4018
+ }
4019
+ };
4020
+ const subscription = this.#koniState.mktCampaignService.subscribeConfirmationsData(callback);
4021
+ this.createUnsubscriptionHandle(id, subscription.unsubscribe);
4022
+ port.onDisconnect.addListener(() => {
4023
+ this.cancelSubscription(id);
4024
+ });
4025
+ ready = true;
4026
+ return this.#koniState.mktCampaignService.getAppConfirmationsData();
4027
+ }
3978
4028
 
3979
4029
  /* Campaign */
3980
4030
 
@@ -4601,6 +4651,12 @@ export default class KoniExtension {
4601
4651
  return this.subscribeCampaignPopupVisibility(id, port);
4602
4652
  case 'pri(campaign.popup.toggle)':
4603
4653
  return this.toggleCampaignPopup(request);
4654
+ case 'pri(campaign.popups.subscribe)':
4655
+ return this.subscribeAppPopupData(id, port);
4656
+ case 'pri(campaign.banners.subscribe)':
4657
+ return this.subscribeAppBannerData(id, port);
4658
+ case 'pri(campaign.confirmations.subscribe)':
4659
+ return this.subscribeAppConfirmationData(id, port);
4604
4660
 
4605
4661
  /* Campaign */
4606
4662
 
@@ -14,6 +14,7 @@ import { HistoryService } from '@subwallet/extension-base/services/history-servi
14
14
  import { KeyringService } from '@subwallet/extension-base/services/keyring-service';
15
15
  import MigrationService from '@subwallet/extension-base/services/migration-service';
16
16
  import MintCampaignService from '@subwallet/extension-base/services/mint-campaign-service';
17
+ import MktCampaignService from '@subwallet/extension-base/services/mkt-campaign-service';
17
18
  import NotificationService from '@subwallet/extension-base/services/notification-service/NotificationService';
18
19
  import { PriceService } from '@subwallet/extension-base/services/price-service';
19
20
  import RequestService from '@subwallet/extension-base/services/request-service';
@@ -69,6 +70,7 @@ export default class KoniState {
69
70
  readonly walletConnectService: WalletConnectService;
70
71
  readonly mintCampaignService: MintCampaignService;
71
72
  readonly campaignService: CampaignService;
73
+ readonly mktCampaignService: MktCampaignService;
72
74
  readonly buyService: BuyService;
73
75
  readonly earningService: EarningService;
74
76
  readonly feeService: FeeService;
@@ -192,8 +194,8 @@ export default class KoniState {
192
194
  disableChain(chainSlug: string): Promise<boolean>;
193
195
  enableChain(chainSlug: string, enableTokens?: boolean): Promise<boolean>;
194
196
  resetDefaultChains(): boolean;
195
- getSubstrateApiMap(): Record<string, import("../../../services/chain-service/handler/SubstrateApi").SubstrateApi>;
196
- getSubstrateApi(networkKey: string): import("../../../services/chain-service/handler/SubstrateApi").SubstrateApi;
197
+ getSubstrateApiMap(): Record<string, import("@subwallet/extension-base/services/chain-service/types")._SubstrateApi>;
198
+ getSubstrateApi(networkKey: string): import("@subwallet/extension-base/services/chain-service/types")._SubstrateApi;
197
199
  getEvmApiMap(): Record<string, import("../../../services/chain-service/handler/EvmApi").EvmApi>;
198
200
  getEvmApi(networkKey: string): import("../../../services/chain-service/handler/EvmApi").EvmApi;
199
201
  getApiMap(): ApiMap;
@@ -21,6 +21,7 @@ import { HistoryService } from '@subwallet/extension-base/services/history-servi
21
21
  import { KeyringService } from '@subwallet/extension-base/services/keyring-service';
22
22
  import MigrationService from '@subwallet/extension-base/services/migration-service';
23
23
  import MintCampaignService from '@subwallet/extension-base/services/mint-campaign-service';
24
+ import MktCampaignService from '@subwallet/extension-base/services/mkt-campaign-service';
24
25
  import NotificationService from '@subwallet/extension-base/services/notification-service/NotificationService';
25
26
  import { PriceService } from '@subwallet/extension-base/services/price-service';
26
27
  import RequestService from '@subwallet/extension-base/services/request-service';
@@ -103,6 +104,7 @@ export default class KoniState {
103
104
  this.walletConnectService = new WalletConnectService(this, this.requestService);
104
105
  this.migrationService = new MigrationService(this, this.eventService);
105
106
  this.campaignService = new CampaignService(this);
107
+ this.mktCampaignService = new MktCampaignService(this);
106
108
  this.buyService = new BuyService(this);
107
109
  this.transactionService = new TransactionService(this);
108
110
  this.earningService = new EarningService(this);
@@ -227,6 +229,7 @@ export default class KoniState {
227
229
  this.afterChainServiceInit();
228
230
  await this.migrationService.run();
229
231
  this.campaignService.init();
232
+ this.mktCampaignService.init();
230
233
  this.eventService.emit('chain.ready', true);
231
234
  await this.balanceService.init();
232
235
  await this.earningService.init();
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "./cjs/detectPackage.js"
18
18
  ],
19
19
  "type": "module",
20
- "version": "1.2.23-0",
20
+ "version": "1.2.24-1",
21
21
  "main": "./cjs/index.js",
22
22
  "module": "./index.js",
23
23
  "types": "./index.d.ts",
@@ -144,6 +144,11 @@
144
144
  "require": "./cjs/core/logic-validation/transfer.js",
145
145
  "default": "./core/logic-validation/transfer.js"
146
146
  },
147
+ "./core/substrate/assets-pallet": {
148
+ "types": "./core/substrate/assets-pallet.d.ts",
149
+ "require": "./cjs/core/substrate/assets-pallet.js",
150
+ "default": "./core/substrate/assets-pallet.js"
151
+ },
147
152
  "./core/substrate/foreign-asset-pallet": {
148
153
  "types": "./core/substrate/foreign-asset-pallet.d.ts",
149
154
  "require": "./cjs/core/substrate/foreign-asset-pallet.js",
@@ -154,16 +159,36 @@
154
159
  "require": "./cjs/core/substrate/nominationpools-pallet.js",
155
160
  "default": "./core/substrate/nominationpools-pallet.js"
156
161
  },
162
+ "./core/substrate/ormlTokens-pallet": {
163
+ "types": "./core/substrate/ormlTokens-pallet.d.ts",
164
+ "require": "./cjs/core/substrate/ormlTokens-pallet.js",
165
+ "default": "./core/substrate/ormlTokens-pallet.js"
166
+ },
157
167
  "./core/substrate/system-pallet": {
158
168
  "types": "./core/substrate/system-pallet.d.ts",
159
169
  "require": "./cjs/core/substrate/system-pallet.js",
160
170
  "default": "./core/substrate/system-pallet.js"
161
171
  },
172
+ "./core/substrate/tokens-pallet": {
173
+ "types": "./core/substrate/tokens-pallet.d.ts",
174
+ "require": "./cjs/core/substrate/tokens-pallet.js",
175
+ "default": "./core/substrate/tokens-pallet.js"
176
+ },
177
+ "./core/substrate/types": {
178
+ "types": "./core/substrate/types.d.ts",
179
+ "require": "./cjs/core/substrate/types.js",
180
+ "default": "./core/substrate/types.js"
181
+ },
162
182
  "./core/substrate/xcm-parser": {
163
183
  "types": "./core/substrate/xcm-parser.d.ts",
164
184
  "require": "./cjs/core/substrate/xcm-parser.js",
165
185
  "default": "./core/substrate/xcm-parser.js"
166
186
  },
187
+ "./core/utils": {
188
+ "types": "./core/utils.d.ts",
189
+ "require": "./cjs/core/utils.js",
190
+ "default": "./core/utils.js"
191
+ },
167
192
  "./defaults": {
168
193
  "types": "./defaults.d.ts",
169
194
  "require": "./cjs/defaults.js",
@@ -1186,6 +1211,16 @@
1186
1211
  "require": "./cjs/services/mint-campaign-service/constants.js",
1187
1212
  "default": "./services/mint-campaign-service/constants.js"
1188
1213
  },
1214
+ "./services/mkt-campaign-service": {
1215
+ "types": "./services/mkt-campaign-service/index.d.ts",
1216
+ "require": "./cjs/services/mkt-campaign-service/index.js",
1217
+ "default": "./services/mkt-campaign-service/index.js"
1218
+ },
1219
+ "./services/mkt-campaign-service/types": {
1220
+ "types": "./services/mkt-campaign-service/types.d.ts",
1221
+ "require": "./cjs/services/mkt-campaign-service/types.js",
1222
+ "default": "./services/mkt-campaign-service/types.js"
1223
+ },
1189
1224
  "./services/notification-service/NotificationService": {
1190
1225
  "types": "./services/notification-service/NotificationService.d.ts",
1191
1226
  "require": "./cjs/services/notification-service/NotificationService.js",
@@ -2024,11 +2059,11 @@
2024
2059
  "@reduxjs/toolkit": "^1.9.1",
2025
2060
  "@sora-substrate/type-definitions": "^1.17.7",
2026
2061
  "@substrate/connect": "^0.8.9",
2027
- "@subwallet/chain-list": "0.2.80",
2028
- "@subwallet/extension-base": "^1.2.23-0",
2029
- "@subwallet/extension-chains": "^1.2.23-0",
2030
- "@subwallet/extension-dapp": "^1.2.23-0",
2031
- "@subwallet/extension-inject": "^1.2.23-0",
2062
+ "@subwallet/chain-list": "0.2.81",
2063
+ "@subwallet/extension-base": "^1.2.24-1",
2064
+ "@subwallet/extension-chains": "^1.2.24-1",
2065
+ "@subwallet/extension-dapp": "^1.2.24-1",
2066
+ "@subwallet/extension-inject": "^1.2.24-1",
2032
2067
  "@subwallet/keyring": "^0.1.5",
2033
2068
  "@subwallet/ui-keyring": "^0.1.5",
2034
2069
  "@walletconnect/keyvaluestorage": "^1.1.1",
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.2.23-0'
10
+ version: '1.2.24-1'
11
11
  };
@@ -19,7 +19,7 @@ export const subscribeEquilibriumTokenBalance = async ({
19
19
  const tokenTypes = includeNativeToken ? [_AssetType.NATIVE, _AssetType.LOCAL] : [_AssetType.LOCAL];
20
20
  const tokenMap = filterAssetsByChainAndType(assetMap, chain, tokenTypes);
21
21
  try {
22
- const unsub = await substrateApi.query.system.account.multi(addresses, balances => {
22
+ const unsub = await substrateApi.api.query.system.account.multi(addresses, balances => {
23
23
  // Equilibrium customizes the SystemAccount pallet
24
24
  Object.values(tokenMap).forEach(tokenInfo => {
25
25
  const assetId = _getTokenOnChainAssetId(tokenInfo);
@@ -81,7 +81,7 @@ export const subscribeEqBalanceAccountPallet = async ({
81
81
  const unsubList = Object.values(tokenMap).map(async tokenInfo => {
82
82
  try {
83
83
  const assetId = _getTokenOnChainAssetId(tokenInfo);
84
- const unsub = await substrateApi.query.eqBalances.account.multi(addresses.map(address => [address, [assetId]]), balances => {
84
+ const unsub = await substrateApi.api.query.eqBalances.account.multi(addresses.map(address => [address, [assetId]]), balances => {
85
85
  const items = balances.map((balance, index) => {
86
86
  return {
87
87
  address: addresses[index],