From 679ac0dcfb278f737f0ff403da459427e85adc36 Mon Sep 17 00:00:00 2001 From: Chewing Glass Date: Thu, 3 Aug 2023 14:30:00 -0500 Subject: [PATCH] Support payment QRs --- src/features/payment/PaymentScreen.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/features/payment/PaymentScreen.tsx b/src/features/payment/PaymentScreen.tsx index 591f87b77..32a40fb5f 100644 --- a/src/features/payment/PaymentScreen.tsx +++ b/src/features/payment/PaymentScreen.tsx @@ -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 [