Skip to content

Commit

Permalink
Auto stash before merge of "develop" and "origin/develop"
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastiaanvGaans committed Apr 17, 2018
1 parent 5877e1b commit bfec1e1
Show file tree
Hide file tree
Showing 4 changed files with 689 additions and 66 deletions.
11 changes: 6 additions & 5 deletions logic/transactionfake.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ let json;

async.series([
(callback) => {
rl.question('Write to file', function(args) {

rl.question('Write to file', function (args) {
let data = {
senderpubkey: pubKey1,
receiveraddress: pubKey2,
Expand All @@ -31,14 +32,14 @@ async.series([

json = JSON.stringify(new Transaction(data));

fs.writeFile('transaction.json', json, 'utf8', callback);
//fs.writeFile('transaction.json', json, 'utf8', callback);
});
},
(callback) => {
rl.question('Write signed to file', function(args) {
rl.question('Write signed to file', function (args) {
let transactionJson = JSON.parse(json);

let message = transactionJson._senderpubkey + transactionJson._receiveraddress + transactionJson._amount + transactionJson._timestamp;
let message = transactionJson._senderpubkey + transactionJson._receiveraddress + transactionJson._amount + transactionJson._timestamp
let signature = security.signDetached(message, privKey1);

let data = {
Expand All @@ -50,7 +51,7 @@ async.series([
};
let jsonSigned = JSON.stringify(new Transaction(data));

fs.writeFile('signedTransaction.json', jsonSigned, 'utf8', callback);
//fs.writeFile('signedTransaction.json', jsonSigned, 'utf8', callback);
});
},
], () => {
Expand Down
Loading

0 comments on commit bfec1e1

Please sign in to comment.