diff --git a/ui/component/commentCreate/view.jsx b/ui/component/commentCreate/view.jsx index 5ef268c41..d9994d90e 100644 --- a/ui/component/commentCreate/view.jsx +++ b/ui/component/commentCreate/view.jsx @@ -308,7 +308,7 @@ export function CommentCreate(props: Props) { const tipParams: TipParams = { tipAmount: Math.round(tipAmount * 100) / 100, tipChannelName, channelClaimId }; const userParams: UserParams = { activeChannelName, activeChannelId: activeChannelClaimId }; - doSendCashTip(tipParams, false, userParams, claimId, stripeEnvironment, (customerTipResponse) => { + doSendCashTip(tipParams, false, userParams, claimId, stripeEnvironment, preferredCurrency, (customerTipResponse) => { const { payment_intent_id } = customerTipResponse; handleCreateComment(null, payment_intent_id, stripeEnvironment); diff --git a/ui/component/walletSendTip/index.js b/ui/component/walletSendTip/index.js index e08987a94..956dfd0a0 100644 --- a/ui/component/walletSendTip/index.js +++ b/ui/component/walletSendTip/index.js @@ -43,6 +43,7 @@ const select = (state, props) => { instantTipMax: selectClientSetting(state, SETTINGS.INSTANT_PURCHASE_MAX), isPending: selectIsSendingSupport(state), title: selectTitleForUri(state, uri), + preferredCurrency: selectClientSetting(state, SETTINGS.PREFERRED_CURRENCY), }; }; diff --git a/ui/component/walletSendTip/view.jsx b/ui/component/walletSendTip/view.jsx index 45755ce0b..92653e49d 100644 --- a/ui/component/walletSendTip/view.jsx +++ b/ui/component/walletSendTip/view.jsx @@ -49,6 +49,7 @@ type Props = { doSendCashTip: (TipParams, boolean, UserParams, string, ?string) => string, doSendTip: (SupportParams, boolean) => void, // function that comes from lbry-redux setAmount?: (number) => void, + preferredCurrency?: boolean, }; export default function WalletSendTip(props: Props) { @@ -75,6 +76,7 @@ export default function WalletSendTip(props: Props) { doSendCashTip, doSendTip, setAmount, + preferredCurrency, } = props; /** WHAT TAB TO SHOW **/ @@ -118,8 +120,9 @@ export default function WalletSendTip(props: Props) { confirmLabel = __('Boosting'); break; case TAB_FIAT: - explainerText = __('Show this channel your appreciation by sending a donation in USD. '); - confirmLabel = __('Tipping Fiat (USD)'); + explainerText = __('Show this channel your appreciation by sending a donation in %currencyToUse%. ', + { currencyToUse: preferredCurrency}); + confirmLabel = __('Tipping %currencyToUse%', { currencyToUse: preferredCurrency }); break; case TAB_LBC: explainerText = __('Show this channel your appreciation by sending a donation of Credits. '); @@ -192,7 +195,7 @@ export default function WalletSendTip(props: Props) { const userParams: UserParams = { activeChannelName, activeChannelId }; // hit backend to send tip - doSendCashTip(tipParams, !activeChannelId || incognito, userParams, claimId, stripeEnvironment); + doSendCashTip(tipParams, !activeChannelId || incognito, userParams, claimId, stripeEnvironment, preferredCurrency); doHideModal(); } // if it's a boost (?) @@ -224,7 +227,7 @@ export default function WalletSendTip(props: Props) { case TAB_BOOST: return titleText; case TAB_FIAT: - return __('Send a $%displayAmount% Tip', { displayAmount }); + return __('Send a %fiatSymbolToUse%%displayAmount% Tip', { displayAmount, fiatSymbolToUse }); case TAB_LBC: return __('Send a %displayAmount% Credit Tip', { displayAmount }); } @@ -247,6 +250,13 @@ export default function WalletSendTip(props: Props) { const tabButtonProps = { isOnConfirmationPage, activeTab, setActiveTab }; + let fiatIconToUse = ICONS.FINANCE; + let fiatSymbolToUse = '$'; + if (preferredCurrency === 'EUR') { + fiatIconToUse = ICONS.EURO; + fiatSymbolToUse = '€'; + } + return (