Fix for account used in sntcontroller; returning gas price
This commit is contained in:
parent
98e8c010d3
commit
002dbe2a7c
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
"gasPrice": 20,
|
||||
"gasPrice": 4000000000,
|
||||
"node": {
|
||||
"local":{
|
||||
"protocol": "ws",
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -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
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -27,6 +27,8 @@ const styles = theme => ({
|
|||
});
|
||||
|
||||
window.TestContract = TestContract;
|
||||
window.SNTController = SNTController;
|
||||
|
||||
class TransferSNT extends Component {
|
||||
|
||||
constructor(props){
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
Loading…
Reference in New Issue