Skip to content

Commit

Permalink
remove prints
Browse files Browse the repository at this point in the history
  • Loading branch information
Salvionied committed Sep 1, 2024
1 parent db7296b commit 2400e52
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions serialization/Value/Value.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,12 @@ func (val *AlonzoValue) UnmarshalCBOR(value []byte) error {
func (alVal *AlonzoValue) MarshalCBOR() ([]byte, error) {
if alVal.HasAssets {
if alVal.Am.Coin < 0 {
fmt.Println(alVal.ToValue().GetCoin())
return nil, errors.New("invalid coin value")
}
em, _ := cbor.CanonicalEncOptions().EncMode()
return em.Marshal(alVal.Am)
} else {
if alVal.Coin < 0 {
fmt.Println(alVal.ToValue().GetCoin())
return nil, errors.New("invalid coin value")
}
return cbor.Marshal(alVal.Coin)
Expand Down Expand Up @@ -522,14 +520,12 @@ func (val *Value) UnmarshalCBOR(value []byte) error {
func (val *Value) MarshalCBOR() ([]byte, error) {
if val.HasAssets {
if val.Am.Coin < 0 {
fmt.Println(val.GetCoin())
return nil, errors.New("invalid coin value")
}
em, _ := cbor.CanonicalEncOptions().EncMode()
return em.Marshal(val.Am)
} else {
if val.Coin < 0 {
fmt.Println(val.GetCoin())
return nil, errors.New("invalid coin value")
}
return cbor.Marshal(val.Coin)
Expand Down

0 comments on commit 2400e52

Please sign in to comment.