This repository was archived by the owner on Apr 21, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -233,7 +233,8 @@ export function Receive() {
233233
234234 const params = objectToSearchParams ( {
235235 amount : raw ?. btc_amount ,
236- lightning : raw ?. invoice
236+ lightning : raw ?. invoice ,
237+ pj : raw ?. pj ,
237238 } ) ;
238239
239240 setLoading ( false ) ;
Original file line number Diff line number Diff line change @@ -5,11 +5,17 @@ export function objectToSearchParams<
55 Object . entries ( obj )
66 . filter ( ( [ _ , value ] ) => value !== undefined )
77 // Value shouldn't be null we just filtered it out but typescript is dumb
8- . map ( ( [ key , value ] ) =>
9- value
10- ? `${ encodeURIComponent ( key ) } =${ encodeURIComponent ( value ) } `
11- : ""
12- )
8+ . map ( ( [ key , value ] ) => {
9+ if ( value ) {
10+ if ( key === "pj" ) {
11+ return `${ key } =${ value } `
12+ } else {
13+ return `${ encodeURIComponent ( key ) } =${ encodeURIComponent ( value ) } `
14+ }
15+ } else {
16+ return ""
17+ }
18+ } )
1319 . join ( "&" )
1420 ) ;
1521}
You can’t perform that action at this time.
0 commit comments