Skip to content

Commit

Permalink
Merge pull request #6532 from multiversx/data-codec-fix
Browse files Browse the repository at this point in the history
data codec fix for amount and royalties
  • Loading branch information
axenteoctavian authored Oct 15, 2024
2 parents 50b54a9 + 3a56f84 commit 8068b30
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmd/sovereignnode/dataCodec/dataCodec.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func getTokenDataStruct(tokenData sovereign.EsdtTokenData) *abi.StructValue {
},
{
Name: "amount",
Value: &abi.BigIntValue{Value: tokenData.Amount},
Value: &abi.BigUIntValue{Value: tokenData.Amount},
},
{
Name: "frozen",
Expand All @@ -179,7 +179,7 @@ func getTokenDataStruct(tokenData sovereign.EsdtTokenData) *abi.StructValue {
},
{
Name: "royalties",
Value: &abi.BigIntValue{Value: tokenData.Royalties},
Value: &abi.BigUIntValue{Value: tokenData.Royalties},
},
{
Name: "uris",
Expand All @@ -202,13 +202,13 @@ func (dc *dataCodec) DeserializeTokenData(data []byte) (*sovereign.EsdtTokenData
return nil
},
}
amount := &abi.BigIntValue{}
amount := &abi.BigUIntValue{}
frozen := &abi.BoolValue{}
hash := &abi.BytesValue{}
name := &abi.BytesValue{}
attributes := &abi.BytesValue{}
creator := &abi.AddressValue{}
royalties := &abi.BigIntValue{}
royalties := &abi.BigUIntValue{}
uris := &abi.ListValue{
ItemCreator: func() abi.SingleValue {
return &abi.BytesValue{}
Expand Down Expand Up @@ -431,7 +431,7 @@ func getTokenStruct(token sovereign.EsdtToken) *abi.StructValue {
},
{
Name: "amount",
Value: &abi.BigIntValue{Value: token.Data.Amount},
Value: &abi.BigUIntValue{Value: token.Data.Amount},
},
{
Name: "frozen",
Expand All @@ -455,7 +455,7 @@ func getTokenStruct(token sovereign.EsdtToken) *abi.StructValue {
},
{
Name: "royalties",
Value: &abi.BigIntValue{Value: token.Data.Royalties},
Value: &abi.BigUIntValue{Value: token.Data.Royalties},
},
{
Name: "uris",
Expand Down

0 comments on commit 8068b30

Please sign in to comment.