-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(a3p): replace waitForBlock with retryUntilCondition on acceptan…
…ce tests (#10404) closes: https://github.com/Agoric/BytePitchPartnerEng/issues/10 ## Description This PR intends to replace the use of the `waitForBlock` method with the available `sync tools`, more specifically, the `retryUntilCondition` method. The tests that were updated are: - wallet.test.js - core-eval.test.js - value.Vow.test.js - localchain.test.js Note: At wallet.test.js, the script `exitOffer.js` was replaced with the `broadcastBridgeAction` method of `walletUtils` to execute a `tryExitOffer` call. ### Security Considerations No considerations. ### Scaling Considerations No considerations. ### Documentation Considerations No considerations. ### Testing Considerations To build a condition that verifies the success of a `tryExitOffer` transaction for a failed or "bad invitation" offer, it was not possible to use the users wallet `liveOffers` due to the fact that when an invalid offer is created, the payment makes it to `liveOfferPayments` via `withdrawGive` but the offer fails to enter `liveOffers` or `liveOfferSeats`. Checking the Vstorage node `published.wallet.{addr}` for the status of `tryExitOffer` call also does not provide the needed information due to the error thrown by `tryExitOffer`, as the `offerId` isn’t present at `liveOfferSeats`. The alternative approach used was to monitor wallet balance, since the main goal is to ensure that the user’s payment is reclaimed, Suggestion: If feasible, consider updating `Vstorage` to log a `tryExitOffer` attempt, even if it throws an error due to a missing `offerId`. This could include additional information about the transaction's outcome, such as “reclaim successful”. This may require changes to `Vstorage` but could provide more transparent access to the outcome of similar scenarios. This topic was addressed in the following discussion https://github.com/Agoric/agoric-sdk/discussions/10374 ### Upgrade Considerations No considerations.
- Loading branch information
Showing
5 changed files
with
64 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters