feat: read nip-58 badges (#394)
This commit is contained in:
@ -13,7 +13,7 @@ import Modal from "Element/Modal";
|
||||
import QrCode from "Element/QrCode";
|
||||
import Copy from "Element/Copy";
|
||||
import { LNURL, LNURLError, LNURLErrorCode, LNURLInvoice, LNURLSuccessAction } from "LNURL";
|
||||
import { debounce } from "Util";
|
||||
import { chunks, debounce } from "Util";
|
||||
|
||||
import messages from "./messages";
|
||||
import { useWallet } from "Wallet";
|
||||
@ -37,18 +37,6 @@ export interface SendSatsProps {
|
||||
author?: HexKey;
|
||||
}
|
||||
|
||||
function chunks<T>(arr: T[], length: number) {
|
||||
const result = [];
|
||||
let idx = 0;
|
||||
let n = arr.length / length;
|
||||
while (n > 0) {
|
||||
result.push(arr.slice(idx, idx + length));
|
||||
idx += length;
|
||||
n -= 1;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
export default function SendSats(props: SendSatsProps) {
|
||||
const onClose = props.onClose || (() => undefined);
|
||||
const { note, author, target } = props;
|
||||
|
Reference in New Issue
Block a user