Repository navigation
fix(facilitator): link webhooks to transactions; skip EVM agent register - #171
Merged
Merged
Conversation
- Return the transaction id from the settle insert and pass it to dispatchWebhook, so webhook_deliveries.transaction_id is populated. - Only auto-register agents for Solana payers; EVM payers were being written into agents.solana_address. - Make the Solana e2e mock DB chain like a promise so returned values propagate, and add tests for both fixes. Closes #165 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NbrZHvYoDo9HCJXRGkVjCF
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
# Conflicts: # apps/facilitator/src/__tests__/e2e-solana-payment.test.ts # apps/facilitator/src/__tests__/e2e.test.ts
This branch was successfully deployed
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 #165.
Changes (
apps/facilitator/src/routes/settle.ts).returning({ id }), and the id is passed todispatchWebhook(was hard-codedtransactionId: undefined).webhook_deliveries.transaction_idis now populated, so deliveries can be joined back to their transaction.solanaAddress. Agent auto-registration runs only forsolana:*networks. Theagentstable has no EVM address column, so EVM payments now recordagentId = nullinstead of creating an agent with an0x…address insolana_address.Tests
e2e-solana-payment.test.ts: new "webhook delivery is linked to the recorded transaction". The mock DB's thenable now chains like a promise (passes the callback's return value down), so.returning()values propagate. Previously the mock silently dropped them.e2e.test.ts: new "does not auto-register an EVM payer as a Solana agent".settle.tsand pass with this change.shutdown-loadflake, Flaky test: shutdown-load concurrent requests under full suite #161). Typecheck clean.Note
Touches a different part of
settle.tsthan the pending facilitator security PR, so the two should merge without conflict.🤖 Generated with Claude Code
https://claude.ai/code/session_01NbrZHvYoDo9HCJXRGkVjCF