From 25fb15ed2e7619fa990f8091d2263682344d9044 Mon Sep 17 00:00:00 2001 From: Salvionied Date: Fri, 30 Aug 2024 16:38:59 +0200 Subject: [PATCH] bump maestro deps --- serialization/Value/Value.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/serialization/Value/Value.go b/serialization/Value/Value.go index 81ca407..771ec45 100644 --- a/serialization/Value/Value.go +++ b/serialization/Value/Value.go @@ -64,12 +64,14 @@ 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) @@ -520,12 +522,14 @@ 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)