diff --git a/package.json b/package.json index e450d32318..7dd76c7cbe 100644 --- a/package.json +++ b/package.json @@ -85,7 +85,7 @@ "@polkadot/types": "^10.9.1", "@polkadot/util": "^12.3.2", "@polkadot/util-crypto": "^12.3.2", - "@subwallet/chain-list": "0.2.18-beta.0", + "@subwallet/chain-list": "0.2.18-beta.2", "@subwallet/keyring": "^0.1.1", "@subwallet/ui-keyring": "^0.1.1", "babel-core": "^7.0.0-bridge.0", diff --git a/packages/extension-base/package.json b/packages/extension-base/package.json index 998a7dd05b..e07844778f 100644 --- a/packages/extension-base/package.json +++ b/packages/extension-base/package.json @@ -47,7 +47,7 @@ "@reduxjs/toolkit": "^1.9.1", "@sora-substrate/type-definitions": "^1.17.7", "@substrate/connect": "^0.7.26", - "@subwallet/chain-list": "0.2.18-beta.0", + "@subwallet/chain-list": "0.2.18-beta.2", "@subwallet/extension-base": "^1.1.12-1", "@subwallet/extension-chains": "^1.1.12-1", "@subwallet/extension-dapp": "^1.1.12-1", diff --git a/packages/extension-base/src/koni/api/dotsama/crowdloan.ts b/packages/extension-base/src/koni/api/dotsama/crowdloan.ts index 8ef335aac8..41c1006f4e 100644 --- a/packages/extension-base/src/koni/api/dotsama/crowdloan.ts +++ b/packages/extension-base/src/koni/api/dotsama/crowdloan.ts @@ -25,7 +25,7 @@ export type CrowdloanFundInfo = _CrowdloanFund & { } const getOnlineFundList = (async () => { - const request = await axios.get('https://static-data.subwallet.app/crowdloan-funds/list.json'); + const request = await axios.get('https://content.subwallet.app/api/list/crowdloan-fund'); return request.data; })(); @@ -36,6 +36,7 @@ function getRPCCrowdloan (parentAPI: _SubstrateApi, fundInfo: _CrowdloanFund, he let contribute = new BN(0); Object.values(result).forEach((item) => { + console.log(fundId, item.toBn().toString()); contribute = contribute.add(item.toBn()); }); @@ -161,12 +162,15 @@ export async function subscribeCrowdloan (addresses: string[], substrateApiMap: const chainSlug = fundInfo.chain; const endTime = new Date(fundInfo.endTime).getTime(); const parentChain = fundInfo.relayChain; + const substrateInfo = chainInfoMap[chainSlug]?.substrateInfo; - if (chainSlug && parentChain && STATUS_MAP[fundInfo.status] && fundInfo.paraId && endTime > now && chainInfoMap[chainSlug]) { + if (chainSlug && parentChain && STATUS_MAP[fundInfo.status] && fundInfo.paraId && endTime > now && substrateInfo) { const crowdloanCb = (rs: CrowdloanItem) => { callback(chainSlug, rs); }; + fundInfo.paraId = substrateInfo.crowdloanParaId || substrateInfo.paraId || fundInfo.paraId; + if (chainSlug === COMMON_CHAIN_SLUGS.ACALA) { const acalaAddresses = substrateAddresses.map((address) => reformatAddress(address, 10, false)); diff --git a/packages/extension-koni-ui/package.json b/packages/extension-koni-ui/package.json index 40586353cf..5289180ef1 100644 --- a/packages/extension-koni-ui/package.json +++ b/packages/extension-koni-ui/package.json @@ -35,7 +35,7 @@ "@polkadot/util-crypto": "^12.3.2", "@ramonak/react-progress-bar": "^5.0.3", "@reduxjs/toolkit": "^1.9.1", - "@subwallet/chain-list": "0.2.18-beta.0", + "@subwallet/chain-list": "0.2.18-beta.2", "@subwallet/extension-base": "^1.1.12-1", "@subwallet/extension-chains": "^1.1.12-1", "@subwallet/extension-dapp": "^1.1.12-1", diff --git a/yarn.lock b/yarn.lock index 79e0973f3b..aec0664fc6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5863,14 +5863,14 @@ __metadata: languageName: node linkType: hard -"@subwallet/chain-list@npm:0.2.18-beta.0": - version: 0.2.18-beta.0 - resolution: "@subwallet/chain-list@npm:0.2.18-beta.0" +"@subwallet/chain-list@npm:0.2.18-beta.2": + version: 0.2.18-beta.2 + resolution: "@subwallet/chain-list@npm:0.2.18-beta.2" dependencies: "@polkadot/dev": 0.67.167 "@polkadot/util": ^12.5.1 eventemitter3: ^5.0.1 - checksum: ed19fa4ad2954e9407846bae484156116e67d6471beb9fdb09c7aa7c204dccbe1c9c6f3dcf33b6d63cbd352f1a1a7b4833746c3b75ee59d1f99fc666f2ed7b1a + checksum: b1b9817df8d1659566dcdd87755f07c64123d2ddd5a1c204d08e1ecf0128282a0513f3896e8ced072877597d24701a6419068adc18e83e51f6731ac0184001ff languageName: node linkType: hard @@ -5905,7 +5905,7 @@ __metadata: "@reduxjs/toolkit": ^1.9.1 "@sora-substrate/type-definitions": ^1.17.7 "@substrate/connect": ^0.7.26 - "@subwallet/chain-list": 0.2.18-beta.0 + "@subwallet/chain-list": 0.2.18-beta.2 "@subwallet/extension-base": ^1.1.12-1 "@subwallet/extension-chains": ^1.1.12-1 "@subwallet/extension-dapp": ^1.1.12-1 @@ -6035,7 +6035,7 @@ __metadata: "@polkadot/util-crypto": ^12.3.2 "@ramonak/react-progress-bar": ^5.0.3 "@reduxjs/toolkit": ^1.9.1 - "@subwallet/chain-list": 0.2.18-beta.0 + "@subwallet/chain-list": 0.2.18-beta.2 "@subwallet/extension-base": ^1.1.12-1 "@subwallet/extension-chains": ^1.1.12-1 "@subwallet/extension-dapp": ^1.1.12-1