Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions internal/data/disbursement_instructions.go
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@
}

for receiverID := range receiversByIDMap {
receiverWalletID, exists := receiverIDToReceiverWalletIDMap[receiverID]
_, exists := receiverIDToReceiverWalletIDMap[receiverID]
if !exists {
receiverWalletInsert := ReceiverWalletInsert{
ReceiverID: receiverID,
Expand All @@ -377,13 +377,8 @@
return nil, fmt.Errorf("inserting receiver wallet for receiver id %s: %w", receiverID, insertErr)
}
receiverIDToReceiverWalletIDMap[receiverID] = rwID
} else {

Check failure on line 380 in internal/data/disbursement_instructions.go

View workflow job for this annotation

GitHub Actions / check

SA9003: empty branch (staticcheck)
_, 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
}
Comment on lines 380 to 382
Copy link

Copilot AI Dec 2, 2025

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.

Copilot uses AI. Check for mistakes.
}

Expand Down
Loading