Skip to content

Commit

Permalink
fix: fee rate was not parsed correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
bonomat committed Jul 17, 2024
1 parent 288de5b commit 33dee30
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions webapp/frontend/lib/common/model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,9 @@ class FeeRate implements Formattable {
_feeRate = feeRate;
}

FeeRate.parse(String value) {
FeeRate(double.parse(value));
factory FeeRate.parse(String feeRateString) {
double parsedRate = double.tryParse(feeRateString) ?? 1.0;
return FeeRate(parsedRate);
}

double get feeRate => _feeRate;
Expand Down

0 comments on commit 33dee30

Please sign in to comment.