Skip to content

Commit

Permalink
fix: add missing metadata type (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudoyu authored Oct 15, 2024
1 parent 5880dc4 commit 501b6b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions schema/metadata/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ func unmarshalCollectibleMetadata(metadataType schema.Type, data json.RawMessage
result = new(CollectibleTrade)
case typex.CollectibleTransfer, typex.CollectibleMint, typex.CollectibleBurn:
result = new(CollectibleTransfer)
case typex.CollectibleAuction:
result = new(CollectibleAuction)
default:
return nil, fmt.Errorf("invalid metadata type: %s.%s", metadataType.Tag(), metadataType.Name())
}
Expand Down Expand Up @@ -126,6 +128,8 @@ func unmarshalExchangeMetadata(metadataType schema.Type, data json.RawMessage) (
result = new(ExchangeStaking)
case typex.ExchangeSwap:
result = new(ExchangeSwap)
case typex.ExchangeLoan:
result = new(ExchangeLoan)
default:
return nil, fmt.Errorf("invalid metadata type: %s.%s", metadataType.Tag(), metadataType.Name())
}
Expand Down

0 comments on commit 501b6b1

Please sign in to comment.