From 498a5159233f37ffb74b12ac1f90594ad7813447 Mon Sep 17 00:00:00 2001 From: agoltzman <106151463+agoltzman@users.noreply.github.com> Date: Sun, 13 Oct 2024 15:48:30 +0900 Subject: [PATCH] fix(@fireblocks/e2e-tests): :bug: raise error in case invalid address format --- .changeset/afraid-buses-give.md | 5 +++++ packages/e2e-tests/transfer-utils.ts | 11 +++-------- 2 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 .changeset/afraid-buses-give.md diff --git a/.changeset/afraid-buses-give.md b/.changeset/afraid-buses-give.md new file mode 100644 index 00000000..74166f9c --- /dev/null +++ b/.changeset/afraid-buses-give.md @@ -0,0 +1,5 @@ +--- +'@fireblocks/e2e-tests': patch +--- + +raise error if invalid address format diff --git a/packages/e2e-tests/transfer-utils.ts b/packages/e2e-tests/transfer-utils.ts index ad887804..956a8bbe 100644 --- a/packages/e2e-tests/transfer-utils.ts +++ b/packages/e2e-tests/transfer-utils.ts @@ -54,6 +54,9 @@ export const startWithdrawal = async (page: Page, assetId: string, toAddress: st await page.getByLabel(`Withdraw ${assetId}`).click(); await page.getByLabel('Recipient Address').fill(toAddress); await page.getByRole('button', { name: 'Create Transaction' }).click(); + if (await page.getByText('Invalid address format').isVisible()) { + throw new FixError('Invalid format when not expected.'); + } return (await page.getByLabel('Relay URL').inputValue()) ?? ''; }; @@ -118,11 +121,3 @@ export const broadcastTransaction = async (page: Page, signedTxData: string): Pr }; const _fillQrCode = async (page: Page, qrCodeData: string) => await page.getByLabel('QR Code URL').fill(qrCodeData); - -// export const deriveAsset = wrapFunc(_deriveAsset); -// export const createVaults = wrapFunc(_createVaults); -// export const getAddressForAsset = wrapFunc(_getAddressForAsset); -// export const startWithdrawal = wrapFunc(_startWithdrawal); -// export const fetchTxParamData = wrapFunc(_fetchTxParamData); -// export const approveTransaction = wrapFunc(_approveTransaction); -// export const broadcastTransaction = wrapFunc(_broadcastTransaction);