Use new lbry.getCostInfoForName() in DownloadLink and WatchLink

This commit is contained in:
Alex Liebowitz 2016-12-16 17:56:53 -05:00
parent 500ea38792
commit 7efbccbe83

View file

@ -113,9 +113,9 @@ export let DownloadLink = React.createClass({
downloading: true
});
lbry.getCostEstimate(this.props.streamName, (amount) => {
lbry.getCostInfoForName(this.props.streamName, ({cost}) => {
lbry.getBalance((balance) => {
if (amount > balance) {
if (cost > balance) {
this.setState({
modal: 'notEnoughCredits',
downloading: false
@ -172,9 +172,9 @@ export let WatchLink = React.createClass({
this.setState({
loading: true,
})
lbry.getCostEstimate(this.props.streamName, (amount) => {
lbry.getCostInfoForName(this.props.streamName, ({cost}) => {
lbry.getBalance((balance) => {
if (amount > balance) {
if (cost > balance) {
this.setState({
modal: 'notEnoughCredits',
loading: false,