mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-19 03:57:29 +02:00
fix: oldObj values lost
This commit is contained in:
@@ -14,7 +14,7 @@ const retryWithDelay = async function (fn, retryCount = 0) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const mapCharge = (obj, oldObj = {}) => {
|
const mapCharge = (obj, oldObj = {}) => {
|
||||||
const charge = _.clone(obj)
|
const charge = {...obj, ...oldObj}
|
||||||
|
|
||||||
charge.progress = obj.time_left < 0 ? 1 : 1 - obj.time_left / obj.time
|
charge.progress = obj.time_left < 0 ? 1 : 1 - obj.time_left / obj.time
|
||||||
charge.time = minutesToTime(obj.time)
|
charge.time = minutesToTime(obj.time)
|
||||||
|
Reference in New Issue
Block a user