Skip to content

Change promise all into two separate calls.#998

Merged
zajck merged 1 commit intomainfrom
make-tests-deterministic
Jun 5, 2025
Merged

Change promise all into two separate calls.#998
zajck merged 1 commit intomainfrom
make-tests-deterministic

Conversation

@zajck
Copy link
Member

@zajck zajck commented Jun 5, 2025

Promise.all should be only used with static calls or when the order of transactions doesn't matter.

In the changed code, the order matters, since it influences the offer id. If the order is switched, the commit to offer in

await exchangeHandler.connect(buyer).commitToOffer(await buyer.getAddress(), offerToken.id);

failed about half of the time.

@zajck zajck self-assigned this Jun 5, 2025
@zajck zajck added the bug Something isn't working label Jun 5, 2025
@coveralls
Copy link

Coverage Status

coverage: 98.916%. remained the same
when pulling 1bc3375 on make-tests-deterministic
into f31a6a7 on main.

@zajck zajck merged commit d75972c into main Jun 5, 2025
12 checks passed
@zajck zajck deleted the make-tests-deterministic branch June 5, 2025 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants