@rango-dev/queue-manager-rango-preset 0.1.10-next.102 → 0.1.10-next.104

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/queue-manager-rango-preset",
3
- "version": "0.1.10-next.102",
3
+ "version": "0.1.10-next.104",
4
4
  "license": "MIT",
5
5
  "module": "dist/queue-manager-rango-preset.esm.js",
6
6
  "main": "dist/index.js",
@@ -209,7 +209,6 @@ async function checkApprovalStatus({
209
209
  });
210
210
  }
211
211
  } catch (e) {
212
- console.error('Failed to check getApprovedAmount', e);
213
212
  isApproved = false;
214
213
  }
215
214
  if (isApproved) {
@@ -79,7 +79,7 @@ export async function executeTransaction(
79
79
  */
80
80
  const needsToBlockQueue = isNeedBlockQueueForParallel(currentStep);
81
81
 
82
- if (needsToBlockQueue && !isClaimed && context.claimedBy) {
82
+ if (needsToBlockQueue && !isClaimed) {
83
83
  const blockedFor = {
84
84
  reason: BlockReason.DEPENDS_ON_OTHER_QUEUES,
85
85
  description: 'Waiting for other swaps to complete',
package/src/helpers.ts CHANGED
@@ -510,7 +510,6 @@ export async function isNetworkMatchedForTransaction(
510
510
  providers: Providers
511
511
  ): Promise<boolean> {
512
512
  if (isWalletNull(wallet)) {
513
- console.warn('wallet object is null');
514
513
  return false;
515
514
  }
516
515
  const fromBlockChain = getCurrentBlockchainOfOrNull(swap, step);
@@ -746,6 +745,8 @@ export function onDependsOnOtherQueues(
746
745
  const claimerId = claimedBy();
747
746
  const isClaimedByAnyQueue = !!claimerId;
748
747
 
748
+ if (claimerId === queue.id) return;
749
+
749
750
  // Check if any queue `claimed` before, if yes, we don't should do anything.
750
751
  if (isClaimedByAnyQueue) {
751
752
  // We need to keep the latest swap messages
@@ -781,7 +782,7 @@ export function onDependsOnOtherQueues(
781
782
  resetClaimedBy: () => {
782
783
  reset();
783
784
  // TODO: Use key generator
784
- retryOn(`${type}-${network}-${address}`, context.notifier, manager);
785
+ retryOn(`${type}-${network}:${address}`, context.notifier, manager);
785
786
  },
786
787
  });
787
788
  }
@@ -869,7 +870,6 @@ export function singTransaction(
869
870
  .signAndSendTx(evmApprovalTransaction, walletAddress, null)
870
871
  .then(
871
872
  (hash) => {
872
- console.debug('transaction of approval minted successfully', hash);
873
873
  const approveUrl = getEvmApproveUrl(
874
874
  hash,
875
875
  getCurrentBlockchainOf(swap, currentStep),
@@ -889,7 +889,7 @@ export function singTransaction(
889
889
 
890
890
  (error) => {
891
891
  if (swap.status === 'failed') return;
892
- console.debug('error in approving', error);
892
+
893
893
  const { extraMessage, extraMessageDetail, extraMessageErrorCode } =
894
894
  prettifyErrorMessage(error);
895
895
  if (
@@ -952,7 +952,6 @@ export function singTransaction(
952
952
  .signAndSendTx(tronApprovalTransaction, walletAddress, null)
953
953
  .then(
954
954
  (hash) => {
955
- console.debug('transaction of approval minted successfully', hash);
956
955
  const approveUrl = getTronApproveUrl(hash);
957
956
  setStepTransactionIds(
958
957
  actions,
@@ -968,7 +967,7 @@ export function singTransaction(
968
967
 
969
968
  (error) => {
970
969
  if (swap.status === 'failed') return;
971
- console.debug('error in approving', error);
970
+
972
971
  const { extraMessage, extraMessageDetail, extraMessageErrorCode } =
973
972
  prettifyErrorMessage(error);
974
973
  if (
@@ -1031,7 +1030,6 @@ export function singTransaction(
1031
1030
  .signAndSendTx(starknetApprovalTransaction, walletAddress, null)
1032
1031
  .then(
1033
1032
  (hash) => {
1034
- console.debug('transaction of approval minted successfully', hash);
1035
1033
  const approveUrl = getStarknetApproveUrl(hash);
1036
1034
  setStepTransactionIds(
1037
1035
  actions,
@@ -1047,7 +1045,7 @@ export function singTransaction(
1047
1045
 
1048
1046
  (error) => {
1049
1047
  if (swap.status === 'failed') return;
1050
- console.debug('error in approving', error);
1048
+
1051
1049
  const { extraMessage, extraMessageDetail, extraMessageErrorCode } =
1052
1050
  prettifyErrorMessage(error);
1053
1051
  if (