fix: correct buyKrk call sites for new opts param, add eslint-disable for polling loop
- no-dilution.spec.ts: pass undefined for opts, screenshotPrefix as 4th arg - swap.ts: add eslint-disable-next-line for eth_getFilterLogs polling delay
This commit is contained in:
parent
e6bd236bcc
commit
cd459bb9b0
2 changed files with 3 additions and 2 deletions
|
|
@ -154,6 +154,7 @@ export async function buyKrk(page: Page, ethAmount: string, opts?: BuyKrkOptions
|
|||
console.log(`[swap] Transfer event received (${logs.length} log(s))`);
|
||||
break;
|
||||
}
|
||||
// eslint-disable-next-line no-restricted-syntax -- Polling with timeout: eth_getFilterLogs is HTTP-only polling (not push). See AGENTS.md #Engineering Principles.
|
||||
await new Promise(r => setTimeout(r, 200));
|
||||
}
|
||||
// Clean up filter
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ test('passive holders are not diluted', async ({ browser }) => {
|
|||
await connectWallet(pageA);
|
||||
|
||||
console.log('[TEST] Wallet A buying 1 ETH of KRK...');
|
||||
await buyKrk(pageA, '1', 'walletA');
|
||||
await buyKrk(pageA, '1', undefined, 'walletA');
|
||||
|
||||
const krkBalanceA = await getKrkBalance(config.rpcUrl, config.contracts.Kraiken, ADDRESS_A);
|
||||
console.log(`[TEST] Wallet A KRK balance after buy: ${krkBalanceA}`);
|
||||
|
|
@ -96,7 +96,7 @@ test('passive holders are not diluted', async ({ browser }) => {
|
|||
await connectWallet(pageB);
|
||||
|
||||
console.log('[TEST] Wallet B buying 5 ETH of KRK...');
|
||||
await buyKrk(pageB, '5', 'walletB');
|
||||
await buyKrk(pageB, '5', undefined, 'walletB');
|
||||
|
||||
const krkBalanceB = await getKrkBalance(config.rpcUrl, config.contracts.Kraiken, ADDRESS_B);
|
||||
console.log(`[TEST] Wallet B KRK balance after buy: ${krkBalanceB}`);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue