@rango-dev/queue-manager-rango-preset 0.1.10-next.77 → 0.1.10-next.78
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 +2 -2
- package/dist/helpers.d.ts.map +1 -1
- package/dist/queue-manager-rango-preset.cjs.development.js +18 -15
- package/dist/queue-manager-rango-preset.cjs.development.js.map +1 -1
- package/dist/queue-manager-rango-preset.cjs.production.min.js +1 -1
- package/dist/queue-manager-rango-preset.cjs.production.min.js.map +1 -1
- package/dist/queue-manager-rango-preset.esm.js +13 -10
- package/dist/queue-manager-rango-preset.esm.js.map +1 -1
- package/dist/shared-api.d.ts.map +1 -1
- package/dist/shared.d.ts +2 -2
- package/dist/shared.d.ts.map +1 -1
- package/dist/types.d.ts +3 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/helpers.ts +213 -182
- package/src/shared-api.ts +10 -13
- package/src/shared-sentry.ts +1 -1
- package/src/shared.ts +5 -8
- package/src/types.ts +2 -3
package/src/shared.ts
CHANGED
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Network,
|
|
3
|
-
Transaction,
|
|
4
|
-
TransferTransaction,
|
|
5
|
-
WalletError,
|
|
6
|
-
WalletType,
|
|
7
|
-
} from '@rango-dev/wallets-shared';
|
|
1
|
+
import { Network, WalletType } from '@rango-dev/wallets-shared';
|
|
8
2
|
import {
|
|
9
3
|
CosmosTransaction,
|
|
10
4
|
EvmBlockchainMeta,
|
|
@@ -12,12 +6,15 @@ import {
|
|
|
12
6
|
SimulationResult,
|
|
13
7
|
SolanaTransaction,
|
|
14
8
|
StarknetTransaction,
|
|
9
|
+
Transaction,
|
|
15
10
|
TronTransaction,
|
|
11
|
+
Transfer as TransferTransaction,
|
|
16
12
|
} from 'rango-sdk';
|
|
17
13
|
import { BigNumber } from 'bignumber.js';
|
|
18
14
|
|
|
19
15
|
import { ErrorDetail, PrettyError } from './shared-errors';
|
|
20
16
|
import { getRelatedWallet } from './helpers';
|
|
17
|
+
import { SignerError } from 'rango-types';
|
|
21
18
|
|
|
22
19
|
export type SwapperStatusResponse = {
|
|
23
20
|
status: 'running' | 'failed' | 'success' | null;
|
|
@@ -273,7 +270,7 @@ export const getEvmApproveUrl = (
|
|
|
273
270
|
export const prettifyErrorMessage = (obj: unknown): ErrorDetail => {
|
|
274
271
|
if (!obj) return { extraMessage: '', extraMessageErrorCode: null };
|
|
275
272
|
if (obj instanceof PrettyError) return obj.getErrorDetail();
|
|
276
|
-
if (obj instanceof
|
|
273
|
+
if (obj instanceof SignerError) {
|
|
277
274
|
const t = obj.getErrorDetail();
|
|
278
275
|
return {
|
|
279
276
|
extraMessage: t.message,
|
package/src/types.ts
CHANGED
|
@@ -2,14 +2,13 @@ import { QueueStorage, QueueDef } from '@rango-dev/queue-manager-core';
|
|
|
2
2
|
import { QueueContext } from '@rango-dev/queue-manager-core/dist/queue';
|
|
3
3
|
import { ConnectResult, Providers } from '@rango-dev/wallets-core';
|
|
4
4
|
import {
|
|
5
|
-
EvmBlockchainMeta,
|
|
6
5
|
Meta,
|
|
7
6
|
Network,
|
|
8
|
-
WalletSigners,
|
|
9
7
|
WalletState,
|
|
10
8
|
WalletType,
|
|
11
9
|
} from '@rango-dev/wallets-shared';
|
|
12
10
|
import { PendingSwap, SwapProgressNotification, Wallet } from './shared';
|
|
11
|
+
import { EvmBlockchainMeta, SignerFactory } from 'rango-types';
|
|
13
12
|
|
|
14
13
|
export type SwapQueueDef = QueueDef<
|
|
15
14
|
SwapStorage,
|
|
@@ -51,7 +50,7 @@ export interface SwapQueueContext extends QueueContext {
|
|
|
51
50
|
meta: Meta;
|
|
52
51
|
wallets: Wallet | null;
|
|
53
52
|
providers: Providers;
|
|
54
|
-
getSigners: (type: WalletType) =>
|
|
53
|
+
getSigners: (type: WalletType) => SignerFactory;
|
|
55
54
|
switchNetwork: (
|
|
56
55
|
wallet: WalletType,
|
|
57
56
|
network: Network
|