1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

Minor fixes in a number of docs.

This commit is contained in:
Dan 2018-04-20 15:48:58 -02:30
parent 3ec22dc7e1
commit 69920045e9
6 changed files with 17 additions and 18 deletions

View File

@ -11,7 +11,7 @@ class BalanceController {
* @param {Object} opts Initialize various properties of the class.
* @property {string} address A base 16 hex string. The account address which has the balance managed by this
* BalanceController.
* @property {AccountTracker} accountTracker Contains and updates the users accounts; is the source of the account
* @property {AccountTracker} accountTracker Stores and updates the users accounts
* for which this BalanceController manages balance.
* @property {TransactionController} txController Stores, tracks and manages transactions. Here used to create a listener for
* transaction updates.
@ -58,7 +58,7 @@ class BalanceController {
/**
* Sets up listeners and subscriptions which should trigger an update of ethBalance. These updates include:
* - when a transaction changes to a submitted, confirmed or failed state
* - when a transaction changes state to 'submitted', 'confirmed' or 'failed'
* - when the current account changes (i.e. a new account is selected)
* - when there is a block update
*

View File

@ -57,7 +57,7 @@ class AccountTracker extends EventEmitter {
* AccountTracker.
*
* Once this AccountTracker's accounts are up to date with those referenced by the passed addresses, each
* of these accounts are given an updated balance via Ethquery.
* of these accounts are given an updated balance via EthQuery.
*
* @param {array} address The array of hex addresses for accounts with which this AccountTracker's accounts should be
* in sync
@ -119,7 +119,7 @@ class AccountTracker extends EventEmitter {
*
* @private
* @param {object} block Data about the block that contains the data to update to.
* @fires 'block' The updated state, if all account updates are successfull
* @fires 'block' The updated state, if all account updates are successful
*
*/
_updateForBlock (block) {
@ -139,7 +139,7 @@ class AccountTracker extends EventEmitter {
/**
* Calls this._updateAccount for each account in this.store
*
* @param {Function} cb A callback to pass to this._updateAccount, called after each account is succesfully updated
* @param {Function} cb A callback to pass to this._updateAccount, called after each account is successfully updated
*
*/
_updateAccounts (cb = noop) {

View File

@ -5,7 +5,7 @@ module.exports = extractEthjsErrorMessage
/**
* Extracts the important part of an ethjs-rpc error message. If the passed error is not anis isEthjsRpcError, the error
* Extracts the important part of an ethjs-rpc error message. If the passed error is not an isEthjsRpcError, the error
* is returned unchanged.
*
* @param {string} errorMessage The error message to parse

View File

@ -20,7 +20,7 @@ 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.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'
@ -36,7 +36,7 @@ module.exports = class MessageManager extends EventEmitter {
*
* @typedef {Object} MessageManager
* @param {object} opts @deprecated
* @property {object} memStore The observable store where Messages are saved with persistance.
* @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
@ -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.
*
*/

View File

@ -3,7 +3,6 @@ const ObservableStore = require('obs-store')
const ethUtil = require('ethereumjs-util')
const createId = require('./random-id')
const hexRe = /^[0-9A-Fa-f]+$/g
const log = require('loglevel')
/**
* Represents, and contains data about, an 'personal_sign' type signature request. These are created when a
@ -15,7 +14,7 @@ const log = require('loglevel')
* @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
* 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'
@ -124,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.
*
*/

View File

@ -15,7 +15,7 @@ const log = require('loglevel')
* @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
* 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 {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
@ -31,7 +31,7 @@ module.exports = class TypedMessageManager extends EventEmitter {
*
* @typedef {Object} TypedMessage
* @param {object} opts @deprecated
* @property {object} memStore The observable store where TypedMessage are saved with persistance.
* @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
@ -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.
*
*/