Skip to content

Commit

Permalink
fix(@fireblocks/e2e-tests): 🐛 raise error in case invalid address format
Browse files Browse the repository at this point in the history
  • Loading branch information
a0ngo committed Oct 13, 2024
1 parent e9cd83d commit 498a515
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/afraid-buses-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@fireblocks/e2e-tests': patch
---

raise error if invalid address format
11 changes: 3 additions & 8 deletions packages/e2e-tests/transfer-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()) ?? '';
};

Expand Down Expand Up @@ -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);

0 comments on commit 498a515

Please sign in to comment.