Merge pull request #1719 from stackernews/fix-missing-save-error-log
Fix missing logging of sender wallet validation error
This commit is contained in:
commit
e8434d07c5
|
@ -37,17 +37,22 @@ export function useWalletConfigurator (wallet) {
|
||||||
let serverConfig = serverWithShared
|
let serverConfig = serverWithShared
|
||||||
|
|
||||||
if (canSend({ def: wallet.def, config: clientConfig })) {
|
if (canSend({ def: wallet.def, config: clientConfig })) {
|
||||||
let transformedConfig = await validateWallet(wallet.def, clientWithShared, { skipGenerated: true })
|
try {
|
||||||
if (transformedConfig) {
|
let transformedConfig = await validateWallet(wallet.def, clientWithShared, { skipGenerated: true })
|
||||||
clientConfig = Object.assign(clientConfig, transformedConfig)
|
|
||||||
}
|
|
||||||
if (wallet.def.testSendPayment && validateLightning) {
|
|
||||||
transformedConfig = await wallet.def.testSendPayment(clientConfig, { me, logger })
|
|
||||||
if (transformedConfig) {
|
if (transformedConfig) {
|
||||||
clientConfig = Object.assign(clientConfig, transformedConfig)
|
clientConfig = Object.assign(clientConfig, transformedConfig)
|
||||||
}
|
}
|
||||||
// validate again to ensure generated fields are valid
|
if (wallet.def.testSendPayment && validateLightning) {
|
||||||
await validateWallet(wallet.def, clientConfig)
|
transformedConfig = await wallet.def.testSendPayment(clientConfig, { me, logger })
|
||||||
|
if (transformedConfig) {
|
||||||
|
clientConfig = Object.assign(clientConfig, transformedConfig)
|
||||||
|
}
|
||||||
|
// validate again to ensure generated fields are valid
|
||||||
|
await validateWallet(wallet.def, clientConfig)
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
logger.error(err.message)
|
||||||
|
throw err
|
||||||
}
|
}
|
||||||
} else if (canReceive({ def: wallet.def, config: serverConfig })) {
|
} else if (canReceive({ def: wallet.def, config: serverConfig })) {
|
||||||
const transformedConfig = await validateWallet(wallet.def, serverConfig)
|
const transformedConfig = await validateWallet(wallet.def, serverConfig)
|
||||||
|
|
Loading…
Reference in New Issue