mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge pull request #988 from gradido/apollo_fix
deliver a decay block every time
This commit is contained in:
commit
a1f8022295
@ -82,7 +82,6 @@ async function calculateAndAddDecayTransactions(
|
|||||||
)
|
)
|
||||||
const balance = prev.balance - decay.balance
|
const balance = prev.balance - decay.balance
|
||||||
|
|
||||||
if (balance) {
|
|
||||||
finalTransaction.decay = decay
|
finalTransaction.decay = decay
|
||||||
finalTransaction.decay.balance = roundFloorFrom4(balance)
|
finalTransaction.decay.balance = roundFloorFrom4(balance)
|
||||||
if (
|
if (
|
||||||
@ -95,7 +94,6 @@ async function calculateAndAddDecayTransactions(
|
|||||||
).toString()
|
).toString()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// sender or receiver when user has sent money
|
// sender or receiver when user has sent money
|
||||||
// group name if creation
|
// group name if creation
|
||||||
@ -144,7 +142,7 @@ async function calculateAndAddDecayTransactions(
|
|||||||
now.getTime(),
|
now.getTime(),
|
||||||
)
|
)
|
||||||
const balance = userTransaction.balance - decay.balance
|
const balance = userTransaction.balance - decay.balance
|
||||||
if (balance) {
|
|
||||||
const decayTransaction = new Transaction()
|
const decayTransaction = new Transaction()
|
||||||
decayTransaction.type = 'decay'
|
decayTransaction.type = 'decay'
|
||||||
decayTransaction.balance = roundFloorFrom4(balance)
|
decayTransaction.balance = roundFloorFrom4(balance)
|
||||||
@ -154,7 +152,6 @@ async function calculateAndAddDecayTransactions(
|
|||||||
finalTransactions.push(decayTransaction)
|
finalTransactions.push(decayTransaction)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return finalTransactions
|
return finalTransactions
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user