Skip to content

Commit

Permalink
chore: jsdocs with description
Browse files Browse the repository at this point in the history
  • Loading branch information
wainola committed Nov 3, 2023
1 parent e218cf8 commit 1045243
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/sdk/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ export function getFeeOracleBaseURL(environment?: Environment): string {
}
}

/**
* @@description Get the status of a transfer using transaction hash and optionally domain id

Check failure on line 21 in packages/sdk/src/utils.ts

View workflow job for this annotation

GitHub Actions / check (ubuntu-latest, 18)

Delete `·`
*/
export async function getTransferStatus(
txHash: string,
environment: Environment,
txHash: string,
domainId?: string,
): Promise<TransferStatus> {
let url: string;

Expand All @@ -31,7 +35,9 @@ export async function getTransferStatus(
throw new Error('Invalid environment');
}

const response = await fetch(`${url}/api/transfers/txHash/${txHash}`);
const response = await fetch(
`${url}/api/transfers/txHash/${txHash}?${domainId ? `domainId=${domainId}` : ''}}`,
);
const data = (await response.json()) as Record<string, unknown> & { status: TransferStatus };
return data.status;
}

0 comments on commit 1045243

Please sign in to comment.