mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2025-12-10 05:56:33 -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);
|
||||
expect(ctx.offer.getState()).toEqual(ctx.reserveExactAmount ? "PENDING" : "AVAILABLE");
|
||||
ctx.offerId = ctx.offer.getId();
|
||||
await wait(ctx.maxTimePeerNoticeMs);
|
||||
} else {
|
||||
ctx.offer = getOffer(await ctx.maker.havenod!.getMyOffers(ctx.assetCode!, ctx.direction), ctx.offerId!);
|
||||
if (!ctx.offer) {
|
||||
|
|
@ -2778,6 +2777,7 @@ async function executeTrade(ctxP: Partial<TradeContext>): Promise<string> {
|
|||
} catch (err) { /* ignore */ }
|
||||
}
|
||||
}
|
||||
await wait(ctx.maxTimePeerNoticeMs); //wait for taker and arbitrator to see offer
|
||||
|
||||
// TODO (woodser): test error message taking offer before posted
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue