Skip to content

Commit

Permalink
update quote payment instructions (#266)
Browse files Browse the repository at this point in the history
* update quote payment instructions

* update changeset
  • Loading branch information
nitro-neal authored Aug 1, 2024
1 parent a06581d commit cad5c4e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 30 deletions.
5 changes: 5 additions & 0 deletions .changeset/mighty-carrots-jog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tbdex/protocol": patch
---

update to latest tbdex spec
24 changes: 8 additions & 16 deletions packages/protocol/src/dev-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,24 +153,16 @@ export class DevTools {
return {
expiresAt : new Date().toISOString(),
payin : {
currencyCode : 'BTC',
subtotal : '0.01',
fee : '0.0001',
total : '0.0101',
paymentInstruction : {
link : 'tbdex.io/example',
instruction : 'Fake instruction'
}
currencyCode : 'BTC',
subtotal : '0.01',
fee : '0.0001',
total : '0.0101'
},
payout: {
currencyCode : 'USD',
subtotal : '1000',
fee : '0',
total : '1000',
paymentInstruction : {
link : 'tbdex.io/example',
instruction : 'Fake instruction'
}
currencyCode : 'USD',
subtotal : '1000',
fee : '0',
total : '1000'
},
payoutUnitsPerPayinUnit: '100000.01'
}
Expand Down
13 changes: 0 additions & 13 deletions packages/protocol/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,19 +392,6 @@ export type QuoteDetails = {
fee?: string
/** The total amount of currency to be paid in or paid out. It is always a sum of subtotal and fee */
total: string
/** Object that describes how to pay the PFI, and how to get paid by the PFI (e.g. BTC address, payment link) */
paymentInstruction?: PaymentInstruction
}

/**
* Describes the payment instructions with plain text and/or a link
* @beta
*/
export type PaymentInstruction = {
/** Link to allow Alice to pay PFI, or be paid by the PFI */
link?: string
/** Instruction on how Alice can pay PFI, or how Alice can be paid by the PFI */
instruction?: string
}

/**
Expand Down

0 comments on commit cad5c4e

Please sign in to comment.