fixing broadcastTx not been asynchronized call

This commit is contained in:
Sai Raj 2019-10-13 03:04:28 +05:30 committed by GitHub
parent ed59eeeb65
commit b1c6d8c153
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5070,8 +5070,7 @@
reject("Empty Signature"); reject("Empty Signature");
else { else {
var params = `{"rawtx":"${signedTxHash}"}`; var params = `{"rawtx":"${signedTxHash}"}`;
var result; request.open('POST', url, true);
request.open('POST', url, false);
//Send the proper header information along with the request //Send the proper header information along with the request
request.setRequestHeader('Content-type', 'application/json'); request.setRequestHeader('Content-type', 'application/json');
request.onload = function () { request.onload = function () {
@ -5082,7 +5081,6 @@
reject(request.responseText); reject(request.responseText);
} }
request.send(params); request.send(params);
return result;
} }
}) })
}, },
@ -5837,4 +5835,4 @@
} }
</script> </script>
</body> </body>
</html> </html>