From 65f456293707016b43f17cfeb44dc0e98a7820cc Mon Sep 17 00:00:00 2001 From: Jeffrey Fisher Date: Fri, 24 Apr 2020 15:22:33 -0700 Subject: [PATCH] Fix purchase confirmation logic Closes #4057 --- ui/redux/actions/content.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ui/redux/actions/content.js b/ui/redux/actions/content.js index 6f5d1da51..38e5ccd95 100644 --- a/ui/redux/actions/content.js +++ b/ui/redux/actions/content.js @@ -197,13 +197,17 @@ export function doPlayUri( return; } - if (instantPurchaseEnabled || instantPurchaseMax.currency === 'LBC') { - attemptPlay(instantPurchaseMax.amount); + if (instantPurchaseEnabled) { + if (instantPurchaseMax.currency === 'LBC') { + attemptPlay(instantPurchaseMax.amount); + } else { + // Need to convert currency of instant purchase maximum before trying to play + Lbryio.getExchangeRates().then(({ LBC_USD }) => { + attemptPlay(instantPurchaseMax.amount / LBC_USD); + }); + } } else { - // Need to convert currency of instant purchase maximum before trying to play - Lbryio.getExchangeRates().then(({ LBC_USD }) => { - attemptPlay(instantPurchaseMax.amount / LBC_USD); - }); + attemptPlay(); } }; }