feat: use blasters for new user metadata
This commit is contained in:
parent
e3cb397d1d
commit
f2ff2c65be
@ -59,6 +59,11 @@ export const DefaultImgProxy = {
|
||||
*/
|
||||
export const DerivationPath = "m/44'/1237'/0'/0/0";
|
||||
|
||||
/**
|
||||
* Blaster relays
|
||||
*/
|
||||
export const Blasters = ["wss://nostr.mutinywallet.com"];
|
||||
|
||||
/**
|
||||
* Regex to match email address
|
||||
*/
|
||||
|
@ -12,7 +12,7 @@ import { unixNowMs } from "@snort/shared";
|
||||
import * as secp from "@noble/curves/secp256k1";
|
||||
import * as utils from "@noble/curves/abstract/utils";
|
||||
|
||||
import { SnortPubKey } from "Const";
|
||||
import { Blasters, SnortPubKey } from "Const";
|
||||
import { LoginStore, UserPreferences, LoginSession, LoginSessionType, SnortAppData, Newest } from "Login";
|
||||
import { generateBip39Entropy, entropyToPrivateKey } from "nip6";
|
||||
import { bech32ToHex, dedupeById, getCountry, sanitizeRelayUrl, unwrap } from "SnortUtils";
|
||||
@ -123,10 +123,12 @@ export async function generateNewLogin(
|
||||
// Create relay metadata event
|
||||
const ev2 = await publisher.relayList(newRelays);
|
||||
await system.BroadcastEvent(ev2);
|
||||
await Promise.all(Blasters.map(a => system.WriteOnceToRelay(a, ev2)));
|
||||
|
||||
// Publish new profile
|
||||
const ev3 = await publisher.metadata(profile);
|
||||
await system.BroadcastEvent(ev3);
|
||||
await Promise.all(Blasters.map(a => system.WriteOnceToRelay(a, ev3)));
|
||||
|
||||
LoginStore.loginWithPrivateKey(await pin(privateKey), entropy, newRelays);
|
||||
}
|
||||
|
@ -11,9 +11,9 @@ import AsyncButton from "Element/AsyncButton";
|
||||
import SnortApi, { RelayDistance } from "External/SnortApi";
|
||||
import { getCountry, getRelayName, sanitizeRelayUrl } from "SnortUtils";
|
||||
import { formatShort } from "Number";
|
||||
import { Blasters } from "Const";
|
||||
|
||||
import messages from "./messages";
|
||||
const Blasters = ["wss://nostr.mutinywallet.com"];
|
||||
|
||||
export async function saveRelays(
|
||||
system: SystemInterface,
|
||||
|
Loading…
x
Reference in New Issue
Block a user