mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Revert "deliver a decay block every time"
This commit is contained in:
parent
bf6a3419d5
commit
cc9e3b54c9
@ -82,6 +82,7 @@ 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 (
|
||||||
@ -94,6 +95,7 @@ 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
|
||||||
@ -142,7 +144,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)
|
||||||
@ -152,6 +154,7 @@ async function calculateAndAddDecayTransactions(
|
|||||||
finalTransactions.push(decayTransaction)
|
finalTransactions.push(decayTransaction)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return finalTransactions
|
return finalTransactions
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user