@rango-dev/queue-manager-rango-preset 0.1.12-next.0 → 0.1.12-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2148,9 +2148,11 @@ function _throwOnOK() {
2148
2148
  }));
2149
2149
  return _throwOnOK.apply(this, arguments);
2150
2150
  }
2151
- function cancelSwap(swap) {
2151
+ function cancelSwap(swap, manager) {
2152
+ var _claimQueue2 = claimQueue(),
2153
+ reset = _claimQueue2.reset;
2152
2154
  swap.actions.cancel();
2153
- return updateSwapStatus({
2155
+ var updateResult = updateSwapStatus({
2154
2156
  getStorage: swap.actions.getStorage,
2155
2157
  setStorage: swap.actions.setStorage,
2156
2158
  message: 'Swap canceled by user.',
@@ -2159,6 +2161,9 @@ function cancelSwap(swap) {
2159
2161
  nextStepStatus: 'failed',
2160
2162
  errorCode: 'USER_CANCEL'
2161
2163
  });
2164
+ reset();
2165
+ if (manager) manager == null ? void 0 : manager.retry();
2166
+ return updateResult;
2162
2167
  }
2163
2168
 
2164
2169
  var INTERVAL_FOR_CHECK = 3000;
@@ -2206,7 +2211,7 @@ function _checkTransactionStatus() {
2206
2211
  return _context.abrupt("return");
2207
2212
  case 17:
2208
2213
  outputAmount = ((_status = status) == null ? void 0 : _status.outputAmount) || (!!currentStep.outputAmount ? currentStep.outputAmount : null);
2209
- prevOutputAmount = currentStep.outputAmount;
2214
+ prevOutputAmount = currentStep.outputAmount || null;
2210
2215
  swap.extraMessage = ((_status2 = status) == null ? void 0 : _status2.extraMessage) || swap.extraMessage;
2211
2216
  swap.extraMessageSeverity = MessageSeverity.info;
2212
2217
  swap.extraMessageDetail = '';