From 07a3384eba5ae67ede8725647aa127da79e0e7e1 Mon Sep 17 00:00:00 2001 From: sairaj mote Date: Sat, 18 Feb 2023 01:06:03 +0530 Subject: [PATCH] bug fix --- index.html | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/index.html b/index.html index 4142dd7..deedea5 100644 --- a/index.html +++ b/index.html @@ -1375,8 +1375,6 @@ }); function retrieveBtcAddr() { let wif = getRef('retrieve_btc_addr_field').value.trim(); - // addressForm['legacy'].value = btcOperator.address(wif); - // addressForm['segwit'].value = btcOperator.segwitAddress(wif); getRef('recovered_btc_addr_wrapper').classList.remove('hidden') getRef('recovered_btc_addr').value = btcOperator.bech32Address(wif); } @@ -1553,14 +1551,20 @@ } function calculateApproxFee() { return new Promise((resolve, reject) => { - fetch('https://bitcoiner.live/api/fees/estimates/latest').then(res => res.json()).then(data => { - const satPerByte = data.estimates['60'].sat_per_vbyte; - const legacyBytes = 200; - const segwitBytes = 77; - resolve((legacyBytes * satPerByte + (0.25 * satPerByte) * segwitBytes) / Math.pow(10, 8)); - }).catch(e => { - reject(e) - }) + fetch('https://bitcoiner.live/api/fees/estimates/latest') + .then(res => { + res.json() + .then(data => { + const satPerByte = data.estimates['60'].sat_per_vbyte; + const legacyBytes = 200; + const segwitBytes = 77; + resolve((legacyBytes * satPerByte + (0.25 * satPerByte) * segwitBytes) / Math.pow(10, 8)); + }).catch(e => { + reject(e) + }) + }).catch(e => { + reject(e) + }) }) } function calculateExactFee() {