This commit is contained in:
parent
a1e9df8254
commit
d00f8b0d85
@ -158,7 +158,7 @@ export function NoteCreator() {
|
|||||||
async function sendNote() {
|
async function sendNote() {
|
||||||
const ev = await buildNote();
|
const ev = await buildNote();
|
||||||
if (ev) {
|
if (ev) {
|
||||||
trackEvent("PostNote")
|
trackEvent("PostNote");
|
||||||
if (ev.tags.find(a => a[0] === "content-warning")) {
|
if (ev.tags.find(a => a[0] === "content-warning")) {
|
||||||
trackEvent("PostNote:WithContentWarning");
|
trackEvent("PostNote:WithContentWarning");
|
||||||
}
|
}
|
||||||
@ -352,18 +352,18 @@ export function NoteCreator() {
|
|||||||
onChange={e => {
|
onChange={e => {
|
||||||
note.update(
|
note.update(
|
||||||
v =>
|
v =>
|
||||||
(v.selectedCustomRelays =
|
(v.selectedCustomRelays =
|
||||||
// set false if all relays selected
|
// set false if all relays selected
|
||||||
e.target.checked &&
|
e.target.checked &&
|
||||||
note.selectedCustomRelays &&
|
note.selectedCustomRelays &&
|
||||||
note.selectedCustomRelays.length == a.length - 1
|
note.selectedCustomRelays.length == a.length - 1
|
||||||
? undefined
|
? undefined
|
||||||
: // otherwise return selectedCustomRelays with target relay added / removed
|
: // otherwise return selectedCustomRelays with target relay added / removed
|
||||||
a.filter(el =>
|
a.filter(el =>
|
||||||
el === r
|
el === r
|
||||||
? e.target.checked
|
? e.target.checked
|
||||||
: !note.selectedCustomRelays || note.selectedCustomRelays.includes(el),
|
: !note.selectedCustomRelays || note.selectedCustomRelays.includes(el),
|
||||||
)),
|
)),
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
@ -432,9 +432,9 @@ export function NoteCreator() {
|
|||||||
onChange={e =>
|
onChange={e =>
|
||||||
note.update(
|
note.update(
|
||||||
v =>
|
v =>
|
||||||
(v.zapSplits = arr.map((vv, ii) =>
|
(v.zapSplits = arr.map((vv, ii) =>
|
||||||
ii === i ? { ...vv, weight: Number(e.target.value) } : vv,
|
ii === i ? { ...vv, weight: Number(e.target.value) } : vv,
|
||||||
)),
|
)),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
@ -148,10 +148,11 @@ export default function ZapPoolPage() {
|
|||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{wallet && (
|
{wallet && (
|
||||||
<AsyncButton onClick={async () => {
|
<AsyncButton
|
||||||
trackEvent("ZapPool:Manual")
|
onClick={async () => {
|
||||||
await ZapPoolController?.payout(wallet);
|
trackEvent("ZapPool:Manual");
|
||||||
}}>
|
await ZapPoolController?.payout(wallet);
|
||||||
|
}}>
|
||||||
<FormattedMessage defaultMessage="Payout Now" id="+PzQ9Y" />
|
<FormattedMessage defaultMessage="Payout Now" id="+PzQ9Y" />
|
||||||
</AsyncButton>
|
</AsyncButton>
|
||||||
)}
|
)}
|
||||||
|
@ -168,7 +168,7 @@ class ZapPool extends ExternalStore<Array<ZapPoolRecipient>> {
|
|||||||
if (wallet.canAutoLogin()) {
|
if (wallet.canAutoLogin()) {
|
||||||
await wallet.login();
|
await wallet.login();
|
||||||
}
|
}
|
||||||
trackEvent("ZapPool:Automatic")
|
trackEvent("ZapPool:Automatic");
|
||||||
await this.payout(wallet);
|
await this.payout(wallet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user