Fix [undefined] in logs
This commit is contained in:
parent
a0d33a23f3
commit
f9169c645a
@ -112,7 +112,7 @@ export function useWalletLogManager (setLogs) {
|
|||||||
const { add, clear, notSupported } = useWalletLogDB()
|
const { add, clear, notSupported } = useWalletLogDB()
|
||||||
|
|
||||||
const appendLog = useCallback(async (wallet, level, message, context) => {
|
const appendLog = useCallback(async (wallet, level, message, context) => {
|
||||||
const log = { wallet: walletTag(wallet), level, message, ts: +new Date(), context }
|
const log = { wallet: walletTag(wallet.def), level, message, ts: +new Date(), context }
|
||||||
try {
|
try {
|
||||||
if (notSupported) {
|
if (notSupported) {
|
||||||
console.log('cannot persist wallet log: indexeddb not supported')
|
console.log('cannot persist wallet log: indexeddb not supported')
|
||||||
|
@ -29,7 +29,7 @@ export function useWalletLoggerFactory () {
|
|||||||
context.send = true
|
context.send = true
|
||||||
|
|
||||||
appendLog(wallet, level, message, context)
|
appendLog(wallet, level, message, context)
|
||||||
console[level !== 'error' ? 'info' : 'error'](`[${walletTag(wallet)}]`, message)
|
console[level !== 'error' ? 'info' : 'error'](`[${walletTag(wallet.def)}]`, message)
|
||||||
}, [appendLog])
|
}, [appendLog])
|
||||||
|
|
||||||
return useCallback(wallet => ({
|
return useCallback(wallet => ({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user