Fix [undefined] in logs

This commit is contained in:
ekzyis 2024-11-28 01:25:04 +01:00
parent a0d33a23f3
commit f9169c645a
2 changed files with 2 additions and 2 deletions

View File

@ -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')

View File

@ -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 => ({