do not test invoice when disabling wallets
This commit is contained in:
parent
240040f2a3
commit
0263aa8372
|
@ -672,7 +672,10 @@ async function upsertWallet (
|
|||
if (!me) throw new GqlAuthenticationError()
|
||||
assertApiKeyNotPermitted({ me })
|
||||
|
||||
if (testCreateInvoice && !priorityOnly && canReceive) {
|
||||
const { id, ...walletData } = data
|
||||
const { autoWithdrawThreshold, autoWithdrawMaxFeePercent, enabled, priority } = settings
|
||||
|
||||
if (testCreateInvoice && !priorityOnly && canReceive && enabled) {
|
||||
try {
|
||||
await testCreateInvoice(data)
|
||||
} catch (err) {
|
||||
|
@ -685,15 +688,6 @@ async function upsertWallet (
|
|||
}
|
||||
}
|
||||
|
||||
const { id, ...walletData } = data
|
||||
const {
|
||||
autoWithdrawThreshold,
|
||||
autoWithdrawMaxFeePercent,
|
||||
autoWithdrawMaxFeeTotal,
|
||||
enabled,
|
||||
priority
|
||||
} = settings
|
||||
|
||||
return await models.$transaction(async (tx) => {
|
||||
if (canReceive) {
|
||||
await tx.user.update({
|
||||
|
|
Loading…
Reference in New Issue