Skip to content

Commit

Permalink
fix(wallet): Send wallet transaction webhooks outside of DB transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-pochet committed Oct 14, 2024
1 parent 46f1b29 commit 4c59d0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/services/credits/applied_prepaid_credit_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def call
invoice.prepaid_credit_amount_cents += amount_cents
end

SendWebhookJob.perform_later('wallet_transaction.created', result.wallet_transaction)
after_commit { SendWebhookJob.perform_later('wallet_transaction.created', result.wallet_transaction) }

result
rescue ActiveRecord::RecordInvalid => e
Expand Down

0 comments on commit 4c59d0f

Please sign in to comment.