This commit is contained in:
Hillel Coren 2018-08-31 00:06:22 -07:00
parent 7439b4f652
commit 7b72d526a9
1 changed files with 2 additions and 2 deletions

View File

@ -45,7 +45,7 @@ Middleware<AppState> _editPayment() {
await Navigator.of(action.context).pushNamed(PaymentEditScreen.route); await Navigator.of(action.context).pushNamed(PaymentEditScreen.route);
if (action.completer != null && payment != null) { if (action.completer != null && payment != null) {
action.completer.complete(payment); action.completer.complete(null);
} }
}; };
} }
@ -149,7 +149,7 @@ Middleware<AppState> _savePayment(PaymentRepository repository) {
} else { } else {
store.dispatch(SavePaymentSuccess(payment)); store.dispatch(SavePaymentSuccess(payment));
} }
action.completer.complete(payment); action.completer.complete(null);
}).catchError((Object error) { }).catchError((Object error) {
print(error); print(error);
store.dispatch(SavePaymentFailure(error)); store.dispatch(SavePaymentFailure(error));