Fix transaction size when using esplora api

This commit is contained in:
Simon Lindh
2019-10-28 16:47:42 +08:00
parent 35c4d9676c
commit 3074983d3a
4 changed files with 4 additions and 4 deletions

View File

@@ -43,8 +43,7 @@ class EsploraApi implements AbstractBitcoinApi {
try {
const response: AxiosResponse = await this.client.get('/tx/' + txId);
response.data.vsize = response.data.size;
response.data.size = response.data.weight;
response.data.vsize = Math.round(response.data.weight / 4);
response.data.fee = response.data.fee / 100000000;
response.data.blockhash = response.data.status.block_hash;