Skip to content

Commit

Permalink
Merge pull request #14 from thesixnetwork/10-get-current-timestamp-in…
Browse files Browse the repository at this point in the history
…-action

Added: added CurrentTimestamp()
  • Loading branch information
citrusaquarium authored Sep 16, 2022
2 parents 6a71a54 + a460034 commit 01f7174
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions x/nftmngr/types/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package types
import (
"regexp"
"strconv"
"time"

sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)
Expand Down Expand Up @@ -72,6 +73,10 @@ func NewMetadata(schema *NFTSchema, tokenData *NftData, attributeOverring Attrib
return meta
}

func (m *Metadata) CurrentTimestamp() int64 {
return time.Now().Unix()
}

func (m *Metadata) GetImage() string {
if m.nftData.OnchainImage != "" {
return m.nftData.OnchainImage
Expand Down

0 comments on commit 01f7174

Please # to comment.