bug: nip5 service update profile cache
This commit is contained in:
parent
6fa641e33e
commit
8e2f01fdff
|
@ -22,6 +22,7 @@ import useEventPublisher from "Feed/EventPublisher";
|
||||||
import { debounce } from "Util";
|
import { debounce } from "Util";
|
||||||
import useLogin from "Hooks/useLogin";
|
import useLogin from "Hooks/useLogin";
|
||||||
import SnortServiceProvider from "Nip05/SnortServiceProvider";
|
import SnortServiceProvider from "Nip05/SnortServiceProvider";
|
||||||
|
import { mapEventToProfile, UserCache } from "Cache";
|
||||||
|
|
||||||
import messages from "./messages";
|
import messages from "./messages";
|
||||||
|
|
||||||
|
@ -218,6 +219,10 @@ export default function Nip5Service(props: Nip05ServiceProps) {
|
||||||
if (props.onSuccess) {
|
if (props.onSuccess) {
|
||||||
props.onSuccess(nip05);
|
props.onSuccess(nip05);
|
||||||
}
|
}
|
||||||
|
const newMeta = mapEventToProfile(ev);
|
||||||
|
if (newMeta) {
|
||||||
|
UserCache.set(newMeta);
|
||||||
|
}
|
||||||
if (helpText) {
|
if (helpText) {
|
||||||
navigate("/settings");
|
navigate("/settings");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue