diff --git a/helpers/lbryApi.js b/helpers/lbryApi.js index a9314401..d296db94 100644 --- a/helpers/lbryApi.js +++ b/helpers/lbryApi.js @@ -68,7 +68,7 @@ function findAllClaims(name, resolve, reject){ module.exports = { publishClaim: function(publishParams){ - console.log(publishParams); + console.log("publish params:>", publishParams); var deferred = new Promise(function(resolve, reject){ axios.post('http://localhost:5279/lbryapi', { "method": "publish", @@ -89,9 +89,7 @@ module.exports = { }, getClaimBasedOnNameOnly: function(claimName){ - // 1. create a promise var deferred = new Promise(function (resolve, reject){ - // 2. code to resolve or reject the promise // make a call to the daemon to get the claims list axios.post('http://localhost:5279/lbryapi', { "method": "claim_list", @@ -129,9 +127,7 @@ module.exports = { reject(error); }); }); - // 3. return the promise return deferred; - }, getClaimBasedOnUri: function(uri){ diff --git a/helpers/socketHelpers.js b/helpers/socketHelpers.js index 0a4f41fe..6a3a7638 100644 --- a/helpers/socketHelpers.js +++ b/helpers/socketHelpers.js @@ -15,7 +15,7 @@ function createPublishParams(name, filepath, license, nsfw) { var publishParams = { "name": name, "file_path": filepath, - "bid": 0.1, + "bid": 0.01, "metadata": { "description": name + " published via spee.ch", "title": name, @@ -23,7 +23,9 @@ function createPublishParams(name, filepath, license, nsfw) { "language": "en", "license": license, "nsfw": (nsfw.toLowerCase() === "true") - } + }, + "claim_address": "", // fill in wallet address + "change_address": "" // fill in wallet address; requires daemon 0.12.2rc1 or above }; return publishParams; } diff --git a/routes/sockets-routes.js b/routes/sockets-routes.js index 76ac399e..8c58a01c 100644 --- a/routes/sockets-routes.js +++ b/routes/sockets-routes.js @@ -19,7 +19,7 @@ module.exports = function(app) { console.log("saved " + event.file.name); if (event.file.success){ socket.emit("publish-status", "file upload successfully completed"); - socketHelpers.publish(event.file.meta.name, event.file.pathName, event.file.meta.license,event.file.meta.nsfw, socket) + socketHelpers.publish(event.file.meta.name, event.file.pathName, event.file.meta.license, event.file.meta.nsfw, socket) } else { socket.emit("publish-failure", "file uploaded, but with errors") };