Skip to content

Commit

Permalink
chore: update blinklabs-io/gouroboros to v0.85.0 (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
agaffney authored May 17, 2024
1 parent 1f34735 commit 9724b57
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.21
toolchain go1.21.6

require (
github.com/blinklabs-io/gouroboros v0.84.0
github.com/blinklabs-io/gouroboros v0.85.0
github.com/gen2brain/beeep v0.0.0-20230602101333-f384c29b62dd
github.com/gin-gonic/gin v1.10.0
github.com/kelseyhightower/envconfig v1.4.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
github.com/blinklabs-io/gouroboros v0.84.0 h1:uVKfYA4VBnrTle2mr85TpJNS1WkZTz31OOF0K4bJ1MU=
github.com/blinklabs-io/gouroboros v0.84.0/go.mod h1:EZe1WcIWfZNESlwHPGLStB6HluXGTkf/ZFUbBi5bCvs=
github.com/blinklabs-io/gouroboros v0.85.0 h1:KLB7prQpDq3IRIS7Oxl8cz8nABSjU8UoOp0TvBhSyAc=
github.com/blinklabs-io/gouroboros v0.85.0/go.mod h1:EZe1WcIWfZNESlwHPGLStB6HluXGTkf/ZFUbBi5bCvs=
github.com/blinklabs-io/ouroboros-mock v0.3.0 h1:6VRWyhAv0k7nQEgzFpuqhS/n8OM+OAaLN/sCT5K2Hbc=
github.com/blinklabs-io/ouroboros-mock v0.3.0/go.mod h1:0dzTNEk/Kvqa7qYHDy7/Nn3OTt+EOosMknB37FRzI1k=
github.com/bytedance/sonic v1.11.6 h1:oUp34TzMlL+OY1OUWxHqsdkgC/Zfc85zGqw9siXjrc0=
Expand Down
2 changes: 1 addition & 1 deletion input/chainsync/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ type TransactionEvent struct {
Inputs []ledger.TransactionInput `json:"inputs"`
Outputs []ledger.TransactionOutput `json:"outputs"`
Certificates []ledger.Certificate `json:"certificates"`
Metadata *cbor.Value `json:"metadata,omitempty"`
Metadata *cbor.LazyValue `json:"metadata,omitempty"`
Fee uint64 `json:"fee"`
TTL uint64 `json:"ttl,omitempty"`
}
Expand Down
6 changes: 5 additions & 1 deletion output/push/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,15 @@ func (p *PushOutput) OutputChan() <-chan event.Event {
// This should probably go in gouroboros module
// extractCIP20FromMetadata extracts the CIP20 message from the transaction metadata
// and returns it as a JSON string.
func extractCIP20FromMetadata(metadata *cbor.Value) (string, error) {
func extractCIP20FromMetadata(metadata *cbor.LazyValue) (string, error) {
if metadata == nil {
return "", fmt.Errorf("metadata is nil")
}

if _, err := metadata.Decode(); err != nil {
return "", fmt.Errorf("could not decode metadata: %w", err)
}

metadataMap, ok := metadata.Value().(map[any]any)
if !ok {
return "", fmt.Errorf("metadata value is not of the expected map type")
Expand Down

0 comments on commit 9724b57

Please sign in to comment.