@rango-dev/queue-manager-rango-preset 0.33.3-next.0 → 0.34.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.
- package/CHANGELOG.md +4 -0
- package/dist/helpers.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +4 -4
- package/dist/queue-manager-rango-preset.build.json +1 -0
- package/package.json +4 -4
- package/src/helpers.ts +7 -9
- package/dist/errors.d.ts +0 -5
- package/dist/errors.d.ts.map +0 -1
- package/src/errors.ts +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/configs.ts":{"bytes":745,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/types.ts":{"bytes":7214,"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":11059,"imports":[{"path":"bignumber.js","kind":"import-statement","external":true},{"path":"rango-types","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":7656,"imports":[{"path":"mitt","kind":"import-statement","external":true},{"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":43072,"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","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","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":14961,"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":2890,"imports":[{"path":"@rango-dev/queue-manager-core","kind":"import-statement","external":true},{"path":"src/types.ts","kind":"import-statement","original":"../types"},{"path":"src/helpers.ts","kind":"import-statement","original":"../helpers"},{"path":"src/shared-errors.ts","kind":"import-statement","original":"../shared-errors"},{"path":"rango-sdk","kind":"import-statement","external":true},{"path":"src/services/index.ts","kind":"import-statement","original":"../services"},{"path":"src/services/eventEmitter.ts","kind":"import-statement","original":"../services/eventEmitter"},{"path":"src/constants.ts","kind":"import-statement","original":"../constants"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/actions/executeTransaction.ts":{"bytes":4402,"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":2363,"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":2414,"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":"src/services/eventEmitter.ts","kind":"import-statement","original":"./services/eventEmitter"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":1470,"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":165932},"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","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","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":"mitt","kind":"import-statement","external":true},{"path":"bignumber.js","kind":"import-statement","external":true},{"path":"rango-types","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","MainEvents","MessageSeverity","PrettyError","RouteEventType","StepEventType","StepExecutionBlockedEventStatus","StepExecutionEventStatus","calculatePendingSwap","cancelSwap","checkWaitingForNetworkChange","getCurrentBlockchainOfOrNull","getCurrentStep","getLastSuccessfulStep","getRelatedWallet","getRelatedWalletOrNull","getRequiredWallet","getRunningSwaps","isApprovalTX","makeQueueDefinition","prettifyErrorMessage","resetRunningSwapNotifsOnPageLoad","updateSwapStatus","useEvents","useMigration","useQueueManager"],"entryPoint":"src/index.ts","inputs":{"src/configs.ts":{"bytesInOutput":255},"src/types.ts":{"bytesInOutput":846},"src/constants.ts":{"bytesInOutput":431},"src/helpers.ts":{"bytesInOutput":14897},"src/services/httpService.ts":{"bytesInOutput":120},"src/services/index.ts":{"bytesInOutput":0},"src/services/eventEmitter.ts":{"bytesInOutput":3366},"src/shared.ts":{"bytesInOutput":4846},"src/numbers.ts":{"bytesInOutput":689},"src/shared-errors.ts":{"bytesInOutput":2224},"src/actions/checkStatus.ts":{"bytesInOutput":5332},"src/actions/createTransaction.ts":{"bytesInOutput":847},"src/actions/executeTransaction.ts":{"bytesInOutput":943},"src/actions/scheduleNextStep.ts":{"bytesInOutput":701},"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":38594}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/queue-manager-rango-preset",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.34.1-next.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"@types/uuid": "^8.3.4"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@rango-dev/logging-core": "^0.
|
|
37
|
+
"@rango-dev/logging-core": "^0.4.0",
|
|
38
38
|
"mitt": "^3.0.0",
|
|
39
|
-
"rango-types": "^0.1.
|
|
39
|
+
"rango-types": "^0.1.69",
|
|
40
40
|
"uuid": "^9.0.0"
|
|
41
41
|
},
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
44
44
|
}
|
|
45
|
-
}
|
|
45
|
+
}
|
package/src/helpers.ts
CHANGED
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
splitWalletNetwork,
|
|
46
46
|
} from '@rango-dev/wallets-shared';
|
|
47
47
|
import { TransactionType } from 'rango-sdk';
|
|
48
|
-
import { PendingSwapNetworkStatus } from 'rango-types';
|
|
48
|
+
import { PendingSwapNetworkStatus, SignerError } from 'rango-types';
|
|
49
49
|
|
|
50
50
|
import {
|
|
51
51
|
DEFAULT_ERROR_CODE,
|
|
@@ -53,7 +53,6 @@ import {
|
|
|
53
53
|
ERROR_MESSAGE_WAIT_FOR_WALLET,
|
|
54
54
|
ERROR_MESSAGE_WAIT_FOR_WALLET_DESCRIPTION,
|
|
55
55
|
} from './constants';
|
|
56
|
-
import { RangoPresetError } from './errors';
|
|
57
56
|
import { httpService } from './services';
|
|
58
57
|
import { notifier } from './services/eventEmitter';
|
|
59
58
|
import {
|
|
@@ -353,7 +352,7 @@ export function updateSwapStatus({
|
|
|
353
352
|
|
|
354
353
|
// If trace of error was available, we will send it to the api (except user rejection)
|
|
355
354
|
const errorReasonForAPI =
|
|
356
|
-
errorCode !== '
|
|
355
|
+
errorCode !== 'REJECTED_BY_USER' &&
|
|
357
356
|
trace?.message &&
|
|
358
357
|
typeof trace.message === 'string'
|
|
359
358
|
? trace.message
|
|
@@ -1140,17 +1139,16 @@ export function signTransaction(
|
|
|
1140
1139
|
const { extraMessage, extraMessageDetail, extraMessageErrorCode } =
|
|
1141
1140
|
prettifyErrorMessage(error);
|
|
1142
1141
|
|
|
1143
|
-
|
|
1144
|
-
const log_msg = new RangoPresetError(
|
|
1145
|
-
error?.trace?.stack || error?.trace || error?.root || error
|
|
1146
|
-
);
|
|
1147
|
-
warn(log_msg, {
|
|
1142
|
+
warn(error, {
|
|
1148
1143
|
tags: {
|
|
1149
1144
|
requestId: swap.requestId,
|
|
1150
1145
|
rpc: true,
|
|
1151
1146
|
swapper: currentStep?.swapperId || '',
|
|
1152
1147
|
walletType: sourceWallet?.walletType || '',
|
|
1153
1148
|
},
|
|
1149
|
+
context: SignerError.isSignerError(error)
|
|
1150
|
+
? error.getErrorContext()
|
|
1151
|
+
: {},
|
|
1154
1152
|
});
|
|
1155
1153
|
|
|
1156
1154
|
const updateResult = updateSwapStatus({
|
|
@@ -1161,7 +1159,7 @@ export function signTransaction(
|
|
|
1161
1159
|
message: extraMessage,
|
|
1162
1160
|
details: extraMessageDetail,
|
|
1163
1161
|
errorCode: extraMessageErrorCode,
|
|
1164
|
-
trace: error?.
|
|
1162
|
+
trace: error?.cause,
|
|
1165
1163
|
});
|
|
1166
1164
|
|
|
1167
1165
|
notifier({
|
package/dist/errors.d.ts
DELETED
package/dist/errors.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,IAAI,SAAsB;gBAEd,GAAG,EAAE,MAAM;CAGxB"}
|