-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1527 from get10101/configure-fee
feat: configurable fee for sending on chain
- Loading branch information
Showing
18 changed files
with
858 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:get_10101/common/amount_text.dart'; | ||
import 'package:get_10101/common/domain/model.dart'; | ||
import 'package:get_10101/common/fiat_text.dart'; | ||
import 'package:get_10101/features/swap/swap_value_change_notifier.dart'; | ||
import 'package:provider/provider.dart'; | ||
|
||
class AmountAndFiatText extends StatelessWidget { | ||
final Amount amount; | ||
|
||
const AmountAndFiatText({super.key, required this.amount}); | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Selector<SwapValuesChangeNotifier, double>( | ||
selector: (_, provider) => provider.stableValues().price ?? 1.0, | ||
builder: (BuildContext context, double price, Widget? child) => | ||
Column(crossAxisAlignment: CrossAxisAlignment.end, children: [ | ||
AmountText(amount: amount, textStyle: const TextStyle(fontSize: 17)), | ||
Wrap(children: [ | ||
Text("~", style: TextStyle(color: Colors.grey.shade700, fontSize: 15)), | ||
FiatText( | ||
amount: amount.btc / price, | ||
textStyle: TextStyle(color: Colors.grey.shade700, fontSize: 15)) | ||
]) | ||
]), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.