mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2025-12-18 14:54:26 +01:00
npub doesn't work so hide from contact form
This commit is contained in:
@@ -46,7 +46,7 @@ const SubtleText: ParentComponent = (props) => {
|
||||
|
||||
function OnChainItem(props: { item: OnChainTx, labels: MutinyTagItem[] }) {
|
||||
const [store, actions] = useMegaStore();
|
||||
const isReceive = createMemo(() => props.item.received > 0);
|
||||
const isReceive = () => props.item.received > props.item.sent
|
||||
|
||||
const [open, setOpen] = createSignal(false)
|
||||
|
||||
|
||||
@@ -16,11 +16,11 @@ export function ContactForm(props: { handleSubmit: SubmitHandler<ContactFormValu
|
||||
<TextField {...props} placeholder='Satoshi' value={field.value} error={field.error} label="Name" />
|
||||
)}
|
||||
</Field>
|
||||
<Field name="npub" validate={[]}>
|
||||
{/* <Field name="npub" validate={[]}>
|
||||
{(field, props) => (
|
||||
<TextField {...props} placeholder='npub...' value={field.value} error={field.error} label="Nostr npub or NIP-05 (optional)" />
|
||||
)}
|
||||
</Field>
|
||||
</Field> */}
|
||||
</VStack>
|
||||
</div>
|
||||
<Button type="submit" intent="blue" class="w-full flex-none">
|
||||
|
||||
@@ -18,7 +18,8 @@ export function ContactViewer(props: { contact: Contact, gradient: string, saveC
|
||||
|
||||
const handleSubmit: SubmitHandler<ContactFormValues> = (c: ContactFormValues) => {
|
||||
// FIXME: merge with existing contact if saving (need edit contact method)
|
||||
const contact = new Contact(c.name, c.npub ?? undefined, undefined, undefined)
|
||||
// FIXME: npub not valid? other undefineds
|
||||
const contact = new Contact(c.name, undefined, undefined, undefined)
|
||||
props.saveContact(contact)
|
||||
setIsEditing(false)
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ export function TagEditor(props: {
|
||||
|
||||
async function createContact(contact: ContactFormValues) {
|
||||
// FIXME: undefineds
|
||||
// FIXME: npub not valid? other undefineds
|
||||
const c = new Contact(contact.name, undefined, undefined, undefined);
|
||||
const newContactId = await state.mutiny_wallet?.create_new_contact(c);
|
||||
const contactItem = await state.mutiny_wallet?.get_contact(newContactId ?? "");
|
||||
|
||||
@@ -30,7 +30,8 @@ function ContactRow() {
|
||||
const [gradients] = createResource(contacts, gradientsPerContact);
|
||||
|
||||
async function createContact(contact: ContactFormValues) {
|
||||
const c = new Contact(contact.name, contact.npub ?? undefined, undefined, undefined);
|
||||
// FIXME: npub not valid? other undefineds
|
||||
const c = new Contact(contact.name, undefined, undefined, undefined);
|
||||
await state.mutiny_wallet?.create_new_contact(c)
|
||||
refetch();
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ export default function Redshift() {
|
||||
<Match when={shiftStage() === "choose"}>
|
||||
<VStack>
|
||||
<NiceP>Where is this going?</NiceP>
|
||||
<StyledRadioGroup red value={shiftType()} onValueChange={(newValue) => setShiftType(newValue as ShiftOption)} choices={SHIFT_OPTIONS} />
|
||||
<StyledRadioGroup accent="red" value={shiftType()} onValueChange={(newValue) => setShiftType(newValue as ShiftOption)} choices={SHIFT_OPTIONS} />
|
||||
</VStack>
|
||||
<VStack>
|
||||
<NiceP>Choose your <span class="inline-block"><img class="h-4" src={wave} alt="sine wave" /></span> UTXO to begin</NiceP>
|
||||
|
||||
Reference in New Issue
Block a user