@@ -221,6 +221,7 @@ import {
221221 createSignStatesParams ,
222222 createSyncStatesParams ,
223223 createTimestamp ,
224+ createTimestamp32 ,
224225 encryptSecretKey ,
225226 getHKDFKeysFromPassword ,
226227 getSecretKey ,
@@ -775,7 +776,7 @@ export class Client {
775776 this . nashProtocolMarketData = mapMarketsForNashProtocol ( this . marketData )
776777 this . assetData = await this . fetchAssetData ( )
777778
778- this . currentOrderNonce = this . createTimestamp32 ( )
779+ this . currentOrderNonce = createTimestamp32 ( )
779780 await this . updateTradedAssetNonces ( )
780781 }
781782
@@ -854,7 +855,7 @@ export class Client {
854855 this . marketData = await this . fetchMarketData ( )
855856 this . assetData = await this . fetchAssetData ( )
856857 this . assetNonces = { }
857- this . currentOrderNonce = this . createTimestamp32 ( )
858+ this . currentOrderNonce = createTimestamp32 ( )
858859 if ( resp . data . signIn . twoFaRequired ) {
859860 if ( twoFaCode !== undefined ) {
860861 this . account = await this . doTwoFactorLogin ( twoFaCode )
@@ -2644,7 +2645,7 @@ export class Client {
26442645 )
26452646 } else {
26462647 const sendAmount = parseFloat ( amount ) * 1e8
2647- const timestamp = new BigNumber ( this . createTimestamp32 ( ) ) . toString ( 16 )
2648+ const timestamp = new BigNumber ( createTimestamp32 ( ) ) . toString ( 16 )
26482649 transaction = new tx . InvocationTransaction ( {
26492650 script : NeonJS . default . create . script ( {
26502651 scriptHash : assetData . hash ,
@@ -3358,7 +3359,7 @@ export class Client {
33583359 txId : prefixWith0xIfNeeded ( hash )
33593360 }
33603361 case 'neo' :
3361- const timestamp = new BigNumber ( this . createTimestamp32 ( ) ) . toString ( 16 )
3362+ const timestamp = new BigNumber ( createTimestamp32 ( ) ) . toString ( 16 )
33623363 const balance = await NeonJS . api . neoscan . getBalance (
33633364 this . opts . neoScan ,
33643365 childKey . address
@@ -3619,10 +3620,6 @@ export class Client {
36193620 this . assetNonces = assetNonces
36203621 }
36213622
3622- private createTimestamp32 ( ) : number {
3623- return Math . trunc ( new Date ( ) . getTime ( ) / 10 ) - 155000000000
3624- }
3625-
36263623 private getNoncesForTrade (
36273624 marketName : string ,
36283625 direction : OrderBuyOrSell
0 commit comments