react-native-unit-components 1.12.0 → 1.14.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 +93 -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 +8 -4
- 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/UNCardComponent/UNCardComponent.js +4 -3
- package/lib/commonjs/components/UNCardComponent/UNCardComponent.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 +88 -0
- package/lib/commonjs/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.js.map +1 -0
- package/lib/commonjs/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.js +30 -0
- package/lib/commonjs/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.js.map +1 -0
- package/lib/commonjs/components/UNFundAccountPaymentComponent/index.js +21 -0
- package/lib/commonjs/components/UNFundAccountPaymentComponent/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/UNPayeeManagementComponent/UNPayeeManagementComponent.js +7 -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 +8 -3
- 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 +22 -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/fundAccountPaymentMessage.js +6 -0
- package/lib/commonjs/messages/webMessages/fundAccountPaymentMessage.js.map +1 -0
- package/lib/commonjs/messages/webMessages/onLoadMessage.js +2 -0
- package/lib/commonjs/messages/webMessages/onLoadMessage.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/types/internal/webComponent.types.js +2 -0
- package/lib/commonjs/types/internal/webComponent.types.js.map +1 -1
- package/lib/commonjs/types/shared/checkDeposit.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/fundAccountPayment.types.js +6 -0
- package/lib/commonjs/types/shared/fundAccountPayment.types.js.map +1 -0
- package/lib/commonjs/types/shared/index.js +22 -0
- package/lib/commonjs/types/shared/index.js.map +1 -1
- package/lib/commonjs/types/shared/payments.types.js +18 -1
- 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/types.js +10 -0
- package/lib/commonjs/types/shared/types.js.map +1 -1
- 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 +6 -1
- package/lib/commonjs/unitSdkManager/UnitSdk.constants.js.map +1 -1
- package/lib/commonjs/unitSdkManager/UnitSdkManager.js +25 -4
- 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/unitSdkManager/unitHelpersManager/UnitHelpersManager.js +18 -0
- package/lib/commonjs/unitSdkManager/unitHelpersManager/UnitHelpersManager.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 +4 -3
- package/lib/commonjs/webComponent/WebComponent.js.map +1 -1
- package/lib/commonjs/webComponent/WebComponent.utils.js +2 -2
- package/lib/commonjs/webComponent/WebComponent.utils.js.map +1 -1
- package/lib/commonjs/webComponent/html.js +1 -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 +9 -5
- 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/UNCardComponent/UNCardComponent.js +4 -3
- package/lib/module/components/UNCardComponent/UNCardComponent.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 +79 -0
- package/lib/module/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.js.map +1 -0
- package/lib/module/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.js +22 -0
- package/lib/module/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.js.map +1 -0
- package/lib/module/components/UNFundAccountPaymentComponent/index.js +2 -0
- package/lib/module/components/UNFundAccountPaymentComponent/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/UNPayeeManagementComponent/UNPayeeManagementComponent.js +7 -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 +8 -3
- 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 +2 -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/fundAccountPaymentMessage.js +2 -0
- package/lib/module/messages/webMessages/fundAccountPaymentMessage.js.map +1 -0
- package/lib/module/messages/webMessages/onLoadMessage.js +2 -0
- package/lib/module/messages/webMessages/onLoadMessage.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/types/internal/webComponent.types.js +2 -0
- package/lib/module/types/internal/webComponent.types.js.map +1 -1
- package/lib/module/types/shared/checkDeposit.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/fundAccountPayment.types.js +2 -0
- package/lib/module/types/shared/fundAccountPayment.types.js.map +1 -0
- package/lib/module/types/shared/index.js +2 -0
- package/lib/module/types/shared/index.js.map +1 -1
- package/lib/module/types/shared/payments.types.js +17 -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/types.js +6 -0
- package/lib/module/types/shared/types.js.map +1 -1
- 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 +6 -1
- package/lib/module/unitSdkManager/UnitSdk.constants.js.map +1 -1
- package/lib/module/unitSdkManager/UnitSdkManager.js +25 -4
- 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/unitSdkManager/unitHelpersManager/UnitHelpersManager.js +18 -0
- package/lib/module/unitSdkManager/unitHelpersManager/UnitHelpersManager.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 +4 -3
- package/lib/module/webComponent/WebComponent.js.map +1 -1
- package/lib/module/webComponent/WebComponent.utils.js +2 -2
- package/lib/module/webComponent/WebComponent.utils.js.map +1 -1
- package/lib/module/webComponent/html.js +1 -0
- 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/UNCardComponent/UNCardComponent.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 +19 -0
- package/lib/typescript/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.d.ts.map +1 -0
- package/lib/typescript/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.d.ts +4 -0
- package/lib/typescript/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.d.ts.map +1 -0
- package/lib/typescript/src/components/UNFundAccountPaymentComponent/index.d.ts +2 -0
- package/lib/typescript/src/components/UNFundAccountPaymentComponent/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.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 +2 -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/fundAccountPaymentMessage.d.ts +6 -0
- package/lib/typescript/src/messages/webMessages/fundAccountPaymentMessage.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/onLoadMessage.d.ts +10 -3
- package/lib/typescript/src/messages/webMessages/onLoadMessage.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/types/internal/webComponent.types.d.ts +2 -0
- package/lib/typescript/src/types/internal/webComponent.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/achCredit.types.d.ts +3 -3
- package/lib/typescript/src/types/shared/achCredit.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/bookPayment.types.d.ts +2 -2
- package/lib/typescript/src/types/shared/bookPayment.types.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/checkDeposit.types.d.ts +1 -1
- package/lib/typescript/src/types/shared/checkDeposit.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/fundAccountPayment.types.d.ts +38 -0
- package/lib/typescript/src/types/shared/fundAccountPayment.types.d.ts.map +1 -0
- package/lib/typescript/src/types/shared/index.d.ts +2 -0
- package/lib/typescript/src/types/shared/index.d.ts.map +1 -1
- package/lib/typescript/src/types/shared/payments.types.d.ts +29 -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/types.d.ts +7 -4
- package/lib/typescript/src/types/shared/types.d.ts.map +1 -1
- 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 +7 -1
- 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/unitSdkManager/unitHelpersManager/UnitHelpersManager.d.ts +2 -0
- package/lib/typescript/src/unitSdkManager/unitHelpersManager/UnitHelpersManager.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.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 +9 -5
- 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/UNCardComponent/UNCardComponent.tsx +3 -3
- package/src/components/UNCheckDepositComponent/UNCheckDepositComponent.tsx +7 -14
- package/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.tsx +111 -0
- package/src/components/UNFundAccountPaymentComponent/UNFundAccountPaymentComponent.utils.ts +24 -0
- package/src/components/UNFundAccountPaymentComponent/index.ts +1 -0
- package/src/components/UNMultipleCardsComponent/UNMultipleCardsComponent.tsx +6 -14
- package/src/components/UNNextRepaymentComponent/UNNextRepaymentComponent.tsx +3 -3
- package/src/components/UNPayeeManagementComponent/UNPayeeManagementComponent.tsx +14 -11
- package/src/components/UNProgramDetailsComponent/UNProgramDetailsComponent.tsx +3 -3
- package/src/components/UNWhiteLabelAppComponent/UNWhiteLabelAppComponent.tsx +15 -12
- 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 +2 -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/fundAccountPaymentMessage.ts +8 -0
- package/src/messages/webMessages/index.ts +2 -0
- package/src/messages/webMessages/onLoadMessage.ts +13 -2
- package/src/messages/webMessages/unitMessages.ts +1 -1
- 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/types/internal/webComponent.types.ts +2 -0
- package/src/types/shared/achCredit.types.ts +3 -3
- package/src/types/shared/bookPayment.types.ts +2 -2
- package/src/types/shared/checkDeposit.types.ts +1 -2
- package/src/types/shared/env.types.ts +2 -1
- package/src/types/shared/fundAccountPayment.types.ts +38 -0
- package/src/types/shared/index.ts +2 -0
- package/src/types/shared/payments.types.ts +33 -1
- package/src/types/shared/securitySettings.ts +8 -0
- package/src/types/shared/types.ts +9 -4
- package/src/types/shared/wirePayment.types.ts +43 -0
- package/src/unitSdkManager/UnitSdk.constants.ts +6 -0
- package/src/unitSdkManager/UnitSdkManager.ts +37 -4
- package/src/unitSdkManager/UnitSdkManager.utils.internal.ts +3 -0
- package/src/unitSdkManager/unitHelpersManager/UnitHelpersManager.ts +20 -0
- package/src/utils/onLoadMessages.utils.ts +3 -0
- package/src/webComponent/WebComponent.tsx +4 -3
- package/src/webComponent/WebComponent.utils.ts +2 -2
- package/src/webComponent/html.ts +1 -0
- package/lib/commonjs/utils/SDKInfo.js +0 -13
- package/lib/commonjs/utils/SDKInfo.js.map +0 -1
- package/lib/module/utils/SDKInfo.js +0 -5
- package/lib/module/utils/SDKInfo.js.map +0 -1
- package/lib/typescript/src/utils/SDKInfo.d.ts +0 -2
- package/lib/typescript/src/utils/SDKInfo.d.ts.map +0 -1
- package/src/utils/SDKInfo.ts +0 -5
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { WebComponent } from '../../webComponent/WebComponent';
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import { PresentationMode, WebComponentType } from '../../types/internal/webComponent.types';
|
|
4
|
+
import { withReduxStore } from '../../helpers/store/helpers';
|
|
5
|
+
import { RESPONSE_KEYS, UnitOnLoadResponseEvent } from '../../messages/webMessages/onLoadMessage';
|
|
6
|
+
import { UNAccountData, UNError, UNOnLoadResponse, UNOnLoadResponseData } from '../../types/shared';
|
|
7
|
+
import { WebViewMessage } from '../../messages/webMessages';
|
|
8
|
+
import { PaymentMessage } from '../../messages/webMessages/paymentsMessage';
|
|
9
|
+
import { UnitMessage } from '../../messages/webMessages/unitMessages';
|
|
10
|
+
import { HeightEvent, PageMessage } from '../../messages/webMessages/pageMessage';
|
|
11
|
+
import { getWirePaymentParams, getWirePaymentScript } from './UNWirePaymentComponent.utils';
|
|
12
|
+
import { UNWirePaymentData, WirePaymentCreatedEvent } from '../../types/shared/wirePayment.types';
|
|
13
|
+
import { UNBaseView } from '../../nativeComponents/UNBaseView';
|
|
14
|
+
import { ensureArray } from '../../utils/onLoadMessages.utils';
|
|
15
|
+
|
|
16
|
+
export interface UNWirePaymentComponentProps {
|
|
17
|
+
// inputs
|
|
18
|
+
customerToken: string;
|
|
19
|
+
accountId?: string;
|
|
20
|
+
fee?: number;
|
|
21
|
+
|
|
22
|
+
// ui
|
|
23
|
+
theme?: string;
|
|
24
|
+
language?: string;
|
|
25
|
+
|
|
26
|
+
isAutoFocus?: boolean;
|
|
27
|
+
initialStageBackButton?: boolean;
|
|
28
|
+
finalStageDoneButton?: boolean;
|
|
29
|
+
|
|
30
|
+
// events
|
|
31
|
+
onPaymentCreated?: (data: UNWirePaymentData) => void;
|
|
32
|
+
onLoad?: (response: UNOnLoadResponse<[UNAccountData]>) => void;
|
|
33
|
+
onInitialStageBackButtonClicked?: () => void;
|
|
34
|
+
onFinalStageDoneButtonClicked?: () => void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const UNWirePaymentComponent = (props: UNWirePaymentComponentProps) => {
|
|
38
|
+
const [height, setHeight] = useState<number>(0);
|
|
39
|
+
const [presentationMode, setPresentationMode] = useState<PresentationMode>(PresentationMode.Inherit);
|
|
40
|
+
|
|
41
|
+
const handleUnitOnLoad = (response: UnitOnLoadResponseEvent) => {
|
|
42
|
+
if (!props.onLoad) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (RESPONSE_KEYS.errors in response) {
|
|
47
|
+
props.onLoad(response as UNError);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (RESPONSE_KEYS.account in response) {
|
|
52
|
+
const account = response[RESPONSE_KEYS.account].data;
|
|
53
|
+
const paymentOnLoad: UNOnLoadResponseData<[UNAccountData]> = {
|
|
54
|
+
data: ensureArray(account),
|
|
55
|
+
};
|
|
56
|
+
props.onLoad(paymentOnLoad);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
console.error('On Load Error: unexpected response type');
|
|
61
|
+
return;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const handleWebViewMessage = (message: WebViewMessage) => {
|
|
65
|
+
if (!message || !message.details) return;
|
|
66
|
+
switch (message.type) {
|
|
67
|
+
case PaymentMessage.INITIAL_STAGE_BACK_BUTTON_CLICKED: {
|
|
68
|
+
props.onInitialStageBackButtonClicked && props.onInitialStageBackButtonClicked();
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
case PaymentMessage.FINAL_STAGE_DONE_BUTTON_CLICKED: {
|
|
72
|
+
props.onFinalStageDoneButtonClicked && props.onFinalStageDoneButtonClicked();
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
case PaymentMessage.PAYMENT_CREATED:
|
|
76
|
+
props.onPaymentCreated && props.onPaymentCreated((message.details as WirePaymentCreatedEvent).data);
|
|
77
|
+
break;
|
|
78
|
+
case UnitMessage.UNIT_ON_LOAD:
|
|
79
|
+
handleUnitOnLoad(message.details as UnitOnLoadResponseEvent);
|
|
80
|
+
break;
|
|
81
|
+
case PageMessage.PAGE_HEIGHT: {
|
|
82
|
+
const currentHeight = (message.details as HeightEvent).height;
|
|
83
|
+
setHeight(currentHeight);
|
|
84
|
+
if (presentationMode === PresentationMode.Inherit && currentHeight === 0) {
|
|
85
|
+
setPresentationMode(PresentationMode.Default);
|
|
86
|
+
}
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const style = presentationMode === PresentationMode.Inherit ? { flex: 1 } : { height: height };
|
|
93
|
+
return (
|
|
94
|
+
<UNBaseView style={style}>
|
|
95
|
+
<WebComponent
|
|
96
|
+
type={WebComponentType.wirePayment}
|
|
97
|
+
presentationMode={presentationMode}
|
|
98
|
+
params={getWirePaymentParams(props)}
|
|
99
|
+
script={getWirePaymentScript()}
|
|
100
|
+
onMessage={(message: WebViewMessage) => handleWebViewMessage(message)}
|
|
101
|
+
isScrollable={true}
|
|
102
|
+
theme={props.theme}
|
|
103
|
+
language={props.language}
|
|
104
|
+
/>
|
|
105
|
+
</UNBaseView>
|
|
106
|
+
);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export default withReduxStore<UNWirePaymentComponentProps>(UNWirePaymentComponent);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LISTENERS } from '../../scripts/html/bodyScript';
|
|
2
|
+
import { UNWirePaymentComponentProps } from './UNWirePaymentComponent';
|
|
3
|
+
|
|
4
|
+
export const getWirePaymentParams = (props: UNWirePaymentComponentProps) => {
|
|
5
|
+
const accountIdParam = props.accountId ? `account-id="${props.accountId}"` : '';
|
|
6
|
+
const feeParam = props.fee ? `fee="${props.fee}"` : '';
|
|
7
|
+
return `
|
|
8
|
+
${accountIdParam}
|
|
9
|
+
customer-token="${props.customerToken}"
|
|
10
|
+
${feeParam}
|
|
11
|
+
is-auto-focus="${props.isAutoFocus || false}"
|
|
12
|
+
initial-stage-back-button="${props.initialStageBackButton ?? false}"
|
|
13
|
+
final-stage-done-button="${props.finalStageDoneButton ?? false}"
|
|
14
|
+
`;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const getWirePaymentScript = () => {
|
|
18
|
+
return `
|
|
19
|
+
${LISTENERS.unitPaymentCreated}
|
|
20
|
+
${LISTENERS.unitPaymentInitialStageBackButtonClicked}
|
|
21
|
+
${LISTENERS.unitPaymentFinalStageDoneButtonClicked}
|
|
22
|
+
`;
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as UNWirePaymentComponent, UNWirePaymentComponentProps } from './UNWirePaymentComponent';
|
package/src/components/index.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './UNBottomSheetComponent';
|
|
|
4
4
|
export * from './UNBookPaymentComponent';
|
|
5
5
|
export * from './UNActivityComponent';
|
|
6
6
|
export * from './UNAccountComponent';
|
|
7
|
+
export * from './UNFundAccountPaymentComponent';
|
|
7
8
|
export * from './UNCheckDepositComponent';
|
|
8
9
|
export * from './UNACHDebitComponent';
|
|
9
10
|
export * from './UNACHCreditComponent';
|
|
@@ -11,3 +12,4 @@ export * from './UNProgramDetailsComponent';
|
|
|
11
12
|
export * from './UNNextRepaymentComponent';
|
|
12
13
|
export * from './UNWhiteLabelAppComponent';
|
|
13
14
|
export * from './UNPayeeManagementComponent';
|
|
15
|
+
export * from './UNWirePaymentComponent';
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
import { getStylesObject } from './BottomSheet.styles';
|
|
21
21
|
import { useAppStateListener } from '../../hooks/useAppStateListener';
|
|
22
22
|
import { BottomSheetNativePlaceType } from '../../types/internal/bottomSheet.types';
|
|
23
|
+
import { UNBaseView } from '../../nativeComponents/UNBaseView';
|
|
23
24
|
|
|
24
25
|
export interface BottomSheetProps {
|
|
25
26
|
isOpen: boolean,
|
|
@@ -223,11 +224,9 @@ const BottomSheet = (props: BottomSheetProps) => {
|
|
|
223
224
|
<View
|
|
224
225
|
onLayout={_setSize}
|
|
225
226
|
>
|
|
226
|
-
<
|
|
227
|
-
style={{ height: props.height }}
|
|
228
|
-
>
|
|
227
|
+
<UNBaseView style={{ height: props.height }}>
|
|
229
228
|
{children}
|
|
230
|
-
</
|
|
229
|
+
</UNBaseView>
|
|
231
230
|
|
|
232
231
|
</View>
|
|
233
232
|
</View>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import UNSecurityManagerHelper from '../nativeModulesHelpers/UNSecurityHelper';
|
|
3
|
+
|
|
4
|
+
export const useIsJailbrokeDevice = () => {
|
|
5
|
+
const [isJailbroke, setIsJailbroke] = useState(false);
|
|
6
|
+
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
const isDeviceJailbroke = async () => {
|
|
9
|
+
const isDeviceJailbroke = await UNSecurityManagerHelper.isDeviceJailbroke();
|
|
10
|
+
setIsJailbroke(isDeviceJailbroke);
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
isDeviceJailbroke();
|
|
14
|
+
}, []);
|
|
15
|
+
|
|
16
|
+
return isJailbroke;
|
|
17
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
2
|
+
import UNSnapshotProtectionHelper from '../nativeModulesHelpers/UNSanpshotProtectionHelper/UNSnapshotProtectionHelper';
|
|
3
|
+
import { UnitSDK } from '../unitSdkManager/UnitSdkManager';
|
|
4
|
+
import { UNSnapshotProtectionStrategy } from '../types/shared/securitySettings';
|
|
5
|
+
import { useEffect } from 'react';
|
|
6
|
+
|
|
7
|
+
export const useSnapshotProtection = () => {
|
|
8
|
+
/**
|
|
9
|
+
* This hook provides snapshot protection specifically for Android.
|
|
10
|
+
* For iOS, a native service is utilized instead.
|
|
11
|
+
*/
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (!UnitSDK.isInitialized()) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
if (UnitSDK.getSecuritySettings().snapshotProtectionStrategy == UNSnapshotProtectionStrategy.None) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (Platform.OS == 'android') {
|
|
22
|
+
UNSnapshotProtectionHelper.setAndroidSecurity();
|
|
23
|
+
}
|
|
24
|
+
}, []);
|
|
25
|
+
};
|
|
@@ -9,6 +9,7 @@ import type { AccountEvent, AccountMessage } from './accountMessage';
|
|
|
9
9
|
import type { CheckEvent, CheckMessage } from './checkMessage';
|
|
10
10
|
import type { ActivityEvent, ActivityMessage } from './activityMessage';
|
|
11
11
|
import type { MultipleCardsEvent, MultipleCardsMessage } from './multipleCardsMessage';
|
|
12
|
+
import { FundAccountPaymentEvent } from './fundAccountPaymentMessage';
|
|
12
13
|
import { PlaidEvent, PlaidMessage } from './plaidMessages';
|
|
13
14
|
import { PayeeManagementMessage, PayeeManagementEvent } from './payeeManagementMessage';
|
|
14
15
|
|
|
@@ -32,6 +33,7 @@ type WebViewEvent =
|
|
|
32
33
|
| BookPaymentEvent
|
|
33
34
|
| PaymentMessage
|
|
34
35
|
| ACHEvent
|
|
36
|
+
| FundAccountPaymentEvent
|
|
35
37
|
| AccountEvent
|
|
36
38
|
| CheckEvent
|
|
37
39
|
| ActivityEvent
|
|
@@ -7,6 +7,7 @@ import type {
|
|
|
7
7
|
} from '../../types/shared';
|
|
8
8
|
import type { UNAuthorizationData } from '../../types/shared/authorization.types';
|
|
9
9
|
import type { UNTransactionData } from '../../types/shared/transactions.types';
|
|
10
|
+
import type { UNAstraExternalCardData } from '../../types/shared/payments.types';
|
|
10
11
|
|
|
11
12
|
export enum RESPONSE_KEYS {
|
|
12
13
|
errors = 'errors',
|
|
@@ -16,7 +17,9 @@ export enum RESPONSE_KEYS {
|
|
|
16
17
|
counterpartyAccount = 'counterpartyResult',
|
|
17
18
|
transactions = 'transactionsResult',
|
|
18
19
|
authorizations = 'authorizationsResult',
|
|
19
|
-
repayment = 'repaymentResult'
|
|
20
|
+
repayment = 'repaymentResult',
|
|
21
|
+
astraExternalCard = 'astraCardsResult',
|
|
22
|
+
accountCards = 'accountCardsResult'
|
|
20
23
|
}
|
|
21
24
|
|
|
22
25
|
export type CardsOnLoadResponse = {
|
|
@@ -35,7 +38,7 @@ export type AccountsOnLoadResponse = {
|
|
|
35
38
|
}
|
|
36
39
|
|
|
37
40
|
export type ACHOnLoadResponse = {
|
|
38
|
-
[RESPONSE_KEYS.account]: UNOnLoadResponseData<UNAccountData>,
|
|
41
|
+
[RESPONSE_KEYS.account]: UNOnLoadResponseData<UNAccountData> | UNOnLoadResponseData<[UNAccountData]>,
|
|
39
42
|
[RESPONSE_KEYS.counterpartyAccount]: UNOnLoadResponseData<[UNCounterpartyAccountData]>
|
|
40
43
|
}
|
|
41
44
|
|
|
@@ -44,6 +47,13 @@ export type ActivityOnLoadResponse = {
|
|
|
44
47
|
[RESPONSE_KEYS.transactions]: UNOnLoadResponseData<[UNTransactionData]>
|
|
45
48
|
}
|
|
46
49
|
|
|
50
|
+
export type FundAccountPaymentOnLoadResponse = {
|
|
51
|
+
// Currently, FundAccountPaymentComponent get 2 on load events: 1- for the external cards, 2- for the internal cards;
|
|
52
|
+
// we may consider unite them.
|
|
53
|
+
[RESPONSE_KEYS.astraExternalCard]?: UNOnLoadResponseData<[UNAstraExternalCardData]>,
|
|
54
|
+
[RESPONSE_KEYS.accountCards]?: UNOnLoadResponseData<[UNCardData]>
|
|
55
|
+
}
|
|
56
|
+
|
|
47
57
|
export type UnitOnLoadResponseSuccessData =
|
|
48
58
|
| CardOnLoadResponse
|
|
49
59
|
| CardsOnLoadResponse
|
|
@@ -51,6 +61,7 @@ export type UnitOnLoadResponseSuccessData =
|
|
|
51
61
|
| AccountsOnLoadResponse
|
|
52
62
|
| AccountOnLoadResponse
|
|
53
63
|
| ActivityOnLoadResponse
|
|
64
|
+
| FundAccountPaymentOnLoadResponse
|
|
54
65
|
|
|
55
66
|
export type UnitOnLoadResponseEvent =
|
|
56
67
|
| UNError
|
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
|
};
|
|
@@ -5,6 +5,7 @@ export enum WebComponentType {
|
|
|
5
5
|
activity = 'unit-elements-activity',
|
|
6
6
|
slot = 'unit-elements-sdk-slot',
|
|
7
7
|
account = 'unit-elements-account',
|
|
8
|
+
fundAccountPayment = 'unit-elements-fund-account-payment',
|
|
8
9
|
checkDeposit = 'unit-elements-check-deposit',
|
|
9
10
|
achDebitPayment = 'unit-elements-ach-debit-payment',
|
|
10
11
|
achCreditPayment = 'unit-elements-ach-credit-payment',
|
|
@@ -12,6 +13,7 @@ export enum WebComponentType {
|
|
|
12
13
|
programDetails = 'unit-elements-program-details',
|
|
13
14
|
nextRepayment = 'unit-elements-next-repayment',
|
|
14
15
|
payeeManagement = 'unit-elements-payee-management',
|
|
16
|
+
wirePayment = 'unit-elements-wire-payment',
|
|
15
17
|
whiteLabelApp = 'unit-elements-white-label-app',
|
|
16
18
|
}
|
|
17
19
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import type { RESPONSE_KEYS } from '../../messages/webMessages/onLoadMessage';
|
|
2
2
|
import type { UNAccountData, UNCounterpartyAccountData } from './account.types';
|
|
3
|
-
import type { UNAchCounterparty, UNCounterpartyVerificationMethod, UNPaymentStatus } from './payments.types';
|
|
3
|
+
import type { UNPaymentType, UNAchCounterparty, UNCounterpartyVerificationMethod, UNPaymentStatus } from './payments.types';
|
|
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
|
|
|
11
11
|
export type UNACHData = {
|
|
12
|
-
type:
|
|
12
|
+
type: UNPaymentType.AchPayment,
|
|
13
13
|
id: string,
|
|
14
14
|
attributes: {
|
|
15
15
|
createdAt: string | Date,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { UNPaymentStatus } from './payments.types';
|
|
1
|
+
import type { UNPaymentStatus, UNPaymentType } from './payments.types';
|
|
2
2
|
import type { UNTags, UNRelationship } from './types';
|
|
3
3
|
|
|
4
4
|
export type UNBookPaymentData = {
|
|
5
|
-
type:
|
|
5
|
+
type: UNPaymentType.BookPayment,
|
|
6
6
|
id: string,
|
|
7
7
|
attributes: {
|
|
8
8
|
createdAt: string | Date,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { UNRelationship } from './types';
|
|
2
|
+
import type { Cents } from './payments.types';
|
|
2
3
|
|
|
3
4
|
export type UNCheckDepositData = {
|
|
4
5
|
id: string
|
|
@@ -41,8 +42,6 @@ export enum UNCheckDepositStatus {
|
|
|
41
42
|
Returned = 'Returned',
|
|
42
43
|
}
|
|
43
44
|
|
|
44
|
-
export type Cents = number
|
|
45
|
-
|
|
46
45
|
export type UNCheckCounterparty = {
|
|
47
46
|
name: string
|
|
48
47
|
accountNumber: string
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { UNCardData } from './card.types';
|
|
2
|
+
import { UNPaymentType, Cents, UNPaymentStatus, UNAstraExternalCardData } from './payments.types';
|
|
3
|
+
import { UNDirection, UNRelationshipData } from './types';
|
|
4
|
+
|
|
5
|
+
export type UNFundAccountPaymentOnLoadData = [UNAstraExternalCardData] | [UNCardData]
|
|
6
|
+
|
|
7
|
+
export type UNFundAccountPaymentData = {
|
|
8
|
+
type: UNPaymentType.CardToCardPayment
|
|
9
|
+
id: string
|
|
10
|
+
attributes: {
|
|
11
|
+
createdAt: Date
|
|
12
|
+
amount: Cents
|
|
13
|
+
direction: UNDirection
|
|
14
|
+
description: string
|
|
15
|
+
status: UNPaymentStatus
|
|
16
|
+
reason?: string
|
|
17
|
+
tags?: {[key: string]: string}
|
|
18
|
+
astraRoutineId: string
|
|
19
|
+
}
|
|
20
|
+
relationships: {
|
|
21
|
+
account: {
|
|
22
|
+
data: UNRelationshipData
|
|
23
|
+
}
|
|
24
|
+
customer?: {
|
|
25
|
+
data: UNRelationshipData
|
|
26
|
+
}
|
|
27
|
+
customers?: {
|
|
28
|
+
data: [UNRelationshipData]
|
|
29
|
+
}
|
|
30
|
+
transaction?: {
|
|
31
|
+
data: [UNRelationshipData]
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
card: {
|
|
35
|
+
data: UNRelationshipData
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -10,5 +10,7 @@ export * from './fonts.types';
|
|
|
10
10
|
export * from './error.types';
|
|
11
11
|
export * from './versioning.types';
|
|
12
12
|
export * from './multipleCards.types';
|
|
13
|
+
export * from './fundAccountPayment.types';
|
|
13
14
|
export * from './payeeManagement.types';
|
|
14
15
|
export * from './env.types';
|
|
16
|
+
export * from './securitySettings';
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
export
|
|
1
|
+
export enum UNPaymentType {
|
|
2
|
+
AchPayment = 'achPayment',
|
|
3
|
+
BookPayment = 'bookPayment',
|
|
4
|
+
CardToCardPayment = 'cardToCardPayment',
|
|
5
|
+
WirePayment = 'wirePayment'
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export type UNPaymentStatus = 'Sent' | 'Rejected' | 'Pending' | 'Clearing' | 'Canceled' | 'Returned' | 'PendingReview'
|
|
2
9
|
|
|
3
10
|
export type UNAchCounterparty = {
|
|
4
11
|
name: string
|
|
@@ -35,3 +42,28 @@ export enum UNPlaidAccountFilter {
|
|
|
35
42
|
export enum UNCounterpartyVerificationMethod {
|
|
36
43
|
Plaid = 'Plaid',
|
|
37
44
|
}
|
|
45
|
+
|
|
46
|
+
export enum UNCardNetwork {
|
|
47
|
+
Visa = 'Visa',
|
|
48
|
+
Diners = 'Diners',
|
|
49
|
+
Maestro = 'Maestro',
|
|
50
|
+
Generic = 'Generic',
|
|
51
|
+
Discover = 'Discover',
|
|
52
|
+
MasterCard = 'MasterCard',
|
|
53
|
+
AmericanExpress = 'AmericanExpress',
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface UNAstraExternalCardData {
|
|
57
|
+
type: 'astraExternalCard'
|
|
58
|
+
id: string
|
|
59
|
+
attributes: {
|
|
60
|
+
last4Digits: string
|
|
61
|
+
cardNetwork: UNCardNetwork
|
|
62
|
+
fullName: {
|
|
63
|
+
first: string
|
|
64
|
+
last: string
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export type Cents = number
|