mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix implicit-arrow-linebreak issues (#9201)
See [`implicit-arrow-linebreak`](https://eslint.org/docs/rules/implicit-arrow-linebreak) for more information. This change enables `implicit-arrow-linebreak` and fixes the issues raised by the rule.
This commit is contained in:
parent
76bd7f98b6
commit
c0f05ccae6
@ -47,6 +47,7 @@ module.exports = {
|
|||||||
'consistent-return': 'error',
|
'consistent-return': 'error',
|
||||||
'global-require': 'error',
|
'global-require': 'error',
|
||||||
'guard-for-in': 'error',
|
'guard-for-in': 'error',
|
||||||
|
'implicit-arrow-linebreak': 'error',
|
||||||
'no-case-declarations': 'error',
|
'no-case-declarations': 'error',
|
||||||
'no-empty': 'error',
|
'no-empty': 'error',
|
||||||
'no-eq-null': 'error',
|
'no-eq-null': 'error',
|
||||||
|
@ -239,11 +239,11 @@ export default class PendingTransactionTracker extends EventEmitter {
|
|||||||
async _checkIfNonceIsTaken (txMeta) {
|
async _checkIfNonceIsTaken (txMeta) {
|
||||||
const address = txMeta.txParams.from
|
const address = txMeta.txParams.from
|
||||||
const completed = this.getCompletedTransactions(address)
|
const completed = this.getCompletedTransactions(address)
|
||||||
return completed.some((other) =>
|
return completed.some(
|
||||||
// This is called while the transaction is in-flight, so it is possible that the
|
// This is called while the transaction is in-flight, so it is possible that the
|
||||||
// list of completed transactions now includes the transaction we were looking at
|
// list of completed transactions now includes the transaction we were looking at
|
||||||
// and if that is the case, don't consider the transaction to have taken its own nonce
|
// and if that is the case, don't consider the transaction to have taken its own nonce
|
||||||
!(other.id === txMeta.id) && other.txParams.nonce === txMeta.txParams.nonce,
|
(other) => !(other.id === txMeta.id) && other.txParams.nonce === txMeta.txParams.nonce,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1756,8 +1756,7 @@ export function exportAccounts (password, addresses) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.debug(`background.exportAccounts`)
|
log.debug(`background.exportAccounts`)
|
||||||
const accountPromises = addresses.map((address) =>
|
const accountPromises = addresses.map((address) => new Promise(
|
||||||
new Promise(
|
|
||||||
(resolve, reject) => background.exportAccount(address, function (err, result) {
|
(resolve, reject) => background.exportAccount(address, function (err, result) {
|
||||||
if (err) {
|
if (err) {
|
||||||
log.error(err)
|
log.error(err)
|
||||||
@ -1768,8 +1767,7 @@ export function exportAccounts (password, addresses) {
|
|||||||
resolve(result)
|
resolve(result)
|
||||||
return
|
return
|
||||||
}),
|
}),
|
||||||
),
|
))
|
||||||
)
|
|
||||||
resolve(Promise.all(accountPromises))
|
resolve(Promise.all(accountPromises))
|
||||||
return
|
return
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user