add ids to all toasts to help id rogue toasts
This commit is contained in:
parent
d8f4071afb
commit
5086c2036d
@ -122,7 +122,7 @@ export function MarkdownInput ({ label, topLevel, groupClassName, onChange, onKe
|
|||||||
nextFetchPolicy: 'no-cache',
|
nextFetchPolicy: 'no-cache',
|
||||||
onError: (err) => {
|
onError: (err) => {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
toaster.danger(err.message || err.toString?.())
|
toaster.danger(`unabled to get image fees: ${err.message || err.toString?.()}`)
|
||||||
},
|
},
|
||||||
onCompleted: ({ imageFeesInfo }) => {
|
onCompleted: ({ imageFeesInfo }) => {
|
||||||
merge({
|
merge({
|
||||||
@ -757,7 +757,7 @@ export function Form ({
|
|||||||
const feeButton = useFeeButton()
|
const feeButton = useFeeButton()
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (initialError && !initialErrorToasted.current) {
|
if (initialError && !initialErrorToasted.current) {
|
||||||
toaster.danger(initialError.message || initialError.toString?.())
|
toaster.danger('form error: ' + initialError.message || initialError.toString?.())
|
||||||
initialErrorToasted.current = true
|
initialErrorToasted.current = true
|
||||||
}
|
}
|
||||||
}, [])
|
}, [])
|
||||||
@ -804,7 +804,7 @@ export function Form ({
|
|||||||
const msg = err.message || err.toString?.()
|
const msg = err.message || err.toString?.()
|
||||||
// handle errors from JIT invoices by ignoring them
|
// handle errors from JIT invoices by ignoring them
|
||||||
if (msg === 'modal closed' || msg === 'invoice canceled') return
|
if (msg === 'modal closed' || msg === 'invoice canceled') return
|
||||||
toaster.danger(err.message || err.toString?.())
|
toaster.danger('submit error:' + msg)
|
||||||
}
|
}
|
||||||
}, [onSubmit, feeButton?.total, toaster, clearLocalStorage, storageKeyPrefix])
|
}, [onSubmit, feeButton?.total, toaster, clearLocalStorage, storageKeyPrefix])
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ export const ImageUpload = forwardRef(({ children, className, onSelect, onUpload
|
|||||||
try {
|
try {
|
||||||
({ data } = await getSignedPOST({ variables }))
|
({ data } = await getSignedPOST({ variables }))
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
toaster.danger(e.message || e.toString?.())
|
toaster.danger('error initiating upload: ' + e.message || e.toString?.())
|
||||||
onError?.({ ...variables, name: file.name, file })
|
onError?.({ ...variables, name: file.name, file })
|
||||||
reject(e)
|
reject(e)
|
||||||
return
|
return
|
||||||
@ -189,7 +189,7 @@ export const ImageUpload = forwardRef(({ children, className, onSelect, onUpload
|
|||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
// TODO make sure this is actually a helpful error message and does not expose anything to the user we don't want
|
// TODO make sure this is actually a helpful error message and does not expose anything to the user we don't want
|
||||||
const err = res.statusText
|
const err = res.statusText
|
||||||
toaster.danger(err)
|
toaster.danger('error uploading: ' + err)
|
||||||
onError?.({ ...variables, name: file.name, file })
|
onError?.({ ...variables, name: file.name, file })
|
||||||
reject(err)
|
reject(err)
|
||||||
return
|
return
|
||||||
|
@ -274,7 +274,7 @@ export function useZap () {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
console.error(error)
|
console.error(error)
|
||||||
toaster.danger(error?.message || error?.toString?.())
|
toaster.danger('zap: ' + error?.message || error?.toString?.())
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -293,7 +293,7 @@ function InvoiceScanner ({ fieldName }) {
|
|||||||
if (error instanceof DOMException) {
|
if (error instanceof DOMException) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
} else {
|
} else {
|
||||||
toaster.danger(error?.message || error?.toString?.())
|
toaster.danger('qr scan: ' + error?.message || error?.toString?.())
|
||||||
}
|
}
|
||||||
onClose()
|
onClose()
|
||||||
}}
|
}}
|
||||||
@ -340,7 +340,7 @@ export function LnWithdrawal () {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
createWith().catch(e => {
|
createWith().catch(e => {
|
||||||
toaster.danger(e?.message || e?.toString?.())
|
toaster.danger('withdrawal creation: ' + e?.message || e?.toString?.())
|
||||||
})
|
})
|
||||||
}, [createWith, toaster])
|
}, [createWith, toaster])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user