mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-18 05:51:34 +02:00
CAKE-185 | added validation of amount for xmr.to provider in the exchange_page.dart; added isValidAmount() to exchange_view_model.dart
This commit is contained in:
@@ -411,7 +411,18 @@ class ExchangePage extends BasePage {
|
||||
buttonAction: () => Navigator.of(context).pop());
|
||||
});
|
||||
} else {
|
||||
exchangeViewModel.createTrade();
|
||||
exchangeViewModel.isValidAmount()
|
||||
? exchangeViewModel.createTrade()
|
||||
: showPopUp<void>(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return AlertWithOneAction(
|
||||
alertTitle: 'XMR.TO error',
|
||||
alertContent: 'Invalid amount. Maximum limit 8 digits after the decimal point ',
|
||||
buttonText: S.of(context).ok,
|
||||
buttonAction: () =>
|
||||
Navigator.of(context).pop());
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user