mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 01:39:44 +01:00
Fix nits.
This commit is contained in:
parent
69920045e9
commit
0c26df9653
@ -7,7 +7,7 @@ class PreferencesController {
|
||||
/**
|
||||
*
|
||||
* @typedef {Object} PreferencesController
|
||||
* @param {object} opts Overrides the defaults for the initial state of this.store
|
||||
* @param {object} opts Overrides the defaults for the initial state of this.store
|
||||
* @property {object} store The stored object containing a users preferences, stored in local storage
|
||||
* @property {array} store.frequentRpcList A list of custom rpcs to provide the user
|
||||
* @property {string} store.currentAccountTab Indicates the selected tab in the ui
|
||||
|
@ -19,8 +19,8 @@ var msgData = {
|
||||
*
|
||||
* @typedef {Object} Message
|
||||
* @property {number} id An id to track and identify the message object
|
||||
* @property {object} msgParams The parameters to pass to the eth_sign method once the signature request is approved.
|
||||
* @property {object} msgParams.metamaskId Added to msgParams for tracking and identification within MetaMask.
|
||||
* @property {Object} msgParams The parameters to pass to the eth_sign method once the signature request is approved.
|
||||
* @property {Object} msgParams.metamaskId Added to msgParams for tracking and identification within MetaMask.
|
||||
* @property {string} msgParams.data A hex string conversion of the raw buffer data of the signature request
|
||||
* @property {number} time The epoch time at which the this message was created
|
||||
* @property {string} status Indicates whether the signature request is 'unapproved', 'approved', 'signed' or 'rejected'
|
||||
@ -35,9 +35,9 @@ module.exports = class MessageManager extends EventEmitter {
|
||||
* Controller in charge of managing - storing, adding, removing, updating - Messages.
|
||||
*
|
||||
* @typedef {Object} MessageManager
|
||||
* @param {object} opts @deprecated
|
||||
* @property {object} memStore The observable store where Messages are saved.
|
||||
* @property {object} memStore.unapprovedMsgs A collection of all Messages in the 'unapproved' state
|
||||
* @param {Object} opts @deprecated
|
||||
* @property {Object} memStore The observable store where Messages are saved.
|
||||
* @property {Object} memStore.unapprovedMsgs A collection of all Messages in the 'unapproved' state
|
||||
* @property {number} memStore.unapprovedMsgCount The count of all Messages in this.memStore.unapprobedMsgs
|
||||
* @property {array} messages Holds all messages that have been created by this MessageManager
|
||||
*
|
||||
@ -64,7 +64,7 @@ module.exports = class MessageManager extends EventEmitter {
|
||||
/**
|
||||
* A getter for the 'unapproved' Messages in this.messages
|
||||
*
|
||||
* @returns {object} An index of Message ids to Messages, for all 'unapproved' Messages in this.messages
|
||||
* @returns {Object} An index of Message ids to Messages, for all 'unapproved' Messages in this.messages
|
||||
*
|
||||
*/
|
||||
getUnapprovedMsgs () {
|
||||
@ -76,7 +76,7 @@ module.exports = class MessageManager extends EventEmitter {
|
||||
* Creates a new Message with an 'unapproved' status using the passed msgParams. this.addMsg is called to add the
|
||||
* new Message to this.messages, and to save the unapproved Messages from that list to this.memStore.
|
||||
*
|
||||
* @param {object} msgParams The params for the eth_sign call to be made after the message is approved.
|
||||
* @param {Object} msgParams The params for the eth_sign call to be made after the message is approved.
|
||||
* @returns {number} The id of the newly created message.
|
||||
*
|
||||
*/
|
||||
@ -126,8 +126,8 @@ module.exports = class MessageManager extends EventEmitter {
|
||||
* Approves a Message. Sets the message status via a call to this.setMsgStatusApproved, and returns a promise with
|
||||
* any the message params modified for proper signing.
|
||||
*
|
||||
* @param {object} msgParams The msgParams to be used when eth_sign is called, plus data added by MetaMask.
|
||||
* @param {object} msgParams.metamaskId Added to msgParams for tracking and identification within MetaMask.
|
||||
* @param {Object} msgParams The msgParams to be used when eth_sign is called, plus data added by MetaMask.
|
||||
* @param {Object} msgParams.metamaskId Added to msgParams for tracking and identification within MetaMask.
|
||||
* @returns {Promise<object>} Promises the msgParams object with metamaskId removed.
|
||||
*
|
||||
*/
|
||||
@ -164,7 +164,7 @@ module.exports = class MessageManager extends EventEmitter {
|
||||
/**
|
||||
* Removes the metamaskId property from passed msgParams and returns a promise which resolves the updated msgParams
|
||||
*
|
||||
* @param {object} msgParams The msgParams to modify
|
||||
* @param {Object} msgParams The msgParams to modify
|
||||
* @returns {Promise<object>} Promises the msgParams with the metamaskId property removed
|
||||
*
|
||||
*/
|
||||
|
@ -12,9 +12,9 @@ const hexRe = /^[0-9A-Fa-f]+$/g
|
||||
*
|
||||
* @typedef {Object} PersonalMessage
|
||||
* @property {number} id An id to track and identify the message object
|
||||
* @property {object} msgParams The parameters to pass to the personal_sign method once the signature request is
|
||||
* @property {Object} msgParams The parameters to pass to the personal_sign method once the signature request is
|
||||
* approved.
|
||||
* @property {object} msgParams.metamaskId Added to msgParams for tracking and identification within MetaMask.
|
||||
* @property {Object} msgParams.metamaskId Added to msgParams for tracking and identification within MetaMask.
|
||||
* @property {string} msgParams.data A hex string conversion of the raw buffer data of the signature request
|
||||
* @property {number} time The epoch time at which the this message was created
|
||||
* @property {string} status Indicates whether the signature request is 'unapproved', 'approved', 'signed' or 'rejected'
|
||||
@ -28,9 +28,9 @@ module.exports = class PersonalMessageManager extends EventEmitter {
|
||||
* Controller in charge of managing - storing, adding, removing, updating - PersonalMessage.
|
||||
*
|
||||
* @typedef {Object} PersonalMessageManager
|
||||
* @param {object} opts @deprecated
|
||||
* @property {object} memStore The observable store where PersonalMessage are saved with persistance.
|
||||
* @property {object} memStore.unapprovedPersonalMsgs A collection of all PersonalMessages in the 'unapproved' state
|
||||
* @param {Object} opts @deprecated
|
||||
* @property {Object} memStore The observable store where PersonalMessage are saved with persistance.
|
||||
* @property {Object} memStore.unapprovedPersonalMsgs A collection of all PersonalMessages in the 'unapproved' state
|
||||
* @property {number} memStore.unapprovedPersonalMsgCount The count of all PersonalMessages in this.memStore.unapprobedMsgs
|
||||
* @property {array} messages Holds all messages that have been created by this PersonalMessageManager
|
||||
*
|
||||
@ -57,7 +57,7 @@ module.exports = class PersonalMessageManager extends EventEmitter {
|
||||
/**
|
||||
* A getter for the 'unapproved' PersonalMessages in this.messages
|
||||
*
|
||||
* @returns {object} An index of PersonalMessage ids to PersonalMessages, for all 'unapproved' PersonalMessages in
|
||||
* @returns {Object} An index of PersonalMessage ids to PersonalMessages, for all 'unapproved' PersonalMessages in
|
||||
* this.messages
|
||||
*
|
||||
*/
|
||||
@ -71,7 +71,7 @@ module.exports = class PersonalMessageManager extends EventEmitter {
|
||||
* the new PersonalMessage to this.messages, and to save the unapproved PersonalMessages from that list to
|
||||
* this.memStore.
|
||||
*
|
||||
* @param {object} msgParams The params for the eth_sign call to be made after the message is approved.
|
||||
* @param {Object} msgParams The params for the eth_sign call to be made after the message is approved.
|
||||
* @returns {number} The id of the newly created PersonalMessage.
|
||||
*
|
||||
*/
|
||||
@ -123,8 +123,8 @@ module.exports = class PersonalMessageManager extends EventEmitter {
|
||||
* Approves a PersonalMessage. Sets the message status via a call to this.setMsgStatusApproved, and returns a promise
|
||||
* with any the message params modified for proper signing.
|
||||
*
|
||||
* @param {object} msgParams The msgParams to be used when eth_sign is called, plus data added by MetaMask.
|
||||
* @param {object} msgParams.metamaskId Added to msgParams for tracking and identification within MetaMask.
|
||||
* @param {Object} msgParams The msgParams to be used when eth_sign is called, plus data added by MetaMask.
|
||||
* @param {Object} msgParams.metamaskId Added to msgParams for tracking and identification within MetaMask.
|
||||
* @returns {Promise<object>} Promises the msgParams object with metamaskId removed.
|
||||
*
|
||||
*/
|
||||
@ -161,7 +161,7 @@ module.exports = class PersonalMessageManager extends EventEmitter {
|
||||
/**
|
||||
* Removes the metamaskId property from passed msgParams and returns a promise which resolves the updated msgParams
|
||||
*
|
||||
* @param {object} msgParams The msgParams to modify
|
||||
* @param {Object} msgParams The msgParams to modify
|
||||
* @returns {Promise<object>} Promises the msgParams with the metamaskId property removed
|
||||
*
|
||||
*/
|
||||
|
@ -13,10 +13,10 @@ const log = require('loglevel')
|
||||
*
|
||||
* @typedef {Object} TypedMessage
|
||||
* @property {number} id An id to track and identify the message object
|
||||
* @property {object} msgParams The parameters to pass to the eth_signTypedData method once the signature request is
|
||||
* @property {Object} msgParams The parameters to pass to the eth_signTypedData method once the signature request is
|
||||
* approved.
|
||||
* @property {object} msgParams.metamaskId Added to msgParams for tracking and identification within MetaMask.
|
||||
* @property {object} msgParams.from The address that is making the signature request.
|
||||
* @property {Object} msgParams.metamaskId Added to msgParams for tracking and identification within MetaMask.
|
||||
* @property {Object} msgParams.from The address that is making the signature request.
|
||||
* @property {string} msgParams.data A hex string conversion of the raw buffer data of the signature request
|
||||
* @property {number} time The epoch time at which the this message was created
|
||||
* @property {string} status Indicates whether the signature request is 'unapproved', 'approved', 'signed' or 'rejected'
|
||||
@ -30,9 +30,9 @@ module.exports = class TypedMessageManager extends EventEmitter {
|
||||
* Controller in charge of managing - storing, adding, removing, updating - TypedMessage.
|
||||
*
|
||||
* @typedef {Object} TypedMessage
|
||||
* @param {object} opts @deprecated
|
||||
* @property {object} memStore The observable store where TypedMessage are saved.
|
||||
* @property {object} memStore.unapprovedTypedMessages A collection of all TypedMessages in the 'unapproved' state
|
||||
* @param {Object} opts @deprecated
|
||||
* @property {Object} memStore The observable store where TypedMessage are saved.
|
||||
* @property {Object} memStore.unapprovedTypedMessages A collection of all TypedMessages in the 'unapproved' state
|
||||
* @property {number} memStore.unapprovedTypedMessagesCount The count of all TypedMessages in this.memStore.unapprobedMsgs
|
||||
* @property {array} messages Holds all messages that have been created by this TypedMessage
|
||||
*
|
||||
@ -59,7 +59,7 @@ module.exports = class TypedMessageManager extends EventEmitter {
|
||||
/**
|
||||
* A getter for the 'unapproved' TypedMessages in this.messages
|
||||
*
|
||||
* @returns {object} An index of TypedMessage ids to TypedMessages, for all 'unapproved' TypedMessages in
|
||||
* @returns {Object} An index of TypedMessage ids to TypedMessages, for all 'unapproved' TypedMessages in
|
||||
* this.messages
|
||||
*
|
||||
*/
|
||||
@ -73,7 +73,7 @@ module.exports = class TypedMessageManager extends EventEmitter {
|
||||
* the new TypedMessage to this.messages, and to save the unapproved TypedMessages from that list to
|
||||
* this.memStore. Before any of this is done, msgParams are validated
|
||||
*
|
||||
* @param {object} msgParams The params for the eth_sign call to be made after the message is approved.
|
||||
* @param {Object} msgParams The params for the eth_sign call to be made after the message is approved.
|
||||
* @returns {number} The id of the newly created TypedMessage.
|
||||
*
|
||||
*/
|
||||
@ -101,7 +101,7 @@ module.exports = class TypedMessageManager extends EventEmitter {
|
||||
/**
|
||||
* Helper method for this.addUnapprovedMessage. Validates that the passed params have the required properties.
|
||||
*
|
||||
* @param {object} params The params to validate
|
||||
* @param {Object} params The params to validate
|
||||
*
|
||||
*/
|
||||
validateParams (params) {
|
||||
@ -143,8 +143,8 @@ module.exports = class TypedMessageManager extends EventEmitter {
|
||||
* Approves a TypedMessage. Sets the message status via a call to this.setMsgStatusApproved, and returns a promise
|
||||
* with any the message params modified for proper signing.
|
||||
*
|
||||
* @param {object} msgParams The msgParams to be used when eth_sign is called, plus data added by MetaMask.
|
||||
* @param {object} msgParams.metamaskId Added to msgParams for tracking and identification within MetaMask.
|
||||
* @param {Object} msgParams The msgParams to be used when eth_sign is called, plus data added by MetaMask.
|
||||
* @param {Object} msgParams.metamaskId Added to msgParams for tracking and identification within MetaMask.
|
||||
* @returns {Promise<object>} Promises the msgParams object with metamaskId removed.
|
||||
*
|
||||
*/
|
||||
@ -181,7 +181,7 @@ module.exports = class TypedMessageManager extends EventEmitter {
|
||||
/**
|
||||
* Removes the metamaskId property from passed msgParams and returns a promise which resolves the updated msgParams
|
||||
*
|
||||
* @param {object} msgParams The msgParams to modify
|
||||
* @param {Object} msgParams The msgParams to modify
|
||||
* @returns {Promise<object>} Promises the msgParams with the metamaskId property removed
|
||||
*
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user