Fix up various flow issues.

This commit is contained in:
Josh Harvey 2017-09-12 00:00:24 +03:00
parent 08bd7da33f
commit 0d8a8547f5
8 changed files with 60 additions and 40 deletions

View file

@ -88,7 +88,7 @@ function redeemableTxs (deviceId) {
and redeem=$2
and dispense=$3
and provisioned_1 is not null
and (extract(epoch from (now() - greatest(created, confirmation_time))) * 1000) < $4`
and (extract(epoch from (now() - greatest(created, confirmed_at))) * 1000) < $4`
return db.any(sql, [deviceId, true, false, REDEEMABLE_AGE])
.then(_.map(toObj))