1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

Fix a few instances of signature mismatches (#7704)

Co-Authored-By: Mark Stacey <markjstacey@gmail.com>
This commit is contained in:
Whymarrh Whitby 2019-12-16 19:54:52 -03:30 committed by GitHub
parent 4c3bafbc6d
commit 6c1bce28ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

View File

@ -298,10 +298,10 @@ function setupController (initState, initLangCode) {
async function persistData (state) {
if (!state) {
throw new Error('MetaMask - updated state is missing', state)
throw new Error('MetaMask - updated state is missing')
}
if (!state.data) {
throw new Error('MetaMask - updated state does not have data', state)
throw new Error('MetaMask - updated state does not have data')
}
if (localStore.isSupported) {
try {

View File

@ -34,7 +34,7 @@ function injectScript (content) {
try {
const container = document.head || document.documentElement
const scriptTag = document.createElement('script')
scriptTag.setAttribute('async', false)
scriptTag.setAttribute('async', 'false')
scriptTag.textContent = content
container.insertBefore(scriptTag, container.children[0])
container.removeChild(scriptTag)

View File

@ -671,7 +671,7 @@ class PreferencesController {
/**
* A getter for `tokens` and `accountTokens` related states.
*
* @param {string} selectedAddress A new hex address for an account
* @param {string} [selectedAddress] A new hex address for an account
* @returns {Object.<array, object, string, string>} States to interact with tokens in `accountTokens`
*
*/

View File

@ -79,7 +79,7 @@ class RecentBlocksController {
*/
async processBlock (newBlockNumberHex) {
const newBlockNumber = Number.parseInt(newBlockNumberHex, 16)
const newBlock = await this.getBlockByNumber(newBlockNumber, true)
const newBlock = await this.getBlockByNumber(newBlockNumber)
if (!newBlock) {
return
}
@ -153,7 +153,7 @@ class RecentBlocksController {
const targetBlockNumbers = Array(blocksToFetch).fill().map((_, index) => prevBlockNumber - index)
await Promise.all(targetBlockNumbers.map(async (targetBlockNumber) => {
try {
const newBlock = await this.getBlockByNumber(targetBlockNumber, true)
const newBlock = await this.getBlockByNumber(targetBlockNumber)
if (!newBlock) {
return
}

View File

@ -35,7 +35,7 @@ function migrateFromSnapshotsToDiffs (longHistory) {
with the first entry having the note and a timestamp when the change took place
@param previousState {object} - the previous state of the object
@param newState {object} - the update object
@param note {string} - a optional note for the state change
@param {string} [note] - a optional note for the state change
@returns {array}
*/
function generateHistoryEntry (previousState, newState, note) {