Skip to content

Commit 87363e3

Browse files
committed
connect: Changed QuoteWarning to be a union type
1 parent 60af955 commit 87363e3

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

connect/src/routes/types.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { TokenId } from "@wormhole-foundation/sdk-definitions";
2-
import type { AttestationReceipt, TransferReceipt } from "../types.js";
2+
import type { AttestationReceipt, QuoteWarning, TransferReceipt } from "../types.js";
33
import type { amount } from "@wormhole-foundation/sdk-base";
44

55
// Extend Options to provide custom options
@@ -80,8 +80,3 @@ export type QuoteError = {
8080
success: false;
8181
error: Error;
8282
};
83-
84-
export type QuoteWarning = {
85-
message: string;
86-
url?: string;
87-
};

connect/src/types.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,12 @@ export interface TransferQuote {
176176
destinationNativeGas?: bigint;
177177
// If the transfer being quoted has any warnings
178178
// such as high slippage or a delay, they will be included here
179-
warnings?: TransferQuoteWarning[];
179+
warnings?: QuoteWarning[];
180180
}
181181

182-
export interface TransferQuoteWarning {
183-
message: string;
184-
url?: string;
185-
}
182+
export type QuoteWarning = DestinationCapacityWarning;
183+
184+
export type DestinationCapacityWarning = {
185+
type: "DestinationCapacityWarning";
186+
delayDurationSec?: number;
187+
};

0 commit comments

Comments
 (0)