Skip to content

Commit

Permalink
Add support to change to bitcoindWithZmq backend
Browse files Browse the repository at this point in the history
  • Loading branch information
hsjoberg committed Jun 24, 2024
1 parent 53bc8d3 commit a913030
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions src/windows/Settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1548,6 +1548,17 @@ ${t("experimental.tor.disabled.msg2")}`;
await changeHideAmountsEnabled(!hideAmountsEnabled);
};

// Change backend to bitcoindWithZmq
const changeLndChainBackend = useStoreActions((store) => store.settings.changeLndChainBackend);
const onPressChangeBackendToBitcoindWithZmq = async () => {
await changeLndChainBackend("bitcoindWithZmq");
};

// Change backend to neutrino
const onPressChangeBackendToNeutrino = async () => {
await changeLndChainBackend("neutrino");
};

return (
<Container>
<Content style={{ padding: 10 }}>
Expand Down Expand Up @@ -2781,6 +2792,31 @@ ${t("experimental.tor.disabled.msg2")}`;
<Text>Lookup invoice</Text>
</Body>
</ListItem>
{lndChainBackend === "neutrino" && (
<ListItem
style={style.listItem}
icon={true}
onPress={onPressChangeBackendToBitcoindWithZmq}
>
<Left>
<Icon style={style.icon} type="AntDesign" name="file1" />
</Left>
<Body>
<Text>Change bitcoin backend to bitcoindWithZmq</Text>
</Body>
</ListItem>
)}
{lndChainBackend !== "neutrino" && (
<ListItem style={style.listItem} icon={true} onPress={onPressChangeBackendToNeutrino}>
<Left>
<Icon style={style.icon} type="AntDesign" name="file1" />
</Left>
<Body>
<Text>Change bitcoin backend to neutrino</Text>
</Body>
</ListItem>
)}

<ListItem
style={style.listItem}
icon={true}
Expand Down

0 comments on commit a913030

Please sign in to comment.