From 2b81ffb912cda8df90aa6a78617cbfb3080be876 Mon Sep 17 00:00:00 2001 From: Julian Gonzalez Date: Wed, 13 Mar 2019 13:28:13 +0000 Subject: [PATCH] expiration time: change date.now to props.time --- src/helpers/broadcast.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/broadcast.ts b/src/helpers/broadcast.ts index d4b561b..3c1229e 100644 --- a/src/helpers/broadcast.ts +++ b/src/helpers/broadcast.ts @@ -282,7 +282,7 @@ export class BroadcastAPI { const ref_block_num = props.head_block_number & 0xFFFF const ref_block_prefix = Buffer.from(props.head_block_id, 'hex').readUInt32LE(4) - const expiration = new Date(Date.now() + this.expireTime).toISOString().slice(0, -5) + const expiration = new Date(new Date(props.time + 'Z').getTime() + this.expireTime).toISOString().slice(0, -5) const extensions = [] const tx: Transaction = {