From 1362da59d3c922d75ae6d448f2a11dbcc5b4dcf8 Mon Sep 17 00:00:00 2001 From: Barry Gitarts Date: Fri, 7 Jun 2019 11:11:01 -0400 Subject: [PATCH] update pledges commitTime on sync --- src/actions/pledges.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/actions/pledges.js b/src/actions/pledges.js index 2bde98a..6bfb096 100644 --- a/src/actions/pledges.js +++ b/src/actions/pledges.js @@ -56,11 +56,12 @@ export const updateStalePledges = async () => { const batch = stalePledges.map(p => { const updated = updatedPledges[p.idPledge - 1] return p.prepareUpdate(p => { - const { amount, nDelegates, pledgeState, blockNumber } = updated + const { amount, nDelegates, pledgeState, blockNumber, commitTime } = updated p.amount = amount p.nDelegates = Number(nDelegates) p.pledgeState = Number(pledgeState) p.blockNumber = blockNumber + p.commitTime = Number(commitTime) }) }) database.action(() => database.batch(...batch))