mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 17:57:40 +00:00
Merge pull request #779 from cypherstack/fees
Fix fees when returned in scientific notation
This commit is contained in:
commit
97f2262cf0
3 changed files with 3 additions and 15 deletions
|
@ -1020,18 +1020,6 @@ class ElectrumXClient {
|
|||
],
|
||||
);
|
||||
try {
|
||||
// If the response is -1 or null, return a temporary hardcoded value for
|
||||
// Dogecoin. This is a temporary fix until the fee estimation is fixed.
|
||||
if (coin == Coin.dogecoin &&
|
||||
(response == null ||
|
||||
response == -1 ||
|
||||
Decimal.parse(response.toString()) == Decimal.parse("-1"))) {
|
||||
// Return 0.05 for slow, 0.2 for average, and 1 for fast txs.
|
||||
// These numbers produce tx fees in line with txs in the wild on
|
||||
// https://dogechain.info/
|
||||
return Decimal.parse((1 / blocks).toString());
|
||||
// TODO [prio=med]: Fix fee estimation.
|
||||
}
|
||||
return Decimal.parse(response.toString());
|
||||
} catch (e, s) {
|
||||
final String msg = "Error parsing fee rate. Response: $response"
|
||||
|
|
|
@ -528,8 +528,8 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
path: "."
|
||||
ref: "0a34f7f48d921fb33f551cb11dfc9b2930522240"
|
||||
resolved-ref: "0a34f7f48d921fb33f551cb11dfc9b2930522240"
|
||||
ref: "2897c6448e131241d4d91fe23fdab83305134225"
|
||||
resolved-ref: "2897c6448e131241d4d91fe23fdab83305134225"
|
||||
url: "https://github.com/cypherstack/electrum_adapter.git"
|
||||
source: git
|
||||
version: "3.0.0"
|
||||
|
|
|
@ -176,7 +176,7 @@ dependencies:
|
|||
electrum_adapter:
|
||||
git:
|
||||
url: https://github.com/cypherstack/electrum_adapter.git
|
||||
ref: 0a34f7f48d921fb33f551cb11dfc9b2930522240
|
||||
ref: 2897c6448e131241d4d91fe23fdab83305134225
|
||||
stream_channel: ^2.1.0
|
||||
|
||||
dev_dependencies:
|
||||
|
|
Loading…
Reference in a new issue