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": {
"LbryAddress": "LBRY_WALLET_ADDRESS"
"LbryPayAddress": "LBRY_PAY_ADDRESS",
"LbryClaimAddress": "LBRY_CLAIM_ADDRESS",
"LbryChangeAddress": "LBRY_CHANGE_ADDRESS"
},
"Database": {
"MySqlConnectionUri": "MYSQL_CONNECTION_STRING"

View file

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

View file

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

View file

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

View file

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

View file

@ -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;