move @snort/nostr code into System

This commit is contained in:
2023-05-30 14:48:38 +01:00
parent baec8d6904
commit f86053c14f
119 changed files with 1071 additions and 163 deletions

View File

@ -1,8 +1,9 @@
import "./SendSats.css";
import React, { useEffect, useMemo, useState } from "react";
import { useIntl, FormattedMessage } from "react-intl";
import { HexKey, RawEvent } from "@snort/nostr";
import { HexKey, RawEvent } from "System";
import { System } from "index";
import { formatShort } from "Number";
import Icon from "Icons/Icon";
import useEventPublisher from "Feed/EventPublisher";
@ -133,7 +134,7 @@ export default function SendSats(props: SendSatsProps) {
const randomKey = generateRandomKey();
console.debug("Generated new key for zap: ", randomKey);
const publisher = new EventPublisher(randomKey.publicKey, randomKey.privateKey);
const publisher = new EventPublisher(System, randomKey.publicKey, randomKey.privateKey);
zap = await publisher.zap(amount * 1000, author, relays, note, comment, eb => eb.tag(["anon", ""]));
} else {
zap = await publisher.zap(amount * 1000, author, relays, note, comment);