File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,13 @@ const Web3 = require("web3");
22
33const OPTIONS = {
44 defaultBlock : "latest" ,
5- transactionConfirmationBlocks : 3 ,
5+ transactionConfirmationBlocks : 1 ,
66 transactionBlockTimeout : 5
77} ;
88
99const web3 = new Web3 (
1010 new Web3 . providers . WebsocketProvider ( "ws://localhost:8545" ) ,
11+ // Web3.providers.HtttpProvider("http://localhost:8545")
1112 null ,
1213 OPTIONS
1314) ;
@@ -38,14 +39,13 @@ async function sendTx() {
3839 value : web3 . utils . toWei ( "0.1" , "ether" )
3940 } )
4041 . on ( "transactionHash" , txHash => {
41- //web3.currentProvider.send("evm_mine");
42+ //web3.currentProvider.send("evm_mine"); // execution of it seems to be blocked by sendTransaction in beta52
4243 console . log ( "on transactionHash" , txHash ) ;
4344 } )
4445 . on ( "receipt" , receipt => {
4546 console . log ( "on receipt" ) ;
4647 } )
4748 . on ( "confirmation" , ( confirmationNumber , receipt ) => {
48- // ganache.advanceBlock(web3); // execution of it seems to be blocked by sendTransaction in beta52
4949 console . log ( "on confirmation" , confirmationNumber ) ;
5050 } )
5151 . on ( "error" , error => {
You can’t perform that action at this time.
0 commit comments