diff --git a/examples/PayPro/README.md b/examples/PayPro/README.md index 006185fb2..645d6328d 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 054c4f4d3..83b5d9ebf 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);