From f1bf067ebdbf2dd51b79f3e61f5788a6fc82085a Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Mon, 31 May 2021 11:19:13 +0800 Subject: [PATCH] Combine Buy and Swap ## Issue 5873 Unify swap and buy flow // swaps round 2 ## Changes - Added "Buy|Swap" tab in the Buy Page and display the Swap component when needed. - Removed 'Swap' button from Wallet Page. - "Buy More" and related tooltips updated to "Buy or Swap Credits". --- static/app-strings.json | 2 + ui/component/walletBalance/view.jsx | 1 - ui/component/walletSendTip/view.jsx | 4 +- ui/component/walletTipAmountSelector/view.jsx | 2 +- ui/component/yrblWalletEmpty/view.jsx | 2 +- ui/page/buy/view.jsx | 201 +++++++++++------- 6 files changed, 127 insertions(+), 85 deletions(-) diff --git a/static/app-strings.json b/static/app-strings.json index ec159b604..744dd355d 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -1150,6 +1150,7 @@ "Update Your Password": "Update Your Password", "Your Wallet is Empty": "Your Wallet is Empty", "Buy Credits": "Buy Credits", + "Buy/Swap Credits": "Buy/Swap Credits", "LBRY, Inc. partners with Moonpay to provide the option to purchase LBRY Credits. %learn_more%.": "LBRY, Inc. partners with Moonpay to provide the option to purchase LBRY Credits. %learn_more%.", "Earn Rewards": "Earn Rewards", "Rewards are currently disabled for your account. Turn on diagnostic data sharing, in %settings%, to re-enable them.": "Rewards are currently disabled for your account. Turn on diagnostic data sharing, in %settings%, to re-enable them.", @@ -1197,6 +1198,7 @@ "Send a %amount% Tip": "Send a %amount% Tip", "Channel to show support as": "Channel to show support as", "Buy more LBRY Credits": "Buy more LBRY Credits", + "Buy or swap more LBRY Credits": "Buy or swap more LBRY Credits", "Support this content": "Support this content", "Custom support amount": "Custom support amount", "(%lbc_balance% Credits available)": "(%lbc_balance% Credits available)", diff --git a/ui/component/walletBalance/view.jsx b/ui/component/walletBalance/view.jsx index 6e270463d..6746d5c36 100644 --- a/ui/component/walletBalance/view.jsx +++ b/ui/component/walletBalance/view.jsx @@ -155,7 +155,6 @@ const WalletBalance = (props: Props) => {