separating wallets to pay, claim, and change

This commit is contained in:
bill bittner 2017-06-28 12:55:17 -07:00
parent ab9bf98c10
commit 94fd907513
6 changed files with 20 additions and 8 deletions

View file

@ -1,6 +1,8 @@
{ {
"WalletConfig": { "WalletConfig": {
"LbryAddress": "LBRY_WALLET_ADDRESS" "LbryPayAddress": "LBRY_PAY_ADDRESS",
"LbryClaimAddress": "LBRY_CLAIM_ADDRESS",
"LbryChangeAddress": "LBRY_CHANGE_ADDRESS"
}, },
"Database": { "Database": {
"MySqlConnectionUri": "MYSQL_CONNECTION_STRING" "MySqlConnectionUri": "MYSQL_CONNECTION_STRING"

View file

@ -1,6 +1,8 @@
{ {
"WalletConfig": { "WalletConfig": {
"LbryAddress": "none" "LbryPayAddress": "none",
"LbryClaimAddress": "none",
"LbryChangeAddress": "none"
}, },
"AnalyticsConfig":{ "AnalyticsConfig":{
"GoogleId": "none" "GoogleId": "none"

View file

@ -1,6 +1,8 @@
{ {
"WalletConfig": { "WalletConfig": {
"LbryAddress": "none" "LbryPayAddress": "none",
"LbryClaimAddress": "none",
"LbryChangeAddress": "none"
}, },
"AnalyticsConfig":{ "AnalyticsConfig":{
"GoogleId": "UA-100747990-1" "GoogleId": "UA-100747990-1"

View file

@ -1,6 +1,8 @@
{ {
"WalletConfig": { "WalletConfig": {
"LbryAddress": "none" "LbryPayAddress": "none",
"LbryClaimAddress": "none",
"LbryChangeAddress": "none"
}, },
"AnalyticsConfig":{ "AnalyticsConfig":{
"GoogleId": "UA-60403362-2" "GoogleId": "UA-60403362-2"

View file

@ -1,6 +1,8 @@
{ {
"WalletConfig": { "WalletConfig": {
"LbryAddress": "none" "LbryPayAddress": "none",
"LbryClaimAddress": "none",
"LbryChangeAddress": "none"
}, },
"AnalyticsConfig":{ "AnalyticsConfig":{
"GoogleId": "UA-100747990-1" "GoogleId": "UA-100747990-1"

View file

@ -1,11 +1,13 @@
const logger = require('winston'); const logger = require('winston');
const config = require('config'); const config = require('config');
const walletAddress = config.get('WalletConfig.LbryAddress');
const fs = require('fs'); const fs = require('fs');
module.exports = { module.exports = {
createPublishParams: (name, filePath, license, nsfw) => { createPublishParams: (name, filePath, license, nsfw) => {
logger.debug(`Creating Publish Parameters for "${name}"`); 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 // ensure nsfw is a boolean
if (nsfw === false) { if (nsfw === false) {
nsfw = false; nsfw = false;
@ -32,8 +34,8 @@ module.exports = {
license, license,
nsfw, nsfw,
}, },
claim_address : walletAddress, claim_address : claimAddress,
change_address: walletAddress, change_address: changeAddress,
}; };
logger.debug('publishParams:', publishParams); logger.debug('publishParams:', publishParams);
return publishParams; return publishParams;