-
Notifications
You must be signed in to change notification settings - Fork 11
feat: add Bitcoin L1 deposit-address instruction + refundAddress to quotes #736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| title: Bitcoin L1 Deposit Address | ||
| type: object | ||
| required: | ||
| - accountType | ||
| - address | ||
| properties: | ||
| accountType: | ||
| type: string | ||
| description: Type of payment account or wallet | ||
| enum: | ||
| - BITCOIN_L1 | ||
| example: BITCOIN_L1 | ||
|
Comment on lines
+7
to
+12
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we don't need this if we're using PaymentAccountType.yaml? and I think we should be doing that based on my read of the cousin models
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same underlying decision as the thread above — full context there. Short version: dropping this local |
||
| address: | ||
| type: string | ||
| description: On-chain Bitcoin (L1) deposit address to send funds to | ||
| example: bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq | ||
| network: | ||
| type: string | ||
| description: The blockchain network for the deposit address. | ||
| enum: | ||
| - BITCOIN | ||
| example: BITCOIN | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be using BasePaymentAccountInfo.yaml ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right on consistency grounds — every cousin model does
allOf: [BasePaymentAccountInfo, { narrow accountType to its discriminator value }], and this is the only member that rolls its own standaloneaccountType. I actually made exactly this change earlier (commit 847f94c: inheritBasePaymentAccountInfo+ addBITCOIN_L1to the sharedPaymentAccountTypeenum), but reverted it because it broke theDetect breaking changesjob — and I want to flag that trade-off before redoing it, because the two are inseparable.Why they're coupled: inheriting
BasePaymentAccountInfopinsaccountTypeto the sharedPaymentAccountTypeenum, so narrowing toBITCOIN_L1is only valid ifBITCOIN_L1is in that shared enum (otherwise theallOfintersection is empty). So "use BasePaymentAccountInfo" necessarily means "add BITCOIN_L1 to PaymentAccountType."Why it broke CI: adding the value to the shared enum makes oasdiff report a new enum value on the
accountTypeof every cousin that inherits the base (~50 currencies × the quote + transaction response paths = 100+ findings). The breaking detection is fine — that step runs--fail-on ERRand these are all WARN — but the downstreammarocchino/sticky-pull-request-commentstep then fails withArgument list too longtrying to post that 100+-line body. The standalone enum keeps it to the single "added oneOf member" finding, so the job stays green.I can't fix that workflow myself (the bot lacks the GitHub Actions
workflowspermission).So it's a real trade-off:
Detect breaking changescheck goes red on the comment step until the workflow is made large-body-safe (or that check is overridden/not required for merge).oneOfvariant carries its ownaccountTypeliteral (generators key off the discriminator), and it avoids implying a USD/EUR/etc. account could ever returnaccountType: BITCOIN_L1.Happy to push the
BasePaymentAccountInfoversion if you'd prefer consistency and are OK with that check being red pending a workflow fix — just say the word and I'll redo it. Which way do you want to go?🤖 resonant-reactor(#2) | Feedback