Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions suite-native/intl/src/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ export const messages = {
description:
'<type></type> is the default address type. <moreLink>Learn more</moreLink>',
buttons: {
select: 'Change account type',
select: 'Change address type',
confirm: 'Continue with <type></type>',
},
},
Expand Down Expand Up @@ -2242,12 +2242,12 @@ export const messages = {
},
selectCoinToSell: {
title: 'You pay',
buttonTitle: 'Select coin',
buttonTitle: 'Select asset',
amountLabel: 'You pay',
},
selectCoin: {
title: 'You get',
buttonTitle: 'Select coin',
buttonTitle: 'Select asset',
amountLabel: 'You get',
},
selectRate: {
Expand Down Expand Up @@ -2400,7 +2400,8 @@ export const messages = {
},
tradingExchangeApprovalScreen: {
title: 'Set {symbol} spending',
subtitle: 'Set how much {symbol} to approve for this swap.',
subtitle:
'Set the {symbol} amount to approve so {companyName} can access it. This is required to continue with your swap.',
revokeSuccessAlert: 'Revoke successful. Set a higher limit.',
lowLimitInfoAlert:
'You’ve approved this token, but the limit is too low. Increase it to continue.',
Expand All @@ -2427,7 +2428,7 @@ export const messages = {
title: 'Fee picker',
description: {
title: 'Transaction fee',
body: 'Fees are paid directly to network miners for processing your transactions.',
body: 'Fees are paid directly to validators for processing your transactions.',
},
},
tradingReviewOutputs: {
Expand All @@ -2438,11 +2439,11 @@ export const messages = {
title: 'Set limit',
unlimitedCard: {
description:
"Skip future approval requests and save on fees by approving unlimited {symbol}. {companyName} will have full access to your {symbol}, and your funds may be at risk if they're ever compromised.",
'Approve unlimited {symbol} to skip future approval requests and reduce fees. Only use this option if you trust {companyName}, as it will have access to all your {symbol}.',
},
limitedCard: {
description:
"Approve only the amount needed for this swap. You'll need to approve again (and pay a fee) for future swaps, but this reduces risk by keeping you in full control of your {symbol}.",
"Approve only the amount needed for this swap. This helps reduce risk, but you'll need to approve again (and pay a fee) for future swaps.",
},
},
exchangeTradePreviewCard: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('BuyForm', () => {
const { queryByText, getByText, getByLabelText } = await renderBuyForm({}, result.current);

expect(getByText('You pay')).toBeTruthy();
expect(getByLabelText('Select coin')).toHaveTextContent(/Select coin/);
expect(getByLabelText('Select asset')).toHaveTextContent(/Select asset/);
expect(queryByText('Receive account')).toBeNull();
expect(queryByText('Payment method')).toBeNull();
expect(queryByText('Country of residence')).toBeTruthy();
Expand Down Expand Up @@ -59,7 +59,7 @@ describe('BuyForm', () => {
expect(getByText('You pay')).toBeTruthy();

expect(getByLabelText('Select fiat currency')).toHaveTextContent(/CZK/);
expect(getByLabelText('Select coin')).toHaveTextContent(/Select coin/);
expect(getByLabelText('Select asset')).toHaveTextContent(/Select asset/);

expect(queryByText('Receive account')).toBeNull();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ describe('BuyTradeableAssetPicker', () => {
form = await renderFormHook();
});

it('should render "Select coin" button with caret', async () => {
it('should render "Select asset" button with caret', async () => {
const { getByLabelText } = await renderTradeableAssetPicker();

expect(getByLabelText('Select coin')).toHaveTextContent(/^Select coin.$/);
expect(getByLabelText('Select asset')).toHaveTextContent(/^Select asset.$/);
});

it('should render bottom sheet with all assets', async () => {
Expand All @@ -69,7 +69,7 @@ describe('BuyTradeableAssetPicker', () => {
it('should preselect BTC and do not render caret', async () => {
const { getByLabelText } = await renderTradeableAssetPicker();

expect(getByLabelText('Select coin')).toHaveTextContent('BTC');
expect(getByLabelText('Select asset')).toHaveTextContent('BTC');
});

it('should not render bottom sheet at all', async () => {
Expand All @@ -82,10 +82,10 @@ describe('BuyTradeableAssetPicker', () => {
const { getByLabelText } = await renderTradeableAssetPicker();

// no need to act as there should be no action
fireEvent.press(getByLabelText('Select coin'));
fireEvent.press(getByLabelText('Select asset'));
fireEvent.press(getByLabelText('You get'));

expect(getByLabelText('Select coin')).toHaveTextContent('BTC');
expect(getByLabelText('Select asset')).toHaveTextContent('BTC');
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('ExchangeApprovalLimitSheet', () => {
expect(getByText('Unlimited')).toBeTruthy();
expect(
getByText(
"Skip future approval requests and save on fees by approving unlimited USDC. Mercuryo will have full access to your USDC, and your funds may be at risk if they're ever compromised.",
'Approve unlimited USDC to skip future approval requests and reduce fees. Only use this option if you trust Mercuryo, as it will have access to all your USDC.',
),
).toBeTruthy();
});
Expand All @@ -73,7 +73,7 @@ describe('ExchangeApprovalLimitSheet', () => {
expect(getByText('200.32 USDC')).toBeTruthy();
expect(
getByText(
"Approve only the amount needed for this swap. You'll need to approve again (and pay a fee) for future swaps, but this reduces risk by keeping you in full control of your USDC.",
"Approve only the amount needed for this swap. This helps reduce risk, but you'll need to approve again (and pay a fee) for future swaps.",
),
).toBeTruthy();
});
Expand All @@ -90,7 +90,7 @@ describe('ExchangeApprovalLimitSheet', () => {

expect(
getByText(
"Skip future approval requests and save on fees by approving unlimited USDC. Mercuryo will have full access to your USDC, and your funds may be at risk if they're ever compromised.",
'Approve unlimited USDC to skip future approval requests and reduce fees. Only use this option if you trust Mercuryo, as it will have access to all your USDC.',
),
).toBeTruthy();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('ExchangeReceiveCard', () => {
const { getByText, getByLabelText } = await renderExchangeBuyCard();

expect(getByText('You get')).toBeOnTheScreen();
expect(getByLabelText('Select coin')).toHaveTextContent(/USDC/);
expect(getByLabelText('Select asset')).toHaveTextContent(/USDC/);
expect(getByLabelText('Network name')).toHaveTextContent('Ethereum');
expect(getByLabelText('You get')).toHaveDisplayValue('0.00083554');
expect(getByText('Balance:')).toBeOnTheScreen();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ describe('ExchangeTradeableAssetPicker', () => {
form = await renderFormHook();
});

it('should render "Select coin" button with caret', async () => {
it('should render "Select asset" button with caret', async () => {
const { getByLabelText } = await renderTradeableAssetPicker();

expect(getByLabelText('Select coin')).toHaveTextContent(/^Select coin.$/);
expect(getByLabelText('Select asset')).toHaveTextContent(/^Select asset.$/);
});

it('should render bottom sheet with all assets', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('ExchangeSendCard', () => {

expect(getByText('You pay')).toBeOnTheScreen();
expect(getByText('$99.00')).toBeOnTheScreen();
expect(getByLabelText('Select coin')).toHaveTextContent(/USDC/);
expect(getByLabelText('Select asset')).toHaveTextContent(/USDC/);
expect(getByLabelText('Network name')).toHaveTextContent('Ethereum');
expect(getByLabelText('You pay')).toHaveDisplayValue('100');
expect(getByText('Balance:')).toBeOnTheScreen();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ describe('TradingFeesForm', () => {

expect(getByText('Transaction fee')).toBeTruthy();
expect(
getByText('Fees are paid directly to network miners for processing your transactions.'),
getByText('Fees are paid directly to validators for processing your transactions.'),
).toBeTruthy();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ import { adaAsset } from '../../../__fixtures__/tradeableAssets';
import { SelectTradeableAssetButton } from '../SelectTradeableAssetButton';

describe('SelectTradeableAssetButton', () => {
it('should render "Select coin" when no network is selected', () => {
it('should render "Select asset" when no network is selected', () => {
const { getByLabelText } = renderWithBasicProvider(
<SelectTradeableAssetButton onPress={jest.fn()} selectedAsset={undefined} caret />,
);

const button = getByLabelText('Select coin');
expect(button).toHaveTextContent(/^Select coin.$/);
const button = getByLabelText('Select asset');
expect(button).toHaveTextContent(/^Select asset.$/);
});

it('should render TradeableAssetButton when network is selected', () => {
const { getByLabelText } = renderWithBasicProvider(
<SelectTradeableAssetButton onPress={jest.fn()} selectedAsset={adaAsset} caret />,
);
const button = getByLabelText('Select coin');
const button = getByLabelText('Select asset');
expect(button).toHaveTextContent(/^ADA.$/);
});

it('should not display caret when caret prop is falsy', () => {
const { getByLabelText } = renderWithBasicProvider(
<SelectTradeableAssetButton onPress={jest.fn()} selectedAsset={adaAsset} />,
);
const button = getByLabelText('Select coin');
const button = getByLabelText('Select asset');
expect(button).toHaveTextContent('ADA');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe('SellCard', () => {

expect(getByText('You pay')).toBeOnTheScreen();
expect(getByText('$99.00')).toBeOnTheScreen();
expect(getByLabelText('Select coin')).toHaveTextContent(/USDC/);
expect(getByLabelText('Select asset')).toHaveTextContent(/USDC/);
expect(getByLabelText('Network name')).toHaveTextContent('Ethereum');
expect(getByLabelText('You pay')).toHaveDisplayValue('100');
expect(getByText('Balance:')).toBeOnTheScreen();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('SellForm', () => {

expect(getByText('You pay')).toBeOnTheScreen();
expect(getByText('You get')).toBeOnTheScreen();
expect(getByLabelText('Select coin')).toHaveTextContent(/Select coin/);
expect(getByLabelText('Select asset')).toHaveTextContent(/Select asset/);
});

describe('with preloaded sell data', () => {
Expand All @@ -61,7 +61,7 @@ describe('SellForm', () => {

expect(getByText('You pay')).toBeOnTheScreen();
expect(getByLabelText('Select fiat currency')).toBeOnTheScreen();
expect(getByLabelText('Select coin')).toHaveTextContent(/BTC/);
expect(getByLabelText('Select asset')).toHaveTextContent(/BTC/);
expect(getByText('Country of residence')).toBeOnTheScreen();
expect(getByText('Provider')).toBeOnTheScreen();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const TradingExchangeApprovalScreen = () => {
subtitle={
<Translation
id="moduleTrading.tradingExchangeApprovalScreen.subtitle"
values={{ symbol: coinSymbol }}
values={{ symbol: coinSymbol, companyName: providerInfo?.companyName }}
/>
}
closeActionType="close"
Expand Down
Loading