Fix for account used in sntcontroller; returning gas price

This commit is contained in:
Richard Ramos 2018-09-14 14:48:34 -04:00
parent 98e8c010d3
commit 002dbe2a7c
6 changed files with 15 additions and 7 deletions

View File

@ -1,5 +1,5 @@
module.exports = {
"gasPrice": 20,
"gasPrice": 4000000000,
"node": {
"local":{
"protocol": "ws",

View File

@ -118,9 +118,14 @@ class MessageProcessor {
this.events.emit('exit');
} else {
try {
const receipt = await this.web3.eth.sendTransaction(p);
// TODO: parse events
reply("Transaction mined", receipt);
this.web3.eth.sendTransaction(p)
.on('transactionHash', function(hash){
reply("Transaction broadcasted: " + hash);
})
.on('receipt', function(receipt){
reply("Transaction mined", receipt);
});
} catch(err){
reply("Couldn't mine transaction: " + err.message);
// TODO log this?

View File

@ -24,7 +24,8 @@ class AvailabilityStrategy extends Strategy {
message: {
message: "Available",
address: this.config.node.blockchain.account,
minPrice: minPrice
minAcceptedGasPrice: minPrice,
gasPriceUsed: this.config.gasPrice
}
};
}

View File

@ -111,7 +111,7 @@ class Status extends Component {
web3.eth.getAccounts()
.then(accounts => {
SNTController.methods.signNonce(accounts[2])
SNTController.methods.signNonce(this.props.walletAddress)
.call()
.then((nonce) => {
this.props.nonceUpdateFunction(nonce);

View File

@ -27,6 +27,8 @@ const styles = theme => ({
});
window.TestContract = TestContract;
window.SNTController = SNTController;
class TransferSNT extends Component {
constructor(props){

View File

@ -12,8 +12,8 @@
<h3>Gas Relayer Demos</h3>
<p>The following demos are available:</p>
<ul>
<li><a href="./identity.html">identity.html</a></li>
<li><a href="./sntcontroller.html">sntcontroller.html</a></li>
<li><a href="./identity.html">identity.html (Testnet requires nonce issue to be fixed)</a></li>
</ul>
</body>