Last active
August 29, 2015 13:56
-
-
Save gkucmierz/8891627 to your computer and use it in GitHub Desktop.
add many transactions in brainwallet #tx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// add many transactions in brainwallet #tx | |
var add = function(addr, amount) { | |
document.querySelector('#txAddDest').click(); | |
[].pop.call(document.querySelectorAll('#txDest')).value = addr; | |
[].pop.call(document.querySelectorAll('#txValue')).value = amount; | |
}; | |
var addr = prompt().split(/\n/).filter(function(line) { | |
return line.trim() !== ''; | |
}).map(function(line) { | |
var m = line.match(/(1[\w]+)\s+([0-9\,\.]+)/); | |
return [m[1], m[2].replace(/\,/, '.')]; | |
}); | |
addr.map(function(line) { | |
add(line[0], line[1]); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment