From 45e0b54684348d8322edb2e981397b5d46c3b4d4 Mon Sep 17 00:00:00 2001
From: "runway-github[bot]"
<73448015+runway-github[bot]@users.noreply.github.com>
Date: Fri, 25 Oct 2024 12:28:47 -0600
Subject: [PATCH] chore(runway): cherry-pick refactor(ramp): update ramp copy
(#11960)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- refactor(ramp): update ramp copy (#10952)
## **Description**
This PR contains the changes requested to comply with some regulations
## **Related issues**
Fixes:
## **Manual testing steps**
1. Navigate through the changed screens and see the new copy
## **Screenshots/Recordings**
| Image |
|:-----:|
| |
| |
| |
| |
| |
| |
### **Before**
### **After**
## **Pre-merge author checklist**
- [x] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
[6facd6d](https://github.com/MetaMask/metamask-mobile/commit/6facd6d4a6ea6b80df139fdc203e4b1f3d2374d8)
Co-authored-by: Pedro Pablo Aste Kompen
---
app/components/UI/ReceiveRequest/index.js | 6 +-----
app/components/UI/Swaps/QuotesView.js | 8 ++------
.../Tokens/TokenList/TokenListFooter/index.tsx | 6 ++++--
.../confirmations/SendFlow/Amount/index.js | 18 ++++++++++++++----
.../confirmations/SendFlow/Confirm/index.js | 2 +-
.../confirmations/SendFlow/SendTo/index.js | 11 +++++++----
.../ApproveTransactionReview/index.js | 2 +-
.../TransactionReviewInformation/index.js | 2 +-
locales/languages/en.json | 13 ++++++++++---
9 files changed, 41 insertions(+), 27 deletions(-)
diff --git a/app/components/UI/ReceiveRequest/index.js b/app/components/UI/ReceiveRequest/index.js
index 59027ce658d..adeb81bc78c 100644
--- a/app/components/UI/ReceiveRequest/index.js
+++ b/app/components/UI/ReceiveRequest/index.js
@@ -23,10 +23,7 @@ import GlobalAlert from '../GlobalAlert';
import StyledButton from '../StyledButton';
import ClipboardManager from '../../../core/ClipboardManager';
import { ThemeContext, mockTheme } from '../../../util/theme';
-import {
- selectChainId,
- selectTicker,
-} from '../../../selectors/networkController';
+import { selectChainId } from '../../../selectors/networkController';
import { isNetworkRampSupported } from '../Ramp/utils';
import { createBuyNavigationDetails } from '../Ramp/routes/utils';
import { selectSelectedInternalAccountChecksummedAddress } from '../../../selectors/accountsController';
@@ -271,7 +268,6 @@ ReceiveRequest.contextType = ThemeContext;
const mapStateToProps = (state) => ({
chainId: selectChainId(state),
- ticker: selectTicker(state),
selectedAddress: selectSelectedInternalAccountChecksummedAddress(state),
receiveAsset: state.modals.receiveAsset,
seedphraseBackedUp: state.user.seedphraseBackedUp,
diff --git a/app/components/UI/Swaps/QuotesView.js b/app/components/UI/Swaps/QuotesView.js
index ca0b8a17e90..19562a0fe74 100644
--- a/app/components/UI/Swaps/QuotesView.js
+++ b/app/components/UI/Swaps/QuotesView.js
@@ -1709,16 +1709,12 @@ function SwapsQuotesView({
{(!hasEnoughTokenBalance || !hasEnoughEthBalance) && (
- {`${strings('swaps.you_need')} `}
{!hasEnoughTokenBalance && !isSwapsNativeAsset(sourceToken)
? `${renderFromTokenMinimalUnit(
missingTokenBalance,
sourceToken.decimals,
- )} ${
- sourceToken.symbol
- // eslint-disable-next-line no-mixed-spaces-and-tabs
- } `
+ )} ${sourceToken.symbol} `
: `${renderFromWei(missingEthBalance)} ${getTicker(ticker)} `}
{!hasEnoughTokenBalance
@@ -1727,7 +1723,7 @@ function SwapsQuotesView({
{(isSwapsNativeAsset(sourceToken) ||
(hasEnoughTokenBalance && !hasEnoughEthBalance)) && (
- {strings('swaps.buy_more', { ticker: getTicker(ticker) })}
+ {strings('swaps.token_marketplace')}
)}
diff --git a/app/components/UI/Tokens/TokenList/TokenListFooter/index.tsx b/app/components/UI/Tokens/TokenList/TokenListFooter/index.tsx
index c2ea0b42dcc..a20532ee2a0 100644
--- a/app/components/UI/Tokens/TokenList/TokenListFooter/index.tsx
+++ b/app/components/UI/Tokens/TokenList/TokenListFooter/index.tsx
@@ -88,7 +88,9 @@ export const TokenListFooter = ({
{isBuyableToken && (
- {strings('wallet.add_to_get_started')}
+ {strings('wallet.token_is_needed_to_continue', {
+ tokenSymbol: mainToken.symbol,
+ })}
)}
diff --git a/app/components/Views/confirmations/SendFlow/Amount/index.js b/app/components/Views/confirmations/SendFlow/Amount/index.js
index 98741587ed3..f2bd09ddc3a 100644
--- a/app/components/Views/confirmations/SendFlow/Amount/index.js
+++ b/app/components/Views/confirmations/SendFlow/Amount/index.js
@@ -1243,6 +1243,7 @@ class Amount extends PureComponent {
isNetworkBuyNativeTokenSupported,
swapsIsLive,
chainId,
+ ticker,
} = this.props;
const colors = this.context.colors || mockTheme.colors;
const themeAppearance = this.context.themeAppearance || 'light';
@@ -1346,11 +1347,20 @@ class Amount extends PureComponent {
onPress={navigateToBuyOrSwaps}
style={styles.errorBuyWrapper}
>
- {amountError}
- {isNetworkBuyNativeTokenSupported && selectedAsset.isETH && (
-
- {strings('transaction.buy_more')}
+ {isNetworkBuyNativeTokenSupported && selectedAsset.isETH ? (
+
+ {strings('transaction.more_to_continue', {
+ ticker: getTicker(ticker),
+ })}
+ {'\n'}
+
+ {strings('transaction.token_Marketplace')}
+
+ {'\n'}
+ {strings('transaction.you_can_also_send_funds')}
+ ) : (
+ {amountError}
)}
{isSwappable && (
diff --git a/app/components/Views/confirmations/SendFlow/Confirm/index.js b/app/components/Views/confirmations/SendFlow/Confirm/index.js
index ef52107eb2c..7fe1fda6d76 100644
--- a/app/components/Views/confirmations/SendFlow/Confirm/index.js
+++ b/app/components/Views/confirmations/SendFlow/Confirm/index.js
@@ -1301,7 +1301,7 @@ class Confirm extends PureComponent {
const errorPress = isTestNetwork ? this.goToFaucet : this.buyEth;
const errorLinkText = isTestNetwork
? strings('transaction.go_to_faucet')
- : strings('transaction.buy_more');
+ : strings('transaction.token_marketplace');
return (
-
- {strings('fiat_on_ramp.buy', {
- ticker: getTicker(this.props.ticker),
- })}
+
+
+ {strings('fiat_on_ramp_aggregator.token_marketplace')}.
+
+
+ {'\n'}
+ {strings('transaction.you_can_also_send_funds')}
>
);
diff --git a/app/components/Views/confirmations/components/ApproveTransactionReview/index.js b/app/components/Views/confirmations/components/ApproveTransactionReview/index.js
index 6afec01a82a..3d51f439938 100644
--- a/app/components/Views/confirmations/components/ApproveTransactionReview/index.js
+++ b/app/components/Views/confirmations/components/ApproveTransactionReview/index.js
@@ -830,7 +830,7 @@ class ApproveTransactionReview extends PureComponent {
const errorPress = isTestNetwork ? this.goToFaucet : this.buyEth;
const errorLinkText = isTestNetwork
? strings('transaction.go_to_faucet')
- : strings('transaction.buy_more');
+ : strings('transaction.token_marketplace');
const showFeeMarket =
!gasEstimateType ||
diff --git a/app/components/Views/confirmations/components/TransactionReview/TransactionReviewInformation/index.js b/app/components/Views/confirmations/components/TransactionReview/TransactionReviewInformation/index.js
index ec92704823e..2fd06f6bdeb 100644
--- a/app/components/Views/confirmations/components/TransactionReview/TransactionReviewInformation/index.js
+++ b/app/components/Views/confirmations/components/TransactionReview/TransactionReviewInformation/index.js
@@ -666,7 +666,7 @@ class TransactionReviewInformation extends PureComponent {
const errorPress = this.isTestNetwork() ? this.goToFaucet : this.buyEth;
const errorLinkText = this.isTestNetwork()
? strings('transaction.go_to_faucet')
- : strings('transaction.buy_more');
+ : strings('transaction.token_marketplace');
const showFeeMarket =
(!gasEstimateType ||
diff --git a/locales/languages/en.json b/locales/languages/en.json
index 631e9f3acf9..eb9eb3af89b 100644
--- a/locales/languages/en.json
+++ b/locales/languages/en.json
@@ -438,6 +438,8 @@
"confirm_cta": "Confirm"
},
"add_to_get_started": "Add crypto to get started",
+ "token_is_needed_to_continue": "{{tokenSymbol}} is needed to continue",
+ "next": "Next",
"buy_asset": "Buy {{asset}}",
"no_tokens": "You don't have any tokens!",
"no_nfts_yet": "No NFTs yet",
@@ -1245,6 +1247,7 @@
"asset_overview": {
"send_button": "Send",
"buy_button": "Buy",
+ "token_marketplace": "Token marketplace",
"sell_button": "Sell",
"receive_button": "Receive",
"portfolio_button": "Portfolio",
@@ -1400,6 +1403,10 @@
"insufficient_amount": "You need {{amount}} more {{tokenSymbol}} to complete this transaction.",
"buy_more_eth": "Buy more ETH",
"buy_more": "Buy more",
+ "more_to_continue": "More {{ticker}} is needed to continue",
+ "you_can_also_send_funds": "You can also send funds from another account.",
+ "token_marketplace": "Token marketplace",
+ "token_Marketplace": "Token Marketplace",
"go_to_faucet": "Go to faucet",
"get_ether": "Get Ether for the {{networkName}} network.",
"insufficient_tokens": "Insufficient {{token}}",
@@ -1447,7 +1454,7 @@
"asset": "Asset",
"balance": "Balance",
"token_id": "Token ID",
- "not_enough_for_gas": "You have 0 {{ticker}} in your account to pay for transaction fees. Buy some {{ticker}} or deposit from another account.",
+ "not_enough_for_gas": "You have 0 {{ticker}} in your account to pay for transaction fees.",
"send": "Send",
"confirm_with_qr_hardware": "Confirm with hardware wallet",
"confirm_with_ledger_hardware": "Confirm with Ledger",
@@ -2413,6 +2420,7 @@
"All": "All",
"Buy": "Buy",
"Sell": "Sell",
+ "token_marketplace": "Token marketplace",
"Purchased": "Purchased",
"Sold": "Sold",
"empty_buy_orders_list": "You don't have any buy orders",
@@ -2679,8 +2687,7 @@
"you_need": "You need",
"more_to_complete": "more to complete this swap.",
"more_gas_to_complete": "more for gas to complete this swap.",
- "buy_more_eth": "Buy more ETH.",
- "buy_more": "Buy more {{ticker}}.",
+ "token_marketplace": "Token marketplace",
"market_price_unavailable_title": "Check your rate before proceeding",
"market_price_unavailable": "Market price is unavailable and price impact is therefore unknown. Please verify that you are comfortable with the amount of tokens you will receive before swapping.",
"price_difference": "Price difference of {{amount}}",