Skip to content

Commit

Permalink
Merge pull request #2635 from get10101/fix/fee-rate-parser-webapp
Browse files Browse the repository at this point in the history
fix: fee rate was not parsed correctly
  • Loading branch information
holzeis authored Jul 17, 2024
2 parents 5ae2988 + 33dee30 commit 405cb81
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 405cb81

Please sign in to comment.