From 14c9858df287b0040f35046ed81033697936519e Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Thu, 15 Sep 2022 22:27:12 +0300 Subject: [PATCH] nns: use MillisecondsInSecond constant where appropriate --- examples/nft-nd-nns/nns.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/nft-nd-nns/nns.go b/examples/nft-nd-nns/nns.go index bc5ad890c3..6f93490c4e 100644 --- a/examples/nft-nd-nns/nns.go +++ b/examples/nft-nd-nns/nns.go @@ -64,8 +64,10 @@ const ( const ( // defaultRegisterPrice is the default price for new domain registration. defaultRegisterPrice = 10_0000_0000 + // millisecondsInSecond is the amount of milliseconds per second. + millisecondsInSecond = 1000 // millisecondsInYear is amount of milliseconds per year. - millisecondsInYear = 365 * 24 * 3600 * 1000 + millisecondsInYear = 365 * 24 * 3600 * millisecondsInSecond ) // RecordState is a type that registered entities are saved to. @@ -327,7 +329,7 @@ func Register(name string, owner interop.Hash160, email string, refresh, retry, ns := NameState{ Owner: owner, Name: name, - Expiration: runtime.GetTime() + expire*1000, + Expiration: runtime.GetTime() + expire*millisecondsInSecond, } putNameStateWithKey(ctx, tokenKey, ns) putSoaRecord(ctx, name, email, refresh, retry, expire, ttl)