@rango-dev/queue-manager-rango-preset 0.43.1-next.0 → 0.43.1-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 -2
- package/dist/helpers.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/dist/queue-manager-rango-preset.build.json +1 -1
- package/dist/shared.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/helpers.ts +14 -4
- package/src/shared.ts +10 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/configs.ts":{"bytes":816,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/types.ts":{"bytes":7278,"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":11480,"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":8005,"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":44730,"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-sdk","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":15319,"imports":[{"path":"src/constants.ts","kind":"import-statement","original":"../constants"},{"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":2970,"imports":[{"path":"src/constants.ts","kind":"import-statement","original":"../constants"},{"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/executeTransaction.ts":{"bytes":4424,"imports":[{"path":"rango-types","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":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/actions/scheduleNextStep.ts":{"bytes":2657,"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.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":1958,"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":"./types","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":1499,"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":170424},"dist/index.js":{"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-sdk","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-types","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/constants.ts":{"bytesInOutput":431},"src/helpers.ts":{"bytesInOutput":15807},"src/services/httpService.ts":{"bytesInOutput":118},"src/services/index.ts":{"bytesInOutput":0},"src/shared.ts":{"bytesInOutput":4891},"src/numbers.ts":{"bytesInOutput":689},"src/shared-errors.ts":{"bytesInOutput":2212},"src/services/eventEmitter.ts":{"bytesInOutput":3499},"src/actions/checkStatus.ts":{"bytesInOutput":5425},"src/actions/createTransaction.ts":{"bytesInOutput":858},"src/actions/executeTransaction.ts":{"bytesInOutput":957},"src/actions/scheduleNextStep.ts":{"bytesInOutput":762},"src/actions/start.ts":{"bytesInOutput":155},"src/queueDef.ts":{"bytesInOutput":340},"src/index.ts":{"bytesInOutput":59},"src/hooks.ts":{"bytesInOutput":592},"src/migration.ts":{"bytesInOutput":1138}},"bytes":39702}}}
|
|
1
|
+
{"inputs":{"src/configs.ts":{"bytes":816,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/types.ts":{"bytes":7278,"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":11722,"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":8005,"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":44946,"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":15319,"imports":[{"path":"src/constants.ts","kind":"import-statement","original":"../constants"},{"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":2970,"imports":[{"path":"src/constants.ts","kind":"import-statement","original":"../constants"},{"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/executeTransaction.ts":{"bytes":4424,"imports":[{"path":"rango-types","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":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/actions/scheduleNextStep.ts":{"bytes":2657,"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.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":1958,"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":"./types","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":1499,"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":171165},"dist/index.js":{"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":"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-types","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/constants.ts":{"bytesInOutput":431},"src/helpers.ts":{"bytesInOutput":15914},"src/services/httpService.ts":{"bytesInOutput":118},"src/services/index.ts":{"bytesInOutput":0},"src/shared.ts":{"bytesInOutput":5030},"src/numbers.ts":{"bytesInOutput":689},"src/shared-errors.ts":{"bytesInOutput":2212},"src/services/eventEmitter.ts":{"bytesInOutput":3499},"src/actions/checkStatus.ts":{"bytesInOutput":5425},"src/actions/createTransaction.ts":{"bytesInOutput":858},"src/actions/executeTransaction.ts":{"bytesInOutput":957},"src/actions/scheduleNextStep.ts":{"bytesInOutput":762},"src/actions/start.ts":{"bytesInOutput":155},"src/queueDef.ts":{"bytesInOutput":340},"src/index.ts":{"bytesInOutput":59},"src/hooks.ts":{"bytesInOutput":592},"src/migration.ts":{"bytesInOutput":1138}},"bytes":39948}}}
|
package/dist/shared.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAC1F,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,YAAY,EACZ,UAAU,EACV,KAAK,EACN,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EACV,WAAW,EACX,eAAe,EACf,iBAAiB,EAEjB,oBAAoB,EACrB,MAAM,aAAa,CAAC;AAErB,OAAO,SAAS,MAAM,cAAc,CAAC;AAKrC,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,OAAO,CAA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AED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,WAAW,EACjB,WAAW,EAAE,eAAe,GAAG,IAAI,GAClC,oBAAoB,GAAG,IAAI,CAS7B;AAED,eAAO,MAAM,WAAW,eACV,MAAM,UACV,MAAM,WACL,MAAM,GAAG,IAAI,aACX,KAAK,EAAE,KACjB,MAAM,GAAG,IAQX,CAAC;AAEF,wBAAgB,eAAe,CAC7B,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,KAAK,EAAE,GACjB,SAAS,CAoBX;AA6CD,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,WAAW,CAAC,oBAAoB,CAAC,QAAQ,CAAC,CAAC,EACtD,OAAO,EAAE;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,oBAAoB,CAAA;CAAE,EAC9C,QAAQ,EAAE,iBAAiB,EAC3B,oBAAoB,EAAE,OAAO,EAC7B,IAAI,EAAE,IAAI,CAAC,YAAY,EAAE,aAAa,GAAG,QAAQ,CAAC,GAAG,IAAI,GACxD,WAAW,CAwEb"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/queue-manager-rango-preset",
|
|
3
|
-
"version": "0.43.1-next.
|
|
3
|
+
"version": "0.43.1-next.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"@types/uuid": "^8.3.4"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@rango-dev/logging-core": "^0.7.1-next.
|
|
38
|
-
"rango-types": "^0.1.
|
|
37
|
+
"@rango-dev/logging-core": "^0.7.1-next.1",
|
|
38
|
+
"rango-types": "^0.1.81",
|
|
39
39
|
"uuid": "^9.0.0"
|
|
40
40
|
},
|
|
41
41
|
"publishConfig": {
|
package/src/helpers.ts
CHANGED
|
@@ -45,8 +45,11 @@ import {
|
|
|
45
45
|
splitWalletNetwork,
|
|
46
46
|
} from '@rango-dev/wallets-shared';
|
|
47
47
|
import BigNumber from 'bignumber.js';
|
|
48
|
-
import {
|
|
49
|
-
|
|
48
|
+
import {
|
|
49
|
+
PendingSwapNetworkStatus,
|
|
50
|
+
SignerError,
|
|
51
|
+
TransactionType,
|
|
52
|
+
} from 'rango-types';
|
|
50
53
|
|
|
51
54
|
import {
|
|
52
55
|
DEFAULT_ERROR_CODE,
|
|
@@ -167,6 +170,7 @@ export const getCurrentStepTx = (
|
|
|
167
170
|
tronApprovalTransaction,
|
|
168
171
|
tronTransaction,
|
|
169
172
|
tonTransaction,
|
|
173
|
+
moveTransaction,
|
|
170
174
|
} = currentStep;
|
|
171
175
|
return (
|
|
172
176
|
evmTransaction ||
|
|
@@ -178,7 +182,8 @@ export const getCurrentStepTx = (
|
|
|
178
182
|
starknetTransaction ||
|
|
179
183
|
tronApprovalTransaction ||
|
|
180
184
|
tronTransaction ||
|
|
181
|
-
tonTransaction
|
|
185
|
+
tonTransaction ||
|
|
186
|
+
moveTransaction
|
|
182
187
|
);
|
|
183
188
|
};
|
|
184
189
|
|
|
@@ -201,6 +206,7 @@ export const setCurrentStepTx = (
|
|
|
201
206
|
currentStep.tronApprovalTransaction = null;
|
|
202
207
|
currentStep.tronTransaction = null;
|
|
203
208
|
currentStep.tonTransaction = null;
|
|
209
|
+
currentStep.moveTransaction = null;
|
|
204
210
|
|
|
205
211
|
const txType = transaction.type;
|
|
206
212
|
switch (txType) {
|
|
@@ -237,6 +243,9 @@ export const setCurrentStepTx = (
|
|
|
237
243
|
case TransactionType.TON:
|
|
238
244
|
currentStep.tonTransaction = transaction;
|
|
239
245
|
break;
|
|
246
|
+
case TransactionType.MOVE:
|
|
247
|
+
currentStep.moveTransaction = transaction;
|
|
248
|
+
break;
|
|
240
249
|
default:
|
|
241
250
|
((x: never) => {
|
|
242
251
|
throw new Error(`${x} was unhandled!`);
|
|
@@ -523,7 +532,7 @@ export function markRunningSwapAsSwitchingNetwork({
|
|
|
523
532
|
const { type } = getRequiredWallet(swap);
|
|
524
533
|
const fromNamespace = getCurrentNamespaceOf(swap, currentStep);
|
|
525
534
|
const reason = `Change ${type} wallet network to ${fromNamespace.network}`;
|
|
526
|
-
const reasonDetail = `Please change your ${type} wallet network to ${fromNamespace.
|
|
535
|
+
const reasonDetail = `Please change your ${type} wallet network to ${fromNamespace.namespace}.`;
|
|
527
536
|
|
|
528
537
|
const currentTime = new Date();
|
|
529
538
|
swap.lastNotificationTime = currentTime.getTime().toString();
|
|
@@ -733,6 +742,7 @@ export const isTxAlreadyCreated = (
|
|
|
733
742
|
swap.wallets[step.cosmosTransaction?.blockChain || ''] ||
|
|
734
743
|
swap.wallets[step.solanaTransaction?.blockChain || ''] ||
|
|
735
744
|
swap.wallets[step.tonTransaction?.blockChain || ''] ||
|
|
745
|
+
swap.wallets[step.moveTransaction?.blockChain || ''] ||
|
|
736
746
|
step.transferTransaction?.fromWalletAddress ||
|
|
737
747
|
null;
|
|
738
748
|
|
package/src/shared.ts
CHANGED
|
@@ -97,7 +97,7 @@ export const getCurrentNamespaceOfOrNull = (
|
|
|
97
97
|
): TargetNamespace | null => {
|
|
98
98
|
try {
|
|
99
99
|
return getCurrentNamespaceOf(swap, step);
|
|
100
|
-
} catch
|
|
100
|
+
} catch {
|
|
101
101
|
return null;
|
|
102
102
|
}
|
|
103
103
|
};
|
|
@@ -117,6 +117,7 @@ export const getCurrentNamespaceOf = (
|
|
|
117
117
|
const cosmosNetwork = step.cosmosTransaction?.blockChain;
|
|
118
118
|
const solanaNetwork = step.solanaTransaction?.blockChain;
|
|
119
119
|
const tonNetwork = step.tonTransaction?.blockChain;
|
|
120
|
+
const moveNetwork = step.moveTransaction?.blockChain;
|
|
120
121
|
|
|
121
122
|
if (evmNetwork) {
|
|
122
123
|
return {
|
|
@@ -148,6 +149,11 @@ export const getCurrentNamespaceOf = (
|
|
|
148
149
|
namespace: 'Ton',
|
|
149
150
|
network: tonNetwork,
|
|
150
151
|
};
|
|
152
|
+
} else if (moveNetwork) {
|
|
153
|
+
return {
|
|
154
|
+
namespace: 'Move',
|
|
155
|
+
network: moveNetwork,
|
|
156
|
+
};
|
|
151
157
|
} else if (!!step.transferTransaction) {
|
|
152
158
|
const transferAddress = step.transferTransaction.fromWalletAddress;
|
|
153
159
|
if (!transferAddress) {
|
|
@@ -221,6 +227,7 @@ export const getCurrentAddressOf = (
|
|
|
221
227
|
swap.wallets[step.cosmosTransaction?.blockChain || ''] ||
|
|
222
228
|
swap.wallets[step.solanaTransaction?.blockChain || ''] ||
|
|
223
229
|
swap.wallets[step.tonTransaction?.blockChain || ''] ||
|
|
230
|
+
swap.wallets[step.moveTransaction?.blockChain || ''] ||
|
|
224
231
|
(step.transferTransaction?.fromWalletAddress
|
|
225
232
|
? { address: step.transferTransaction?.fromWalletAddress }
|
|
226
233
|
: null) ||
|
|
@@ -261,7 +268,7 @@ export function getRelatedWalletOrNull(
|
|
|
261
268
|
}
|
|
262
269
|
try {
|
|
263
270
|
return getRelatedWallet(swap, currentStep);
|
|
264
|
-
} catch
|
|
271
|
+
} catch {
|
|
265
272
|
return null;
|
|
266
273
|
}
|
|
267
274
|
}
|
|
@@ -421,6 +428,7 @@ export function calculatePendingSwap(
|
|
|
421
428
|
solanaTransaction: null,
|
|
422
429
|
transferTransaction: null,
|
|
423
430
|
tonTransaction: null,
|
|
431
|
+
moveTransaction: null,
|
|
424
432
|
|
|
425
433
|
// front fields
|
|
426
434
|
hasAlreadyProceededToSign: false,
|