noop walletLogger if wallet isn't provided
This commit is contained in:
parent
cb8cce77f0
commit
d1c770dbbc
|
@ -675,6 +675,16 @@ const resolvers = {
|
|||
export default injectResolvers(resolvers)
|
||||
|
||||
export const walletLogger = ({ wallet, models }) => {
|
||||
// no-op logger if wallet is not provided
|
||||
if (!wallet) {
|
||||
return {
|
||||
ok: () => {},
|
||||
info: () => {},
|
||||
error: () => {},
|
||||
warn: () => {}
|
||||
}
|
||||
}
|
||||
|
||||
// server implementation of wallet logger interface on client
|
||||
const log = (level) => async (message, context = {}) => {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue