Skip to content

Commit

Permalink
Add util that wraps reading in a transfer note, added by Russ
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan Richard committed Jul 25, 2019
1 parent 90d2c88 commit fdb9342
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions examplecoin/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,13 @@ func ProcessTransfer(curState map[string]uint64, transfer Transfer, wrappingTxn

return curState, nil
}

// ReadTransferNote takes in the desired blob notefield and produces amount, to, from
func ReadTransferNote(transferBlob BytesBase64, transfer Transfer) error {
err := msgpack.Decode(transferBlob, transfer)

if err != nil {
return err
}
return nil
}

0 comments on commit fdb9342

Please sign in to comment.