Description
src/sponsorship.ts emits a SponsorshipUsed event when a sponsored transaction is submitted, but the event payload's feeSource field is set to the submitter's account rather than the sponsor account. This causes incorrect fee attribution in downstream analytics.
Acceptance Criteria
Context
- Target file:
src/sponsorship.ts
- The sponsor account ID is available in the transaction envelope; no additional Horizon calls are needed
Description
src/sponsorship.tsemits aSponsorshipUsedevent when a sponsored transaction is submitted, but the event payload'sfeeSourcefield is set to the submitter's account rather than the sponsor account. This causes incorrect fee attribution in downstream analytics.Acceptance Criteria
SponsorshipUsedeventfeeSourcefield is set to the sponsor account IDfeeSourcein the emitted event for a sponsored transactionfeeSourceto the submitterContext
src/sponsorship.ts