fix: tests
This commit is contained in:
@ -1,5 +1,4 @@
|
|||||||
import { RelaySettings } from "@snort/system";
|
import { RelaySettings } from "@snort/system";
|
||||||
import { bech32ToHex } from "SnortUtils";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1 Hour in seconds
|
* 1 Hour in seconds
|
||||||
@ -61,10 +60,10 @@ export const DefaultRelays = new Map<string, RelaySettings>([
|
|||||||
export const SearchRelays = ["wss://relay.nostr.band"];
|
export const SearchRelays = ["wss://relay.nostr.band"];
|
||||||
|
|
||||||
export const DeveloperAccounts = [
|
export const DeveloperAccounts = [
|
||||||
bech32ToHex(KieranPubKey), // kieran
|
"63fe6318dc58583cfe16810f86dd09e18bfd76aabc24a0081ce2856f330504ed", // kieran
|
||||||
bech32ToHex("npub1g53mukxnjkcmr94fhryzkqutdz2ukq4ks0gvy5af25rgmwsl4ngq43drvk"), // Martti
|
"4523be58d395b1b196a9b8c82b038b6895cb02b683d0c253a955068dba1facd0", // Martti
|
||||||
bech32ToHex("npub107jk7htfv243u0x5ynn43scq9wrxtaasmrwwa8lfu2ydwag6cx2quqncxg"), // verbiricha
|
"7fa56f5d6962ab1e3cd424e758c3002b8665f7b0d8dcee9fe9e288d7751ac194", // verbiricha
|
||||||
bech32ToHex("npub1r0rs5q2gk0e3dk3nlc7gnu378ec6cnlenqp8a3cjhyzu6f8k5sgs4sq9ac"), // Karnage
|
"1bc70a0148b3f316da33fe3c89f23e3e71ac4ff998027ec712b905cd24f6a411", // Karnage
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -75,13 +75,9 @@ export function parseId(id: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function bech32ToHex(str: string) {
|
export function bech32ToHex(str: string) {
|
||||||
try {
|
const nKey = bech32.decode(str, 10_000);
|
||||||
const nKey = bech32.decode(str, 1_000);
|
const buff = bech32.fromWords(nKey.words);
|
||||||
const buff = bech32.fromWords(nKey.words);
|
return bytesToHex(buff);
|
||||||
return utils.bytesToHex(Uint8Array.from(buff));
|
|
||||||
} catch (e) {
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -90,13 +86,9 @@ export function bech32ToHex(str: string) {
|
|||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function bech32ToText(str: string) {
|
export function bech32ToText(str: string) {
|
||||||
try {
|
const nKey = bech32.decode(str, 10_000);
|
||||||
const decoded = bech32.decode(str, 1000);
|
const buff = bech32.fromWords(nKey.words);
|
||||||
const buf = bech32.fromWords(decoded.words);
|
return new TextDecoder().decode(buff);
|
||||||
return new TextDecoder().decode(Uint8Array.from(buf));
|
|
||||||
} catch {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user