Skip to content

Commit 3e831df

Browse files
authored
Merge pull request #65 from blackswan-03/patch-3
Modify main.js
2 parents 753ce8f + f18e806 commit 3e831df

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/main.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
'use strict';
12
const { Blockchain, Transaction } = require('./blockchain');
23
const EC = require('elliptic').ec;
34
const ec = new EC('secp256k1');
45

56
// Your private key goes here
6-
const myKey = ec.keyFromPrivate('7c4c45907dec40c91bab3480c39032e90049f1a44f3e18c3e07c23e3273995cf');
7+
const myKey = ec.keyFromPrivate(
8+
'7c4c45907dec40c91bab3480c39032e90049f1a44f3e18c3e07c23e3273995cf'
9+
);
710

811
// From that we can calculate your public key (which doubles as your wallet address)
912
const myWalletAddress = myKey.getPublic('hex');
@@ -31,7 +34,9 @@ savjeeCoin.addTransaction(tx2);
3134
savjeeCoin.minePendingTransactions(myWalletAddress);
3235

3336
console.log();
34-
console.log(`Balance of xavier is ${savjeeCoin.getBalanceOfAddress(myWalletAddress)}`);
37+
console.log(
38+
`Balance of xavier is ${savjeeCoin.getBalanceOfAddress(myWalletAddress)}`
39+
);
3540

3641
// Uncomment this line if you want to test tampering with the chain
3742
// savjeeCoin.chain[1].transactions[0].amount = 10;

0 commit comments

Comments
 (0)