-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add resync ln address to kitchen sink
- Loading branch information
1 parent
0da0dce
commit e17feab
Showing
5 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { createSignal } from "solid-js"; | ||
|
||
import { Button, InnerCard, NiceP, VStack } from "~/components"; | ||
import { useI18n } from "~/i18n/context"; | ||
import { useMegaStore } from "~/state/megaStore"; | ||
|
||
export function ResyncLnAddress() { | ||
const i18n = useI18n(); | ||
const [_state, _actions, sw] = useMegaStore(); | ||
const [loading, setLoading] = createSignal(false); | ||
|
||
async function resync() { | ||
try { | ||
setLoading(true); | ||
await sw.resync_lightning_address(); | ||
} catch (e) { | ||
console.error(e); | ||
} | ||
setLoading(false); | ||
} | ||
|
||
return ( | ||
<InnerCard> | ||
<VStack> | ||
<NiceP>{i18n.t("error.resync.lightning_address")}</NiceP> | ||
<Button intent="red" onClick={resync} loading={loading()}> | ||
{i18n.t("error.resync.resync_ln")} | ||
</Button> | ||
</VStack> | ||
</InnerCard> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters