react-native-unit-components 1.13.0 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/com/unitreactnativecomponents/UnitAddToWalletButtonViewManager.kt +1 -0
- package/android/src/main/java/com/unitreactnativecomponents/UnitReactNativeComponentsPackage.kt +9 -1
- package/android/src/main/java/com/unitreactnativecomponents/extensions/ContextExtensions.kt +2 -0
- package/android/src/main/java/com/unitreactnativecomponents/secureView/UNSecureViewManager.kt +19 -0
- package/android/src/main/java/com/unitreactnativecomponents/security/UNSecurityHelper.kt +37 -0
- package/android/src/main/java/com/unitreactnativecomponents/unSnapshotProtectionManager/UNSnapshotProtectionManager.kt +42 -0
- package/ios/UNSecurity/UNSecurityHelper.swift +90 -0
- package/ios/UNSecurity/UNSecurityHelperExportModule.m +7 -0
- package/ios/UNSharedServicesProvider/UNAppStateService.swift +38 -0
- package/ios/UNSharedServicesProvider/UNGlobalSnapshotProtectionService.swift +96 -0
- package/ios/UNSharedServicesProvider/UNPresentationService.swift +37 -0
- package/ios/UNSharedServicesProvider/UNSharedServicesProviderManager.swift +45 -0
- package/ios/UNSnapshotProtectionManager/UNSnapshotProtectionManager.swift +20 -0
- package/ios/UNSnapshotProtectionManager/UNSnapshotProtectionManagerExportModule.m +5 -0
- package/ios/UnitReactNativeComponents.xcodeproj/project.pbxproj +16 -0
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js +22 -21
- package/lib/commonjs/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js +22 -21
- package/lib/commonjs/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js +4 -3
- package/lib/commonjs/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js +19 -20
- package/lib/commonjs/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
- package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js +24 -21
- package/lib/commonjs/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -1
- package/lib/commonjs/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
- package/lib/commonjs/components/UNCardActionComponent/UNCardActionComponent.js +71 -0
- package/lib/commonjs/components/UNCardActionComponent/UNCardActionComponent.js.map +1 -0
- package/lib/commonjs/components/UNCardActionComponent/UNCardActionComponent.utils.js +22 -0
- package/lib/commonjs/components/UNCardActionComponent/UNCardActionComponent.utils.js.map +1 -0
- package/lib/commonjs/components/UNCardActionComponent/index.js +21 -0
- package/lib/commonjs/components/UNCardActionComponent/index.js.map +1 -0
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.js +26 -3
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.js.map +1 -1
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.utils.js +2 -1
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNCheckDepositComponent/UNCheckDepositComponent.js +18 -19
- package/lib/commonjs/components/UNCheckDepositComponent/UNCheckDepositComponent.js.map +1 -1
- package/lib/commonjs/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.js +7 -1
- package/lib/commonjs/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.js.map +1 -1
- package/lib/commonjs/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.js +79 -0
- package/lib/commonjs/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.js.map +1 -0
- package/lib/commonjs/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.utils.js +32 -0
- package/lib/commonjs/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.utils.js.map +1 -0
- package/lib/commonjs/components/UNMultiFactorAuthenticationComponent/index.js +21 -0
- package/lib/commonjs/components/UNMultiFactorAuthenticationComponent/index.js.map +1 -0
- package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js +19 -20
- package/lib/commonjs/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js.map +1 -1
- package/lib/commonjs/components/UNNextRepaymentComponent/UNNextRepaymentComponent.js +4 -3
- package/lib/commonjs/components/UNNextRepaymentComponent/UNNextRepaymentComponent.js.map +1 -1
- package/lib/commonjs/components/UNNextRepaymentComponent/UNNextRepaymentComponent.utils.js +1 -1
- package/lib/commonjs/components/UNNextRepaymentComponent/UNNextRepaymentComponent.utils.js.map +1 -1
- package/lib/commonjs/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js +24 -2
- package/lib/commonjs/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js.map +1 -1
- package/lib/commonjs/components/UNProgramDetailsComponent/UNProgramDetailsComponent.js +4 -3
- package/lib/commonjs/components/UNProgramDetailsComponent/UNProgramDetailsComponent.js.map +1 -1
- package/lib/commonjs/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js +7 -2
- package/lib/commonjs/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js.map +1 -1
- package/lib/commonjs/components/UNWirePaymentComponent/UNWirePaymentComponent.js +91 -0
- package/lib/commonjs/components/UNWirePaymentComponent/UNWirePaymentComponent.js.map +1 -0
- package/lib/commonjs/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.js +29 -0
- package/lib/commonjs/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.js.map +1 -0
- package/lib/commonjs/components/UNWirePaymentComponent/index.js +21 -0
- package/lib/commonjs/components/UNWirePaymentComponent/index.js.map +1 -0
- package/lib/commonjs/components/index.js +33 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/helpers/BottomSheet/BottomSheet.js +2 -1
- package/lib/commonjs/helpers/BottomSheet/BottomSheet.js.map +1 -1
- package/lib/commonjs/hooks/useIsJailbrokeDevice.js +22 -0
- package/lib/commonjs/hooks/useIsJailbrokeDevice.js.map +1 -0
- package/lib/commonjs/hooks/useSnapshotProtection.js +31 -0
- package/lib/commonjs/hooks/useSnapshotProtection.js.map +1 -0
- package/lib/commonjs/messages/webMessages/multiFactorAuthenticationMessage.js +11 -0
- package/lib/commonjs/messages/webMessages/multiFactorAuthenticationMessage.js.map +1 -0
- package/lib/commonjs/messages/webMessages/onLoadMessage.js +1 -0
- package/lib/commonjs/messages/webMessages/onLoadMessage.js.map +1 -1
- package/lib/commonjs/messages/webMessages/unitMessages.js +1 -0
- package/lib/commonjs/messages/webMessages/unitMessages.js.map +1 -1
- package/lib/commonjs/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js +6 -1
- package/lib/commonjs/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js.map +1 -1
- package/lib/commonjs/nativeComponents/UNBaseView/UNBaseView.js +39 -0
- package/lib/commonjs/nativeComponents/UNBaseView/UNBaseView.js.map +1 -0
- package/lib/commonjs/nativeComponents/UNBaseView/index.js +14 -0
- package/lib/commonjs/nativeComponents/UNBaseView/index.js.map +1 -0
- package/lib/commonjs/nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper.js +26 -0
- package/lib/commonjs/nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper.js.map +1 -0
- package/lib/commonjs/nativeModulesHelpers/UNSecurityHelper.js +39 -0
- package/lib/commonjs/nativeModulesHelpers/UNSecurityHelper.js.map +1 -0
- package/lib/commonjs/networking/common/UNNetworkConstants.js +2 -1
- package/lib/commonjs/networking/common/UNNetworkConstants.js.map +1 -1
- package/lib/commonjs/scripts/html/bodyScript.js +18 -5
- package/lib/commonjs/scripts/html/bodyScript.js.map +1 -1
- package/lib/commonjs/types/internal/webComponent.types.js +3 -0
- package/lib/commonjs/types/internal/webComponent.types.js.map +1 -1
- package/lib/commonjs/types/shared/env.types.js +1 -0
- package/lib/commonjs/types/shared/env.types.js.map +1 -1
- package/lib/commonjs/types/shared/index.js +11 -0
- package/lib/commonjs/types/shared/index.js.map +1 -1
- package/lib/commonjs/types/shared/multiFactorAuthentication.types.js +2 -0
- package/lib/commonjs/types/shared/multiFactorAuthentication.types.js.map +1 -0
- package/lib/commonjs/types/shared/payeeManagement.types.js.map +1 -1
- package/lib/commonjs/types/shared/payments.types.js +1 -0
- package/lib/commonjs/types/shared/payments.types.js.map +1 -1
- package/lib/commonjs/types/shared/securitySettings.js +12 -0
- package/lib/commonjs/types/shared/securitySettings.js.map +1 -0
- package/lib/commonjs/types/shared/wirePayment.types.js +6 -0
- package/lib/commonjs/types/shared/wirePayment.types.js.map +1 -0
- package/lib/commonjs/unitSdkManager/UnitSdk.constants.js +7 -2
- package/lib/commonjs/unitSdkManager/UnitSdk.constants.js.map +1 -1
- package/lib/commonjs/unitSdkManager/UnitSdkManager.js +25 -5
- package/lib/commonjs/unitSdkManager/UnitSdkManager.js.map +1 -1
- package/lib/commonjs/unitSdkManager/UnitSdkManager.utils.internal.js +2 -0
- package/lib/commonjs/unitSdkManager/UnitSdkManager.utils.internal.js.map +1 -1
- package/lib/commonjs/utils/onLoadMessages.utils.js +10 -0
- package/lib/commonjs/utils/onLoadMessages.utils.js.map +1 -0
- package/lib/commonjs/webComponent/WebComponent.js +11 -5
- package/lib/commonjs/webComponent/WebComponent.js.map +1 -1
- package/lib/commonjs/webComponent/WebComponent.utils.js +5 -1
- package/lib/commonjs/webComponent/WebComponent.utils.js.map +1 -1
- package/lib/commonjs/webComponent/html.js +2 -0
- package/lib/commonjs/webComponent/html.js.map +1 -1
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js +23 -22
- package/lib/module/components/UNACHCreditComponent/UNACHCreditComponent.js.map +1 -1
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js +23 -22
- package/lib/module/components/UNACHDebitComponent/UNACHDebitComponent.js.map +1 -1
- package/lib/module/components/UNAccountComponent/UNAccountComponent.js +4 -3
- package/lib/module/components/UNAccountComponent/UNAccountComponent.js.map +1 -1
- package/lib/module/components/UNActivityComponent/UNActivityComponent.js +20 -21
- package/lib/module/components/UNActivityComponent/UNActivityComponent.js.map +1 -1
- package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js +24 -21
- package/lib/module/components/UNBookPaymentComponent/UNBookPaymentComponent.js.map +1 -1
- package/lib/module/components/UNBottomSheetComponent/UNBottomSheetComponent.js.map +1 -1
- package/lib/module/components/UNCardActionComponent/UNCardActionComponent.js +63 -0
- package/lib/module/components/UNCardActionComponent/UNCardActionComponent.js.map +1 -0
- package/lib/module/components/UNCardActionComponent/UNCardActionComponent.utils.js +14 -0
- package/lib/module/components/UNCardActionComponent/UNCardActionComponent.utils.js.map +1 -0
- package/lib/module/components/UNCardActionComponent/index.js +2 -0
- package/lib/module/components/UNCardActionComponent/index.js.map +1 -0
- package/lib/module/components/UNCardComponent/UNCardComponent.js +26 -3
- package/lib/module/components/UNCardComponent/UNCardComponent.js.map +1 -1
- package/lib/module/components/UNCardComponent/UNCardComponent.utils.js +2 -1
- package/lib/module/components/UNCardComponent/UNCardComponent.utils.js.map +1 -1
- package/lib/module/components/UNCheckDepositComponent/UNCheckDepositComponent.js +19 -20
- package/lib/module/components/UNCheckDepositComponent/UNCheckDepositComponent.js.map +1 -1
- package/lib/module/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.js +7 -1
- package/lib/module/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.js.map +1 -1
- package/lib/module/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.js +71 -0
- package/lib/module/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.js.map +1 -0
- package/lib/module/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.utils.js +24 -0
- package/lib/module/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.utils.js.map +1 -0
- package/lib/module/components/UNMultiFactorAuthenticationComponent/index.js +2 -0
- package/lib/module/components/UNMultiFactorAuthenticationComponent/index.js.map +1 -0
- package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js +20 -21
- package/lib/module/components/UNMultipleCardsComponent/UNMultipleCardsComponent.js.map +1 -1
- package/lib/module/components/UNNextRepaymentComponent/UNNextRepaymentComponent.js +4 -3
- package/lib/module/components/UNNextRepaymentComponent/UNNextRepaymentComponent.js.map +1 -1
- package/lib/module/components/UNNextRepaymentComponent/UNNextRepaymentComponent.utils.js +1 -1
- package/lib/module/components/UNNextRepaymentComponent/UNNextRepaymentComponent.utils.js.map +1 -1
- package/lib/module/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js +24 -2
- package/lib/module/components/UNPayeeManagementComponent/UNPayeeManagementComponent.js.map +1 -1
- package/lib/module/components/UNProgramDetailsComponent/UNProgramDetailsComponent.js +4 -3
- package/lib/module/components/UNProgramDetailsComponent/UNProgramDetailsComponent.js.map +1 -1
- package/lib/module/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js +7 -2
- package/lib/module/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.js.map +1 -1
- package/lib/module/components/UNWirePaymentComponent/UNWirePaymentComponent.js +83 -0
- package/lib/module/components/UNWirePaymentComponent/UNWirePaymentComponent.js.map +1 -0
- package/lib/module/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.js +21 -0
- package/lib/module/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.js.map +1 -0
- package/lib/module/components/UNWirePaymentComponent/index.js +2 -0
- package/lib/module/components/UNWirePaymentComponent/index.js.map +1 -0
- package/lib/module/components/index.js +3 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/helpers/BottomSheet/BottomSheet.js +2 -1
- package/lib/module/helpers/BottomSheet/BottomSheet.js.map +1 -1
- package/lib/module/hooks/useIsJailbrokeDevice.js +14 -0
- package/lib/module/hooks/useIsJailbrokeDevice.js.map +1 -0
- package/lib/module/hooks/useSnapshotProtection.js +23 -0
- package/lib/module/hooks/useSnapshotProtection.js.map +1 -0
- package/lib/module/messages/webMessages/multiFactorAuthenticationMessage.js +5 -0
- package/lib/module/messages/webMessages/multiFactorAuthenticationMessage.js.map +1 -0
- package/lib/module/messages/webMessages/onLoadMessage.js +1 -0
- package/lib/module/messages/webMessages/onLoadMessage.js.map +1 -1
- package/lib/module/messages/webMessages/unitMessages.js +1 -0
- package/lib/module/messages/webMessages/unitMessages.js.map +1 -1
- package/lib/module/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js +6 -1
- package/lib/module/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.js.map +1 -1
- package/lib/module/nativeComponents/UNBaseView/UNBaseView.js +31 -0
- package/lib/module/nativeComponents/UNBaseView/UNBaseView.js.map +1 -0
- package/lib/module/nativeComponents/UNBaseView/index.js +2 -0
- package/lib/module/nativeComponents/UNBaseView/index.js.map +1 -0
- package/lib/module/nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper.js +20 -0
- package/lib/module/nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper.js.map +1 -0
- package/lib/module/nativeModulesHelpers/UNSecurityHelper.js +33 -0
- package/lib/module/nativeModulesHelpers/UNSecurityHelper.js.map +1 -0
- package/lib/module/networking/common/UNNetworkConstants.js +2 -1
- package/lib/module/networking/common/UNNetworkConstants.js.map +1 -1
- package/lib/module/scripts/html/bodyScript.js +17 -4
- package/lib/module/scripts/html/bodyScript.js.map +1 -1
- package/lib/module/types/internal/webComponent.types.js +3 -0
- package/lib/module/types/internal/webComponent.types.js.map +1 -1
- package/lib/module/types/shared/env.types.js +1 -0
- package/lib/module/types/shared/env.types.js.map +1 -1
- package/lib/module/types/shared/index.js +1 -0
- package/lib/module/types/shared/index.js.map +1 -1
- package/lib/module/types/shared/multiFactorAuthentication.types.js +2 -0
- package/lib/module/types/shared/multiFactorAuthentication.types.js.map +1 -0
- package/lib/module/types/shared/payeeManagement.types.js.map +1 -1
- package/lib/module/types/shared/payments.types.js +1 -0
- package/lib/module/types/shared/payments.types.js.map +1 -1
- package/lib/module/types/shared/securitySettings.js +6 -0
- package/lib/module/types/shared/securitySettings.js.map +1 -0
- package/lib/module/types/shared/wirePayment.types.js +2 -0
- package/lib/module/types/shared/wirePayment.types.js.map +1 -0
- package/lib/module/unitSdkManager/UnitSdk.constants.js +7 -2
- package/lib/module/unitSdkManager/UnitSdk.constants.js.map +1 -1
- package/lib/module/unitSdkManager/UnitSdkManager.js +25 -5
- package/lib/module/unitSdkManager/UnitSdkManager.js.map +1 -1
- package/lib/module/unitSdkManager/UnitSdkManager.utils.internal.js +2 -0
- package/lib/module/unitSdkManager/UnitSdkManager.utils.internal.js.map +1 -1
- package/lib/module/utils/onLoadMessages.utils.js +4 -0
- package/lib/module/utils/onLoadMessages.utils.js.map +1 -0
- package/lib/module/webComponent/WebComponent.js +12 -6
- package/lib/module/webComponent/WebComponent.js.map +1 -1
- package/lib/module/webComponent/WebComponent.utils.js +3 -0
- package/lib/module/webComponent/WebComponent.utils.js.map +1 -1
- package/lib/module/webComponent/html.js +3 -1
- package/lib/module/webComponent/html.js.map +1 -1
- package/lib/typescript/src/components/UNACHCreditComponent/UNACHCreditComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNACHDebitComponent/UNACHDebitComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNAccountComponent/UNAccountComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNActivityComponent/UNActivityComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNBookPaymentComponent/UNBookPaymentComponent.d.ts +1 -1
- package/lib/typescript/src/components/UNBookPaymentComponent/UNBookPaymentComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNBottomSheetComponent/UNBottomSheetComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNCardActionComponent/UNCardActionComponent.d.ts +14 -0
- package/lib/typescript/src/components/UNCardActionComponent/UNCardActionComponent.d.ts.map +1 -0
- package/lib/typescript/src/components/UNCardActionComponent/UNCardActionComponent.utils.d.ts +4 -0
- package/lib/typescript/src/components/UNCardActionComponent/UNCardActionComponent.utils.d.ts.map +1 -0
- package/lib/typescript/src/components/UNCardActionComponent/index.d.ts +2 -0
- package/lib/typescript/src/components/UNCardActionComponent/index.d.ts.map +1 -0
- package/lib/typescript/src/components/UNCardComponent/UNCardComponent.d.ts +3 -1
- package/lib/typescript/src/components/UNCardComponent/UNCardComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNCardComponent/UNCardComponent.utils.d.ts.map +1 -1
- package/lib/typescript/src/components/UNCheckDepositComponent/UNCheckDepositComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.d.ts +14 -0
- package/lib/typescript/src/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.d.ts.map +1 -0
- package/lib/typescript/src/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.utils.d.ts +4 -0
- package/lib/typescript/src/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.utils.d.ts.map +1 -0
- package/lib/typescript/src/components/UNMultiFactorAuthenticationComponent/index.d.ts +2 -0
- package/lib/typescript/src/components/UNMultiFactorAuthenticationComponent/index.d.ts.map +1 -0
- package/lib/typescript/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNNextRepaymentComponent/UNNextRepaymentComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.d.ts +2 -1
- package/lib/typescript/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNProgramDetailsComponent/UNProgramDetailsComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.d.ts.map +1 -1
- package/lib/typescript/src/components/UNWirePaymentComponent/UNWirePaymentComponent.d.ts +20 -0
- package/lib/typescript/src/components/UNWirePaymentComponent/UNWirePaymentComponent.d.ts.map +1 -0
- package/lib/typescript/src/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.d.ts +4 -0
- package/lib/typescript/src/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.d.ts.map +1 -0
- package/lib/typescript/src/components/UNWirePaymentComponent/index.d.ts +2 -0
- package/lib/typescript/src/components/UNWirePaymentComponent/index.d.ts.map +1 -0
- package/lib/typescript/src/components/index.d.ts +3 -0
- package/lib/typescript/src/components/index.d.ts.map +1 -1
- package/lib/typescript/src/helpers/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useIsJailbrokeDevice.d.ts +2 -0
- package/lib/typescript/src/hooks/useIsJailbrokeDevice.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useSnapshotProtection.d.ts +2 -0
- package/lib/typescript/src/hooks/useSnapshotProtection.d.ts.map +1 -0
- package/lib/typescript/src/messages/webMessages/index.d.ts +2 -1
- package/lib/typescript/src/messages/webMessages/index.d.ts.map +1 -1
- package/lib/typescript/src/messages/webMessages/multiFactorAuthenticationMessage.d.ts +4 -0
- package/lib/typescript/src/messages/webMessages/multiFactorAuthenticationMessage.d.ts.map +1 -0
- package/lib/typescript/src/messages/webMessages/onLoadMessage.d.ts +8 -4
- package/lib/typescript/src/messages/webMessages/onLoadMessage.d.ts.map +1 -1
- package/lib/typescript/src/messages/webMessages/unitMessages.d.ts +11 -1
- package/lib/typescript/src/messages/webMessages/unitMessages.d.ts.map +1 -1
- package/lib/typescript/src/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.d.ts.map +1 -1
- package/lib/typescript/src/nativeComponents/UNBaseView/UNBaseView.d.ts +11 -0
- package/lib/typescript/src/nativeComponents/UNBaseView/UNBaseView.d.ts.map +1 -0
- package/lib/typescript/src/nativeComponents/UNBaseView/index.d.ts +2 -0
- package/lib/typescript/src/nativeComponents/UNBaseView/index.d.ts.map +1 -0
- package/lib/typescript/src/nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper.d.ts +6 -0
- package/lib/typescript/src/nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper.d.ts.map +1 -0
- package/lib/typescript/src/nativeModulesHelpers/UNSecurityHelper.d.ts +12 -0
- package/lib/typescript/src/nativeModulesHelpers/UNSecurityHelper.d.ts.map +1 -0
- package/lib/typescript/src/networking/common/UNNetworkConstants.d.ts +1 -0
- package/lib/typescript/src/networking/common/UNNetworkConstants.d.ts.map +1 -1
- package/lib/typescript/src/scripts/html/bodyScript.d.ts +1 -0
- package/lib/typescript/src/scripts/html/bodyScript.d.ts.map +1 -1
- package/lib/typescript/src/slices/SharedEventsSlice.d.ts +2 -2
- package/lib/typescript/src/slices/SharedEventsSlice.d.ts.map +1 -1
- package/lib/typescript/src/store/store.d.ts +2 -2
- package/lib/typescript/src/types/internal/webComponent.types.d.ts +4 -1
- package/lib/typescript/src/types/internal/webComponent.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/achCredit.types.d.ts +1 -1
- package/lib/typescript/src/types/shared/achCredit.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/env.types.d.ts +2 -1
- package/lib/typescript/src/types/shared/env.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/index.d.ts +1 -0
- package/lib/typescript/src/types/shared/index.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/multiFactorAuthentication.types.d.ts +15 -0
- package/lib/typescript/src/types/shared/multiFactorAuthentication.types.d.ts.map +1 -0
- package/lib/typescript/src/types/shared/payeeManagement.types.d.ts +32 -0
- package/lib/typescript/src/types/shared/payeeManagement.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/payments.types.d.ts +2 -1
- package/lib/typescript/src/types/shared/payments.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/securitySettings.d.ts +8 -0
- package/lib/typescript/src/types/shared/securitySettings.d.ts.map +1 -0
- package/lib/typescript/src/types/shared/wirePayment.types.d.ts +42 -0
- package/lib/typescript/src/types/shared/wirePayment.types.d.ts.map +1 -0
- package/lib/typescript/src/unitSdkManager/UnitSdk.constants.d.ts +2 -0
- package/lib/typescript/src/unitSdkManager/UnitSdk.constants.d.ts.map +1 -1
- package/lib/typescript/src/unitSdkManager/UnitSdkManager.d.ts +6 -2
- package/lib/typescript/src/unitSdkManager/UnitSdkManager.d.ts.map +1 -1
- package/lib/typescript/src/unitSdkManager/UnitSdkManager.utils.internal.d.ts.map +1 -1
- package/lib/typescript/src/utils/onLoadMessages.utils.d.ts +2 -0
- package/lib/typescript/src/utils/onLoadMessages.utils.d.ts.map +1 -0
- package/lib/typescript/src/webComponent/WebComponent.d.ts.map +1 -1
- package/lib/typescript/src/webComponent/WebComponent.utils.d.ts +3 -1
- package/lib/typescript/src/webComponent/WebComponent.utils.d.ts.map +1 -1
- package/lib/typescript/src/webComponent/html.d.ts.map +1 -1
- package/package.json +1 -1
- package/react-native-unit-components.podspec +1 -1
- package/src/components/UNACHCreditComponent/UNACHCreditComponent.tsx +11 -16
- package/src/components/UNACHDebitComponent/UNACHDebitComponent.tsx +11 -17
- package/src/components/UNAccountComponent/UNAccountComponent.tsx +3 -3
- package/src/components/UNActivityComponent/UNActivityComponent.tsx +7 -14
- package/src/components/UNBookPaymentComponent/UNBookPaymentComponent.tsx +14 -17
- package/src/components/UNBottomSheetComponent/UNBottomSheetComponent.tsx +0 -1
- package/src/components/UNCardActionComponent/UNCardActionComponent.tsx +81 -0
- package/src/components/UNCardActionComponent/UNCardActionComponent.utils.ts +16 -0
- package/src/components/UNCardActionComponent/index.ts +1 -0
- package/src/components/UNCardComponent/UNCardComponent.tsx +28 -4
- package/src/components/UNCardComponent/UNCardComponent.utils.ts +2 -1
- package/src/components/UNCheckDepositComponent/UNCheckDepositComponent.tsx +7 -14
- package/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.tsx +16 -12
- package/src/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.tsx +86 -0
- package/src/components/UNMultiFactorAuthenticationComponent/UNMultiFactorAuthenticationComponent.utils.ts +27 -0
- package/src/components/UNMultiFactorAuthenticationComponent/index.ts +1 -0
- package/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.tsx +6 -14
- package/src/components/UNNextRepaymentComponent/UNNextRepaymentComponent.tsx +3 -3
- package/src/components/UNNextRepaymentComponent/UNNextRepaymentComponent.utils.ts +1 -1
- package/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.tsx +37 -12
- package/src/components/UNProgramDetailsComponent/UNProgramDetailsComponent.tsx +3 -3
- package/src/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.tsx +14 -11
- package/src/components/UNWirePaymentComponent/UNWirePaymentComponent.tsx +109 -0
- package/src/components/UNWirePaymentComponent/UNWirePaymentComponent.utils.ts +23 -0
- package/src/components/UNWirePaymentComponent/index.ts +1 -0
- package/src/components/index.ts +3 -0
- package/src/helpers/BottomSheet/BottomSheet.tsx +3 -4
- package/src/hooks/useIsJailbrokeDevice.ts +17 -0
- package/src/hooks/useSnapshotProtection.ts +25 -0
- package/src/messages/webMessages/index.ts +2 -0
- package/src/messages/webMessages/multiFactorAuthenticationMessage.ts +3 -0
- package/src/messages/webMessages/onLoadMessage.ts +9 -2
- package/src/messages/webMessages/unitMessages.ts +14 -2
- package/src/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.tsx +12 -11
- package/src/nativeComponents/UNBaseView/UNBaseView.tsx +50 -0
- package/src/nativeComponents/UNBaseView/index.ts +1 -0
- package/src/nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper.ts +21 -0
- package/src/nativeModulesHelpers/UNSecurityHelper.ts +35 -0
- package/src/networking/common/UNNetworkConstants.ts +2 -1
- package/src/scripts/html/bodyScript.ts +18 -4
- package/src/slices/SharedEventsSlice.ts +2 -2
- package/src/types/internal/webComponent.types.ts +3 -0
- package/src/types/shared/achCredit.types.ts +1 -1
- package/src/types/shared/env.types.ts +2 -1
- package/src/types/shared/index.ts +1 -0
- package/src/types/shared/multiFactorAuthentication.types.ts +17 -0
- package/src/types/shared/payeeManagement.types.ts +31 -0
- package/src/types/shared/payments.types.ts +1 -0
- package/src/types/shared/securitySettings.ts +8 -0
- package/src/types/shared/wirePayment.types.ts +43 -0
- package/src/unitSdkManager/UnitSdk.constants.ts +7 -1
- package/src/unitSdkManager/UnitSdkManager.ts +37 -7
- package/src/unitSdkManager/UnitSdkManager.utils.internal.ts +3 -0
- package/src/utils/onLoadMessages.utils.ts +3 -0
- package/src/webComponent/WebComponent.tsx +14 -6
- package/src/webComponent/WebComponent.utils.ts +6 -1
- package/src/webComponent/html.ts +4 -1
|
@@ -13,11 +13,12 @@ export enum UnitMessage {
|
|
|
13
13
|
UNIT_REQUEST_LEFT_TO_SPEND_DETAILS = 'unitRequestLeftToSpendDetails',
|
|
14
14
|
UNIT_MULTI_FACTOR_AUTH_FINISHED = 'unitMultiFactorAuthFinished',
|
|
15
15
|
UNIT_WHITE_LABEL_APP_ON_LOAD = 'unitWhiteLabelAppOnLoad',
|
|
16
|
-
UNIT_UNAUTHORIZED_TOKEN = 'unitUnauthorizedToken'
|
|
16
|
+
UNIT_UNAUTHORIZED_TOKEN = 'unitUnauthorizedToken',
|
|
17
|
+
UNIT_EVENT_TO_CONTINUE = 'unitEventToContinue'
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
export enum UnitRequestRefreshEventTypes {
|
|
20
|
-
REQUEST_REFRESH_EVENT = 'requestRefreshEvent'
|
|
21
|
+
REQUEST_REFRESH_EVENT = 'requestRefreshEvent'
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
export interface RequestRenderingEvent {
|
|
@@ -38,6 +39,12 @@ export interface RequestRefreshEvent {
|
|
|
38
39
|
resourceId?: string;
|
|
39
40
|
}
|
|
40
41
|
|
|
42
|
+
export interface MultiFactorAuthenticationFinishedEvent {
|
|
43
|
+
unitVerifiedCustomerTokenString: string;
|
|
44
|
+
parentInstanceId?: string;
|
|
45
|
+
eventToContinue?: string;
|
|
46
|
+
}
|
|
47
|
+
|
|
41
48
|
export interface RequestOpenLinkEvent {
|
|
42
49
|
href: string;
|
|
43
50
|
target: string;
|
|
@@ -51,6 +58,11 @@ export interface RequestDownloadEvent {
|
|
|
51
58
|
fileName: string;
|
|
52
59
|
}
|
|
53
60
|
|
|
61
|
+
export interface EventToContinueEvent {
|
|
62
|
+
parentInstanceId?: string;
|
|
63
|
+
eventToContinue?: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
54
66
|
export interface PlaidTokenCreatedEvent {
|
|
55
67
|
linkToken: PlaidLinkTokenData;
|
|
56
68
|
}
|
package/src/nativeComponents/UNAddToWallet/UNAddToWalletComponent/UNAddToWalletComponent.tsx
CHANGED
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
} from '../../../components/UNBottomSheetComponent/UNBottomSheetComponent.constants';
|
|
22
22
|
import { launchStartCardProvisioning } from '../../../helpers/pushProvisioningService/startProvisioning';
|
|
23
23
|
import { PageMessage } from '../../../messages/webMessages/pageMessage';
|
|
24
|
+
import { UNBaseView } from '../../UNBaseView';
|
|
24
25
|
|
|
25
26
|
export interface UNAddToWalletComponentProps {
|
|
26
27
|
customerToken: string;
|
|
@@ -64,25 +65,25 @@ const UNAddToWalletComponent = (props: UNAddToWalletComponentProps) => {
|
|
|
64
65
|
return <ActivityIndicator style={styles.loader} />;
|
|
65
66
|
}
|
|
66
67
|
return (
|
|
67
|
-
|
|
68
|
+
<UNBaseView style={{flex: 1}}>
|
|
68
69
|
{
|
|
69
70
|
shouldRenderAddToWalletWebView() &&
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
71
|
+
<WebComponent
|
|
72
|
+
ref={webRef}
|
|
73
|
+
type={WebComponentType.cardAction}
|
|
74
|
+
presentationMode={PresentationMode.CoverInjectedHeight}
|
|
75
|
+
params={getAddToWalletParams(props)}
|
|
76
|
+
isScrollable={false}
|
|
77
|
+
onMessage={(message: WebViewMessage) => handleWebViewMessage(message)}
|
|
78
|
+
windowParams={getAddToWalletWindowParams(currentUNWallet)}
|
|
79
|
+
/>
|
|
79
80
|
}
|
|
80
81
|
|
|
81
82
|
{
|
|
82
83
|
currentUNWallet?.status === UNCardAddToWalletStatus.readyToProvisioning &&
|
|
83
84
|
<UnitAddToWalletButtonView style={styles.addToWalletButton} onAddToWalletClicked={handleAddToWalletClicked} />
|
|
84
85
|
}
|
|
85
|
-
|
|
86
|
+
</UNBaseView>
|
|
86
87
|
);
|
|
87
88
|
};
|
|
88
89
|
return (
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Platform,
|
|
4
|
+
StyleProp,
|
|
5
|
+
View,
|
|
6
|
+
ViewStyle,
|
|
7
|
+
requireNativeComponent,
|
|
8
|
+
} from 'react-native';
|
|
9
|
+
import { UNError } from '../../types/shared';
|
|
10
|
+
import { useIsJailbrokeDevice } from '../../hooks/useIsJailbrokeDevice';
|
|
11
|
+
import { useSnapshotProtection } from '../../hooks/useSnapshotProtection';
|
|
12
|
+
|
|
13
|
+
type UnitAndroidSecureViewProps = {
|
|
14
|
+
style?: StyleProp<ViewStyle>;
|
|
15
|
+
filterTouchesWhenObscured: boolean;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
type UnitSecureViewProps = {
|
|
20
|
+
style?: StyleProp<ViewStyle>;
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
onLoadError?: (error: UNError) => void;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const UnitAndroidSecureView = requireNativeComponent<UnitAndroidSecureViewProps>('UNSecureView');
|
|
26
|
+
|
|
27
|
+
const UNBaseView = (props: UnitSecureViewProps) => {
|
|
28
|
+
useSnapshotProtection();
|
|
29
|
+
|
|
30
|
+
const isJailbroke = useIsJailbrokeDevice();
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
if (isJailbroke) {
|
|
33
|
+
props.onLoadError && props.onLoadError({errors: [{title: 'Device is Jailbroke'}]});
|
|
34
|
+
}
|
|
35
|
+
}, [props, isJailbroke]);
|
|
36
|
+
|
|
37
|
+
if (isJailbroke) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
if (Platform.OS == 'android') {
|
|
42
|
+
return <UnitAndroidSecureView filterTouchesWhenObscured={true} {...props}/>;
|
|
43
|
+
} else {
|
|
44
|
+
return (
|
|
45
|
+
<View {...props} />
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export default UNBaseView;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as UNBaseView } from './UNBaseView';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { NativeModules } from 'react-native';
|
|
2
|
+
|
|
3
|
+
const { UNSnapshotProtectionManager } = NativeModules;
|
|
4
|
+
|
|
5
|
+
class UNSnapshotProtectionHelper {
|
|
6
|
+
static setAndroidSecurity() {
|
|
7
|
+
/**
|
|
8
|
+
* Set secure flag on the activity's window (if it doesn't exist)
|
|
9
|
+
*/
|
|
10
|
+
UNSnapshotProtectionManager.setSecureFlags();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
static setIosSecurity(shouldProtectFromSnapshot: boolean, style: string) {
|
|
14
|
+
/**
|
|
15
|
+
* Activate a Global native service for managing the snapshotProtection by the given arguments.
|
|
16
|
+
*/
|
|
17
|
+
UNSnapshotProtectionManager.configureSnapshotProtectionStrategy(shouldProtectFromSnapshot, style);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default UNSnapshotProtectionHelper;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { NativeModules } from 'react-native';
|
|
2
|
+
|
|
3
|
+
const { UNSecurityHelper } = NativeModules;
|
|
4
|
+
|
|
5
|
+
enum UNJailbrokeState {
|
|
6
|
+
Unknown,
|
|
7
|
+
Jailbroke,
|
|
8
|
+
NotJailbroke
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class UNSecurityManagerHelper {
|
|
12
|
+
static deviceJailbrokeState: UNJailbrokeState = UNJailbrokeState.Unknown;
|
|
13
|
+
|
|
14
|
+
static async isDeviceJailbroke(): Promise<boolean> {
|
|
15
|
+
if (this.deviceJailbrokeState !== UNJailbrokeState.Unknown) {
|
|
16
|
+
return this.isCurrentStatusIsJailbroke();
|
|
17
|
+
}
|
|
18
|
+
const result: boolean = await UNSecurityHelper.isDeviceJailbroke();
|
|
19
|
+
UNSecurityManagerHelper.deviceJailbrokeState = result ? UNJailbrokeState.Jailbroke : UNJailbrokeState.NotJailbroke;
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
private static isCurrentStatusIsJailbroke = (): boolean => {
|
|
24
|
+
switch (this.deviceJailbrokeState) {
|
|
25
|
+
case UNJailbrokeState.Unknown:
|
|
26
|
+
return false;
|
|
27
|
+
case UNJailbrokeState.Jailbroke:
|
|
28
|
+
return true;
|
|
29
|
+
case UNJailbrokeState.NotJailbroke:
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default UNSecurityManagerHelper;
|
|
@@ -7,5 +7,6 @@ export const APIHeaders = {
|
|
|
7
7
|
|
|
8
8
|
export const UNIT_SECURE_URL = {
|
|
9
9
|
[UNEnvironment.sandbox]: 'https://secure.api.s.unit.sh',
|
|
10
|
-
[UNEnvironment.production]: 'https://secure.api.unit.co'
|
|
10
|
+
[UNEnvironment.production]: 'https://secure.api.unit.co',
|
|
11
|
+
[UNEnvironment.mock]: ''
|
|
11
12
|
};
|
|
@@ -146,12 +146,19 @@ export const LISTENERS = {
|
|
|
146
146
|
`,
|
|
147
147
|
unitMultiFactorAuthFinished: `
|
|
148
148
|
window.addEventListener("${UnitMessage.UNIT_MULTI_FACTOR_AUTH_FINISHED}", async (e) => {
|
|
149
|
-
const response = await
|
|
150
|
-
const
|
|
149
|
+
const response = await e.detail.response;
|
|
150
|
+
const unitVerifiedCustomerToken = {
|
|
151
151
|
token: response.data.attributes.token,
|
|
152
152
|
expiration: new Date().getTime() + response.data.attributes.expiresIn * 1000,
|
|
153
|
-
}
|
|
154
|
-
|
|
153
|
+
};
|
|
154
|
+
const unitVerifiedCustomerTokenString = JSON.stringify(unitVerifiedCustomerToken);
|
|
155
|
+
window.UnitStore["unitVerifiedCustomerToken"] = unitVerifiedCustomerTokenString;
|
|
156
|
+
|
|
157
|
+
const data = {
|
|
158
|
+
unitVerifiedCustomerTokenString,
|
|
159
|
+
parentInstanceId: e.detail.parentInstanceId,
|
|
160
|
+
eventToContinue: e.detail.eventToContinue
|
|
161
|
+
}
|
|
155
162
|
|
|
156
163
|
postMessageToSDK({ type: "${UnitMessage.UNIT_MULTI_FACTOR_AUTH_FINISHED}", details: data })
|
|
157
164
|
});
|
|
@@ -241,6 +248,13 @@ export const DISPATCH_RENDERING_EVENT = `
|
|
|
241
248
|
}
|
|
242
249
|
`;
|
|
243
250
|
|
|
251
|
+
export const DISPATCH_EVENT_TO_CONTINUE = `
|
|
252
|
+
const dispatchEventToContinue = (details) => {
|
|
253
|
+
const event = new CustomEvent("${UnitMessage.UNIT_EVENT_TO_CONTINUE}",{ detail: JSON.parse(details) })
|
|
254
|
+
window.dispatchEvent(event)
|
|
255
|
+
}
|
|
256
|
+
`;
|
|
257
|
+
|
|
244
258
|
export const DISPATCH_REQUEST_REFRESH = `
|
|
245
259
|
const dispatchRefreshEvent = (details) => {
|
|
246
260
|
let event;
|
|
@@ -4,7 +4,7 @@ import { createSlice, PayloadAction } from '@reduxjs/toolkit';
|
|
|
4
4
|
import type { RootState } from '../store';
|
|
5
5
|
import type { UNAccountData, UNCardData, UNPayeeCounterparty } from '../types/shared';
|
|
6
6
|
import type { ActivityFiltersChangedEvent } from '../messages/webMessages/activityMessage';
|
|
7
|
-
import type { RequestRefreshEvent } from '../messages/webMessages/unitMessages';
|
|
7
|
+
import type { MultiFactorAuthenticationFinishedEvent, RequestRefreshEvent } from '../messages/webMessages/unitMessages';
|
|
8
8
|
import type { BottomSheetNativeMessage } from '../messages/nativeMessages/bottomSheetMessage';
|
|
9
9
|
import type { CardMessage } from '../messages/webMessages/cardMessage';
|
|
10
10
|
import type { AccountMessage } from '../messages/webMessages/accountMessage';
|
|
@@ -60,7 +60,7 @@ type RequestRefreshEventState = {
|
|
|
60
60
|
|
|
61
61
|
type MultiFactorAuthFinishedEventState = {
|
|
62
62
|
key: UnitMessage.UNIT_MULTI_FACTOR_AUTH_FINISHED,
|
|
63
|
-
data:
|
|
63
|
+
data: MultiFactorAuthenticationFinishedEvent
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
type ComponentHeightEventState = {
|
|
@@ -13,7 +13,10 @@ export enum WebComponentType {
|
|
|
13
13
|
programDetails = 'unit-elements-program-details',
|
|
14
14
|
nextRepayment = 'unit-elements-next-repayment',
|
|
15
15
|
payeeManagement = 'unit-elements-payee-management',
|
|
16
|
+
wirePayment = 'unit-elements-wire-payment',
|
|
16
17
|
whiteLabelApp = 'unit-elements-white-label-app',
|
|
18
|
+
multiFactorAuthentication = 'unit-elements-multi-factor-authentication',
|
|
19
|
+
cardMenu = 'unit-elements-card-menu'
|
|
17
20
|
}
|
|
18
21
|
|
|
19
22
|
export enum PresentationMode {
|
|
@@ -4,7 +4,7 @@ import type { UNPaymentType, UNAchCounterparty, UNCounterpartyVerificationMethod
|
|
|
4
4
|
import type { UNTags, UNRelationship } from './types';
|
|
5
5
|
|
|
6
6
|
export type UNACHOnLoadData = {
|
|
7
|
-
[RESPONSE_KEYS.account]: UNAccountData,
|
|
7
|
+
[RESPONSE_KEYS.account]: [UNAccountData],
|
|
8
8
|
[RESPONSE_KEYS.counterpartyAccount]: [UNCounterpartyAccountData]
|
|
9
9
|
}
|
|
10
10
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface UNMultiFactorVerification {
|
|
2
|
+
type: string
|
|
3
|
+
|
|
4
|
+
attributes: {
|
|
5
|
+
verificationToken: string
|
|
6
|
+
phoneLast4Digits?: string
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface UNCustomerTokenVerification extends UNMultiFactorVerification {
|
|
11
|
+
type: 'customerTokenVerification'
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type UNMultiFactorAuthenticationFinished = {
|
|
15
|
+
token: string
|
|
16
|
+
expiresIn: number
|
|
17
|
+
}
|
|
@@ -35,6 +35,14 @@ export type UNPayeeCounterparty = {
|
|
|
35
35
|
type: UNCounterpartyType
|
|
36
36
|
permissions: UNCounterpartyPermission
|
|
37
37
|
tags?: {[key: string]: string}
|
|
38
|
+
},
|
|
39
|
+
relationships: {
|
|
40
|
+
customer: {
|
|
41
|
+
data: {
|
|
42
|
+
type: 'customer'
|
|
43
|
+
id: number
|
|
44
|
+
}
|
|
45
|
+
}
|
|
38
46
|
}
|
|
39
47
|
}
|
|
40
48
|
|
|
@@ -47,3 +55,26 @@ export enum UNPayeeManagementComponentPaginationType {
|
|
|
47
55
|
infiniteScroll = 'infiniteScroll',
|
|
48
56
|
pagination = 'pagination'
|
|
49
57
|
}
|
|
58
|
+
|
|
59
|
+
export type UNPayeeOnLoadCounterparty = {
|
|
60
|
+
id: string
|
|
61
|
+
attributes: {
|
|
62
|
+
name: string
|
|
63
|
+
bank?: string
|
|
64
|
+
routingNumber: string
|
|
65
|
+
accountNumber: string
|
|
66
|
+
accountType: UNCounterpartyAccountType
|
|
67
|
+
type: UNCounterpartyType
|
|
68
|
+
permissions: UNCounterpartyPermission
|
|
69
|
+
createdAt: Date
|
|
70
|
+
tags: {[key: string]: string}
|
|
71
|
+
}
|
|
72
|
+
relationships: {
|
|
73
|
+
customer: {
|
|
74
|
+
data: {
|
|
75
|
+
type: 'customer'
|
|
76
|
+
id: number
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -2,6 +2,7 @@ export enum UNPaymentType {
|
|
|
2
2
|
AchPayment = 'achPayment',
|
|
3
3
|
BookPayment = 'bookPayment',
|
|
4
4
|
CardToCardPayment = 'cardToCardPayment',
|
|
5
|
+
WirePayment = 'wirePayment'
|
|
5
6
|
}
|
|
6
7
|
|
|
7
8
|
export type UNPaymentStatus = 'Sent' | 'Rejected' | 'Pending' | 'Clearing' | 'Canceled' | 'Returned' | 'PendingReview'
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { UNPaymentStatus, UNPaymentType } from './payments.types';
|
|
2
|
+
import { UNRelationship, UNTags } from './types';
|
|
3
|
+
|
|
4
|
+
export interface WirePaymentCreatedEvent {
|
|
5
|
+
data: UNWirePaymentData
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export type UNWirePaymentData = {
|
|
9
|
+
type: UNPaymentType.WirePayment
|
|
10
|
+
id: string
|
|
11
|
+
attributes: {
|
|
12
|
+
createdAt: string | Date
|
|
13
|
+
amount: number
|
|
14
|
+
direction: 'Debit' | 'Credit'
|
|
15
|
+
description: string
|
|
16
|
+
status: UNPaymentStatus
|
|
17
|
+
reason?: string
|
|
18
|
+
tags?: UNTags
|
|
19
|
+
counterparty: UNWireCounterparty
|
|
20
|
+
}
|
|
21
|
+
relationships: {
|
|
22
|
+
account: UNRelationship
|
|
23
|
+
customer?: UNRelationship
|
|
24
|
+
customers?: UNRelationship
|
|
25
|
+
transaction?: UNRelationship
|
|
26
|
+
counterpartyAccount?: UNRelationship
|
|
27
|
+
org?: UNRelationship
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
type UNWireCounterparty = {
|
|
32
|
+
name: string
|
|
33
|
+
routingNumber: string
|
|
34
|
+
accountNumber: string
|
|
35
|
+
address: {
|
|
36
|
+
street: string
|
|
37
|
+
street2?: string
|
|
38
|
+
city: string
|
|
39
|
+
state?: string
|
|
40
|
+
postalCode: string
|
|
41
|
+
country?: string
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { UNVersioningStrategyType, UNWebVersioningStrategy } from '../types/shared';
|
|
2
|
+
import { UNSecuritySettings, UNSnapshotProtectionStrategy } from '../types/shared/securitySettings';
|
|
2
3
|
|
|
3
4
|
const WEB_SDK_RECOMMENDED_STRATEGY: UNWebVersioningStrategy = {
|
|
4
5
|
type: UNVersioningStrategyType.upToNextMinor,
|
|
5
6
|
major: 1,
|
|
6
|
-
minor:
|
|
7
|
+
minor: 10,
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const DEFAULT_SECURITY_SETTINGS: UNSecuritySettings = {
|
|
11
|
+
snapshotProtectionStrategy: UNSnapshotProtectionStrategy.FullProtection
|
|
7
12
|
};
|
|
8
13
|
|
|
9
14
|
export const UNSDKConstants = {
|
|
10
15
|
webSDKRecommendedStrategy: WEB_SDK_RECOMMENDED_STRATEGY,
|
|
16
|
+
securitySettings: DEFAULT_SECURITY_SETTINGS
|
|
11
17
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NativeModules } from 'react-native';
|
|
1
|
+
import { NativeModules, Platform } from 'react-native';
|
|
2
2
|
import { fetchUnitScript } from './UnitSdk.api';
|
|
3
3
|
import { UnitUiManager } from './unitUiManager/unitUiManager';
|
|
4
4
|
import type { UNFonts } from '../types/shared/fonts.types';
|
|
@@ -11,35 +11,61 @@ import { UNEnvironment } from '../types/shared/env.types';
|
|
|
11
11
|
import { UserDataKeys } from '../types/internal/unitStore.types';
|
|
12
12
|
import UNStoreManagerHelper from '../nativeModulesHelpers/UNStoreManagerHelper/UNStoreManagerHelper';
|
|
13
13
|
import { UnitHelpersManager } from './unitHelpersManager/UnitHelpersManager';
|
|
14
|
+
import UNSecurityManagerHelper from '../nativeModulesHelpers/UNSecurityHelper';
|
|
15
|
+
import { UNSecuritySettings, UNSnapshotProtectionStrategy } from '../types/shared/securitySettings';
|
|
16
|
+
import UNSnapshotProtectionHelper from '../nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper';
|
|
14
17
|
|
|
15
18
|
export class UnitSDK {
|
|
16
19
|
public static ui: UnitUiManager;
|
|
17
20
|
public static helpers: UnitHelpersManager;
|
|
21
|
+
|
|
18
22
|
protected static env?: UNEnvironment;
|
|
19
23
|
protected static webVersioningStrategy: UNWebVersioningStrategy;
|
|
24
|
+
protected static securitySettings: UNSecuritySettings = UNSDKConstants.securitySettings;
|
|
20
25
|
protected static customerToken?: string;
|
|
21
26
|
protected static fonts?: UNFonts;
|
|
22
27
|
protected static signedNonce?: string;
|
|
23
28
|
protected static pushProvisionModule?: typeof NativeModules;
|
|
24
|
-
protected static sdkVersion = '1.
|
|
29
|
+
protected static sdkVersion = '1.15.0';
|
|
25
30
|
|
|
26
|
-
public static init = async (
|
|
31
|
+
public static init = async (
|
|
32
|
+
env: UNEnvironment,
|
|
33
|
+
theme?: string,
|
|
34
|
+
language?: string,
|
|
35
|
+
fonts?: UNFonts,
|
|
36
|
+
webVersioningStrategy: UNWebVersioningStrategy = UNSDKConstants.webSDKRecommendedStrategy,
|
|
37
|
+
securitySettings: UNSecuritySettings = UNSDKConstants.securitySettings
|
|
38
|
+
) => {
|
|
27
39
|
try {
|
|
28
|
-
this.env = env;
|
|
29
40
|
this.webVersioningStrategy = webVersioningStrategy;
|
|
41
|
+
this.ui = new UnitUiManager();
|
|
42
|
+
this.helpers = new UnitHelpersManager();
|
|
43
|
+
|
|
44
|
+
const isJailbroke = await UNSecurityManagerHelper.isDeviceJailbroke();
|
|
45
|
+
if (isJailbroke) {
|
|
46
|
+
throw Error('Device is jailbroke');
|
|
47
|
+
}
|
|
48
|
+
this.env = env;
|
|
49
|
+
this.securitySettings = securitySettings;
|
|
30
50
|
this.fonts = fonts;
|
|
31
51
|
store.dispatch(setTheme(theme));
|
|
32
52
|
store.dispatch(setLanguage(language));
|
|
33
|
-
this.ui = new UnitUiManager();
|
|
34
|
-
this.helpers = new UnitHelpersManager();
|
|
35
53
|
warnClientIfNeeded(this.webVersioningStrategy);
|
|
54
|
+
const shouldProtectFromSnapshot = securitySettings.snapshotProtectionStrategy != UNSnapshotProtectionStrategy.None;
|
|
55
|
+
if (Platform.OS === 'ios') {
|
|
56
|
+
UNSnapshotProtectionHelper.setIosSecurity(shouldProtectFromSnapshot, 'light');
|
|
57
|
+
}
|
|
36
58
|
await fetchUnitScript();
|
|
37
59
|
} catch (e) {
|
|
38
60
|
console.log(e);
|
|
39
61
|
}
|
|
40
62
|
};
|
|
41
63
|
|
|
42
|
-
public static
|
|
64
|
+
public static isInitialized = () => {
|
|
65
|
+
return this.env != undefined;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
public static setPushProvisioningModule = (pushProvisionModule?: typeof NativeModules) => {
|
|
43
69
|
this.pushProvisionModule = pushProvisionModule;
|
|
44
70
|
};
|
|
45
71
|
|
|
@@ -47,6 +73,10 @@ export class UnitSDK {
|
|
|
47
73
|
return this.pushProvisionModule;
|
|
48
74
|
};
|
|
49
75
|
|
|
76
|
+
public static getSecuritySettings = () => {
|
|
77
|
+
return this.securitySettings;
|
|
78
|
+
};
|
|
79
|
+
|
|
50
80
|
/**
|
|
51
81
|
* @deprecated - Unit SDK is managing the signedNonce, no need to provide it
|
|
52
82
|
*/
|
|
@@ -11,5 +11,8 @@ export const getUnitScriptUrl = (env: UNEnvironment, webVersioningStrategy: UNWe
|
|
|
11
11
|
|
|
12
12
|
case UNEnvironment.production:
|
|
13
13
|
return `https://ui.unit.co/release/${webSdkVersionString}/components.js`;
|
|
14
|
+
|
|
15
|
+
case UNEnvironment.mock:
|
|
16
|
+
return 'https://unit-white-label-ui.netlify.app/assets/components-mock.js';
|
|
14
17
|
}
|
|
15
18
|
};
|
|
@@ -9,13 +9,14 @@ import {
|
|
|
9
9
|
UnitMessage,
|
|
10
10
|
RequestDownloadEvent,
|
|
11
11
|
RequestOpenLinkEvent,
|
|
12
|
+
MultiFactorAuthenticationFinishedEvent,
|
|
12
13
|
} from '../messages/webMessages/unitMessages';
|
|
13
14
|
import { getHtmlBody } from '../scripts/html/bodyHtml';
|
|
14
15
|
import { fetchUnitScript } from '../unitSdkManager/UnitSdk.api';
|
|
15
16
|
import { UnitSDK } from '../unitSdkManager/UnitSdkManager';
|
|
16
17
|
import type { WebViewMessage } from '../messages/webMessages';
|
|
17
18
|
|
|
18
|
-
import { getInfoParams, handleRequestDownload } from './WebComponent.utils';
|
|
19
|
+
import { getInfoParams, handleRequestDownload, injectEventToContinue } from './WebComponent.utils';
|
|
19
20
|
import type { PresentationMode, WebComponentType } from '../types/internal/webComponent.types';
|
|
20
21
|
import { getFontFacesString } from '../scripts/html/fontFaces';
|
|
21
22
|
import type { RootState } from '../store';
|
|
@@ -116,10 +117,15 @@ export const WebComponent = React.forwardRef<WebView, WebComponentProps>(functio
|
|
|
116
117
|
}, [props.params, unitScript, props.presentationMode, props.script, props.windowParams, globalTheme, globalLanguage, infoParams]);
|
|
117
118
|
|
|
118
119
|
// Listen and update the live webComponents
|
|
119
|
-
const
|
|
120
|
-
setItemInWindowUnitStore(webRef.current, UserDataKeys.unitVerifiedToken, data);
|
|
120
|
+
const handleMultiFactorAuthFinished = (data: MultiFactorAuthenticationFinishedEvent) => {
|
|
121
|
+
setItemInWindowUnitStore(webRef.current, UserDataKeys.unitVerifiedToken, data.unitVerifiedCustomerTokenString);
|
|
122
|
+
injectEventToContinue(webRef.current, {
|
|
123
|
+
parentInstanceId: data.parentInstanceId,
|
|
124
|
+
eventToContinue: data.eventToContinue
|
|
125
|
+
});
|
|
121
126
|
};
|
|
122
|
-
|
|
127
|
+
|
|
128
|
+
useListenerToEvent({ busEventKey: UnitMessage.UNIT_MULTI_FACTOR_AUTH_FINISHED, action: handleMultiFactorAuthFinished });
|
|
123
129
|
|
|
124
130
|
const onMessage = (e: WebViewMessageEvent) => {
|
|
125
131
|
const message = JSON.parse(e.nativeEvent.data) as WebViewMessage;
|
|
@@ -145,14 +151,15 @@ export const WebComponent = React.forwardRef<WebView, WebComponentProps>(functio
|
|
|
145
151
|
break;
|
|
146
152
|
case UnitMessage.UNIT_MULTI_FACTOR_AUTH_FINISHED:
|
|
147
153
|
if (message.details) {
|
|
148
|
-
const data = message.details as
|
|
149
|
-
UNStoreManagerHelper.saveValue(UserDataKeys.unitVerifiedToken, data);
|
|
154
|
+
const data = message.details as MultiFactorAuthenticationFinishedEvent;
|
|
155
|
+
UNStoreManagerHelper.saveValue(UserDataKeys.unitVerifiedToken, data.unitVerifiedCustomerTokenString);
|
|
150
156
|
// update existing components - namely, the other webComponents will update their window as well as this webComponent
|
|
151
157
|
dispatch(setEvent({
|
|
152
158
|
key: UnitMessage.UNIT_MULTI_FACTOR_AUTH_FINISHED,
|
|
153
159
|
data,
|
|
154
160
|
}));
|
|
155
161
|
}
|
|
162
|
+
props.onMessage && props.onMessage(message);
|
|
156
163
|
break;
|
|
157
164
|
case UnitMessage.UNIT_UNAUTHORIZED_TOKEN:
|
|
158
165
|
UnitSDK.cleanUserData();
|
|
@@ -191,6 +198,7 @@ export const WebComponent = React.forwardRef<WebView, WebComponentProps>(functio
|
|
|
191
198
|
onMessage={onMessage}
|
|
192
199
|
androidLayerType='hardware'
|
|
193
200
|
webviewDebuggingEnabled={__DEV__}
|
|
201
|
+
mediaCapturePermissionGrantType='grant'
|
|
194
202
|
/>
|
|
195
203
|
);
|
|
196
204
|
});
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
2
|
import { Share, NativeModules, Platform } from 'react-native';
|
|
3
3
|
import * as AppInfo from '../utils/AppInfo';
|
|
4
|
-
import type { RequestDownloadEvent } from '../messages/webMessages/unitMessages';
|
|
4
|
+
import type { EventToContinueEvent, RequestDownloadEvent } from '../messages/webMessages/unitMessages';
|
|
5
5
|
import { UnitSDK } from '../unitSdkManager/UnitSdkManager';
|
|
6
|
+
import WebView from 'react-native-webview';
|
|
6
7
|
const { RNShareFile } = NativeModules;
|
|
7
8
|
|
|
8
9
|
export const getInfoParams = async () => {
|
|
@@ -41,3 +42,7 @@ export const handleRequestDownload = async (details: RequestDownloadEvent, onRea
|
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
};
|
|
45
|
+
|
|
46
|
+
export const injectEventToContinue = (currentWeb: WebView | null, eventToContinueEvent: EventToContinueEvent) => {
|
|
47
|
+
currentWeb?.injectJavaScript(`dispatchEventToContinue('${JSON.stringify(eventToContinueEvent)}')`);
|
|
48
|
+
};
|
package/src/webComponent/html.ts
CHANGED
|
@@ -10,7 +10,8 @@ import {
|
|
|
10
10
|
DISPATCH_ACTIVITY_FILTER_CHANGED_EVENT,
|
|
11
11
|
DISPATCH_REQUEST_SHOW_SENSITIVE_DATA,
|
|
12
12
|
DISPATCH_REQUEST_HIDE_SENSITIVE_DATA,
|
|
13
|
-
SET_ITEM_IN_WINDOW_UNIT_STORE
|
|
13
|
+
SET_ITEM_IN_WINDOW_UNIT_STORE,
|
|
14
|
+
DISPATCH_EVENT_TO_CONTINUE
|
|
14
15
|
} from '../scripts/html/bodyScript';
|
|
15
16
|
|
|
16
17
|
export const HTML_PLACEHOLDER = {
|
|
@@ -88,6 +89,8 @@ const htmlText = `
|
|
|
88
89
|
|
|
89
90
|
${DISPATCH_RENDERING_EVENT}
|
|
90
91
|
|
|
92
|
+
${DISPATCH_EVENT_TO_CONTINUE}
|
|
93
|
+
|
|
91
94
|
${DISPATCH_OPEN_ACTIONS_MENU}
|
|
92
95
|
|
|
93
96
|
${DISPATCH_REQUEST_HIDE_SENSITIVE_DATA}
|