You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicAuction was written to much earlier APIs, and so is not providing good example of current API usage.
The code is too complicated for the function it's providing (121 lines of code)
It's working too hard to check things it shouldn't have to care about
The termination is based on number of bids, which is not part of any interesting use case
auction.js has helper functions just for it. Since htey are specialized to particular Keywords, they should just be private in the module with publicAuction.
Description of the Design
Redo using the affordances of the new APIS
Offer checking should rely on Zoe or use helpers
Termination should at the very least be "whenever the seller closes the auction" since that is at least simpler.
Add notifiers?
It could incrementally update the auction state on each bid
Security Considerations
The refundAmount logic is a hazard and should not be necessary. It's implied by the transfer, and so linear operations would be better (e.g., amount.split).
Test Plan
Tests should stay the same except that auction-close should use a better mechanism
The text was updated successfully, but these errors were encountered:
What is the Problem Being Solved?
publicAuction
was written to much earlier APIs, and so is not providing good example of current API usage.auction.js
has helper functions just for it. Since htey are specialized to particular Keywords, they should just be private in the module with publicAuction.Description of the Design
Security Considerations
The
refundAmount
logic is a hazard and should not be necessary. It's implied by the transfer, and so linear operations would be better (e.g., amount.split).Test Plan
Tests should stay the same except that auction-close should use a better mechanism
The text was updated successfully, but these errors were encountered: