Skip to content

Commit

Permalink
Apply feedback from review
Browse files Browse the repository at this point in the history
  • Loading branch information
erdemyerebasmaz committed Jul 12, 2024
1 parent 2c1c99d commit 3527c30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/bloc/chainswap/chainswap_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class ChainSwapBloc extends Cubit<ChainSwapState> {
OnchainPaymentLimitsResponse onchainLimits,
) {
var limits = outgoing ? onchainLimits.send : onchainLimits.receive;
if ((limits.maxSat != BigInt.zero && amount > limits.maxZeroConfSat) || amount > limits.maxZeroConfSat) {
if (amount > limits.maxSat) {
throw PaymentExceededLimitError(limits.maxSat);
}
if (amount < limits.minSat) {
Expand Down
6 changes: 3 additions & 3 deletions lib/routes/chainswap/receive/receive_chainswap_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ class _ReceiveChainSwapPageState extends State<ReceiveChainSwapPage> {
void initState() {
super.initState();
_doneAction = KeyboardDoneAction(focusNodes: [_amountFocusNode]);
_fetchReverseSwapPairInfo();
_fetchOnchainLimits();
}

void didChangeAppLifecycleState(AppLifecycleState state) {
if (state == AppLifecycleState.resumed) {
_fetchReverseSwapPairInfo();
_fetchOnchainLimits();
}
}

Future _fetchReverseSwapPairInfo() async {
Future _fetchOnchainLimits() async {
final chainSwapBloc = context.read<ChainSwapBloc>();
setState(() {
_onchainPaymentLimitsFuture = chainSwapBloc.fetchOnchainLimits();
Expand Down

0 comments on commit 3527c30

Please sign in to comment.