From 1e57a6d8742531383c13b23951e446c7f194edfb Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Mon, 18 Aug 2014 14:08:04 -0700 Subject: [PATCH] paypro: example - remove some comments. --- examples/PayPro/README.md | 2 +- examples/PayPro/server.js | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/examples/PayPro/README.md b/examples/PayPro/README.md index 006185f..645d632 100644 --- a/examples/PayPro/README.md +++ b/examples/PayPro/README.md @@ -5,7 +5,7 @@ The node payment protocol demonstration will run automatically via: ``` bash -$ node examples/PayPro` +$ node examples/PayPro ``` You will see the server and customer logs output in the terminal. diff --git a/examples/PayPro/server.js b/examples/PayPro/server.js index 054c4f4..83b5d9e 100755 --- a/examples/PayPro/server.js +++ b/examples/PayPro/server.js @@ -147,23 +147,19 @@ app.get('/-/request', function(req, res, next) { // Instead of creating it ourselves: // if (!argv.pubkey && !argv.privkey && !argv.address) { - // argv.pubkey = '3730febcba04bad0cd476cfb820f9c37d7466fd9'; + // //argv.pubkey = '3730febcba04bad0cd476cfb820f9c37d7466fd9'; + // argv.pubkey = 'd96f46d7379c0f82fb6c47cdd0ba04babcfe3037' // } if (argv.pubkey || argv.privkey || argv.address) { var pubKey; if (argv.pubkey) { pubKey = new Buffer(argv.pubkey, 'hex'); - // If it were possible: - // pubKey = bitcore.Script.fromCompressedPubKey(new Buffer(argv.pubkey)).toCompressedPubKey(); } else if (argv.privkey) { pubKey = bitcore.Key.recoverPubKey(new Buffer(argv.privkey)).toCompressedPubKey(); } else if (argv.address) { pubKey = bitcore.Base58Check.decode(new Buffer(argv.address)); - // pubKey = bitcore.Script.fromUncompressedPubKey(pubKey).toCompressedPubKey(); } - // var pubKeyHash = bitcore.util.sha256ripe160(pubKey); - // var address = new bitcore.Address(111, pubKeyHash); var address = bitcore.Address.fromPubKey(pubKey, 'testnet'); var scriptPubKey = address.getScriptPubKey(); assert.equal(scriptPubKey.isPubkeyHash(), true);