adhere to lnurlp spec better

This commit is contained in:
keyan 2022-05-19 08:18:28 -05:00
parent 0c95794d74
commit 9c8396670a
2 changed files with 5 additions and 1 deletions

View File

@ -10,6 +10,9 @@ export function lnurlPayMetadataString (username) {
return JSON.stringify([[ return JSON.stringify([[
'text/plain', 'text/plain',
`Funding @${username} on stacker.news` `Funding @${username} on stacker.news`
], [
'text/identifier',
`${username}@stacker.news`
]]) ]])
} }

View File

@ -32,7 +32,8 @@ export default async ({ query: { username, amount } }, res) => {
${expiresAt}, ${Number(amount)}, ${user.id})`) ${expiresAt}, ${Number(amount)}, ${user.id})`)
return res.status(200).json({ return res.status(200).json({
pr: invoice.request pr: invoice.request,
routes: []
}) })
} catch (error) { } catch (error) {
console.log(error) console.log(error)