diff --git a/src/providers/confirmer/confirmer-provider.tsx b/src/providers/confirmer/confirmer-provider.tsx index 49a857e..86c6052 100644 --- a/src/providers/confirmer/confirmer-provider.tsx +++ b/src/providers/confirmer/confirmer-provider.tsx @@ -18,11 +18,16 @@ const ConfirmerProvider: React.FC = ({ children }) => { var promise = new Promise((resolve, reject) => { defered.resolver = resolve; defered.rejecter = reject; - }).then((result) => { - console.log("Confirming", state); - setState(undefined); - return result; - }); + }) + .then((result) => { + console.log("Confirming", state); + setState(undefined); + return result; + }) + .catch((err) => { + setState(undefined); + throw err; + }); console.log("Confirming", state); setState({ ...state, defered: defered });