From 94fd90751365d48aaf14af261a3537701474d034 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Wed, 28 Jun 2017 12:55:17 -0700 Subject: [PATCH] separating wallets to pay, claim, and change --- config/custom-environment-variables.json | 4 +++- config/default.json | 4 +++- config/development.json | 4 +++- config/production.json | 4 +++- config/test.json | 4 +++- helpers/libraries/publishHelpers.js | 8 +++++--- 6 files changed, 20 insertions(+), 8 deletions(-) diff --git a/config/custom-environment-variables.json b/config/custom-environment-variables.json index be110732..aa3fad52 100644 --- a/config/custom-environment-variables.json +++ b/config/custom-environment-variables.json @@ -1,6 +1,8 @@ { "WalletConfig": { - "LbryAddress": "LBRY_WALLET_ADDRESS" + "LbryPayAddress": "LBRY_PAY_ADDRESS", + "LbryClaimAddress": "LBRY_CLAIM_ADDRESS", + "LbryChangeAddress": "LBRY_CHANGE_ADDRESS" }, "Database": { "MySqlConnectionUri": "MYSQL_CONNECTION_STRING" diff --git a/config/default.json b/config/default.json index 546378c7..a50953a0 100644 --- a/config/default.json +++ b/config/default.json @@ -1,6 +1,8 @@ { "WalletConfig": { - "LbryAddress": "none" + "LbryPayAddress": "none", + "LbryClaimAddress": "none", + "LbryChangeAddress": "none" }, "AnalyticsConfig":{ "GoogleId": "none" diff --git a/config/development.json b/config/development.json index 38c7affe..691528f2 100644 --- a/config/development.json +++ b/config/development.json @@ -1,6 +1,8 @@ { "WalletConfig": { - "LbryAddress": "none" + "LbryPayAddress": "none", + "LbryClaimAddress": "none", + "LbryChangeAddress": "none" }, "AnalyticsConfig":{ "GoogleId": "UA-100747990-1" diff --git a/config/production.json b/config/production.json index 56fde915..05161783 100644 --- a/config/production.json +++ b/config/production.json @@ -1,6 +1,8 @@ { "WalletConfig": { - "LbryAddress": "none" + "LbryPayAddress": "none", + "LbryClaimAddress": "none", + "LbryChangeAddress": "none" }, "AnalyticsConfig":{ "GoogleId": "UA-60403362-2" diff --git a/config/test.json b/config/test.json index b74d2997..bab71bfa 100644 --- a/config/test.json +++ b/config/test.json @@ -1,6 +1,8 @@ { "WalletConfig": { - "LbryAddress": "none" + "LbryPayAddress": "none", + "LbryClaimAddress": "none", + "LbryChangeAddress": "none" }, "AnalyticsConfig":{ "GoogleId": "UA-100747990-1" diff --git a/helpers/libraries/publishHelpers.js b/helpers/libraries/publishHelpers.js index 57a87208..d483eeed 100644 --- a/helpers/libraries/publishHelpers.js +++ b/helpers/libraries/publishHelpers.js @@ -1,11 +1,13 @@ const logger = require('winston'); const config = require('config'); -const walletAddress = config.get('WalletConfig.LbryAddress'); const fs = require('fs'); module.exports = { createPublishParams: (name, filePath, license, nsfw) => { logger.debug(`Creating Publish Parameters for "${name}"`); + // const payAddress = config.get('WalletConfig.LbryPayAddress'); + const claimAddress = config.get('WalletConfig.LbryClaimAddress'); + const changeAddress = config.get('WalletConfig.LbryChangeAddress'); // ensure nsfw is a boolean if (nsfw === false) { nsfw = false; @@ -32,8 +34,8 @@ module.exports = { license, nsfw, }, - claim_address : walletAddress, - change_address: walletAddress, + claim_address : claimAddress, + change_address: changeAddress, }; logger.debug('publishParams:', publishParams); return publishParams;