@rango-dev/queue-manager-rango-preset 0.34.1-next.5 → 0.34.1-next.7

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":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":1485,"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":165948},"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","getUsdPrice","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":38612}}}
1
+ {"inputs":{"src/configs.ts":{"bytes":816,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/types.ts":{"bytes":7220,"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":7687,"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":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":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":1476,"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":165274},"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":"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","MessageSeverity","PrettyError","RouteEventType","StepEventType","StepExecutionBlockedEventStatus","StepExecutionEventStatus","WidgetEvents","calculatePendingSwap","cancelSwap","checkWaitingForNetworkChange","getCurrentBlockchainOfOrNull","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":14903},"src/services/httpService.ts":{"bytesInOutput":118},"src/services/index.ts":{"bytesInOutput":0},"src/shared.ts":{"bytesInOutput":4846},"src/numbers.ts":{"bytesInOutput":689},"src/shared-errors.ts":{"bytesInOutput":2224},"src/services/eventEmitter.ts":{"bytesInOutput":3355},"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":592},"src/migration.ts":{"bytesInOutput":1138}},"bytes":38443}}}
@@ -1,4 +1,4 @@
1
- import type { RemoveNameField, RouteExecutionEvents, StepEvent } from '../types';
1
+ import type { RemoveNameField, StepEvent } from '../types';
2
2
  import type { PendingSwap, PendingSwapStep } from 'rango-types';
3
3
  type NotifierParams = {
4
4
  swap: PendingSwap;
@@ -6,7 +6,6 @@ type NotifierParams = {
6
6
  } & {
7
7
  event: RemoveNameField<StepEvent, 'message' | 'messageSeverity'>;
8
8
  };
9
- export declare const eventEmitter: import("mitt").Emitter<RouteExecutionEvents>;
10
9
  export declare function notifier(params: NotifierParams): void;
11
10
  export {};
12
11
  //# sourceMappingURL=eventEmitter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eventEmitter.d.ts","sourceRoot":"","sources":["../../src/services/eventEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EAGf,oBAAoB,EAEpB,SAAS,EACV,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAoBhE,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;CAC9B,GAAG;IACF,KAAK,EAAE,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,iBAAiB,CAAC,CAAC;CAClE,CAAC;AA+GF,eAAO,MAAM,YAAY,8CAA+B,CAAC;AA2BzD,wBAAgB,QAAQ,CAAC,MAAM,EAAE,cAAc,QAsG9C"}
1
+ {"version":3,"file":"eventEmitter.d.ts","sourceRoot":"","sources":["../../src/services/eventEmitter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EAIf,SAAS,EACV,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAmBhE,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,WAAW,CAAC;IAClB,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;CAC9B,GAAG;IACF,KAAK,EAAE,eAAe,CAAC,SAAS,EAAE,SAAS,GAAG,iBAAiB,CAAC,CAAC;CAClE,CAAC;AA0IF,wBAAgB,QAAQ,CAAC,MAAM,EAAE,cAAc,QAsG9C"}
package/dist/types.d.ts CHANGED
@@ -50,7 +50,7 @@ export interface UseQueueManagerParams {
50
50
  evmChains: EvmBlockchainMeta[];
51
51
  canSwitchNetworkTo: (type: WalletType, network: Network) => boolean;
52
52
  }
53
- export declare enum MainEvents {
53
+ export declare enum WidgetEvents {
54
54
  RouteEvent = "routeEvent",
55
55
  StepEvent = "stepEvent"
56
56
  }
@@ -151,7 +151,7 @@ export type StepEventData = {
151
151
  event: StepEvent;
152
152
  };
153
153
  export type RouteExecutionEvents = {
154
- [MainEvents.RouteEvent]: RouteEventData;
155
- [MainEvents.StepEvent]: StepEventData;
154
+ [WidgetEvents.RouteEvent]: RouteEventData;
155
+ [WidgetEvents.StepEvent]: StepEventData;
156
156
  };
157
157
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,KAAK,EACV,YAAY,EACZ,QAAQ,EACR,YAAY,EACb,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EACV,IAAI,EACJ,OAAO,EACP,SAAS,EACT,WAAW,EACX,UAAU,EACX,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,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AAE,KAAK,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAE,CAAC;AACjE,MAAM,MAAM,aAAa,GAAG;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,SAAS,CAAA;CAAE,CAAC;AAE3E,MAAM,MAAM,oBAAoB,GAAG;IACjC,CAAC,YAAY,CAAC,UAAU,CAAC,EAAE,cAAc,CAAC;IAC1C,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,aAAa,CAAC;CACzC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/queue-manager-rango-preset",
3
- "version": "0.34.1-next.5",
3
+ "version": "0.34.1-next.7",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/index.ts",
@@ -35,7 +35,6 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@rango-dev/logging-core": "^0.4.0",
38
- "mitt": "^3.0.0",
39
38
  "rango-types": "^0.1.69",
40
39
  "uuid": "^9.0.0"
41
40
  },
package/src/configs.ts CHANGED
@@ -1,19 +1,29 @@
1
+ import type { RouteExecutionEvents } from './types';
2
+
3
+ interface Emitter<Events extends Record<string, unknown>> {
4
+ emit<K extends keyof Events>(type: K, event: Events[K]): void;
5
+ }
6
+
1
7
  export interface Configs {
2
8
  API_KEY: string;
3
9
  BASE_URL?: string;
10
+ emitter?: Emitter<RouteExecutionEvents>;
4
11
  }
5
12
 
6
- // this API key is limited and
7
- // it is only for test purpose
13
+ /*
14
+ * this API key is limited and
15
+ * it is only for test purpose
16
+ */
8
17
 
9
18
  const RANGO_PUBLIC_API_KEY = 'c6381a79-2817-4602-83bf-6a641a409e32';
10
19
 
11
20
  let configs: Configs = {
12
21
  API_KEY: RANGO_PUBLIC_API_KEY,
22
+ BASE_URL: '',
13
23
  };
14
24
 
15
- export function getConfig(name: keyof Configs) {
16
- return configs[name] || '';
25
+ export function getConfig<K extends keyof Configs>(name: K): Configs[K] {
26
+ return configs[name];
17
27
  }
18
28
 
19
29
  export function setConfig(name: keyof Configs, value: any) {
@@ -23,12 +33,6 @@ export function setConfig(name: keyof Configs, value: any) {
23
33
  }
24
34
 
25
35
  export function initConfig(nextConfigs: Configs) {
26
- let clonedConfigs;
27
- if (typeof structuredClone === 'function') {
28
- clonedConfigs = structuredClone(nextConfigs);
29
- } else {
30
- clonedConfigs = JSON.parse(JSON.stringify(nextConfigs));
31
- }
32
- configs = clonedConfigs;
36
+ configs = nextConfigs;
33
37
  return configs;
34
38
  }
package/src/hooks.ts CHANGED
@@ -1,5 +1,3 @@
1
- import type { UseQueueManagerParams } from './types';
2
-
3
1
  import { useManager } from '@rango-dev/queue-manager-react';
4
2
  import { useEffect, useState } from 'react';
5
3
 
@@ -9,7 +7,7 @@ import {
9
7
  retryOn,
10
8
  } from './helpers';
11
9
  import { migrated, migration } from './migration';
12
- import { eventEmitter } from './services/eventEmitter';
10
+ import { type UseQueueManagerParams } from './types';
13
11
 
14
12
  let isCalled = 0;
15
13
 
@@ -46,7 +44,7 @@ function useMigration(): {
46
44
 
47
45
  /**
48
46
  *
49
- * On initial load and also connect/disconnet we may need to update swap's notified message.
47
+ * On initial load and also connect/disconnect we may need to update swap's notified message.
50
48
  * And also if a new wallet is connected we will retry the queue to see we can resume it or not.
51
49
  *
52
50
  */
@@ -77,14 +75,4 @@ function useQueueManager(params: UseQueueManagerParams): void {
77
75
  }, [params.disconnectedWallet]);
78
76
  }
79
77
 
80
- function useEvents() {
81
- /**
82
- * Making the 'all' method accessible runs the risk of removing all handlers already linked to all events,
83
- * leading to unforeseen side effects in our widget or in Dapps that utilize it.
84
- * Instead, we can utilize the 'off' method to detach listeners for specific events.
85
- */
86
- const { all, ...otherMethods } = eventEmitter;
87
- return otherMethods;
88
- }
89
-
90
- export { useQueueManager, useMigration, useEvents };
78
+ export { useQueueManager, useMigration };
package/src/index.ts CHANGED
@@ -28,7 +28,7 @@ export type {
28
28
  StepOutputRevealedEvent,
29
29
  } from './types';
30
30
  export {
31
- MainEvents,
31
+ WidgetEvents,
32
32
  StepEventType,
33
33
  RouteEventType,
34
34
  StepExecutionEventStatus,
@@ -55,7 +55,7 @@ export {
55
55
  isApprovalTX,
56
56
  getLastSuccessfulStep,
57
57
  } from './helpers';
58
- export { useMigration, useQueueManager, useEvents } from './hooks';
58
+ export { useMigration, useQueueManager } from './hooks';
59
59
 
60
60
  export function makeQueueDefinition(configs: Configs): SwapQueueDef {
61
61
  initConfig(configs);
@@ -2,14 +2,12 @@ import type {
2
2
  RemoveNameField,
3
3
  Route,
4
4
  RouteEvent,
5
- RouteExecutionEvents,
6
5
  Step,
7
6
  StepEvent,
8
7
  } from '../types';
9
8
  import type { PendingSwap, PendingSwapStep } from 'rango-types';
10
9
 
11
- import mitt from 'mitt';
12
-
10
+ import { getConfig } from '../configs';
13
11
  import {
14
12
  getCurrentStepTx,
15
13
  getFailedStep,
@@ -19,11 +17,11 @@ import {
19
17
  import { getCurrentBlockchainOfOrNull } from '../shared';
20
18
  import {
21
19
  EventSeverity,
22
- MainEvents,
23
20
  RouteEventType,
24
21
  StepEventType,
25
22
  StepExecutionBlockedEventStatus,
26
23
  StepExecutionEventStatus,
24
+ WidgetEvents,
27
25
  } from '../types';
28
26
 
29
27
  type NotifierParams = {
@@ -142,8 +140,6 @@ function getEventPayload(
142
140
  return result;
143
141
  }
144
142
 
145
- export const eventEmitter = mitt<RouteExecutionEvents>();
146
-
147
143
  function emitRouteEvent(stepEvent: StepEvent, route: Route) {
148
144
  let routeEvent: RouteEvent | undefined;
149
145
  const { type } = stepEvent;
@@ -161,12 +157,14 @@ function emitRouteEvent(stepEvent: StepEvent, route: Route) {
161
157
  break;
162
158
  }
163
159
  if (routeEvent) {
164
- eventEmitter.emit(MainEvents.RouteEvent, { event: routeEvent, route });
160
+ const eventEmitter = getConfig('emitter');
161
+ eventEmitter?.emit(WidgetEvents.RouteEvent, { event: routeEvent, route });
165
162
  }
166
163
  }
167
164
 
168
165
  function emitStepEvent(stepEvent: StepEvent, route: Route, step: Step) {
169
- eventEmitter.emit(MainEvents.StepEvent, { event: stepEvent, route, step });
166
+ const eventEmitter = getConfig('emitter');
167
+ eventEmitter?.emit(WidgetEvents.StepEvent, { event: stepEvent, route, step });
170
168
  }
171
169
 
172
170
  export function notifier(params: NotifierParams) {
package/src/types.ts CHANGED
@@ -93,7 +93,7 @@ export interface UseQueueManagerParams {
93
93
  canSwitchNetworkTo: (type: WalletType, network: Network) => boolean;
94
94
  }
95
95
 
96
- export enum MainEvents {
96
+ export enum WidgetEvents {
97
97
  RouteEvent = 'routeEvent',
98
98
  StepEvent = 'stepEvent',
99
99
  }
@@ -282,6 +282,6 @@ export type RouteEventData = { route: Route; event: RouteEvent };
282
282
  export type StepEventData = { route: Route; step: Step; event: StepEvent };
283
283
 
284
284
  export type RouteExecutionEvents = {
285
- [MainEvents.RouteEvent]: RouteEventData;
286
- [MainEvents.StepEvent]: StepEventData;
285
+ [WidgetEvents.RouteEvent]: RouteEventData;
286
+ [WidgetEvents.StepEvent]: StepEventData;
287
287
  };