1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
Mark Stacey 466ece4588 Revert "Merge pull request #7599 from MetaMask/Version-v7.7.0" (#7648)
This reverts commit 1110287fe153bba44b8a7504611c2648b50e065f, reversing
changes made to 72eb233ee953c381407f0121f76822a79753e4ee.
2019-12-05 10:23:43 -10:00

28 lines
569 B
JavaScript

// next version number
const version = 29
const failTxsThat = require('./fail-tx')
// time
const seconds = 1000
const minutes = 60 * seconds
const hours = 60 * minutes
const unacceptableDelay = 12 * hours
/*
normalizes txParams on unconfirmed txs
*/
module.exports = {
version,
migrate: failTxsThat(version, 'Stuck in approved state for too long.', (txMeta) => {
const isApproved = txMeta.status === 'approved'
const createdTime = txMeta.submittedTime
const now = Date.now()
return isApproved && now - createdTime > unacceptableDelay
}),
}