Testing on ropsten

This commit is contained in:
Pol.Alvarez@BSC 2018-02-27 11:24:56 +01:00
parent f6aef0c69a
commit 5f5728d28e
2 changed files with 7 additions and 5 deletions

View File

@ -129,10 +129,12 @@ const error = function (errorMessage) {
const sendTransaction = function (to, amount, gasPrice, chainId) {
const sendTransaction = function (to, amount, gasPrice) {
console.log("Creating wallet with PK: ", config.privateKey);
const wallet = new Wallet(config.privateKey);
wallet.provider = ethers.providers.getDefaultProvider('ropsten');
const transaction = {
nonce: 0,
@ -142,7 +144,7 @@ const sendTransaction = function (to, amount, gasPrice, chainId) {
value: amount,
// data: "0x",
// This ensures the transaction cannot be replayed on different networks
chainId: chainId
chainId: 3 // ropsten
};
const signedTransaction = wallet.sign(transaction);

View File

@ -43,14 +43,14 @@ app.post(`${config.urlEndpoint}`, jsonParser, function (req, res, next) {
})
.catch((err) => {
bot.error('Error processing request: ' + req.body.issue.url);
bot.error('error: ' + err);
bot.error('dump: ' + req.body);
bot.error('Error: ' + err);
bot.error('Dump: ', req.body);
});
}, config.delayInMiliSeconds);
} else {
bot.error('Error validating issue: ' + req.body.issue.url);
bot.error('error: ' + validation.error);
bot.error('Error: ' + validation.error);
}
return res.sendStatus(200);
});