Repository navigation
Eth and personal sign - #29
Conversation
brunobar79
left a comment
There was a problem hiding this comment.
Minor comments but this is solid stuff @estebanmino 💯
| import { EventEmitter } from 'events'; | ||
| import BaseController, { BaseConfig, BaseState } from './BaseController'; | ||
| import { validatePersonalSignMessageData, normalizeMessageData } from './util'; | ||
| const random = require('uuid/v1'); |
There was a problem hiding this comment.
honestly I didn't question this, TransactionController uses the same and imports it in the same way
There was a problem hiding this comment.
You're right. Other files are also using require. Maybe we should standardize? cc: @bitpshr
| /** | ||
| * @type Message | ||
| * | ||
| * Represents, and contains data about, an 'personal_sign' type signature request. |
There was a problem hiding this comment.
"Represents, and contains data about a 'personal_sign' type signature request."
| * @property id - An id to track and identify the message object | ||
| * @property messageParams - The parameters to pass to the personal_sign method once the signature request is approved | ||
| * @property type - The json-prc signing method for which a signature request has been made. | ||
| * A 'Message' with always have a 'personal_sign' type |
There was a problem hiding this comment.
"A 'Message' which always has..."
| /** | ||
| * @type MessageParamsMetamask | ||
| * | ||
| * Represents, the parameters to pass to the personal_sign method once the signature request is approved |
There was a problem hiding this comment.
Represents the (remove comma)
| * | ||
| */ | ||
| getUnapprovedMessages() { | ||
| return this.messages |
There was a problem hiding this comment.
ES6 + Functional programming + TypeScript = 💣 🔥
Codecov Report
@@ Coverage Diff @@
## master #29 +/- ##
======================================
Coverage 100% 100%
======================================
Files 18 19 +1
Lines 889 989 +100
Branches 97 107 +10
======================================
+ Hits 889 989 +100
Continue to review full report at Codecov.
|
This module was added as part of the effort to add decryption support to this library. It was not used in the final draft of that work, but was left in accidentally (see MetaMask#29). This module was entirely unused.
Adds the latest version of the `bip39` package.
This PR is mostly a migration to ts of this to have both eth_sign and personal_sign as proposed here MetaMask/metamask-extension#4117
It also exposes
signPersonalMessagefrometh-keyring-controller