-
Notifications
You must be signed in to change notification settings - Fork 2
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
React Native Products Integration #2
Conversation
android/src/main/java/com/smileidentity/react/SmileIDViewManager.kt
Outdated
Show resolved
Hide resolved
Can you also update the package name? |
Co-authored-by: Juma Allan <allanjuma@gmail.com>
Co-authored-by: Vansh Gandhi <me@van.sh>
657a0d9
to
653db4f
Compare
if (hasKey("partnerParams")) { | ||
val partnerParams = getMap("partnerParams") | ||
return PartnerParams( | ||
jobType = if (partnerParams!!.hasKey("jobType")) JobType.fromValue(partnerParams.getInt("jobType")) else null, |
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.
same here
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.
bump
val allowAgentMode = | ||
if (product.hasKey("allowAgentMode")) product.getBoolean("allowAgentMode") else false | ||
val showInstructions = | ||
if (product.hasKey("showInstructions")) product.getBoolean("showInstructions") else true | ||
val isProduction = | ||
if (product.hasKey("isProduction")) product.getBoolean("isProduction") else false |
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.
same here, can do something like val allowAgentMode = product.getBoolean("allowAgentMode") ?: false
Co-authored-by: Vansh Gandhi <me@van.sh>
Co-authored-by: Vansh Gandhi <me@van.sh>
val partnerParams = product.partnerParams() | ||
partnerParams ?: run { | ||
IllegalArgumentException("partnerParams is required for enhanced kyc") | ||
} |
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.
val partnerParams = product.partnerParams() | |
partnerParams ?: run { | |
IllegalArgumentException("partnerParams is required for enhanced kyc") | |
} | |
val partnerParams = product.partnerParams() ?: run { | |
throw IllegalArgumentException("partnerParams is required for enhanced kyc") | |
} |
same for the below occurences
country ?: run { | ||
IllegalArgumentException("country is required for enhanced kyc") | ||
} | ||
val idType = if (product.hasKey("idType")) product.getString("idType") else null |
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.
see my slack message
android/src/main/java/com/smileidentity/react/views/SmileIDBVNConsentScreen.kt
Outdated
Show resolved
Hide resolved
|
||
override fun renderContent() { | ||
product?.let {product-> | ||
val partnerName = if (product.hasKey("partnerName")) product.getString("partnerName") else null |
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.
same here/for this file
@@ -6,9 +6,9 @@ import type { | |||
BvnConsentRequest, | |||
DocumentVerificationRequest, | |||
SmartSelfieRequest, | |||
} from 'react-native-smile-id'; | |||
} from '@smileid/react-native'; |
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.
Thank you
Story: https://app.shortcut.com/smileid/story/8965/build-react-native-wrapper-android-v10
Summary
The PR now has the below products tested as well as in the sample app
Test Instructions
yarn example android
This will show the main screen and you can run the products as per the options
Known Issues
Enhance the sample app ui for other things like enhanced KYC and docv country selection etc will come in a follow up PR
@vanshg
I will have a follow up PR for dependancy versions etc