@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.
- package/dist/helpers.d.ts +1 -1
- package/dist/helpers.d.ts.map +1 -1
- package/dist/queue-manager-rango-preset.cjs.development.js +8 -3
- package/dist/queue-manager-rango-preset.cjs.development.js.map +1 -1
- package/dist/queue-manager-rango-preset.cjs.production.min.js +1 -1
- package/dist/queue-manager-rango-preset.cjs.production.min.js.map +1 -1
- package/dist/queue-manager-rango-preset.esm.js +8 -3
- package/dist/queue-manager-rango-preset.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/actions/checkStatus.ts +1 -1
- package/src/helpers.ts +11 -2
package/package.json
CHANGED
|
@@ -56,7 +56,7 @@ async function checkTransactionStatus({
|
|
|
56
56
|
const outputAmount: string | null =
|
|
57
57
|
status?.outputAmount ||
|
|
58
58
|
(!!currentStep.outputAmount ? currentStep.outputAmount : null);
|
|
59
|
-
const prevOutputAmount = currentStep.outputAmount;
|
|
59
|
+
const prevOutputAmount = currentStep.outputAmount || null;
|
|
60
60
|
swap.extraMessage = status?.extraMessage || swap.extraMessage;
|
|
61
61
|
swap.extraMessageSeverity = MessageSeverity.info;
|
|
62
62
|
swap.extraMessageDetail = '';
|
package/src/helpers.ts
CHANGED
|
@@ -1755,12 +1755,17 @@ export async function throwOnOK(
|
|
|
1755
1755
|
}
|
|
1756
1756
|
}
|
|
1757
1757
|
|
|
1758
|
-
export function cancelSwap(
|
|
1758
|
+
export function cancelSwap(
|
|
1759
|
+
swap: QueueInfo,
|
|
1760
|
+
manager?: Manager
|
|
1761
|
+
): {
|
|
1759
1762
|
swap: PendingSwap;
|
|
1760
1763
|
step: PendingSwapStep | null;
|
|
1761
1764
|
} {
|
|
1765
|
+
const { reset } = claimQueue();
|
|
1762
1766
|
swap.actions.cancel();
|
|
1763
|
-
|
|
1767
|
+
|
|
1768
|
+
const updateResult = updateSwapStatus({
|
|
1764
1769
|
getStorage: swap.actions.getStorage,
|
|
1765
1770
|
setStorage: swap.actions.setStorage,
|
|
1766
1771
|
message: 'Swap canceled by user.',
|
|
@@ -1770,4 +1775,8 @@ export function cancelSwap(swap: QueueInfo): {
|
|
|
1770
1775
|
nextStepStatus: 'failed',
|
|
1771
1776
|
errorCode: 'USER_CANCEL',
|
|
1772
1777
|
});
|
|
1778
|
+
reset();
|
|
1779
|
+
if (manager) manager?.retry();
|
|
1780
|
+
|
|
1781
|
+
return updateResult;
|
|
1773
1782
|
}
|