Skip to content

Commit c86a70f

Browse files
authored
Merge pull request blocto#41 from portto/feat/add-token-data-id-hash
feat: add token_data_id_hash
2 parents a51f458 + 8a25995 commit c86a70f

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

client/token.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,7 @@ func (impl *TokenClientImpl) ListAccountTokens(ctx context.Context, owner models
455455
property_version
456456
amount
457457
token_properties
458+
token_data_id_hash
458459
}
459460
}
460461
`
@@ -479,6 +480,7 @@ func (impl *TokenClientImpl) ListAccountTokens(ctx context.Context, owner models
479480
PropertyVersion models.Uint64 `json:"property_version"`
480481
Amount models.Uint64 `json:"amount"`
481482
TokenProperties map[string]string `json:"token_properties"`
483+
TokenDataIDHash string `json:"token_data_id_hash"`
482484
} `json:"current_token_ownerships"`
483485
}
484486
if err := json.Unmarshal(raw, &result); err != nil {
@@ -489,6 +491,7 @@ func (impl *TokenClientImpl) ListAccountTokens(ctx context.Context, owner models
489491
tokens = append(tokens, models.Token{
490492
ID: models.TokenID{
491493
TokenDataID: models.TokenDataID{
494+
Hash: t.TokenDataIDHash,
492495
Creator: t.Creator,
493496
Collection: t.Collection,
494497
Name: t.Name,

models/token.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ type TokenData struct {
3434
}
3535

3636
type TokenDataID struct {
37+
Hash string `json:"hash"`
3738
Creator string `json:"creator"`
3839
Collection string `json:"collection"`
3940
Name string `json:"name"`

0 commit comments

Comments
 (0)