diff options
author | Brendan Chou <brendanchou@msn.com> | 2019-08-21 03:52:59 +0800 |
---|---|---|
committer | Whymarrh Whitby <whymarrh.whitby@gmail.com> | 2019-08-21 03:52:59 +0800 |
commit | cc71b4f52b861fda6620874dd8c9ae30c0c0ede9 (patch) | |
tree | 2c9732784d913764a4b1d5b3181ab075af6a6725 /ui/app | |
parent | 6e081eb17c8052dc626e1d113784ee8e1f9f96f2 (diff) | |
download | tangerine-wallet-browser-cc71b4f52b861fda6620874dd8c9ae30c0c0ede9.tar.gz tangerine-wallet-browser-cc71b4f52b861fda6620874dd8c9ae30c0c0ede9.tar.zst tangerine-wallet-browser-cc71b4f52b861fda6620874dd8c9ae30c0c0ede9.zip |
Add support for eth_signTypedData_v4 (#6930)
Diffstat (limited to 'ui/app')
-rw-r--r-- | ui/app/components/app/signature-request.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/app/components/app/signature-request.js b/ui/app/components/app/signature-request.js index 9c0f53f57..039485f88 100644 --- a/ui/app/components/app/signature-request.js +++ b/ui/app/components/app/signature-request.js @@ -215,7 +215,7 @@ SignatureRequest.prototype.msgHexToText = function (hex) { } // eslint-disable-next-line react/display-name -SignatureRequest.prototype.renderTypedDataV3 = function (data) { +SignatureRequest.prototype.renderTypedData = function (data) { const { domain, message } = JSON.parse(data) return [ h('div.request-signature__typed-container', [ @@ -267,8 +267,9 @@ SignatureRequest.prototype.renderBody = function () { }), }, [notice]), - h('div.request-signature__rows', type === 'eth_signTypedData' && version === 'V3' ? - this.renderTypedDataV3(data) : + h('div.request-signature__rows', + type === 'eth_signTypedData' && (version === 'V3' || version === 'V4') ? + this.renderTypedData(data) : rows.map(({ name, value }) => { if (typeof value === 'boolean') { value = value.toString() |