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()
|
if (!me) throw new GqlAuthenticationError()
|
||||||
assertApiKeyNotPermitted({ me })
|
assertApiKeyNotPermitted({ me })
|
||||||
|
|
||||||
if (testCreateInvoice && !priorityOnly && canReceive) {
|
const { id, ...walletData } = data
|
||||||
|
const { autoWithdrawThreshold, autoWithdrawMaxFeePercent, enabled, priority } = settings
|
||||||
|
|
||||||
|
if (testCreateInvoice && !priorityOnly && canReceive && enabled) {
|
||||||
try {
|
try {
|
||||||
await testCreateInvoice(data)
|
await testCreateInvoice(data)
|
||||||
} catch (err) {
|
} 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) => {
|
return await models.$transaction(async (tx) => {
|
||||||
if (canReceive) {
|
if (canReceive) {
|
||||||
await tx.user.update({
|
await tx.user.update({
|
||||||
|
|
Loading…
Reference in New Issue