Skip to content

Commit

Permalink
Merge branch 'eip712'
Browse files Browse the repository at this point in the history
  • Loading branch information
benma committed Oct 17, 2023
2 parents 73e3f60 + 19f9dbe commit 16d670c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/firmware/eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,11 +429,11 @@ func encodeValue(typ *messages.ETHSignTypedMessageRequest_MemberType, value inte
case float64:
v64 := int64(v)
if float64(v64) != v {
return nil, errp.Newf("float64 is not an uint: %v", v)
return nil, errp.Newf("float64 is not an int: %v", v)
}
bigint.SetInt64(v64)
default:
return nil, errp.New("wrong type for uint")
return nil, errp.New("wrong type for int")
}
return bigendianInt(bigint), nil
case messages.ETHSignTypedMessageRequest_BOOL:
Expand Down Expand Up @@ -497,7 +497,7 @@ func getValue(what *messages.ETHTypedMessageValueResponse, msg map[string]interf
return encodeValue(typ, value)
}

// ETHSignTypedMessage signs an Ethereum EIP-612 typed message. 27 is added to the recID to denote
// ETHSignTypedMessage signs an Ethereum EIP-712 typed message. 27 is added to the recID to denote
// an uncompressed pubkey.
func (device *Device) ETHSignTypedMessage(
chainID uint64,
Expand Down

0 comments on commit 16d670c

Please sign in to comment.