Skip to content

Commit 1d10873

Browse files
authored
chore(runway): cherry-pick chore: cp-7.47.0 update button text for EVM bridges (#15748)
2 parents b51d598 + 18a959d commit 1d10873

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

app/components/UI/Bridge/Views/BridgeView/BridgeView.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -462,11 +462,11 @@ describe('BridgeView', () => {
462462
{ state: testState },
463463
);
464464

465-
expect(getByText('Continue')).toBeTruthy();
465+
expect(getByText('Confirm Bridge')).toBeTruthy();
466466
expect(getByText('Terms & Conditions')).toBeTruthy();
467467
});
468468

469-
it('should handle Continue button press', async () => {
469+
it('should handle "Confirm Bridge" button press', async () => {
470470
const testState = createBridgeTestState({
471471
bridgeControllerOverrides: {
472472
quoteRequest: {
@@ -491,8 +491,8 @@ describe('BridgeView', () => {
491491
},
492492
);
493493

494-
const continueButton = getByText('Continue');
495-
fireEvent.press(continueButton);
494+
const button = getByText('Confirm Bridge');
495+
fireEvent.press(button);
496496

497497
// TODO: Add expectations once quote response is implemented
498498
// expect(mockSubmitBridgeTx).toHaveBeenCalled();

app/components/UI/Bridge/Views/BridgeView/index.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,15 @@ const BridgeView = () => {
314314
const getButtonLabel = () => {
315315
if (hasInsufficientBalance) return strings('bridge.insufficient_funds');
316316
if (isSubmittingTx) return strings('bridge.submitting_transaction');
317-
return strings('bridge.continue');
317+
318+
// Solana uses the continue button since they have a snap confirmation modal
319+
const isSolana = isSolanaToEvm || isSolanaSwap;
320+
if (isSolana) {
321+
return strings('bridge.continue');
322+
}
323+
324+
const isSwap = route.params.bridgeViewMode === BridgeViewMode.Swap;
325+
return isSwap ? strings('bridge.confirm_swap') : strings('bridge.confirm_bridge');
318326
};
319327

320328
useEffect(() => {

locales/languages/en.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3906,6 +3906,8 @@
39063906
},
39073907
"bridge": {
39083908
"continue": "Continue",
3909+
"confirm_bridge": "Confirm Bridge",
3910+
"confirm_swap": "Confirm Swap",
39093911
"terms_and_conditions": "Terms & Conditions",
39103912
"select_token": "Select token",
39113913
"select_network": "Select network",

0 commit comments

Comments
 (0)