Skip to content

Commit

Permalink
events: Rename amount retrieving func
Browse files Browse the repository at this point in the history
  • Loading branch information
cdamian committed Jul 13, 2023
1 parent fe01dc2 commit 85ed235
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions chains/substrate/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func fungibleTransferHandler(eventFields map[string]any, log log15.Logger) (msg.
return msg.Message{}, err
}

amount, err := getAmount(eventFields)
amount, err := getU256(eventFields)
if err != nil {
return msg.Message{}, err
}
Expand Down Expand Up @@ -223,7 +223,7 @@ func convertToByteSlice(array []types.U8) ([]byte, error) {
return res, nil
}

func getAmount(eventFields map[string]any) (types.U256, error) {
func getU256(eventFields map[string]any) (types.U256, error) {
for fieldName, fieldValue := range eventFields {
if fieldName != "primitive_types.U256.U256" {
continue
Expand Down

0 comments on commit 85ed235

Please sign in to comment.