Payments
This commit is contained in:
parent
7439b4f652
commit
7b72d526a9
|
|
@ -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));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue