Skip to content

Commit 9724b57

Browse files
authored
chore: update blinklabs-io/gouroboros to v0.85.0 (#212)
1 parent 1f34735 commit 9724b57

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.21
55
toolchain go1.21.6
66

77
require (
8-
github.com/blinklabs-io/gouroboros v0.84.0
8+
github.com/blinklabs-io/gouroboros v0.85.0
99
github.com/gen2brain/beeep v0.0.0-20230602101333-f384c29b62dd
1010
github.com/gin-gonic/gin v1.10.0
1111
github.com/kelseyhightower/envconfig v1.4.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
44
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
55
github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
66
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
7-
github.com/blinklabs-io/gouroboros v0.84.0 h1:uVKfYA4VBnrTle2mr85TpJNS1WkZTz31OOF0K4bJ1MU=
8-
github.com/blinklabs-io/gouroboros v0.84.0/go.mod h1:EZe1WcIWfZNESlwHPGLStB6HluXGTkf/ZFUbBi5bCvs=
7+
github.com/blinklabs-io/gouroboros v0.85.0 h1:KLB7prQpDq3IRIS7Oxl8cz8nABSjU8UoOp0TvBhSyAc=
8+
github.com/blinklabs-io/gouroboros v0.85.0/go.mod h1:EZe1WcIWfZNESlwHPGLStB6HluXGTkf/ZFUbBi5bCvs=
99
github.com/blinklabs-io/ouroboros-mock v0.3.0 h1:6VRWyhAv0k7nQEgzFpuqhS/n8OM+OAaLN/sCT5K2Hbc=
1010
github.com/blinklabs-io/ouroboros-mock v0.3.0/go.mod h1:0dzTNEk/Kvqa7qYHDy7/Nn3OTt+EOosMknB37FRzI1k=
1111
github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0=

input/chainsync/tx.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ type TransactionEvent struct {
3434
Inputs []ledger.TransactionInput `json:"inputs"`
3535
Outputs []ledger.TransactionOutput `json:"outputs"`
3636
Certificates []ledger.Certificate `json:"certificates"`
37-
Metadata *cbor.Value `json:"metadata,omitempty"`
37+
Metadata *cbor.LazyValue `json:"metadata,omitempty"`
3838
Fee uint64 `json:"fee"`
3939
TTL uint64 `json:"ttl,omitempty"`
4040
}

output/push/push.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,15 @@ func (p *PushOutput) OutputChan() <-chan event.Event {
298298
// This should probably go in gouroboros module
299299
// extractCIP20FromMetadata extracts the CIP20 message from the transaction metadata
300300
// and returns it as a JSON string.
301-
func extractCIP20FromMetadata(metadata *cbor.Value) (string, error) {
301+
func extractCIP20FromMetadata(metadata *cbor.LazyValue) (string, error) {
302302
if metadata == nil {
303303
return "", fmt.Errorf("metadata is nil")
304304
}
305305

306+
if _, err := metadata.Decode(); err != nil {
307+
return "", fmt.Errorf("could not decode metadata: %w", err)
308+
}
309+
306310
metadataMap, ok := metadata.Value().(map[any]any)
307311
if !ok {
308312
return "", fmt.Errorf("metadata value is not of the expected map type")

0 commit comments

Comments
 (0)