mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2025-12-11 22:45:42 -05:00
wait for arbitrator and taker to see offer before taking
This commit is contained in:
parent
281144b6c2
commit
c70748bbad
1 changed files with 1 additions and 1 deletions
|
|
@ -2768,7 +2768,6 @@ async function executeTrade(ctxP: Partial<TradeContext>): Promise<string> {
|
||||||
ctx.offer = await makeOffer(ctx);
|
ctx.offer = await makeOffer(ctx);
|
||||||
expect(ctx.offer.getState()).toEqual(ctx.reserveExactAmount ? "PENDING" : "AVAILABLE");
|
expect(ctx.offer.getState()).toEqual(ctx.reserveExactAmount ? "PENDING" : "AVAILABLE");
|
||||||
ctx.offerId = ctx.offer.getId();
|
ctx.offerId = ctx.offer.getId();
|
||||||
await wait(ctx.maxTimePeerNoticeMs);
|
|
||||||
} else {
|
} else {
|
||||||
ctx.offer = getOffer(await ctx.maker.havenod!.getMyOffers(ctx.assetCode!, ctx.direction), ctx.offerId!);
|
ctx.offer = getOffer(await ctx.maker.havenod!.getMyOffers(ctx.assetCode!, ctx.direction), ctx.offerId!);
|
||||||
if (!ctx.offer) {
|
if (!ctx.offer) {
|
||||||
|
|
@ -2778,6 +2777,7 @@ async function executeTrade(ctxP: Partial<TradeContext>): Promise<string> {
|
||||||
} catch (err) { /* ignore */ }
|
} catch (err) { /* ignore */ }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
await wait(ctx.maxTimePeerNoticeMs); //wait for taker and arbitrator to see offer
|
||||||
|
|
||||||
// TODO (woodser): test error message taking offer before posted
|
// TODO (woodser): test error message taking offer before posted
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue