mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 18:00:18 +01:00
Fix a few instances of signature mismatches (#7704)
Co-Authored-By: Mark Stacey <markjstacey@gmail.com>
This commit is contained in:
parent
4c3bafbc6d
commit
6c1bce28ac
@ -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 {
|
||||
|
@ -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)
|
||||
|
@ -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`
|
||||
*
|
||||
*/
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user