From 642c5874eda231c8c9cdd3f22d137e2471384a47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Ste=CC=81n?= Date: Thu, 14 Mar 2019 10:01:02 +0800 Subject: [PATCH] Catch the cancel event --- .../components/tx-reviewer/review-submit.controller.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/core/components/tx-reviewer/review-submit.controller.js b/app/core/components/tx-reviewer/review-submit.controller.js index 1ef2ec5..96d3a4c 100644 --- a/app/core/components/tx-reviewer/review-submit.controller.js +++ b/app/core/components/tx-reviewer/review-submit.controller.js @@ -19,9 +19,13 @@ export default /* @ngInject */ function ($scope, Keychain, Signer, Submitter, Tr $scope.operations = humanizer.parse(context.tx); $scope.state = 'signed'; } else { - await Signer.init(context); - await interactiveSign(context); - submit(); + try { + await Signer.init(context); + await interactiveSign(context); + submit(); + } catch (err) { + close(); + } } }