mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-26 08:55:56 +01:00
Lint
This commit is contained in:
parent
7b6734bcc3
commit
89a1188659
2 changed files with 23 additions and 5 deletions
|
@ -163,7 +163,7 @@ async function estimateFees() {
|
|||
const fast = await mainClient.blockchainEstimatefee(1);
|
||||
const medium = await mainClient.blockchainEstimatefee(6);
|
||||
const slow = await mainClient.blockchainEstimatefee(12);
|
||||
return {fast, medium, slow};
|
||||
return { fast, medium, slow };
|
||||
}
|
||||
|
||||
module.exports.getBalanceByAddress = getBalanceByAddress;
|
||||
|
|
|
@ -19,10 +19,28 @@ export default class NetworkTransactionFees {
|
|||
try {
|
||||
let response = await BlueElectrum.estimateFees();
|
||||
if (typeof response === 'object') {
|
||||
const fast = loc.formatBalanceWithoutSuffix(new BigNumber(response.fast).multipliedBy(100000).toNumber().toFixed(0), BitcoinUnit.SATS)
|
||||
const medium = loc.formatBalanceWithoutSuffix(new BigNumber(response.medium).multipliedBy(100000).toNumber().toFixed(0), BitcoinUnit.SATS)
|
||||
const slow = loc.formatBalanceWithoutSuffix(new BigNumber(response.slow).multipliedBy(100000).toNumber().toFixed(0), BitcoinUnit.SATS)
|
||||
const networkFee = new NetworkTransactionFee(fast, medium, slow);
|
||||
const fast = loc.formatBalanceWithoutSuffix(
|
||||
new BigNumber(response.fast)
|
||||
.multipliedBy(100000)
|
||||
.toNumber()
|
||||
.toFixed(0),
|
||||
BitcoinUnit.SATS,
|
||||
);
|
||||
const medium = loc.formatBalanceWithoutSuffix(
|
||||
new BigNumber(response.medium)
|
||||
.multipliedBy(100000)
|
||||
.toNumber()
|
||||
.toFixed(0),
|
||||
BitcoinUnit.SATS,
|
||||
);
|
||||
const slow = loc.formatBalanceWithoutSuffix(
|
||||
new BigNumber(response.slow)
|
||||
.multipliedBy(100000)
|
||||
.toNumber()
|
||||
.toFixed(0),
|
||||
BitcoinUnit.SATS,
|
||||
);
|
||||
const networkFee = new NetworkTransactionFee(fast, medium, slow);
|
||||
resolve(networkFee);
|
||||
} else {
|
||||
const networkFee = new NetworkTransactionFee(1, 1, 1);
|
||||
|
|
Loading…
Add table
Reference in a new issue