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

Save seed & birthday in keychain (IOS) keystore (Android) #656

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
5a168ab
fix: rebasing dev
juanky201271 Aug 13, 2024
77b578c
fix: logging removed
juanky201271 Jun 18, 2024
4442d42
fix: first approach working in IOS
juanky201271 Jun 18, 2024
b456894
fix: rebasing dev 2
juanky201271 Aug 13, 2024
927fc15
fix: IOS reinstall - the last seed used found
juanky201271 Jun 19, 2024
3c05a81
fix: IOS reinstall - the last seed used found - alert & first screen
juanky201271 Jun 19, 2024
81973d6
fix: little fix
juanky201271 Jun 19, 2024
10e0822
fix: dev rebase conflicts solved
juanky201271 Sep 20, 2024
1200f89
fix: IOS recovery info found when installing - fix
juanky201271 Jun 19, 2024
a940622
fix: a tiny fix
juanky201271 Jun 19, 2024
f815bf3
fix: rebase adjusting...
juanky201271 Aug 13, 2024
38af3cf
fix: dev rebase conflicts solved 2
juanky201271 Sep 20, 2024
7e6704c
fix: conflicts solved
juanky201271 Oct 9, 2024
3c77626
fix: dev rebase conflicts solved 3
juanky201271 Sep 20, 2024
d6cbd6b
fix: adding key storage info in settings
juanky201271 Aug 16, 2024
b8d284b
fix: with biometrics RSA, without AES
juanky201271 Aug 17, 2024
f05204a
fix: using secure hardware with biometrics
juanky201271 Aug 17, 2024
e042589
fix: copy/paste working with seed & birthday
juanky201271 Oct 12, 2024
3504ad0
fix: deactivated by default & warning message added
juanky201271 Oct 16, 2024
8210ea9
fix: adjusting colors & side menu background color added
juanky201271 Oct 16, 2024
f796e36
fix: snapshots updated & New Test version 1.5.0 (190)
juanky201271 Oct 16, 2024
4dc4e2a
fix: yarn & podfile lock file removed & .gitignore fix
juanky201271 Oct 17, 2024
06754a1
fix: problem with react-native-svg fixed
juanky201271 Oct 17, 2024
20dbc7f
fix: a couple of tweaks
juanky201271 Oct 17, 2024
a6d41d6
fix: snapshots updated
juanky201271 Oct 17, 2024
de6009e
fix: trying with ubuntu-24.04 (no space issue again)
juanky201271 Oct 17, 2024
32518f8
fix: e2e test more syncing time
juanky201271 Oct 17, 2024
d25bd67
fix: reverting to clean android dir
juanky201271 Oct 17, 2024
118c227
fix: e2e ci - trying to clean docker before anything
juanky201271 Oct 17, 2024
e8a8b26
fix: visual fixes reviewing 1.5.0 version
juanky201271 Oct 18, 2024
1ef3efd
fix: snapshots updated
juanky201271 Oct 18, 2024
c63b67a
fix: RCP fetching data improved & debug comments added
juanky201271 Oct 18, 2024
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
4 changes: 3 additions & 1 deletion .github/workflows/android-ubuntu-e2e-test-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ jobs:
android-ubuntu-e2e-test-ci:
name: Android Ubuntu e2e test
needs: android-ubuntu-e2e-test-ci-avd-cache
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -165,6 +165,8 @@ jobs:
run: |
echo "Disk space before post-build cleanup:"
df -h
sudo docker builder prune -f
sudo docker system prune -a -f
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo rm -rf /usr/local/lib/android/sdk/ndk
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ buck-out/

# CocoaPods
/ios/Pods/
/ios/Podfile.lock

# e2e test logs
30_ga_64-15860.log
Expand Down
74 changes: 52 additions & 22 deletions App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,39 +13,69 @@ import { LogBox } from 'react-native';

LogBox.ignoreLogs(['[Reanimated] Reduced motion setting is enabled on this device.']);

const advancePalette: string[] = [
'#06172d',
'#dadfe1',
'#43a637',
'#23692f',
'#656e77',
'#183f24',
'#444b56',
'#37444e',
'#7c8494',
'#041d09',
'#040C17',
];

const basicPalette: string[] = [
'#07182e',
'#dadfe1',
'#15576f',
'#4fa254',
'#14343f',
'#123a53',
'#1e6531',
'#84848a',
'#444b54',
'#60849c',
'#040C17',
];

const advancedTheme: ThemeType = {
dark: true,
colors: {
background: '#011401',
card: '#011401',
border: '#ffffff',
primary: '#18bd18',
primaryDisabled: '#5a8c5a',
secondaryDisabled: '#233623',
text: '#c3c3c3',
zingo: '#888888',
placeholder: '#888888',
money: '#ffffff',
syncing: '#ebff5a',
background: advancePalette[0],
card: advancePalette[0],
border: advancePalette[8],
primary: advancePalette[2],
primaryDisabled: advancePalette[3],
secondaryDisabled: advancePalette[5],
text: advancePalette[1],
zingo: advancePalette[8],
placeholder: advancePalette[8],
money: advancePalette[1],
syncing: '#ebff5a', // yellow
notification: '',
sideMenuBackground: advancePalette[10],
},
};

const basicTheme: ThemeType = {
dark: true,
colors: {
background: '#011401',
card: '#011401',
border: '#ffffff',
primary: '#0ef8f8', // new tron color
primaryDisabled: '#a0dcdc', // new tron color disable
secondaryDisabled: '#233623',
text: '#c3c3c3',
zingo: '#888888',
placeholder: '#888888',
money: '#ffffff',
syncing: '#ebff5a',
background: basicPalette[0],
card: basicPalette[0],
border: basicPalette[7],
primary: basicPalette[9],
primaryDisabled: basicPalette[2],
secondaryDisabled: basicPalette[5],
text: basicPalette[1],
zingo: basicPalette[7],
placeholder: basicPalette[7],
money: basicPalette[1],
syncing: '#ebff5a', // yellow
notification: '',
sideMenuBackground: basicPalette[10],
},
};

Expand Down
1 change: 1 addition & 0 deletions __mocks__/dataMocks/mockTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ export const mockTheme: ThemeType = {
money: '#ffffff',
syncing: '#ebff5a',
notification: '',
sideMenuBackground: '#040C17',
},
};
11 changes: 11 additions & 0 deletions __mocks__/dataMocks/mockTranslate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,17 @@ export const mockTranslate = (p: string) => {
text: 'text false',
},
];
} else if (p === 'settings.recoverywalletinfoondevices') {
return [
{
value: true,
text: 'text true',
},
{
value: false,
text: 'text false',
},
];
} else {
return 'text translated';
}
Expand Down
Empty file.
23 changes: 23 additions & 0 deletions __tests__/App.snapshot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,29 @@ jest.mock('react-native-gesture-handler', () => {
RNGestureHandlerModule: RN,
};
});
jest.mock('react-native-keychain', () => ({
ACCESS_CONTROL: {
BIOMETRY_CURRENT_SET: 'biometryCurrentSet',
},
ACCESSIBLE: {
WHEN_UNLOCKED_THIS_DEVICE_ONLY: 'whenUnlockedThisDeviceOnly',
},
AUTHENTICATION_TYPE: {
BIOMETRICS: 'biometrics',
},
SECURITY_LEVEL: {
SECURE_SOFTWARE: 'secureSoftware',
},
SECURITY_RULES: {
NONE: 'none',
},
STORAGE_TYPE: {
AES: 'AES',
},
setGenericPassword: jest.fn(),
getGenericPassword: jest.fn(),
resetGenericPassword: jest.fn(),
}));

// test suite
describe('Component App - test', () => {
Expand Down
25 changes: 25 additions & 0 deletions __tests__/LoadedApp.snapshot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,29 @@ jest.mock('react-native-gesture-handler', () => {
RNGestureHandlerModule: RN,
};
});
jest.mock('react-native-keychain', () => ({
ACCESS_CONTROL: {
BIOMETRY_CURRENT_SET: 'biometryCurrentSet',
},
ACCESSIBLE: {
WHEN_UNLOCKED_THIS_DEVICE_ONLY: 'whenUnlockedThisDeviceOnly',
},
AUTHENTICATION_TYPE: {
BIOMETRICS: 'biometrics',
},
SECURITY_LEVEL: {
SECURE_SOFTWARE: 'secureSoftware',
},
SECURITY_RULES: {
NONE: 'none',
},
STORAGE_TYPE: {
AES: 'AES',
},
setGenericPassword: jest.fn(),
getGenericPassword: jest.fn(),
resetGenericPassword: jest.fn(),
}));

// test suite
describe('Component LoadedApp - test', () => {
Expand All @@ -106,6 +129,7 @@ describe('Component LoadedApp - test', () => {
const currency = CurrencyEnum.noCurrency;
const sendAll = false;
const rescanMenu = false;
const recoveryWalletInfoOnDevice = true;
const donation = false;
const privacy = false;
const mode = ModeEnum.basic;
Expand All @@ -132,6 +156,7 @@ describe('Component LoadedApp - test', () => {
security={mockSecurity}
selectServer={selectServer}
rescanMenu={rescanMenu}
recoveryWalletInfoOnDevice={recoveryWalletInfoOnDevice}
/>,
);
expect(loadedapp.toJSON()).toMatchSnapshot();
Expand Down
25 changes: 25 additions & 0 deletions __tests__/LoadingApp.snapshot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,29 @@ jest.mock('react-native-device-info', () => ({
getManufacturer: jest.fn(() => 'Mocked Manufacturer'),
getModel: jest.fn(() => 'Mocked Model'),
}));
jest.mock('react-native-keychain', () => ({
ACCESS_CONTROL: {
BIOMETRY_CURRENT_SET: 'biometryCurrentSet',
},
ACCESSIBLE: {
WHEN_UNLOCKED_THIS_DEVICE_ONLY: 'whenUnlockedThisDeviceOnly',
},
AUTHENTICATION_TYPE: {
BIOMETRICS: 'biometrics',
},
SECURITY_LEVEL: {
SECURE_SOFTWARE: 'secureSoftware',
},
SECURITY_RULES: {
NONE: 'none',
},
STORAGE_TYPE: {
AES: 'AES',
},
setGenericPassword: jest.fn(),
getGenericPassword: jest.fn(),
resetGenericPassword: jest.fn(),
}));

// test suite
describe('Component LoadingApp - test', () => {
Expand All @@ -94,6 +117,7 @@ describe('Component LoadingApp - test', () => {
const currency = CurrencyEnum.noCurrency;
const sendAll = false;
const rescanMenu = false;
const recoveryWalletInfoOnDevice = true;
const donation = false;
const privacy = false;
const mode = ModeEnum.basic;
Expand Down Expand Up @@ -121,6 +145,7 @@ describe('Component LoadingApp - test', () => {
selectServer={selectServer}
donationAlert={donationAlert}
rescanMenu={rescanMenu}
recoveryWalletInfoOnDevice={recoveryWalletInfoOnDevice}
/>,
);
expect(loadingapp.toJSON()).toMatchSnapshot();
Expand Down
25 changes: 25 additions & 0 deletions __tests__/Settings.snapshot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,29 @@ jest.mock('react-native', () => {
return RN;
});
jest.mock('react-native-picker-select', () => 'RNPickerSelect');
jest.mock('react-native-keychain', () => ({
ACCESS_CONTROL: {
BIOMETRY_CURRENT_SET: 'biometryCurrentSet',
},
ACCESSIBLE: {
WHEN_UNLOCKED_THIS_DEVICE_ONLY: 'whenUnlockedThisDeviceOnly',
},
AUTHENTICATION_TYPE: {
BIOMETRICS: 'biometrics',
},
SECURITY_LEVEL: {
SECURE_SOFTWARE: 'secureSoftware',
},
SECURITY_RULES: {
NONE: 'none',
},
STORAGE_TYPE: {
AES: 'AES',
},
setGenericPassword: jest.fn(),
getGenericPassword: jest.fn(),
resetGenericPassword: jest.fn(),
}));
jest.useFakeTimers();

// test suite
Expand All @@ -60,6 +83,7 @@ describe('Component Settings - test', () => {
state.language = LanguageEnum.en;
state.sendAll = false;
state.rescanMenu = false;
state.recoveryWalletInfoOnDevice = true;
state.donation = false;
state.walletSettings = mockWalletSettings;
const onClose = jest.fn();
Expand All @@ -80,6 +104,7 @@ describe('Component Settings - test', () => {
setSecurityOption={onSetOption}
setSelectServerOption={onSetOption}
setRescanMenuOption={onSetOption}
setRecoveryWalletInfoOnDeviceOption={onSetOption}
/>
</ContextAppLoadedProvider>,
);
Expand Down
2 changes: 1 addition & 1 deletion __tests__/__snapshots__/App.snapshot.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exports[`Component App - test App - snapshot 1`] = `
<RCTSafeAreaView
style={
{
"backgroundColor": "#011401",
"backgroundColor": "#06172d",
"flex": 1,
"justifyContent": "center",
}
Expand Down
48 changes: 20 additions & 28 deletions __tests__/__snapshots__/Header.snapshot.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,18 @@ exports[`Component Header - test Header Complex - snapshot 1`] = `
size={20}
/>
</View>
</View>
<View
style={
{
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "center",
"margin": 0,
"marginTop": 0,
}
}
>
<View
accessibilityState={
{
Expand Down Expand Up @@ -214,26 +226,18 @@ exports[`Component Header - test Header Complex - snapshot 1`] = `
style={
{
"alignItems": "center",
"borderColor": undefined,
"borderRadius": 5,
"borderWidth": 1,
"backgroundColor": "rgb(255, 255, 255)",
"display": "flex",
"flexDirection": "row",
"justifyContent": "center",
"paddingHorizontal": 5,
"margin": 0,
"marginHorizontal": 5,
"minHeight": 25,
"minWidth": 25,
"padding": 0,
}
}
>
<Text
style={
{
"color": "rgb(216, 216, 216)",
"fontSize": 13,
"marginRight": 5,
}
}
>
text translated
</Text>
<
icon={
{
Expand All @@ -248,23 +252,11 @@ exports[`Component Header - test Header Complex - snapshot 1`] = `
"prefix": "fas",
}
}
size={14}
size={25}
/>
</View>
</View>
</View>
</View>
<View
style={
{
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "center",
"margin": 0,
"marginTop": 0,
}
}
>
<View
style={
{
Expand Down
Loading
Loading