feat: add data providers to zap pool
This commit is contained in:
parent
b65542560c
commit
7ab8eff33a
@ -14,6 +14,21 @@ import { useUserProfile } from "Hooks/useUserProfile";
|
||||
import AsyncButton from "Element/AsyncButton";
|
||||
import { useWallet } from "Wallet";
|
||||
|
||||
const DataProviders = [
|
||||
{
|
||||
name: "nostr.band",
|
||||
owner: bech32ToHex("npub1sx9rnd03vs34lp39fvfv5krwlnxpl90f3dzuk8y3cuwutk2gdhdqjz6g8m"),
|
||||
},
|
||||
{
|
||||
name: "nostr.watch",
|
||||
owner: bech32ToHex("npub1uac67zc9er54ln0kl6e4qp2y6ta3enfcg7ywnayshvlw9r5w6ehsqq99rx"),
|
||||
},
|
||||
{
|
||||
name: "nostr.directory",
|
||||
owner: bech32ToHex("npub1teawtzxh6y02cnp9jphxm2q8u6xxfx85nguwg6ftuksgjctvavvqnsgq5u"),
|
||||
},
|
||||
];
|
||||
|
||||
function ZapTarget({ target }: { target: ZapPoolRecipient }) {
|
||||
const login = useLogin();
|
||||
const profile = useUserProfile(target.pubkey);
|
||||
@ -180,6 +195,24 @@ export default function ZapPoolPage() {
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
<h3>
|
||||
<FormattedMessage defaultMessage="Data Providers" />
|
||||
</h3>
|
||||
{DataProviders.map(a => (
|
||||
<div className="card">
|
||||
<h4>{a.name}</h4>
|
||||
<ZapTarget
|
||||
target={
|
||||
zapPool.find(b => b.pubkey === a.owner && b.type === ZapPoolRecipientType.DataProvider) ?? {
|
||||
type: ZapPoolRecipientType.DataProvider,
|
||||
pubkey: a.owner,
|
||||
split: 0,
|
||||
sum: 0,
|
||||
}
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ export enum ZapPoolRecipientType {
|
||||
Generic = 0,
|
||||
Relay = 1,
|
||||
FileHost = 2,
|
||||
DataProvider = 3,
|
||||
}
|
||||
|
||||
export interface ZapPoolRecipient {
|
||||
|
@ -319,6 +319,9 @@
|
||||
"E8a4yq": {
|
||||
"defaultMessage": "Follow some popular accounts"
|
||||
},
|
||||
"ELbg9p": {
|
||||
"defaultMessage": "Data Providers"
|
||||
},
|
||||
"EPYwm7": {
|
||||
"defaultMessage": "Your private key is your password. If you lose this key, you will lose access to your account! Copy it and keep it in a safe place. There is no way to reset your private key."
|
||||
},
|
||||
|
@ -104,6 +104,7 @@
|
||||
"Dt/Zd5": "Media in posts will automatically be shown for selected people, otherwise only the link will show",
|
||||
"DtYelJ": "Transfer",
|
||||
"E8a4yq": "Follow some popular accounts",
|
||||
"ELbg9p": "Data Providers",
|
||||
"EPYwm7": "Your private key is your password. If you lose this key, you will lose access to your account! Copy it and keep it in a safe place. There is no way to reset your private key.",
|
||||
"EWyQH5": "Global",
|
||||
"Ebl/B2": "Translate to {lang}",
|
||||
|
Loading…
x
Reference in New Issue
Block a user