diff options
author | obscuren <geffobscura@gmail.com> | 2015-02-23 22:43:41 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-02-23 22:43:41 +0800 |
commit | b2a225a52e45315f3ec90e11707fefa6059d13f5 (patch) | |
tree | 7019227fc4af5e39f88bcc58ddc455826df8d569 /cmd | |
parent | 20aa6dde067a0c8d28fdafd43e41f996f014e8b0 (diff) | |
download | go-tangerine-b2a225a52e45315f3ec90e11707fefa6059d13f5.tar.gz go-tangerine-b2a225a52e45315f3ec90e11707fefa6059d13f5.tar.zst go-tangerine-b2a225a52e45315f3ec90e11707fefa6059d13f5.zip |
Properly uninstall filters. Mining issue fixed #closes #365
* Added an additional tx state which is used to get the current nonce
* Refresh transient state each time a new canonical block is found
* Properly uninstall filters. Fixes a possible crash in RPC
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/mist/assets/examples/coin.html | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/cmd/mist/assets/examples/coin.html b/cmd/mist/assets/examples/coin.html index 18a6811d7..509a9aeeb 100644 --- a/cmd/mist/assets/examples/coin.html +++ b/cmd/mist/assets/examples/coin.html @@ -19,6 +19,7 @@ <span>Amount:</span> <input type="text" id="amount" style="width:200px"> <button onclick="transact()">Send</button> + <span id="message"></span> </div> <hr> @@ -95,17 +96,28 @@ } function transact() { - var to = document.querySelector("#address").value; - if( to.length == 0 ) { + var to = document.querySelector("#address"); + if( to.value.length == 0 ) { to = "0x4205b06c2cfa0e30359edcab94543266cb6fa1d3"; } else { - to = "0x"+to; + if (to.value.substr(0,2) != "0x") + to.value = "0x"+to.value; } - var value = parseInt( document.querySelector("#amount").value ); - console.log("transact: ", to, " => ", value) + var value = document.querySelector("#amount"); + var amount = parseInt( value.value ); + console.log("transact: ", to.value, " => ", amount) - contract.send( to, value ); + contract.send( to.value, amount ); + + to.value = ""; + value.value = ""; + + var message = document.querySelector("#message") + message.innerHTML = "Submitted"; + setTimeout(function() { + message.innerHTML = ""; + }, 1000); } refresh(); |