Skip to content

Commit

Permalink
Support payment QRs
Browse files Browse the repository at this point in the history
  • Loading branch information
ChewingGlass committed Aug 3, 2023
1 parent 50b7392 commit 679ac0d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/features/payment/PaymentScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,15 @@ type LinkedPayment = {
amount?: string
payee: string
mint?: string
defaultTokenType?: string
}

const parseLinkedPayments = (opts: PaymentRouteParam): LinkedPayment[] => {
if (opts.payments) {
return JSON.parse(opts.payments)
return JSON.parse(opts.payments).map((p: LinkedPayment) => ({
...p,
mint: p.mint || Mints[p.defaultTokenType?.toUpperCase() as Ticker],
}))
}
if (opts.payee) {
return [
Expand Down

0 comments on commit 679ac0d

Please sign in to comment.