Skip to content
This repository has been archived by the owner on Oct 30, 2018. It is now read-only.

Commit

Permalink
Merge pull request #169 from ssa3512/fix_BTC_ERC20
Browse files Browse the repository at this point in the history
Fix BTC to ERC20 in sample config
  • Loading branch information
aleitner authored Jun 19, 2017
2 parents 5a51326 + f956433 commit 9827ea3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,14 @@ information and go on with Step 1 and 2.
"tabs": [
{
"key": "4154e85e87b323611cba45ab1cd51203f2508b1da8455cdff8b641cce827f3d6",
"address": "1K1rPg...",
"address": "0xfB691...",
"storage": {
"dataDir": "D:\\Storj\\storjshare-5f4722"
}
},
{
"key": "0b0341a9913bb84b51485152a1b0a8a6ed68fa4f9a4fedb26c61ff778ce61ec8",
"address": "1K1rPg...",
"address": "0xfB691...",
"storage": {
"dataDir": "D:\\Storj\\storjshare-48a1c4"
}
Expand Down Expand Up @@ -302,7 +302,7 @@ Now that you have Storj Share installed, use the `create` command to generate
your configuration.

```
storjshare create --key 4154e8... --storj 1K1rPg... --storage <datadir> -o <writepath>
storjshare create --key 4154e8... --storj 0xfB691... --storage <datadir> -o <writepath>
```

This will generate your configuration file given the parameters you passed in,
Expand Down
7 changes: 7 additions & 0 deletions bin/storjshare-create.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const mkdirp = require('mkdirp');
const stripJsonComments = require('strip-json-comments');
const storjshare_create = require('commander');
const {execSync} = require('child_process');
const utils = require('../lib/utils');

const defaultConfig = JSON.parse(stripJsonComments(fs.readFileSync(
path.join(__dirname, '../example/farmer.config.json')
Expand Down Expand Up @@ -49,6 +50,12 @@ if (!storjshare_create.storj) {
process.exit(1);
}

if (!utils.isValidEthereumAddress(storjshare_create.storj)) {
console.error('\n SJCX addresses are no longer supported. \
Please enter ERC20 compatible ETH wallet address');
process.exit(1);
}

if (!storjshare_create.key) {
storjshare_create.key = storj.KeyPair().getPrivateKey();
}
Expand Down
2 changes: 1 addition & 1 deletion example/farmer.config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
// Set the STORJ/BTC address for receiving contract payments
// Set the STORJ/ERC20 wallet address for receiving contract payments
"paymentAddress": "",
// Subscribes to the given contract topics
// See https://storj.github.io/core/tutorial-contract-topics.html
Expand Down

0 comments on commit 9827ea3

Please sign in to comment.