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
|
||||
});
|
||||
|
||||
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,
|
||||
|
|
Loading…
Reference in a new issue