diff --git a/wallets/lightning-address/server.js b/wallets/lightning-address/server.js index d0da5f12..f7e51356 100644 --- a/wallets/lightning-address/server.js +++ b/wallets/lightning-address/server.js @@ -32,8 +32,8 @@ export const createInvoice = async ( const body = await res.json() if (body.status === 'ERROR') { - throw new Error(res.reason) + throw new Error(body.reason) } - return res.pr + return body.pr }