Skip to content

Commit

Permalink
fix: use kebap case for json field and float for value
Browse files Browse the repository at this point in the history
  • Loading branch information
bonomat committed May 9, 2024
1 parent abfee77 commit 68ec64e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions webapp/frontend/lib/common/model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ class FeeRate implements Formattable {
FeeRate(double.parse(value));
}

double get feeRate => _feeRate;

@override
String formatted() {
return _feeRate.toString();
Expand Down
7 changes: 5 additions & 2 deletions webapp/frontend/lib/services/wallet_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ class WalletService {
headers: <String, String>{
'Content-Type': 'application/json; charset=UTF-8',
},
body: jsonEncode(
<String, dynamic>{'address': address, 'amount': amount.sats, 'feeRate': feeRate}));
body: jsonEncode(<String, dynamic>{
'address': address,
'amount': amount.sats,
'fee_rate': feeRate.feeRate
}));

if (response.statusCode != 200) {
throw FlutterError(response.body);
Expand Down

0 comments on commit 68ec64e

Please sign in to comment.