We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b0cc00 commit 183ee2eCopy full SHA for 183ee2e
src/utils/lightning/index.ts
@@ -1523,8 +1523,16 @@ export const getPeersFromStorage = ({
1523
return getLightningStore().nodes[selectedWallet].peers[selectedNetwork];
1524
};
1525
1526
+/**
1527
+ * Adds trusted peers from env file as well as directly from Blocktank API
1528
+ */
1529
export const addTrustedPeers = async (): Promise<Result<string>> => {
- await lm.setTrustedZeroConfPeerNodeIds(__TRUSTED_ZERO_CONF_PEERS__);
1530
+ const btInfo = await getBlocktankInfo(true);
1531
+ const btNodeIds = btInfo.nodes.map((n) => n.pubkey);
1532
+
1533
+ await lm.setTrustedZeroConfPeerNodeIds(
1534
+ Array.from(new Set([...btNodeIds, ...__TRUSTED_ZERO_CONF_PEERS__])),
1535
+ );
1536
return ok('Trusted peers added.');
1537
1538
0 commit comments