Skip to content

Commit

Permalink
bump polkadot-js/api v4.17.1 & add XCM support & fix webview double l…
Browse files Browse the repository at this point in the history
…oad issue
  • Loading branch information
RomeroYang committed Jul 8, 2021
1 parent e9e35a1 commit 4178980
Show file tree
Hide file tree
Showing 11 changed files with 209 additions and 135 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [0.2.4] - 20210706

* fix DApp webView double-callback bug
* add isXCMSupport flag
* add DOT/KSM staking minNominatorBond
* bump polkadot-js/api v4.17.1

## [0.2.3] - 20210628

* add crowdLoan api
Expand Down
4 changes: 2 additions & 2 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ packages:
name: webview_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.7"
version: "2.0.9"
win32:
dependency: transitive
description:
Expand All @@ -389,4 +389,4 @@ packages:
version: "0.2.0"
sdks:
dart: ">=2.13.0 <3.0.0"
flutter: ">=1.22.2"
flutter: ">=2.0.0"
12 changes: 6 additions & 6 deletions js_api/dist/main.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions js_api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
"build-dev": "webpack -d --mode development"
},
"resolutions": {
"@polkadot/api": "^4.16.2"
"@polkadot/api": "^4.17.1"
},
"dependencies": {
"@polkadot/api": "^4.16.2",
"@polkadot/api": "^4.17.1",
"@polkadot/ui-shared": "0.82.1",
"@polkadot/extension-dapp": "^0.38.7",
"@walletconnect/client": "2.0.0-alpha.26",
Expand Down
2 changes: 1 addition & 1 deletion js_api/src/service/parachain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ async function _queryAuctionInfo(api: ApiPromise) {
leaseEnd: auctionInfo.leasePeriod.add(api.consts.auctions.leasePeriodsPerSlot as u32).isub(BN_ONE).toNumber()
},
funds,
winners: _mergeCrowdLoanBids(winningData[0].winners, loans),
winners: _mergeCrowdLoanBids(winningData[0]?.winners || [], loans),
};
}

Expand Down
3 changes: 2 additions & 1 deletion js_api/src/service/staking/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,12 +555,13 @@ async function querySortedTargets(api: ApiPromise) {
api.derive.staking.electedInfo({withExposure: true, withPrefs: true}),
api.derive.staking.waitingInfo({withPrefs: true}),
api.derive.session.info(),
api.query.staking.minNominatorBond(),
]);

const partial = data[1] && data[2] && data[3] && data[4]
? _extractTargetsInfo(api, data[2], data[3], data[1], _transfromEra(data[4]), data[0])
: {};
return { inflation: { inflation: 0, stakedReturn: 0 }, medianComm: 0, ...partial };
return { inflation: { inflation: 0, stakedReturn: 0 }, medianComm: 0, ...partial, minNominatorBond: data[5] };
}

async function _getOwnStash(api: ApiPromise, accountId: string): Promise<[string, boolean]> {
Expand Down
Loading

0 comments on commit 4178980

Please sign in to comment.