fixed issues - #416
Merged
chizzy192 merged 2 commits intoAug 28, 2026
Merged
Conversation
|
@Benalex8797 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 #81
closes #85
closes #90
closes #98
SUMMARY:
14 new tests, all present and correct. Here's the complete summary of what was done for issue #85:
No code changes were needed — the initialize function already had all the correct guards (AlreadyInit, InvalidFeeBps, InvalidAddress, require_auth). The issue was about test coverage.
14 new unit tests added to test.rs, organized into three groups:
First-init boundary validation (4 tests):
test_reinit_guard_first_init_zero_fee_succeeds — 0 bps is valid
test_reinit_guard_first_init_max_fee_succeeds — 10000 bps is valid
test_reinit_guard_first_init_fee_above_max_rejected — 10001 bps → InvalidFeeBps, contract stays uninitialized
test_reinit_guard_zero_address_admin_rejected — zero StrKey address → InvalidAddress
Re-initialization guard (6 tests):
Same admin + same fee → AlreadyInit
Same admin + different fee → AlreadyInit, original fee preserved
Different admin → AlreadyInit, original admin preserved
Different admin + zero fee → AlreadyInit
Invalid fee on re-init → AlreadyInit wins (checked before InvalidFeeBps)
test_reinit_guard_config_fully_immutable_after_rejection — all six Config fields unchanged
State corruption / NotInit coverage (4 tests):
test_reinit_guard_repeated_attempts_do_not_corrupt_state — 6 consecutive re-init attempts, all AlreadyInit, config intact
test_reinit_guard_ops_before_init_return_not_init — 7 entry points all return NotInit on uninitialized contract
test_reinit_guard_record_payment_not_init — focused record_payment before init
test_reinit_guard_update_fee_not_init — focused update_platform_fee_bps before init