Skip to content

Commit

Permalink
revert previous change
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Waas committed Apr 1, 2018
1 parent 1e44d4d commit b54da89
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions aws_lambda/setBankHash.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const s3 = new AWS.S3({ sslEnabled: true });
const googleRecaptcha = require('google-recaptcha');

const BANK_ADDRESS = '0x15ae150d7dC03d3B635EE90b85219dBFe071ED35';
const CONTRACT_ADDRESS = '0xe9a2a04ed72c776655f83c8f08dcc517b7e7a340';
const CONTRACT_ADDRESS = '0x128a71fccc792e808b7b34aa416df3ef51da7d6d';
const NETWORK_NAME = 'rinkeby';

const NETWORK_IDS = {
Expand Down Expand Up @@ -71,9 +71,8 @@ module.exports.handler = (event, context, callback) => {
tx.sign(privKey);
const serializedTx = tx.serialize();

addValue(context, decNumber, hash, userAddress);
web3.eth.sendRawTransaction('0x' + serializedTx.toString('hex'), (error, result) => {
if (!error) { returnSucceed(context, hash); }
if (!error) { addValue(context, decNumber, hash, userAddress); }
else { returnFail(context, error); }
});
});
Expand All @@ -92,6 +91,8 @@ function addValue(context, value, hash, userAddress) {
console.log(`Error SET object ${value} with key ${itemKey}`
+ ` from bucket ${BUCKET} for user address ${userAddress}`);
returnFail(context, err);
} else {
returnSucceed(context, hash);
}
});
}
Expand Down

0 comments on commit b54da89

Please sign in to comment.