fix: return hash from nostr.build

This commit is contained in:
2023-12-10 17:23:57 +00:00
parent d167579348
commit 5add66711a
2 changed files with 14 additions and 13 deletions

View File

@ -341,18 +341,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),
)), )),
); );
}} }}
/> />
@ -421,9 +421,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,
)), )),
) )
} }
/> />

View File

@ -40,6 +40,7 @@ export default async function NostrBuild(file: File | Blob, publisher?: EventPub
blurhash: res.blurhash, blurhash: res.blurhash,
width: res.dimensions.width, width: res.dimensions.width,
height: res.dimensions.height, height: res.dimensions.height,
hash: res.sha256
}, },
}; };
} }