diff --git a/src/routes/(app)/admin[[hash=admin_hash]]/phoenixd/+page.server.ts b/src/routes/(app)/admin[[hash=admin_hash]]/phoenixd/+page.server.ts
index 26b7760f7..64ece1db5 100644
--- a/src/routes/(app)/admin[[hash=admin_hash]]/phoenixd/+page.server.ts
+++ b/src/routes/(app)/admin[[hash=admin_hash]]/phoenixd/+page.server.ts
@@ -5,7 +5,9 @@ import {
isPhoenixdConfigured,
phoenixdBalance,
phoenixdDetected,
+ phoenixdGetBolt12,
phoenixdInfo,
+ phoenixdLnAddress,
phoenixdPayInvoice,
phoenixdSendOnChain
} from '$lib/server/phoenixd.js';
@@ -29,17 +31,19 @@ export const load = async () => {
try {
const nodeInfo = await phoenixdInfo();
const balance = await phoenixdBalance();
-
+ const bolt12Address = await phoenixdGetBolt12();
return {
phoenixd: runtimeConfig.phoenixd,
nodeInfo,
- balance
+ balance,
+ bolt12Address
};
} catch (err) {
return {
phoenixd: runtimeConfig.phoenixd,
nodeInfo: null,
- balance: null
+ balance: null,
+ bolt12Address: null
};
}
};
@@ -76,7 +80,9 @@ export const actions = {
.parse(Object.fromEntries(await event.request.formData()));
runtimeConfig.phoenixd.password = parsed.password;
+ runtimeConfig.phoenixd.lnAddress = await phoenixdLnAddress();
+ runtimeConfig.phoenixd.bolt12Address = await phoenixdGetBolt12();
await collections.runtimeConfig.updateOne(
{ _id: 'phoenixd' },
{
diff --git a/src/routes/(app)/admin[[hash=admin_hash]]/phoenixd/+page.svelte b/src/routes/(app)/admin[[hash=admin_hash]]/phoenixd/+page.svelte
index 2691a1073..33f677ed0 100644
--- a/src/routes/(app)/admin[[hash=admin_hash]]/phoenixd/+page.svelte
+++ b/src/routes/(app)/admin[[hash=admin_hash]]/phoenixd/+page.svelte
@@ -22,6 +22,7 @@
let withdrawMode = 'bolt11' as 'bolt11' | 'bitcoin';
let defaultUrl = data.phoenixd.url || 'http://localhost:9740';
+ let showBolt12 = false;
PhoenixD
@@ -92,6 +93,9 @@
+
{#if data.nodeInfo}
+ {#if showBolt12}
+ Bolt12 address: {data.bolt12Address}
+ To use it on page CMS, use this code : [QRCode=Bolt12]
+ {/if}