feat/transfer-subscription-event - #770
Merged
Merged
Conversation
…ion-event This pull request adds support for emitting a dedicated `subscription_transferred` event upon transferring subscription ownership in the FlowPay contract. This enables off-chain indexers and index trackers to accurately reconstruct and follow subscription state changes. Summary of changes: 1. Added `emit_subscription_transferred` in `contract/src/events.rs`. 2. Emitted the `subscription_transferred` event in `transfer_subscription` in `contract/src/lib.rs` using the final (post-transfer) subscription state. 3. Updated the events reference in `docs/EVENTS.md` and `docs/API.md` with schema, details, and JSON examples. 4. Added comprehensive unit tests in `contract/src/test.rs` validating that topic keys and data payload are correctly emitted. 5. Resolved a Soroban field length compile-time restriction by renaming `pending_merchant_revenues_count` to `pending_merchant_rev_count` in `HealthReport`. 6. Suppressed/resolved remaining clippy and compilation errors for clean `--all-targets` clippy verification.
|
@benedictworks-home 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! 🚀 |
- Implemented get_charge_history_count(env: Env, user: Address) -> u32 - Followed existing DataKey::ChargeHistory read pattern - Capped history at 12 entries maximum - Added unit tests covering all count logic & edge cases - Successfully updated related test snapshots - Resolved all clippy warnings and formatting guidelines Co-authored-by: benedictworks-home <277016530+benedictworks-home@users.noreply.github.com>
…-count Implement get_charge_history_count read-only function
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.
This pull request adds support for emitting a dedicated
subscription_transferredevent upon transferring subscription ownership in the FlowPay contract. This enables off-chain indexers and index trackers to accurately reconstruct and follow subscription state changes.Summary of changes:
emit_subscription_transferredincontract/src/events.rs.subscription_transferredevent intransfer_subscriptionincontract/src/lib.rsusing the final (post-transfer) subscription state.docs/EVENTS.mdanddocs/API.mdwith schema, details, and JSON examples.contract/src/test.rsvalidating that topic keys and data payload are correctly emitted.pending_merchant_revenues_counttopending_merchant_rev_countinHealthReport.--all-targetsclippy verification.Closes #629