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 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 {
|
||||
if (notSupported) {
|
||||
console.log('cannot persist wallet log: indexeddb not supported')
|
||||
|
|
|
@ -29,7 +29,7 @@ export function useWalletLoggerFactory () {
|
|||
context.send = true
|
||||
|
||||
appendLog(wallet, level, message, context)
|
||||
console[level !== 'error' ? 'info' : 'error'](`[${walletTag(wallet)}]`, message)
|
||||
console[level !== 'error' ? 'info' : 'error'](`[${walletTag(wallet.def)}]`, message)
|
||||
}, [appendLog])
|
||||
|
||||
return useCallback(wallet => ({
|
||||
|
|
Loading…
Reference in New Issue