From 1045243282d03741b038a30d1a17c2c9b5c13eba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Riquelme=20Guzm=C3=A1n?= Date: Fri, 3 Nov 2023 10:17:26 -0300 Subject: [PATCH] chore: jsdocs with description --- packages/sdk/src/utils.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/sdk/src/utils.ts b/packages/sdk/src/utils.ts index dde79f3bc..5d5478076 100644 --- a/packages/sdk/src/utils.ts +++ b/packages/sdk/src/utils.ts @@ -17,9 +17,13 @@ export function getFeeOracleBaseURL(environment?: Environment): string { } } +/** + * @@description Get the status of a transfer using transaction hash and optionally domain id + */ export async function getTransferStatus( - txHash: string, environment: Environment, + txHash: string, + domainId?: string, ): Promise { let url: string; @@ -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 & { status: TransferStatus }; return data.status; }