From d4d1bcf3b203c17dc2b98d61b1abc516742dce49 Mon Sep 17 00:00:00 2001 From: Daniel Savu Date: Wed, 26 May 2021 15:39:35 +0100 Subject: [PATCH 1/2] chore: Upgrade Big.js type dep --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 4145476e3..c5d3f65e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@interlay/polkabtc", - "version": "0.15.4", + "version": "0.15.5", "description": "JavaScript library to interact with PolkaBTC", "main": "build/index.js", "typings": "build/index.d.ts", @@ -42,7 +42,7 @@ "@interlay/polkabtc-types": "0.7.2", "@polkadot/api": "4.8.1", "@polkadot/typegen": "4.8.1", - "@types/big.js": "4.0.5", + "@types/big.js": "6.0.2", "big.js": "6.0.3", "bitcoin-core": "^3.0.0", "bitcoinjs-lib": "^5.2.0", From 17e09cbfa0ccf3cf26dd03c7c3442fa1e7f0311a Mon Sep 17 00:00:00 2001 From: Daniel Savu Date: Wed, 26 May 2021 16:00:35 +0100 Subject: [PATCH 2/2] fix(treasury): Await issuance promise --- src/parachain/treasury.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parachain/treasury.ts b/src/parachain/treasury.ts index 997b9068f..64c0eedc9 100644 --- a/src/parachain/treasury.ts +++ b/src/parachain/treasury.ts @@ -43,7 +43,7 @@ export class DefaultTreasuryAPI extends DefaultTransactionAPI implements Treasur async total(): Promise { const head = await this.api.rpc.chain.getFinalizedHead(); - const totalBN = this.api.query.wrapped.totalIssuance.at(head); + const totalBN = await this.api.query.wrapped.totalIssuance.at(head); return new Big(satToBTC(totalBN.toString())); }