bug: nip5 service update profile cache

This commit is contained in:
Kieran 2023-04-18 13:17:10 +01:00
parent 6fa641e33e
commit 8e2f01fdff
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
1 changed files with 5 additions and 0 deletions

View File

@ -22,6 +22,7 @@ import useEventPublisher from "Feed/EventPublisher";
import { debounce } from "Util";
import useLogin from "Hooks/useLogin";
import SnortServiceProvider from "Nip05/SnortServiceProvider";
import { mapEventToProfile, UserCache } from "Cache";
import messages from "./messages";
@ -218,6 +219,10 @@ export default function Nip5Service(props: Nip05ServiceProps) {
if (props.onSuccess) {
props.onSuccess(nip05);
}
const newMeta = mapEventToProfile(ev);
if (newMeta) {
UserCache.set(newMeta);
}
if (helpText) {
navigate("/settings");
}