fix(escrow): address issues #706 #707 #708 #709 - #720
Merged
Conversation
…RG#709 JSE-ORG#706 (instructions.rs) — create_escrow_multi: add is_token_allowed() check before persisting the escrow so that the token allowlist is enforced consistently with create_escrow_internal. Returns TokenNotAllowed when the allowlist is enabled and the token is not present. is_token_allowed is a no-op when the allowlist is disabled, so existing deployments are unaffected. JSE-ORG#707 (internal.rs) — tally_votes: expand doc comment with detailed deadlock scenario analysis (threshold=N unanimous split, M-of-N split where all voters have cast), reference issue JSE-ORG#707 (supersedes JSE-ORG#667), and enumerate three concrete on-chain escape hatch designs: admin timelock override, expiration-based majority-rules fallback, and DAO escalation mechanism. JSE-ORG#708 (internal.rs) — payout_basket_tokens: replace the implicit index-0 skip with an explicit value-based filter against EscrowData.token. The function now loads the escrow to obtain the primary token address and skips any basket entry whose token field matches by value, making the primary-token invariant explicit and safe against future reordering of save_basket_tokens call sites. JSE-ORG#709 (admin.rs) — emergency_drain: add detailed doc comment explaining the dual-signature requirement (buyer + seller), the liveness risk it creates when a party is unresponsive, and a recommended admin-controlled timelock override path for a future contract upgrade.
|
@k-deejah Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #706 (instructions.rs) — create_escrow_multi: add is_token_allowed() check
before persisting the escrow so that the token allowlist is enforced
consistently with create_escrow_internal. Returns TokenNotAllowed when
the allowlist is enabled and the token is not present. is_token_allowed
is a no-op when the allowlist is disabled, so existing deployments are
unaffected.
closes #707 (internal.rs) — tally_votes: expand doc comment with detailed deadlock
scenario analysis (threshold=N unanimous split, M-of-N split where all
voters have cast), reference issue #707 (supersedes #667), and enumerate
three concrete on-chain escape hatch designs: admin timelock override,
expiration-based majority-rules fallback, and DAO escalation mechanism.
closes #708 (internal.rs) — payout_basket_tokens: replace the implicit index-0
skip with an explicit value-based filter against EscrowData.token. The
function now loads the escrow to obtain the primary token address and
skips any basket entry whose token field matches by value, making the
primary-token invariant explicit and safe against future reordering of
save_basket_tokens call sites.
closes #709 (admin.rs) — emergency_drain: add detailed doc comment explaining the
dual-signature requirement (buyer + seller), the liveness risk it creates
when a party is unresponsive, and a recommended admin-controlled timelock
override path for a future contract upgrade.
Pull Request Checklist
Thank you for contributing! Please review the following checklist to ensure your PR is ready for review.
Summary
Fixes #issueorRelated to #issue.Testing
cargo test).Documentation
Code Quality
cargo fmt).cargo clippy).Breaking Changes
Additional Notes
Please ensure all checkboxes are checked before requesting a review.