moves hardcoded bid amounts into siteConfig #675
5 changed files with 9 additions and 6 deletions
|
@ -39,6 +39,7 @@ const {
|
||||||
port,
|
port,
|
||||||
title,
|
title,
|
||||||
host,
|
host,
|
||||||
|
channelClaimBidAmount: channelBid,
|
||||||
},
|
},
|
||||||
publishing: {
|
publishing: {
|
||||||
uploadDirectory,
|
uploadDirectory,
|
||||||
|
@ -157,7 +158,7 @@ inquirer
|
||||||
method: 'channel_new',
|
method: 'channel_new',
|
||||||
params: {
|
params: {
|
||||||
channel_name: thumbnailChannelDefault,
|
channel_name: thumbnailChannelDefault,
|
||||||
amount : '0.1',
|
amount : channelBid,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
|
|
|
@ -31,7 +31,9 @@
|
||||||
"serveOnlyApproved": false,
|
"serveOnlyApproved": false,
|
||||||
"publishOnlyApproved": false,
|
"publishOnlyApproved": false,
|
||||||
"approvedChannels": [],
|
"approvedChannels": [],
|
||||||
"publishingChannelWhitelist": []
|
"publishingChannelWhitelist": [],
|
||||||
|
"channelClaimBidAmount": "0.1",
|
||||||
|
"fileClaimBidAmount": "0.01"
|
||||||
},
|
},
|
||||||
"startup": {
|
"startup": {
|
||||||
"performChecks": true,
|
"performChecks": true,
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
const logger = require('winston');
|
const logger = require('winston');
|
||||||
const { details, publishing } = require('@config/siteConfig');
|
const { details, publishing } = require('@config/siteConfig');
|
||||||
|
|
||||||
const createPublishParams = (filePath, name, title, description, license, nsfw, thumbnail, channelName, channelClaimId) => {
|
const createPublishParams = (filePath, name, title, description, license, nsfw, thumbnail, channelName, channelClaimId) => {
|
||||||
// provide defaults for title
|
// provide defaults for title
|
||||||
if (title === null || title.trim() === '') {
|
if (title === null || title.trim() === '') {
|
||||||
|
@ -18,7 +17,7 @@ const createPublishParams = (filePath, name, title, description, license, nsfw,
|
||||||
const publishParams = {
|
const publishParams = {
|
||||||
name,
|
name,
|
||||||
file_path: filePath,
|
file_path: filePath,
|
||||||
bid : '0.01',
|
bid : publishing.fileClaimBidAmount,
|
||||||
metadata : {
|
metadata : {
|
||||||
description,
|
description,
|
||||||
title,
|
title,
|
||||||
|
|
|
@ -10,7 +10,7 @@ const createThumbnailPublishParams = (thumbnailFilePath, claimName, license, nsf
|
||||||
return {
|
return {
|
||||||
name : `${claimName}-thumb`,
|
name : `${claimName}-thumb`,
|
||||||
file_path: thumbnailFilePath,
|
file_path: thumbnailFilePath,
|
||||||
bid : '0.01',
|
bid : publishing.fileClaimBidAmount,
|
||||||
metadata : {
|
metadata : {
|
||||||
title : `${claimName} thumbnail`,
|
title : `${claimName} thumbnail`,
|
||||||
description: `a thumbnail for ${claimName}`,
|
description: `a thumbnail for ${claimName}`,
|
||||||
|
|
|
@ -4,6 +4,7 @@ const { apiHost, apiPort, getTimeout } = require('@config/lbryConfig');
|
||||||
const lbrynetUri = 'http://' + apiHost + ':' + apiPort;
|
const lbrynetUri = 'http://' + apiHost + ':' + apiPort;
|
||||||
const { chooseGaLbrynetPublishLabel, sendGATimingEvent } = require('../utils/googleAnalytics.js');
|
const { chooseGaLbrynetPublishLabel, sendGATimingEvent } = require('../utils/googleAnalytics.js');
|
||||||
const handleLbrynetResponse = require('./utils/handleLbrynetResponse.js');
|
const handleLbrynetResponse = require('./utils/handleLbrynetResponse.js');
|
||||||
|
const { publishing } = require('@config/siteConfig');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
publishClaim (publishParams) {
|
publishClaim (publishParams) {
|
||||||
|
@ -116,7 +117,7 @@ module.exports = {
|
||||||
method: 'channel_new',
|
method: 'channel_new',
|
||||||
params: {
|
params: {
|
||||||
channel_name: name,
|
channel_name: name,
|
||||||
amount : '0.1',
|
amount : publishing.channelClaimBidAmount,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
|
|
Loading…
Reference in a new issue