diff --git a/docs/bundle.js b/docs/bundle.js index 9fbe86b..db6d6f6 100644 --- a/docs/bundle.js +++ b/docs/bundle.js @@ -211898,7 +211898,7 @@ function _cancelOrder() { case 0: _context11.prev = 0; if (!window.getOfflineSignerAuto) { - _context11.next = 27; + _context11.next = 29; break; } _context11.next = 4; @@ -211941,32 +211941,34 @@ function _cancelOrder() { modalTitle: "Please Wait" }); _context11.prev = 15; - _context11.next = 18; + ui_hideResponse(); + ui_hideError(); + _context11.next = 20; return client.signAndBroadcast(walletAddress, [msg], gasFee, "by https://jasbanza.github.io/autoswap-cancel-orders"); - case 18: + case 20: result = _context11.sent; ui_showResponse(result); ui_removeOrder(orderId); - _context11.next = 26; + _context11.next = 28; break; - case 23: - _context11.prev = 23; + case 25: + _context11.prev = 25; _context11.t0 = _context11["catch"](15); ui_showError(_context11.t0.message); - case 26: + case 28: ui_hideLoadingMask(); - case 27: - _context11.next = 32; - break; case 29: - _context11.prev = 29; + _context11.next = 34; + break; + case 31: + _context11.prev = 31; _context11.t1 = _context11["catch"](0); console.error(_context11.t1); - case 32: + case 34: case "end": return _context11.stop(); } - }, _callee11, null, [[0, 29], [15, 23]]); + }, _callee11, null, [[0, 31], [15, 25]]); })); return _cancelOrder.apply(this, arguments); } diff --git a/src/index.js b/src/index.js index c595444..6b99ce5 100644 --- a/src/index.js +++ b/src/index.js @@ -210,10 +210,11 @@ async function cancelOrder(orderId) { ui_showLoadingMask({ modalMessage: "Broadcasting Transaction...", modalTitle: "Please Wait" }); try { + ui_hideResponse(); + ui_hideError(); const result = await client.signAndBroadcast(walletAddress, [msg], gasFee, "by https://jasbanza.github.io/autoswap-cancel-orders"); ui_showResponse(result); ui_removeOrder(orderId); - } catch (error) { ui_showError(error.message); }