Convert lbry.getCostInfo() to use URIs

This commit is contained in:
Alex Liebowitz 2017-04-12 13:08:23 -04:00 committed by Jeremy Kauffman
parent dce87e9079
commit d3258d9de6

View file

@ -247,8 +247,8 @@ lbry.getCostInfo = function(lbryUri, callback, errorCallback) {
throw new Error(`URI required.`);
}
function getCostWithData(name, size, callback, errorCallback) {
lbry.stream_cost_estimate({name, size}).then((cost) => {
function getCostWithData(lbryUri, size, callback, errorCallback) {
lbry.stream_cost_estimate({uri: lbryUri, size}).then((cost) => {
callback({
cost: cost,
includesData: true,
@ -256,8 +256,8 @@ lbry.getCostInfo = function(lbryUri, callback, errorCallback) {
}, errorCallback);
}
function getCostNoData(name, callback, errorCallback) {
lbry.stream_cost_estimate({name}).then((cost) => {
function getCostNoData(lbryUri, callback, errorCallback) {
lbry.stream_cost_estimate({uri: lbryUri}).then((cost) => {
callback({
cost: cost,
includesData: false,