Skip to content

Commit

Permalink
fix: LoadTxCbor should hex decode the cbor string
Browse files Browse the repository at this point in the history
  • Loading branch information
joacohoyos committed Jan 28, 2024
1 parent 4d2c091 commit bffd4c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ApolloBuilder.go
Original file line number Diff line number Diff line change
Expand Up @@ -1533,7 +1533,11 @@ func (b *Apollo) Submit() (serialization.TransactionId, error) {
*/
func (b *Apollo) LoadTxCbor(txCbor string) (*Apollo, error) {
tx := Transaction.Transaction{}
err := cbor.Unmarshal([]byte(txCbor), &tx)
cborBytes, err := hex.DecodeString(txCbor)
if err != nil {
return nil, err
}
err = cbor.Unmarshal(cborBytes, &tx)
if err != nil {
return b, err
}
Expand Down

0 comments on commit bffd4c7

Please sign in to comment.