Skip to content

Commit 97f2262

Browse files
authored
Merge pull request #779 from cypherstack/fees
Fix fees when returned in scientific notation
2 parents 4e90e47 + f67c9e6 commit 97f2262

File tree

3 files changed

+3
-15
lines changed

3 files changed

+3
-15
lines changed

lib/electrumx_rpc/electrumx_client.dart

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,18 +1020,6 @@ class ElectrumXClient {
10201020
],
10211021
);
10221022
try {
1023-
// If the response is -1 or null, return a temporary hardcoded value for
1024-
// Dogecoin. This is a temporary fix until the fee estimation is fixed.
1025-
if (coin == Coin.dogecoin &&
1026-
(response == null ||
1027-
response == -1 ||
1028-
Decimal.parse(response.toString()) == Decimal.parse("-1"))) {
1029-
// Return 0.05 for slow, 0.2 for average, and 1 for fast txs.
1030-
// These numbers produce tx fees in line with txs in the wild on
1031-
// https://dogechain.info/
1032-
return Decimal.parse((1 / blocks).toString());
1033-
// TODO [prio=med]: Fix fee estimation.
1034-
}
10351023
return Decimal.parse(response.toString());
10361024
} catch (e, s) {
10371025
final String msg = "Error parsing fee rate. Response: $response"

pubspec.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,8 @@ packages:
528528
dependency: "direct main"
529529
description:
530530
path: "."
531-
ref: "0a34f7f48d921fb33f551cb11dfc9b2930522240"
532-
resolved-ref: "0a34f7f48d921fb33f551cb11dfc9b2930522240"
531+
ref: "2897c6448e131241d4d91fe23fdab83305134225"
532+
resolved-ref: "2897c6448e131241d4d91fe23fdab83305134225"
533533
url: "https://github.com/cypherstack/electrum_adapter.git"
534534
source: git
535535
version: "3.0.0"

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ dependencies:
176176
electrum_adapter:
177177
git:
178178
url: https://github.com/cypherstack/electrum_adapter.git
179-
ref: 0a34f7f48d921fb33f551cb11dfc9b2930522240
179+
ref: 2897c6448e131241d4d91fe23fdab83305134225
180180
stream_channel: ^2.1.0
181181

182182
dev_dependencies:

0 commit comments

Comments
 (0)