From 38dd797ed574216eb07aa79b778f961bf2dff784 Mon Sep 17 00:00:00 2001 From: Elrond/ Date: Tue, 8 Nov 2022 13:30:24 +0200 Subject: [PATCH] FIX: Use TokenMetaData in AccountTokenData --- data/api/apiTokenMetaData.go | 12 ------------ data/outport/dtos.go | 14 ++++++++++++-- 2 files changed, 12 insertions(+), 14 deletions(-) delete mode 100644 data/api/apiTokenMetaData.go diff --git a/data/api/apiTokenMetaData.go b/data/api/apiTokenMetaData.go deleted file mode 100644 index 2c0a1fd5f..000000000 --- a/data/api/apiTokenMetaData.go +++ /dev/null @@ -1,12 +0,0 @@ -package api - -// TokenMetaData is the api metaData struct for tokens -type TokenMetaData struct { - Nonce uint64 `json:"nonce"` - Name string `json:"name"` - Creator string `json:"creator"` - Royalties uint32 `json:"royalties"` - Hash []byte `json:"hash"` - URIs [][]byte `json:"uris"` - Attributes []byte `json:"attributes"` -} diff --git a/data/outport/dtos.go b/data/outport/dtos.go index 05c271f88..19fc88d83 100644 --- a/data/outport/dtos.go +++ b/data/outport/dtos.go @@ -4,16 +4,26 @@ import ( "time" "github.com/ElrondNetwork/elrond-go-core/data" - "github.com/ElrondNetwork/elrond-go-core/data/esdt" ) +// TokenMetaData is the api metaData struct for tokens +type TokenMetaData struct { + Nonce uint64 `json:"nonce"` + Name string `json:"name"` + Creator string `json:"creator"` + Royalties uint32 `json:"royalties"` + Hash []byte `json:"hash"` + URIs [][]byte `json:"uris"` + Attributes []byte `json:"attributes"` +} + // AccountTokenData holds the data needed for indexing a token of an altered account type AccountTokenData struct { Nonce uint64 `json:"nonce"` Identifier string `json:"identifier"` Balance string `json:"balance"` Properties string `json:"properties"` - MetaData *esdt.MetaData `json:"metadata"` + MetaData *TokenMetaData `json:"metadata"` AdditionalData *AdditionalAccountTokenData `json:"additionalData,omitempty"` }