-
Notifications
You must be signed in to change notification settings - Fork 44
Disable invitation for multiple disbursements #965
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: meridian-pay
Are you sure you want to change the base?
Conversation
|
stellar-disbursement-platform-backend-preview is available here: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR disables automatic invitation retries for existing receiver wallets during multiple disbursement processing, while preserving the manual retry functionality through API endpoints. The change prevents the system from automatically resending invitations when processing the same receivers across multiple disbursements.
Key Changes
- Removed automatic
RetryInvitationMessagecall inprocessReceiverWalletsfor existing receiver wallets - Added explanatory comment documenting the behavioral change
- Manual retry functionality remains available via HTTP endpoints and embedded wallet service
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } else { | ||
| _, retryErr := di.receiverWalletModel.RetryInvitationMessage(ctx, dbTx, receiverWalletID) | ||
| if retryErr != nil { | ||
| if !errors.Is(retryErr, ErrRecordNotFound) { | ||
| return nil, fmt.Errorf("retrying invitation: %w", retryErr) | ||
| } | ||
| } | ||
| // Do not resend invitation if the receiver wallet already exists | ||
| } |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test "success - existing receiver wallet" in disbursement_instructions_test.go (lines 423-531) will fail after this change. The test sets invitation_sent_at = NOW() and then expects it to be reset to nil after calling ProcessAll again (see assertion at line 523). Since the retry invitation logic has been removed, this test needs to be updated to reflect the new behavior where invitation_sent_at should remain set (not be reset to nil) when processing the same receivers again.
What
[TODO: Brief description of the changes]
Why
[TODO: Why this change is being made. Include any context required to understand the why.]
Known limitations
[TODO or N/A]
Checklist
SDP-1234: Add new featureorChore: Refactor package xyzformat. The Jira ticket code was included if available.CHANGELOG.mdis updated (if applicable)