Skip to content

Commit 2b58a3f

Browse files
committed
chore: rename fast mctp
1 parent ab40b5f commit 2b58a3f

8 files changed

Lines changed: 45 additions & 45 deletions

File tree

src/routes/mayan/MayanRoute.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Network } from '@wormhole-foundation/sdk-base';
22
import type { routes } from '@wormhole-foundation/sdk-connect';
33
import { MayanRouteBase } from './MayanRouteBase';
4-
import type { MayanProtocol } from './types';
4+
import { MayanProtocol } from './types';
55

66
export class MayanRoute<N extends Network>
77
extends MayanRouteBase<N>
@@ -13,10 +13,10 @@ export class MayanRoute<N extends Network>
1313
};
1414

1515
override protocols: MayanProtocol[] = [
16-
'WH',
17-
'MCTP',
18-
'FAST_MCTP',
19-
'SWIFT',
20-
'MONO_CHAIN',
16+
MayanProtocol.WH,
17+
MayanProtocol.MCTP,
18+
MayanProtocol.FAST_MCTP,
19+
MayanProtocol.SWIFT,
20+
MayanProtocol.MONO_CHAIN,
2121
];
2222
}

src/routes/mayan/MayanRouteBase.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,16 @@ import {
8282
toMayanChainName,
8383
txStatusToReceipt,
8484
} from './utils';
85-
import type {
85+
import {
8686
MayanProtocol,
87-
Options,
88-
Quote,
89-
QuoteResult,
90-
Receipt,
91-
ReferrerParams,
92-
TransferParams,
93-
ValidatedParams,
94-
ValidationResult,
87+
type Options,
88+
type Quote,
89+
type QuoteResult,
90+
type Receipt,
91+
type ReferrerParams,
92+
type TransferParams,
93+
type ValidatedParams,
94+
type ValidationResult,
9595
} from './types';
9696

9797
export class MayanRouteBase<N extends Network> extends routes.AutomaticRoute<
@@ -106,11 +106,11 @@ export class MayanRouteBase<N extends Network> extends routes.AutomaticRoute<
106106
static override IS_AUTOMATIC = true;
107107

108108
protocols: MayanProtocol[] = [
109-
'WH',
110-
'MCTP',
111-
'FAST_MCTP',
112-
'SWIFT',
113-
'MONO_CHAIN',
109+
MayanProtocol.WH,
110+
MayanProtocol.MCTP,
111+
MayanProtocol.FAST_MCTP,
112+
MayanProtocol.SWIFT,
113+
MayanProtocol.MONO_CHAIN,
114114
];
115115

116116
protected isTestnetRequest(request: routes.RouteTransferRequest<N>): boolean {
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { routes } from '@wormhole-foundation/sdk-connect';
22
import type { Network } from '@wormhole-foundation/sdk-base';
3-
import type { MayanProtocol } from './types';
3+
import { MayanProtocol } from './types';
44
import { MayanRouteBase } from './MayanRouteBase';
55

66
export class MayanRouteFastMCTP<N extends Network>
@@ -9,8 +9,8 @@ export class MayanRouteFastMCTP<N extends Network>
99
{
1010
static meta = {
1111
name: 'MayanSwapFastMCTP',
12-
provider: 'Mayan Fast MCTP',
12+
provider: 'Mayan MCTP',
1313
};
1414

15-
override protocols: MayanProtocol[] = ['FAST_MCTP'];
15+
override protocols: MayanProtocol[] = [MayanProtocol.FAST_MCTP];
1616
}

src/routes/mayan/MayanRouteMCTP.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Network } from '@wormhole-foundation/sdk-base';
22
import type { routes } from '@wormhole-foundation/sdk-connect';
33
import { MayanRouteBase } from './MayanRouteBase';
4-
import type { MayanProtocol } from './types';
4+
import { MayanProtocol } from './types';
55

66
export class MayanRouteMCTP<N extends Network>
77
extends MayanRouteBase<N>
@@ -12,5 +12,5 @@ export class MayanRouteMCTP<N extends Network>
1212
provider: 'Mayan MCTP',
1313
};
1414

15-
override protocols: MayanProtocol[] = ['MCTP'];
15+
override protocols: MayanProtocol[] = [MayanProtocol.MCTP];
1616
}

src/routes/mayan/MayanRouteMONOCHAIN.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { chainToPlatform } from '@wormhole-foundation/sdk-base';
22
import type { Chain, Network } from '@wormhole-foundation/sdk-connect';
33
import type { routes } from '@wormhole-foundation/sdk-connect';
44
import { MayanRouteBase } from './MayanRouteBase';
5-
import type { MayanProtocol } from './types';
5+
import { MayanProtocol } from './types';
66

77
export class MayanRouteMONOCHAIN<N extends Network>
88
extends MayanRouteBase<N>
@@ -13,7 +13,7 @@ export class MayanRouteMONOCHAIN<N extends Network>
1313
provider: 'Mayan Mono Chain',
1414
};
1515

16-
override protocols: MayanProtocol[] = ['MONO_CHAIN'];
16+
override protocols: MayanProtocol[] = [MayanProtocol.MONO_CHAIN];
1717

1818
static supportsSameChainSwaps(network: Network, chain: Chain) {
1919
const platform = chainToPlatform(chain);

src/routes/mayan/MayanRouteSWIFT.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Network } from '@wormhole-foundation/sdk-base';
22
import type { routes } from '@wormhole-foundation/sdk-connect';
33
import { MayanRouteBase } from './MayanRouteBase';
4-
import type { MayanProtocol } from './types';
4+
import { MayanProtocol } from './types';
55

66
export class MayanRouteSWIFT<N extends Network>
77
extends MayanRouteBase<N>
@@ -12,5 +12,5 @@ export class MayanRouteSWIFT<N extends Network>
1212
provider: 'Mayan Swift',
1313
};
1414

15-
override protocols: MayanProtocol[] = ['SWIFT'];
15+
override protocols: MayanProtocol[] = [MayanProtocol.SWIFT];
1616
}

src/routes/mayan/MayanRouteWH.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Network } from '@wormhole-foundation/sdk-base';
22
import type { routes } from '@wormhole-foundation/sdk-connect';
33
import { MayanRouteBase } from './MayanRouteBase';
4-
import type { MayanProtocol } from './types';
4+
import { MayanProtocol } from './types';
55

66
export class MayanRouteWH<N extends Network>
77
extends MayanRouteBase<N>
@@ -12,5 +12,5 @@ export class MayanRouteWH<N extends Network>
1212
provider: 'Mayan WH',
1313
};
1414

15-
override protocols: MayanProtocol[] = ['WH'];
15+
override protocols: MayanProtocol[] = [MayanProtocol.WH];
1616
}

src/routes/mayan/types.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@ import type { Chain, Network } from '@wormhole-foundation/sdk-base';
22
import type { routes } from '@wormhole-foundation/sdk-connect';
33
import type { Quote as MayanQuote } from '@mayanfinance/swap-sdk';
44

5-
export type MayanProtocol =
6-
| 'WH'
7-
| 'MCTP'
8-
| 'SWIFT'
9-
| 'FAST_MCTP'
10-
| 'SHUTTLE'
11-
| 'MONO_CHAIN';
5+
export enum MayanProtocol {
6+
WH = 'WH',
7+
MCTP = 'MCTP',
8+
SWIFT = 'SWIFT',
9+
FAST_MCTP = 'FAST_MCTP',
10+
SHUTTLE = 'SHUTTLE',
11+
MONO_CHAIN = 'MONO_CHAIN',
12+
}
1213

1314
export type ReferrerParams<N extends Network> = {
1415
getReferrerBps?: (request: routes.RouteTransferRequest<N>) => number;
@@ -42,6 +43,11 @@ export type Receipt = routes.Receipt;
4243
export type TransferParams = routes.TransferParams<Options>;
4344
export type ValidationResult = routes.ValidationResult<Options>;
4445

46+
interface MayanTx {
47+
txHash: string;
48+
goals: MayanTransactionGoal[];
49+
scannerUrl: string;
50+
}
4551
export interface TransactionStatus {
4652
id: string;
4753
trader: string;
@@ -136,7 +142,7 @@ export interface TransactionStatus {
136142
fromTokenScannerUrl: string;
137143
toTokenScannerUrl: string;
138144

139-
txs: Tx[];
145+
txs: MayanTx[];
140146

141147
clientStatus: MayanClientStatus;
142148
}
@@ -160,9 +166,3 @@ export enum MayanTransactionGoal {
160166
// settle on destination
161167
Settle = 'SETTLE',
162168
}
163-
164-
export interface Tx {
165-
txHash: string;
166-
goals: MayanTransactionGoal[];
167-
scannerUrl: string;
168-
}

0 commit comments

Comments
 (0)