@rango-dev/queue-manager-rango-preset 0.54.1-next.1 → 0.55.1-next.0

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.
@@ -1 +1 @@
1
- {"inputs":{"src/configs.ts":{"bytes":816,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/types.ts":{"bytes":7700,"imports":[],"format":"esm"},"src/constants.ts":{"bytes":742,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/services/httpService.ts":{"bytes":284,"imports":[{"path":"rango-sdk","kind":"import-statement","external":true},{"path":"src/configs.ts","kind":"import-statement","original":"../configs"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/services/index.ts":{"bytes":45,"imports":[{"path":"src/services/httpService.ts","kind":"import-statement","original":"./httpService"}],"format":"esm"},"src/numbers.ts":{"bytes":1637,"imports":[{"path":"bignumber.js","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/shared-errors.ts":{"bytes":4547,"imports":[{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"./constants"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/shared.ts":{"bytes":12672,"imports":[{"path":"bignumber.js","kind":"import-statement","external":true},{"path":"src/numbers.ts","kind":"import-statement","original":"./numbers"},{"path":"src/shared-errors.ts","kind":"import-statement","original":"./shared-errors"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/services/eventEmitter.ts":{"bytes":8276,"imports":[{"path":"src/configs.ts","kind":"import-statement","original":"../configs"},{"path":"src/helpers.ts","kind":"import-statement","original":"../helpers"},{"path":"src/shared.ts","kind":"import-statement","original":"../shared"},{"path":"src/types.ts","kind":"import-statement","original":"../types"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/helpers.ts":{"bytes":44611,"imports":[{"path":"@rango-dev/logging-core","kind":"import-statement","external":true},{"path":"@rango-dev/queue-manager-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"bignumber.js","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"./constants"},{"path":"src/services/index.ts","kind":"import-statement","original":"./services"},{"path":"src/services/eventEmitter.ts","kind":"import-statement","original":"./services/eventEmitter"},{"path":"src/shared.ts","kind":"import-statement","original":"./shared"},{"path":"src/shared-errors.ts","kind":"import-statement","original":"./shared-errors"},{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/actions/checkStatus.ts":{"bytes":17008,"imports":[{"path":"@rango-dev/logging-core","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/helpers.ts","kind":"import-statement","original":"../helpers"},{"path":"src/services/index.ts","kind":"import-statement","original":"../services"},{"path":"src/services/eventEmitter.ts","kind":"import-statement","original":"../services/eventEmitter"},{"path":"src/shared.ts","kind":"import-statement","original":"../shared"},{"path":"src/shared-errors.ts","kind":"import-statement","original":"../shared-errors"},{"path":"src/types.ts","kind":"import-statement","original":"../types"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/actions/createTransaction.ts":{"bytes":3220,"imports":[{"path":"@rango-dev/logging-core","kind":"import-statement","external":true},{"path":"src/helpers.ts","kind":"import-statement","original":"../helpers"},{"path":"src/services/index.ts","kind":"import-statement","original":"../services"},{"path":"src/services/eventEmitter.ts","kind":"import-statement","original":"../services/eventEmitter"},{"path":"src/shared-errors.ts","kind":"import-statement","original":"../shared-errors"},{"path":"src/types.ts","kind":"import-statement","original":"../types"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/actions/common/utils.ts":{"bytes":645,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/actions/common/checkEnvironmentBeforeExecuteTransaction.ts":{"bytes":4916,"imports":[{"path":"rango-types","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"../../constants"},{"path":"src/helpers.ts","kind":"import-statement","original":"../../helpers"},{"path":"src/shared.ts","kind":"import-statement","original":"../../shared"},{"path":"src/types.ts","kind":"import-statement","original":"../../types"},{"path":"src/actions/common/utils.ts","kind":"import-statement","original":"./utils"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/actions/common/produceNextStateForTransaction.ts":{"bytes":4634,"imports":[{"path":"ts-results","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"../../constants"},{"path":"src/helpers.ts","kind":"import-statement","original":"../../helpers"},{"path":"src/services/eventEmitter.ts","kind":"import-statement","original":"../../services/eventEmitter"},{"path":"src/shared.ts","kind":"import-statement","original":"../../shared"},{"path":"src/types.ts","kind":"import-statement","original":"../../types"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/actions/executeTransaction/executeTransaction.ts":{"bytes":3262,"imports":[{"path":"src/helpers.ts","kind":"import-statement","original":"../../helpers"},{"path":"src/shared.ts","kind":"import-statement","original":"../../shared"},{"path":"src/actions/common/checkEnvironmentBeforeExecuteTransaction.ts","kind":"import-statement","original":"../common/checkEnvironmentBeforeExecuteTransaction"},{"path":"src/actions/common/produceNextStateForTransaction.ts","kind":"import-statement","original":"../common/produceNextStateForTransaction"},{"path":"src/actions/common/utils.ts","kind":"import-statement","original":"../common/utils"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/actions/executeTransaction/index.ts":{"bytes":62,"imports":[{"path":"src/actions/executeTransaction/executeTransaction.ts","kind":"import-statement","original":"./executeTransaction.js"}],"format":"esm"},"src/actions/scheduleNextStep.ts":{"bytes":2758,"imports":[{"path":"src/helpers.ts","kind":"import-statement","original":"../helpers"},{"path":"src/services/eventEmitter.ts","kind":"import-statement","original":"../services/eventEmitter"},{"path":"src/types.ts","kind":"import-statement","original":"../types"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/actions/start.ts":{"bytes":484,"imports":[{"path":"@rango-dev/queue-manager-core","kind":"import-statement","external":true},{"path":"src/types.ts","kind":"import-statement","original":"../types"},{"path":"src/services/eventEmitter.ts","kind":"import-statement","original":"../services/eventEmitter"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/queueDef.ts":{"bytes":1523,"imports":[{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"src/actions/checkStatus.ts","kind":"import-statement","original":"./actions/checkStatus"},{"path":"src/actions/createTransaction.ts","kind":"import-statement","original":"./actions/createTransaction"},{"path":"src/actions/executeTransaction/index.ts","kind":"import-statement","original":"./actions/executeTransaction"},{"path":"src/actions/scheduleNextStep.ts","kind":"import-statement","original":"./actions/scheduleNextStep"},{"path":"src/actions/start.ts","kind":"import-statement","original":"./actions/start"},{"path":"src/helpers.ts","kind":"import-statement","original":"./helpers"}],"format":"esm"},"src/migration.ts":{"bytes":3321,"imports":[{"path":"@rango-dev/queue-manager-core","kind":"import-statement","external":true},{"path":"uuid","kind":"import-statement","external":true},{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hooks.ts":{"bytes":2290,"imports":[{"path":"@rango-dev/queue-manager-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"src/helpers.ts","kind":"import-statement","original":"./helpers"},{"path":"src/migration.ts","kind":"import-statement","original":"./migration"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":1522,"imports":[{"path":"src/configs.ts","kind":"import-statement","original":"./configs"},{"path":"src/queueDef.ts","kind":"import-statement","original":"./queueDef"},{"path":"src/shared-errors.ts","kind":"import-statement","original":"./shared-errors"},{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"src/shared.ts","kind":"import-statement","original":"./shared"},{"path":"src/helpers.ts","kind":"import-statement","original":"./helpers"},{"path":"src/hooks.ts","kind":"import-statement","original":"./hooks"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":190887},"dist/index.js":{"imports":[{"path":"@rango-dev/logging-core","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"@rango-dev/logging-core","kind":"import-statement","external":true},{"path":"@rango-dev/queue-manager-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"bignumber.js","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"rango-sdk","kind":"import-statement","external":true},{"path":"bignumber.js","kind":"import-statement","external":true},{"path":"bignumber.js","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"@rango-dev/logging-core","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@rango-dev/queue-manager-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/queue-manager-core","kind":"import-statement","external":true},{"path":"uuid","kind":"import-statement","external":true}],"exports":["EventSeverity","MessageSeverity","PrettyError","RouteEventType","StepEventType","StepExecutionBlockedEventStatus","StepExecutionEventStatus","WidgetEvents","calculatePendingSwap","cancelSwap","checkWaitingForNetworkChange","getCurrentNamespaceOfOrNull","getCurrentStep","getLastSuccessfulStep","getRelatedWallet","getRelatedWalletOrNull","getRequiredWallet","getRunningSwaps","getUsdPrice","isApprovalTX","makeQueueDefinition","prettifyErrorMessage","resetRunningSwapNotifsOnPageLoad","updateSwapStatus","useMigration","useQueueManager"],"entryPoint":"src/index.ts","inputs":{"src/configs.ts":{"bytesInOutput":167},"src/types.ts":{"bytesInOutput":846},"src/actions/checkStatus.ts":{"bytesInOutput":6227},"src/helpers.ts":{"bytesInOutput":15354},"src/constants.ts":{"bytesInOutput":431},"src/services/httpService.ts":{"bytesInOutput":118},"src/services/index.ts":{"bytesInOutput":0},"src/shared.ts":{"bytesInOutput":5345},"src/numbers.ts":{"bytesInOutput":689},"src/shared-errors.ts":{"bytesInOutput":2212},"src/services/eventEmitter.ts":{"bytesInOutput":3594},"src/actions/createTransaction.ts":{"bytesInOutput":1035},"src/actions/common/checkEnvironmentBeforeExecuteTransaction.ts":{"bytesInOutput":1311},"src/actions/common/utils.ts":{"bytesInOutput":203},"src/actions/common/produceNextStateForTransaction.ts":{"bytesInOutput":1781},"src/actions/executeTransaction/executeTransaction.ts":{"bytesInOutput":557},"src/actions/executeTransaction/index.ts":{"bytesInOutput":0},"src/actions/scheduleNextStep.ts":{"bytesInOutput":804},"src/actions/start.ts":{"bytesInOutput":155},"src/queueDef.ts":{"bytesInOutput":340},"src/index.ts":{"bytesInOutput":59},"src/hooks.ts":{"bytesInOutput":652},"src/migration.ts":{"bytesInOutput":1138}},"bytes":43774}}}
1
+ {"inputs":{"src/configs.ts":{"bytes":816,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/types.ts":{"bytes":7700,"imports":[],"format":"esm"},"src/constants.ts":{"bytes":742,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/services/httpService.ts":{"bytes":284,"imports":[{"path":"rango-sdk","kind":"import-statement","external":true},{"path":"src/configs.ts","kind":"import-statement","original":"../configs"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/services/index.ts":{"bytes":45,"imports":[{"path":"src/services/httpService.ts","kind":"import-statement","original":"./httpService"}],"format":"esm"},"src/numbers.ts":{"bytes":1637,"imports":[{"path":"bignumber.js","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/shared-errors.ts":{"bytes":4547,"imports":[{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"./constants"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/shared.ts":{"bytes":12672,"imports":[{"path":"bignumber.js","kind":"import-statement","external":true},{"path":"src/numbers.ts","kind":"import-statement","original":"./numbers"},{"path":"src/shared-errors.ts","kind":"import-statement","original":"./shared-errors"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/services/eventEmitter.ts":{"bytes":8276,"imports":[{"path":"src/configs.ts","kind":"import-statement","original":"../configs"},{"path":"src/helpers.ts","kind":"import-statement","original":"../helpers"},{"path":"src/shared.ts","kind":"import-statement","original":"../shared"},{"path":"src/types.ts","kind":"import-statement","original":"../types"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/helpers.ts":{"bytes":45345,"imports":[{"path":"@rango-dev/logging-core","kind":"import-statement","external":true},{"path":"@rango-dev/queue-manager-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"bignumber.js","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"./constants"},{"path":"src/services/index.ts","kind":"import-statement","original":"./services"},{"path":"src/services/eventEmitter.ts","kind":"import-statement","original":"./services/eventEmitter"},{"path":"src/shared.ts","kind":"import-statement","original":"./shared"},{"path":"src/shared-errors.ts","kind":"import-statement","original":"./shared-errors"},{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/actions/checkStatus.ts":{"bytes":17008,"imports":[{"path":"@rango-dev/logging-core","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/helpers.ts","kind":"import-statement","original":"../helpers"},{"path":"src/services/index.ts","kind":"import-statement","original":"../services"},{"path":"src/services/eventEmitter.ts","kind":"import-statement","original":"../services/eventEmitter"},{"path":"src/shared.ts","kind":"import-statement","original":"../shared"},{"path":"src/shared-errors.ts","kind":"import-statement","original":"../shared-errors"},{"path":"src/types.ts","kind":"import-statement","original":"../types"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/actions/createTransaction.ts":{"bytes":3220,"imports":[{"path":"@rango-dev/logging-core","kind":"import-statement","external":true},{"path":"src/helpers.ts","kind":"import-statement","original":"../helpers"},{"path":"src/services/index.ts","kind":"import-statement","original":"../services"},{"path":"src/services/eventEmitter.ts","kind":"import-statement","original":"../services/eventEmitter"},{"path":"src/shared-errors.ts","kind":"import-statement","original":"../shared-errors"},{"path":"src/types.ts","kind":"import-statement","original":"../types"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/actions/common/utils.ts":{"bytes":645,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/actions/common/checkEnvironmentBeforeExecuteTransaction.ts":{"bytes":4946,"imports":[{"path":"rango-types","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"../../constants"},{"path":"src/helpers.ts","kind":"import-statement","original":"../../helpers"},{"path":"src/shared.ts","kind":"import-statement","original":"../../shared"},{"path":"src/types.ts","kind":"import-statement","original":"../../types"},{"path":"src/actions/common/utils.ts","kind":"import-statement","original":"./utils"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/actions/common/produceNextStateForTransaction.ts":{"bytes":4634,"imports":[{"path":"ts-results","kind":"import-statement","external":true},{"path":"src/constants.ts","kind":"import-statement","original":"../../constants"},{"path":"src/helpers.ts","kind":"import-statement","original":"../../helpers"},{"path":"src/services/eventEmitter.ts","kind":"import-statement","original":"../../services/eventEmitter"},{"path":"src/shared.ts","kind":"import-statement","original":"../../shared"},{"path":"src/types.ts","kind":"import-statement","original":"../../types"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/actions/executeTransaction/executeTransaction.ts":{"bytes":3262,"imports":[{"path":"src/helpers.ts","kind":"import-statement","original":"../../helpers"},{"path":"src/shared.ts","kind":"import-statement","original":"../../shared"},{"path":"src/actions/common/checkEnvironmentBeforeExecuteTransaction.ts","kind":"import-statement","original":"../common/checkEnvironmentBeforeExecuteTransaction"},{"path":"src/actions/common/produceNextStateForTransaction.ts","kind":"import-statement","original":"../common/produceNextStateForTransaction"},{"path":"src/actions/common/utils.ts","kind":"import-statement","original":"../common/utils"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/actions/executeTransaction/index.ts":{"bytes":62,"imports":[{"path":"src/actions/executeTransaction/executeTransaction.ts","kind":"import-statement","original":"./executeTransaction.js"}],"format":"esm"},"src/actions/scheduleNextStep.ts":{"bytes":2758,"imports":[{"path":"src/helpers.ts","kind":"import-statement","original":"../helpers"},{"path":"src/services/eventEmitter.ts","kind":"import-statement","original":"../services/eventEmitter"},{"path":"src/types.ts","kind":"import-statement","original":"../types"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/actions/start.ts":{"bytes":484,"imports":[{"path":"@rango-dev/queue-manager-core","kind":"import-statement","external":true},{"path":"src/types.ts","kind":"import-statement","original":"../types"},{"path":"src/services/eventEmitter.ts","kind":"import-statement","original":"../services/eventEmitter"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/queueDef.ts":{"bytes":1523,"imports":[{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"src/actions/checkStatus.ts","kind":"import-statement","original":"./actions/checkStatus"},{"path":"src/actions/createTransaction.ts","kind":"import-statement","original":"./actions/createTransaction"},{"path":"src/actions/executeTransaction/index.ts","kind":"import-statement","original":"./actions/executeTransaction"},{"path":"src/actions/scheduleNextStep.ts","kind":"import-statement","original":"./actions/scheduleNextStep"},{"path":"src/actions/start.ts","kind":"import-statement","original":"./actions/start"},{"path":"src/helpers.ts","kind":"import-statement","original":"./helpers"}],"format":"esm"},"src/migration.ts":{"bytes":3321,"imports":[{"path":"@rango-dev/queue-manager-core","kind":"import-statement","external":true},{"path":"uuid","kind":"import-statement","external":true},{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hooks.ts":{"bytes":2290,"imports":[{"path":"@rango-dev/queue-manager-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"src/helpers.ts","kind":"import-statement","original":"./helpers"},{"path":"src/migration.ts","kind":"import-statement","original":"./migration"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":1522,"imports":[{"path":"src/configs.ts","kind":"import-statement","original":"./configs"},{"path":"src/queueDef.ts","kind":"import-statement","original":"./queueDef"},{"path":"src/shared-errors.ts","kind":"import-statement","original":"./shared-errors"},{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"src/shared.ts","kind":"import-statement","original":"./shared"},{"path":"src/helpers.ts","kind":"import-statement","original":"./helpers"},{"path":"src/hooks.ts","kind":"import-statement","original":"./hooks"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":192043},"dist/index.js":{"imports":[{"path":"@rango-dev/logging-core","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"@rango-dev/logging-core","kind":"import-statement","external":true},{"path":"@rango-dev/queue-manager-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"bignumber.js","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"rango-sdk","kind":"import-statement","external":true},{"path":"bignumber.js","kind":"import-statement","external":true},{"path":"bignumber.js","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"@rango-dev/logging-core","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@rango-dev/queue-manager-react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/queue-manager-core","kind":"import-statement","external":true},{"path":"uuid","kind":"import-statement","external":true}],"exports":["EventSeverity","MessageSeverity","PrettyError","RouteEventType","StepEventType","StepExecutionBlockedEventStatus","StepExecutionEventStatus","WidgetEvents","calculatePendingSwap","cancelSwap","checkWaitingForNetworkChange","getCurrentNamespaceOfOrNull","getCurrentStep","getLastSuccessfulStep","getRelatedWallet","getRelatedWalletOrNull","getRequiredWallet","getRunningSwaps","getUsdPrice","isApprovalTX","makeQueueDefinition","prettifyErrorMessage","resetRunningSwapNotifsOnPageLoad","updateSwapStatus","useMigration","useQueueManager"],"entryPoint":"src/index.ts","inputs":{"src/configs.ts":{"bytesInOutput":167},"src/types.ts":{"bytesInOutput":846},"src/actions/checkStatus.ts":{"bytesInOutput":6227},"src/helpers.ts":{"bytesInOutput":15553},"src/constants.ts":{"bytesInOutput":431},"src/services/httpService.ts":{"bytesInOutput":118},"src/services/index.ts":{"bytesInOutput":0},"src/shared.ts":{"bytesInOutput":5345},"src/numbers.ts":{"bytesInOutput":689},"src/shared-errors.ts":{"bytesInOutput":2212},"src/services/eventEmitter.ts":{"bytesInOutput":3594},"src/actions/createTransaction.ts":{"bytesInOutput":1035},"src/actions/common/checkEnvironmentBeforeExecuteTransaction.ts":{"bytesInOutput":1327},"src/actions/common/utils.ts":{"bytesInOutput":203},"src/actions/common/produceNextStateForTransaction.ts":{"bytesInOutput":1781},"src/actions/executeTransaction/executeTransaction.ts":{"bytesInOutput":557},"src/actions/executeTransaction/index.ts":{"bytesInOutput":0},"src/actions/scheduleNextStep.ts":{"bytesInOutput":804},"src/actions/start.ts":{"bytesInOutput":155},"src/queueDef.ts":{"bytesInOutput":340},"src/index.ts":{"bytesInOutput":59},"src/hooks.ts":{"bytesInOutput":652},"src/migration.ts":{"bytesInOutput":1138}},"bytes":43989}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/queue-manager-rango-preset",
3
- "version": "0.54.1-next.1",
3
+ "version": "0.55.1-next.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/index.ts",
@@ -115,7 +115,7 @@ async function ensureWalletIsOnCorrectNetwork(
115
115
  actions: ExecuterActions<SwapStorage, SwapActionTypes, SwapQueueContext>
116
116
  ): Promise<Result<true, BlockedReason>> {
117
117
  const { getStorage, context } = actions;
118
- const { meta, wallets, providers } = context;
118
+ const { meta, wallets, providers, hubProvider } = context;
119
119
  const swap = getStorage().swapDetails;
120
120
  const currentStep = getCurrentStep(swap)!;
121
121
 
@@ -124,7 +124,8 @@ async function ensureWalletIsOnCorrectNetwork(
124
124
  currentStep,
125
125
  wallets,
126
126
  meta,
127
- providers
127
+ providers,
128
+ hubProvider
128
129
  );
129
130
 
130
131
  const { claimedBy } = claimQueue();
package/src/helpers.ts CHANGED
@@ -20,6 +20,7 @@ import type {
20
20
  QueueType,
21
21
  SetStorage,
22
22
  } from '@rango-dev/queue-manager-core';
23
+ import type { Provider } from '@rango-dev/wallets-core';
23
24
  import type {
24
25
  Meta,
25
26
  Network,
@@ -675,6 +676,27 @@ async function getChainId(provider: any): Promise<string | number | null> {
675
676
  }
676
677
  }
677
678
 
679
+ export async function getProviderChainId(
680
+ providers: Providers,
681
+ hubProvider: (type: WalletType) => Provider,
682
+ walletType: string
683
+ ) {
684
+ const legacyProvider = getEvmProvider(providers, walletType);
685
+ if (legacyProvider) {
686
+ const chainId = await getChainId(legacyProvider);
687
+ return chainId;
688
+ }
689
+
690
+ // Legacy provider was not found, try to get the chain id from hub provider.
691
+ const provider = hubProvider(walletType);
692
+ const evmNamespace = provider.get('evm');
693
+ if (!evmNamespace) {
694
+ throw new Error('EVM namespace not found for wallet type: ' + walletType);
695
+ }
696
+ const chainId = evmNamespace.getChainId();
697
+ return chainId;
698
+ }
699
+
678
700
  /**
679
701
  * For running a swap safely, we need to make sure about the state of wallet
680
702
  * which means the netowrk/chain of wallet should be exactly on what a transaction needs.
@@ -684,7 +706,8 @@ export async function isNetworkMatchedForTransaction(
684
706
  step: PendingSwapStep,
685
707
  wallet: Wallet | null,
686
708
  meta: Meta,
687
- providers: Providers
709
+ providers: Providers,
710
+ hubProvider: (type: WalletType) => Provider
688
711
  ): Promise<boolean> {
689
712
  if (isWalletNull(wallet)) {
690
713
  return false;
@@ -702,8 +725,11 @@ export async function isNetworkMatchedForTransaction(
702
725
  try {
703
726
  const sourceWallet = swap.wallets[fromNamespace.network];
704
727
  if (sourceWallet) {
705
- const provider = getEvmProvider(providers, sourceWallet.walletType);
706
- const chainId: number | string | null = await getChainId(provider);
728
+ const chainId = await getProviderChainId(
729
+ providers,
730
+ hubProvider,
731
+ sourceWallet.walletType
732
+ );
707
733
  if (chainId) {
708
734
  const blockChain = getBlockChainNameFromId(
709
735
  chainId,