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) {
|
async function persistData (state) {
|
||||||
if (!state) {
|
if (!state) {
|
||||||
throw new Error('MetaMask - updated state is missing', state)
|
throw new Error('MetaMask - updated state is missing')
|
||||||
}
|
}
|
||||||
if (!state.data) {
|
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) {
|
if (localStore.isSupported) {
|
||||||
try {
|
try {
|
||||||
|
@ -34,7 +34,7 @@ function injectScript (content) {
|
|||||||
try {
|
try {
|
||||||
const container = document.head || document.documentElement
|
const container = document.head || document.documentElement
|
||||||
const scriptTag = document.createElement('script')
|
const scriptTag = document.createElement('script')
|
||||||
scriptTag.setAttribute('async', false)
|
scriptTag.setAttribute('async', 'false')
|
||||||
scriptTag.textContent = content
|
scriptTag.textContent = content
|
||||||
container.insertBefore(scriptTag, container.children[0])
|
container.insertBefore(scriptTag, container.children[0])
|
||||||
container.removeChild(scriptTag)
|
container.removeChild(scriptTag)
|
||||||
|
@ -671,7 +671,7 @@ class PreferencesController {
|
|||||||
/**
|
/**
|
||||||
* A getter for `tokens` and `accountTokens` related states.
|
* 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`
|
* @returns {Object.<array, object, string, string>} States to interact with tokens in `accountTokens`
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@ -79,7 +79,7 @@ class RecentBlocksController {
|
|||||||
*/
|
*/
|
||||||
async processBlock (newBlockNumberHex) {
|
async processBlock (newBlockNumberHex) {
|
||||||
const newBlockNumber = Number.parseInt(newBlockNumberHex, 16)
|
const newBlockNumber = Number.parseInt(newBlockNumberHex, 16)
|
||||||
const newBlock = await this.getBlockByNumber(newBlockNumber, true)
|
const newBlock = await this.getBlockByNumber(newBlockNumber)
|
||||||
if (!newBlock) {
|
if (!newBlock) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -153,7 +153,7 @@ class RecentBlocksController {
|
|||||||
const targetBlockNumbers = Array(blocksToFetch).fill().map((_, index) => prevBlockNumber - index)
|
const targetBlockNumbers = Array(blocksToFetch).fill().map((_, index) => prevBlockNumber - index)
|
||||||
await Promise.all(targetBlockNumbers.map(async (targetBlockNumber) => {
|
await Promise.all(targetBlockNumbers.map(async (targetBlockNumber) => {
|
||||||
try {
|
try {
|
||||||
const newBlock = await this.getBlockByNumber(targetBlockNumber, true)
|
const newBlock = await this.getBlockByNumber(targetBlockNumber)
|
||||||
if (!newBlock) {
|
if (!newBlock) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ function migrateFromSnapshotsToDiffs (longHistory) {
|
|||||||
with the first entry having the note and a timestamp when the change took place
|
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 previousState {object} - the previous state of the object
|
||||||
@param newState {object} - the update 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}
|
@returns {array}
|
||||||
*/
|
*/
|
||||||
function generateHistoryEntry (previousState, newState, note) {
|
function generateHistoryEntry (previousState, newState, note) {
|
||||||
|
Loading…
Reference in New Issue
Block a user