Merge pull request #129 from cake-tech/CAKE-135-validation-alert

CAKE-135 | removed validation alert in the send and exchange pages wh…
This commit is contained in:
M 2020-10-30 19:36:09 +02:00
commit 8117a993f1
3 changed files with 9 additions and 2 deletions

View file

@ -61,7 +61,10 @@ class ExchangePage extends BasePage {
@override
Widget trailing(BuildContext context) => TrailButton(
caption: S.of(context).reset, onPressed: () => exchangeViewModel.reset());
caption: S.of(context).reset, onPressed: () {
_formKey.currentState.reset();
exchangeViewModel.reset();
});
@override
Widget body(BuildContext context) {

View file

@ -70,7 +70,10 @@ class SendPage extends BasePage {
@override
Widget trailing(context) => TrailButton(
caption: S.of(context).clear, onPressed: () => sendViewModel.reset());
caption: S.of(context).clear, onPressed: () {
_formKey.currentState.reset();
sendViewModel.reset();
});
@override
Widget body(BuildContext context) {

View file

@ -107,6 +107,7 @@ abstract class SendViewModelBase with Store {
@action
void reset() {
sendAll = false;
cryptoAmount = '';
fiatAmount = '';
address = '';