mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-25 11:28:51 +01:00
fix formatting of 32-byte strings in personal_sign (#5878)
This commit is contained in:
parent
d8ab9cc002
commit
49971e9ec2
@ -11,6 +11,7 @@
|
||||
|
||||
## 5.0.4 Thu Nov 29 2018
|
||||
|
||||
- [#5878](https://github.com/MetaMask/metamask-extension/pull/5878): Formats 32-length byte strings passed to personal_sign as hex, rather than UTF8.
|
||||
- [#5840](https://github.com/MetaMask/metamask-extension/pull/5840): transactions/tx-gas-utils - add the acctual response for eth_getCode for NO_CONTRACT_ERROR's && add a debug object to simulationFailed
|
||||
- [#5848](https://github.com/MetaMask/metamask-extension/pull/5848): Soften accusatory language on phishing warning
|
||||
- [#5835](https://github.com/MetaMask/metamask-extension/pull/5835): Open full-screen UI on install
|
||||
|
@ -164,7 +164,7 @@ SignatureRequest.prototype.msgHexToText = function (hex) {
|
||||
try {
|
||||
const stripped = ethUtil.stripHexPrefix(hex)
|
||||
const buff = Buffer.from(stripped, 'hex')
|
||||
return buff.toString('utf8')
|
||||
return buff.length === 32 ? hex : buff.toString('utf8')
|
||||
} catch (e) {
|
||||
return hex
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user