feat(sdk-api): pass recipient addresses to v1 billing fee endpoint for PayGo migration waiver#9028
Merged
davidkaplanbitgo merged 1 commit intoJun 15, 2026
Conversation
b270c1a to
d56df37
Compare
Forward recipient addresses from the SDK to the server's GET /api/v1/wallet/:id/billing/fee endpoint as recipients[] query params. This allows the server to waive the PayGo fee when all recipients are v2 PayGo wallets (v1-to-v2 migration scenario). Backward-compatible: existing calls without recipients are unchanged. Ticket: T1-3579 Session-Id: 9bcb0f58-d633-492c-a7a4-70bcd09ce08b Task-Id: bf7868aa-6a4c-4ee7-8520-1e6b61551a64
d56df37 to
ff0cbb7
Compare
lcovar
approved these changes
Jun 15, 2026
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.
Summary
transactionBuilder.ts, thegetBitGoFee()inner function now passes recipient addresses alongsideamountandinstantwhen callingwallet.getBitGoFee()wallet.ts,Wallet.prototype.getBitGoFeeforwards therecipientsarray to the server as repeatedrecipients[]=addrquery params onGET /api/v1/wallet/:id/billing/feerecipientsis empty or not provided, the request is identical to beforeContext
When a customer migrates from a v1 PayGo wallet to a v2 PayGo wallet, the normal PayGo fee should be waived. Because the v1 fee is baked into the signed transaction client-side (the SDK calls the fee endpoint, then embeds any nonzero fee output before signing), the waiver must happen at the fee-query step. The server (companion ticket) will return
fee: 0when all recipient addresses resolve to v2 PayGo wallets — but only if the SDK sends the recipient addresses in the request.This change is purely plumbing: it passes the recipient info the server needs to make the waiver determination.
Test plan
modules/sdk-api/test/unit/v1/wallet.tscover:recipients[]query params are sent when recipients providedrecipients[]sent when empty arrayrecipients[]sent when not provided (backward-compat)amountandinstantarguments still throw@bitgo/sdk-apiunit tests continue to passFixes T1-3579
Parent: T1-3375
🤖 Generated with Ralph