diff --git a/src/components/ActivityDetailsModal.tsx b/src/components/ActivityDetailsModal.tsx index 1ed32510..ab99b189 100644 --- a/src/components/ActivityDetailsModal.tsx +++ b/src/components/ActivityDetailsModal.tsx @@ -520,8 +520,7 @@ export function ActivityDetailsModal(props: { } else { console.debug("reading tx: ", id()); const tx = await state.mutiny_wallet?.get_transaction(id()); - - return tx; + return tx !== null ? tx : id(); // if no tx found still show id } } catch (e) { console.error(e); diff --git a/src/routes/Receive.tsx b/src/routes/Receive.tsx index 76af57c8..450dddaa 100644 --- a/src/routes/Receive.tsx +++ b/src/routes/Receive.tsx @@ -260,7 +260,9 @@ export function Receive() { const params = objectToSearchParams({ amount: raw?.btc_amount, - lightning: raw?.invoice + lightning: raw?.invoice, + pj: raw?.pj, + ohttp: raw?.ohttp, }); setLoading(false); diff --git a/src/utils/objectToSearchParams.ts b/src/utils/objectToSearchParams.ts index 84434cde..20e257fb 100644 --- a/src/utils/objectToSearchParams.ts +++ b/src/utils/objectToSearchParams.ts @@ -5,11 +5,17 @@ export function objectToSearchParams< Object.entries(obj) .filter(([_, value]) => value !== undefined) // Value shouldn't be null we just filtered it out but typescript is dumb - .map(([key, value]) => - value - ? `${encodeURIComponent(key)}=${encodeURIComponent(value)}` - : "" - ) + .map(([key, value]) => { + if (value) { + if (key === "pj") { + return `${key}=${value}` + } else { + return `${encodeURIComponent(key)}=${encodeURIComponent(value)}` + } + } else { + return "" + } + }) .join("&") ); }