-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
Contacts: Saving banner and photos locally #1953
Contacts: Saving banner and photos locally #1953
Conversation
b65e372
to
184b093
Compare
views/NostrContacts.tsx
Outdated
banner: contact?.banner, | ||
isSelected: false | ||
}; | ||
transformContactData = async (contact: any) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since transformContactData
is used across files perhaps we should make a ContactUtils
package.json
Outdated
@@ -99,6 +99,7 @@ | |||
"react-native-draglist": "3.5.1", | |||
"react-native-elements": "3.4.3", | |||
"react-native-encrypted-storage": "4.0.3", | |||
"react-native-fs": "^2.20.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's lock in the version here
9d46101
to
49383b5
Compare
…ore than 1 contact
2a20454
to
698fc29
Compare
utils/ContactUtils.test.ts
Outdated
isSelected: false | ||
}); | ||
}); | ||
it('transforms contact data properly', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change the title here or put the tests in the same block
jest.mock('react-native-fs', () => ({ | ||
DocumentDirectoryPath: '/mocked/document/directory', | ||
downloadFile: jest.fn(() => ({ promise: Promise.resolve() })) | ||
})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this required if we're not processing any images?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it is not required for now, but unknowingly, we get issues in the test when this mock is removed, so I decided to keep it as it will be helpful in our future implementations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good
698fc29
to
ba50451
Compare
No description provided.