Break lbry.getCostEstimate() into 2 separate functions

lbrynet now supports getting the total cost if you provide the "size"
param, so we break this into two functions: lbry.getKeyFee() and
lbry.getTotalCost()
This commit is contained in:
Alex Liebowitz 2016-12-06 13:46:02 -05:00
parent 97496c33da
commit 6963d877df

View file

@ -179,10 +179,17 @@ lbry.getMyClaim = function(name, callback) {
lbry.call('get_my_claim', { name: name }, callback);
}
lbry.getCostEstimate = function(name, callback) {
lbry.getKeyFee = function(name, callback) {
lbry.call('get_est_cost', { name: name }, callback);
}
lbry.getTotalCost = function(name, size, callback) {
lbry.call('get_est_cost', {
name: name,
size: size,
}, callback);
}
lbry.getPeersForBlobHash = function(blobHash, callback) {
lbry.call('get_peers_for_hash', { blob_hash: blobHash }, callback)
}