Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Enable smart transactions for new users #12148

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
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
5 changes: 0 additions & 5 deletions app/components/Nav/App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ import OnboardingGeneralSettings from '../../Views/OnboardingSuccess/OnboardingG
import OnboardingAssetsSettings from '../../Views/OnboardingSuccess/OnboardingAssetsSettings';
import OnboardingSecuritySettings from '../../Views/OnboardingSuccess/OnboardingSecuritySettings';
import BasicFunctionalityModal from '../../UI/BasicFunctionality/BasicFunctionalityModal/BasicFunctionalityModal';
import SmartTransactionsOptInModal from '../../Views/SmartTransactionsOptInModal/SmartTranactionsOptInModal';
import ProfileSyncingModal from '../../UI/ProfileSyncing/ProfileSyncingModal/ProfileSyncingModal';
import ResetNotificationsModal from '../../UI/Notification/ResetNotificationsModal';
import NFTAutoDetectionModal from '../../../../app/components/Views/NFTAutoDetectionModal/NFTAutoDetectionModal';
Expand Down Expand Up @@ -389,10 +388,6 @@ const RootModalFlow = () => (
name={Routes.MODAL.MODAL_MANDATORY}
component={ModalMandatory}
/>
<Stack.Screen
name={Routes.MODAL.SMART_TRANSACTIONS_OPT_IN}
component={SmartTransactionsOptInModal}
/>
<Stack.Screen
name={Routes.SHEET.ACCOUNT_SELECTOR}
component={AccountSelector}
Expand Down
2 changes: 1 addition & 1 deletion app/components/Views/LedgerConnect/Scan.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ describe('Scan', () => {
const onDeviceSelected = jest.fn();

const navigateMock = {
navigate: jest.fn().mockImplementation(() => {onDeviceSelected(device2)}),
navigate: jest.fn().mockImplementation(() => {onDeviceSelected(device2);}),
} as unknown as NavigationProp<ParamListBase>;
jest.mocked(useNavigation).mockReturnValue(navigateMock);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ exports[`AdvancedSettings should render correctly 1`] = `
}
thumbTintColor="#ffffff"
tintColor="#bbc0c566"
value={false}
value={true}
/>
</View>
</View>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe('AdvancedSettings', () => {
Device.isIos = jest.fn().mockReturnValue(true);
Device.isAndroid = jest.fn().mockReturnValue(false);

it('should render smart transactions opt in switch off by default', async () => {
it('should render smart transactions opt in switch on by default', async () => {
const { findByLabelText } = renderWithProvider(
<AdvancedSettings
navigation={{ navigate: mockNavigate, setOptions: jest.fn() }}
Expand All @@ -86,7 +86,7 @@ describe('AdvancedSettings', () => {
const switchElement = await findByLabelText(
strings('app_settings.smart_transactions_opt_in_heading'),
);
expect(switchElement.props.value).toBe(false);
expect(switchElement.props.value).toBe(true);
});
it('should update smartTransactionsOptInStatus when smart transactions opt in is pressed', async () => {
const { findByLabelText } = renderWithProvider(
Expand All @@ -102,9 +102,9 @@ describe('AdvancedSettings', () => {
strings('app_settings.smart_transactions_opt_in_heading'),
);

fireEvent(switchElement, 'onValueChange', true);
fireEvent(switchElement, 'onValueChange', false);

expect(mockSetSmartTransactionsOptInStatus).toBeCalledWith(true);
expect(mockSetSmartTransactionsOptInStatus).toBeCalledWith(false);
});
});
});

This file was deleted.

Loading
Loading