Skip to content

Commit

Permalink
status
Browse files Browse the repository at this point in the history
  • Loading branch information
BeroBurny committed Oct 18, 2024
1 parent 5c1faed commit c4c7852
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
8 changes: 8 additions & 0 deletions packages/sdk/src/helpers/getBridgeHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ interface History {
destinationName: string;
amount: string;
tokenSymbol: string;
status: Status;
}

export enum Status {
pending = "pending",
executed = "executed",
failed = "failed",
}

export async function experimental_getBridgeHistory(
Expand Down Expand Up @@ -68,5 +75,6 @@ function handleSygmaResponseEntry(entry: SygmaTransfer): History {
destinationName: entry.toDomain.name,
amount: entry.amount,
tokenSymbol: entry.fee.tokenSymbol,
status: entry.status,
};
}
10 changes: 3 additions & 7 deletions packages/sdk/src/helpers/sygmaTypes.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {Status} from "./getBridgeHistory";

export interface SygmaTransfer {
id: string;
depositNonce: number;
Expand All @@ -10,7 +12,7 @@ export interface SygmaTransfer {
destination: string;
amount: string;
timestamp?: string;
status: TransferStatus;
status: Status;
deposit?: Deposit;
execution?: Execution;
fee: Fee;
Expand All @@ -19,12 +21,6 @@ export interface SygmaTransfer {
accountId: string;
}

export enum TransferStatus {
pending = "pending",
executed = "executed",
failed = "failed",
}

export interface Resource {
id: string;
type: string;
Expand Down

0 comments on commit c4c7852

Please sign in to comment.