aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan J Miller <danjm.com@gmail.com>2018-06-30 03:30:51 +0800
committerGitHub <noreply@github.com>2018-06-30 03:30:51 +0800
commit22debbfec8b571241c874b0ee99d0d4c732076ea (patch)
treeca0e65228754a9807a456028cee80668898a1223
parentf6238b2d39d3899a41ad4f774d7d4922fecf885e (diff)
parentf17d99f81cbb72126a0d67a8d2c7d3e55bf4a4c1 (diff)
downloadtangerine-wallet-browser-22debbfec8b571241c874b0ee99d0d4c732076ea.tar.gz
tangerine-wallet-browser-22debbfec8b571241c874b0ee99d0d4c732076ea.tar.zst
tangerine-wallet-browser-22debbfec8b571241c874b0ee99d0d4c732076ea.zip
Merge pull request #4640 from weijiekoh/develop
Fix for #4639: display values of EIP712 typed boolean fields in the signing prompt
-rw-r--r--old-ui/app/components/typed-message-renderer.js6
-rw-r--r--ui/app/components/signature-request.js3
2 files changed, 8 insertions, 1 deletions
diff --git a/old-ui/app/components/typed-message-renderer.js b/old-ui/app/components/typed-message-renderer.js
index d170d63b7..19e46f4fc 100644
--- a/old-ui/app/components/typed-message-renderer.js
+++ b/old-ui/app/components/typed-message-renderer.js
@@ -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),
])
})
}
diff --git a/ui/app/components/signature-request.js b/ui/app/components/signature-request.js
index 2a3e929fe..bbb340fcf 100644
--- a/ui/app/components/signature-request.js
+++ b/ui/app/components/signature-request.js
@@ -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),