mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge pull request #4640 from weijiekoh/develop
Fix for #4639: display values of EIP712 typed boolean fields in the signing prompt
This commit is contained in:
commit
22debbfec8
@ -34,9 +34,13 @@ TypedMessageRenderer.prototype.render = function () {
|
||||
|
||||
function renderTypedData (values) {
|
||||
return values.map(function (value) {
|
||||
let v = value.value
|
||||
if (typeof v === 'boolean') {
|
||||
v = v.toString()
|
||||
}
|
||||
return h('div', {}, [
|
||||
h('strong', {style: {display: 'block', fontWeight: 'bold'}}, String(value.name) + ':'),
|
||||
h('div', {}, value.value),
|
||||
h('div', {}, v),
|
||||
])
|
||||
})
|
||||
}
|
||||
|
@ -204,6 +204,9 @@ SignatureRequest.prototype.renderBody = function () {
|
||||
h('div.request-signature__rows', [
|
||||
|
||||
...rows.map(({ name, value }) => {
|
||||
if (typeof value === 'boolean') {
|
||||
value = value.toString()
|
||||
}
|
||||
return h('div.request-signature__row', [
|
||||
h('div.request-signature__row-title', [`${name}:`]),
|
||||
h('div.request-signature__row-value', value),
|
||||
|
Loading…
Reference in New Issue
Block a user