File tree Expand file tree Collapse file tree 1 file changed +6
-14
lines changed
Expand file tree Collapse file tree 1 file changed +6
-14
lines changed Original file line number Diff line number Diff line change 1- import { app } from "@arkecosystem/core-container" ;
2- import { State } from "@arkecosystem/core-interfaces" ;
31import { Enums , Interfaces } from "@arkecosystem/crypto" ;
42
5- export const calculateLockExpirationStatus = ( expiration : Interfaces . IHtlcExpiration ) : boolean => {
6- const lastBlock : Interfaces . IBlock = app
7- . resolvePlugin < State . IStateService > ( "state" )
8- . getStore ( )
9- . getLastBlock ( ) ;
10-
11- return (
12- ( expiration . type === Enums . HtlcLockExpirationType . EpochTimestamp &&
13- expiration . value <= lastBlock . data . timestamp ) ||
14- ( expiration . type === Enums . HtlcLockExpirationType . BlockHeight && expiration . value <= lastBlock . data . height )
15- ) ;
16- } ;
3+ export const calculateLockExpirationStatus = (
4+ lastBlock : Interfaces . IBlock ,
5+ expiration : Interfaces . IHtlcExpiration ,
6+ ) : boolean =>
7+ ( expiration . type === Enums . HtlcLockExpirationType . EpochTimestamp && expiration . value <= lastBlock . data . timestamp ) ||
8+ ( expiration . type === Enums . HtlcLockExpirationType . BlockHeight && expiration . value <= lastBlock . data . height ) ;
You can’t perform that action at this time.
0 commit comments