Merge pull request #819 from MetaMask/i791-FixLosingConnection
Increment tx ids to avoid collisionsfeature/default_network_editable
commit
37d836fa72
@ -0,0 +1,9 @@ |
||||
const MAX = 1000000000 |
||||
|
||||
let idCounter = Math.round( Math.random() * MAX ) |
||||
function createRandomId() { |
||||
idCounter = idCounter % MAX |
||||
return idCounter++ |
||||
} |
||||
|
||||
module.exports = createRandomId |
Loading…
Reference in new issue