aboutsummaryrefslogtreecommitdiff
path: root/lib/wallet
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-11-07 14:27:08 +0100
committerFlorian Dold <florian.dold@gmail.com>2016-11-07 14:27:08 +0100
commitb37e7762bb5492cbd6788863232e7d2634ab5e5c (patch)
treee8fc2f76a9e809e076fbc2fa4b64d0a92d82249e /lib/wallet
parent358c0ce513ecc28d8e03fcb97f57391874e86f74 (diff)
downloadwallet-core-b37e7762bb5492cbd6788863232e7d2634ab5e5c.tar.xz
don't withdraw coins that are valid in the future
Diffstat (limited to 'lib/wallet')
-rw-r--r--lib/wallet/wallet.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/wallet/wallet.ts b/lib/wallet/wallet.ts
index cc600aef9..7080a358b 100644
--- a/lib/wallet/wallet.ts
+++ b/lib/wallet/wallet.ts
@@ -246,8 +246,9 @@ function setTimeout(f: any, t: number) {
function isWithdrawableDenom(d: Denomination) {
const now_sec = (new Date).getTime() / 1000;
const stamp_withdraw_sec = getTalerStampSec(d.stamp_expire_withdraw);
+ const stamp_start_sec = getTalerStampSec(d.stamp_start);
// Withdraw if still possible to withdraw within a minute
- if (stamp_withdraw_sec + 60 > now_sec) {
+ if ((stamp_withdraw_sec + 60 > now_sec) && (now_sec >= stamp_start_sec)) {
return true;
}
return false;