diff --git a/api/paidAction/index.js b/api/paidAction/index.js index 424198be4..fcbfb4e31 100644 --- a/api/paidAction/index.js +++ b/api/paidAction/index.js @@ -258,8 +258,10 @@ export async function createLightningInvoice (actionType, args, context) { expiry: INVOICE_EXPIRE_SECS }, { models }) + // the sender (me) decides if the wrapped invoice has a description + // whereas the recipient decides if their invoice has a description const { invoice: wrappedInvoice, maxFee } = await wrapInvoice( - bolt11, { msats: cost, description }, { lnd }) + bolt11, { msats: cost, description }, { me, lnd }) return { bolt11, diff --git a/components/comment.js b/components/comment.js index 176ab6f14..62e455f3e 100644 --- a/components/comment.js +++ b/components/comment.js @@ -180,7 +180,8 @@ export default function Comment ({ } } - onEdit={e => { setEdit(!edit) }} + edit={edit} + toggleEdit={e => { setEdit(!edit) }} editText={edit ? 'cancel' : 'edit'} />} diff --git a/components/form.js b/components/form.js index d52fee36b..1d37cdc4d 100644 --- a/components/form.js +++ b/components/form.js @@ -40,6 +40,7 @@ import { useShowModal } from './modal' import { QRCodeSVG } from 'qrcode.react' import { Scanner } from '@yudiel/react-qr-scanner' import { qrImageSettings } from './qr' +import { useIsClient } from './use-client' export class SessionRequiredError extends Error { constructor () { @@ -472,6 +473,7 @@ function InputInner ({ const [field, meta, helpers] = noForm ? [{}, {}, {}] : useField(props) const formik = noForm ? null : useFormikContext() const storageKeyPrefix = useContext(StorageKeyPrefixContext) + const isClient = useIsClient() const storageKey = storageKeyPrefix ? storageKeyPrefix + '-' + props.name : undefined @@ -555,7 +557,7 @@ function InputInner ({ isInvalid={invalid} isValid={showValid && meta.initialValue !== meta.value && meta.touched && !meta.error} /> - {(clear && field.value) && + {(isClient && clear && field.value && !props.readOnly) &&