Use new lbry.getCostInfoForName() in DownloadLink and WatchLink
This commit is contained in:
parent
500ea38792
commit
7efbccbe83
1 changed files with 4 additions and 4 deletions
|
@ -113,9 +113,9 @@ export let DownloadLink = React.createClass({
|
||||||
downloading: true
|
downloading: true
|
||||||
});
|
});
|
||||||
|
|
||||||
lbry.getCostEstimate(this.props.streamName, (amount) => {
|
lbry.getCostInfoForName(this.props.streamName, ({cost}) => {
|
||||||
lbry.getBalance((balance) => {
|
lbry.getBalance((balance) => {
|
||||||
if (amount > balance) {
|
if (cost > balance) {
|
||||||
this.setState({
|
this.setState({
|
||||||
modal: 'notEnoughCredits',
|
modal: 'notEnoughCredits',
|
||||||
downloading: false
|
downloading: false
|
||||||
|
@ -172,9 +172,9 @@ export let WatchLink = React.createClass({
|
||||||
this.setState({
|
this.setState({
|
||||||
loading: true,
|
loading: true,
|
||||||
})
|
})
|
||||||
lbry.getCostEstimate(this.props.streamName, (amount) => {
|
lbry.getCostInfoForName(this.props.streamName, ({cost}) => {
|
||||||
lbry.getBalance((balance) => {
|
lbry.getBalance((balance) => {
|
||||||
if (amount > balance) {
|
if (cost > balance) {
|
||||||
this.setState({
|
this.setState({
|
||||||
modal: 'notEnoughCredits',
|
modal: 'notEnoughCredits',
|
||||||
loading: false,
|
loading: false,
|
||||||
|
|
Loading…
Reference in a new issue