Switch name check to URI check in lbry.getCostInfo()

This commit is contained in:
Alex Liebowitz 2017-04-12 01:02:29 -04:00 committed by Jeremy Kauffman
parent b38998dc18
commit dce87e9079

View file

@ -243,6 +243,10 @@ lbry.getCostInfo = function(lbryUri, callback, errorCallback) {
* - includes_data: Boolean; indicates whether or not the data fee info
* from Lighthouse is included.
*/
if (!lbryUri) {
throw new Error(`URI required.`);
}
function getCostWithData(name, size, callback, errorCallback) {
lbry.stream_cost_estimate({name, size}).then((cost) => {
callback({