Remove logger.error since already handled in useWallet
This commit is contained in:
parent
dae69ec4b3
commit
91978171ed
|
@ -103,9 +103,7 @@ export async function sendPayment ({ bolt11, nwcUrl, logger }) {
|
||||||
|
|
||||||
const relay = await Relay.connect(relayUrl).catch(() => {
|
const relay = await Relay.connect(relayUrl).catch(() => {
|
||||||
// NOTE: passed error is undefined for some reason
|
// NOTE: passed error is undefined for some reason
|
||||||
const msg = `failed to connect to ${relayUrl}`
|
throw new Error(`failed to connect to ${relayUrl}`)
|
||||||
logger.error(msg)
|
|
||||||
throw new Error(msg)
|
|
||||||
})
|
})
|
||||||
logger.ok(`connected to ${relayUrl}`)
|
logger.ok(`connected to ${relayUrl}`)
|
||||||
|
|
||||||
|
@ -145,7 +143,6 @@ export async function sendPayment ({ bolt11, nwcUrl, logger }) {
|
||||||
if (!['closed by caller', 'relay connection closed by us'].includes(reason)) {
|
if (!['closed by caller', 'relay connection closed by us'].includes(reason)) {
|
||||||
// only log if not closed by us (caller)
|
// only log if not closed by us (caller)
|
||||||
const msg = 'connection closed: ' + (reason || 'unknown reason')
|
const msg = 'connection closed: ' + (reason || 'unknown reason')
|
||||||
logger.error(msg)
|
|
||||||
reject(new Error(msg))
|
reject(new Error(msg))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue