diff --git a/wallets/lightning-address/server.js b/wallets/lightning-address/server.js index d0da5f127..f7e51356a 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 }