Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion example/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ target 'TsAccountprotectionExample' do
#
# Note that if you have use_frameworks! enabled, Flipper will not work and
# you should disable the next line.
:flipper_configuration => flipper_config,
#:flipper_configuration => flipper_config,
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
Expand Down
120 changes: 10 additions & 110 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
PODS:
- AccountProtection (2.1.0):
- TSCoreSDK (~> 1.0.21)
- AccountProtection (2.1.12):
- TSCoreSDK (~> 1.0.27)
- boost (1.83.0)
- CocoaAsyncSocket (7.6.5)
- DoubleConversion (1.1.6)
- FBLazyVector (0.73.5)
- FBReactNativeSpec (0.73.5):
Expand All @@ -12,69 +11,12 @@ PODS:
- React-Core (= 0.73.5)
- React-jsi (= 0.73.5)
- ReactCommon/turbomodule/core (= 0.73.5)
- Flipper (0.201.0):
- Flipper-Folly (~> 2.6)
- Flipper-Boost-iOSX (1.76.0.1.11)
- Flipper-DoubleConversion (3.2.0.1)
- Flipper-Fmt (7.1.7)
- Flipper-Folly (2.6.10):
- Flipper-Boost-iOSX
- Flipper-DoubleConversion
- Flipper-Fmt (= 7.1.7)
- Flipper-Glog
- libevent (~> 2.1.12)
- OpenSSL-Universal (= 1.1.1100)
- Flipper-Glog (0.5.0.5)
- Flipper-PeerTalk (0.0.4)
- FlipperKit (0.201.0):
- FlipperKit/Core (= 0.201.0)
- FlipperKit/Core (0.201.0):
- Flipper (~> 0.201.0)
- FlipperKit/CppBridge
- FlipperKit/FBCxxFollyDynamicConvert
- FlipperKit/FBDefines
- FlipperKit/FKPortForwarding
- SocketRocket (~> 0.6.0)
- FlipperKit/CppBridge (0.201.0):
- Flipper (~> 0.201.0)
- FlipperKit/FBCxxFollyDynamicConvert (0.201.0):
- Flipper-Folly (~> 2.6)
- FlipperKit/FBDefines (0.201.0)
- FlipperKit/FKPortForwarding (0.201.0):
- CocoaAsyncSocket (~> 7.6)
- Flipper-PeerTalk (~> 0.0.4)
- FlipperKit/FlipperKitHighlightOverlay (0.201.0)
- FlipperKit/FlipperKitLayoutHelpers (0.201.0):
- FlipperKit/Core
- FlipperKit/FlipperKitHighlightOverlay
- FlipperKit/FlipperKitLayoutTextSearchable
- FlipperKit/FlipperKitLayoutIOSDescriptors (0.201.0):
- FlipperKit/Core
- FlipperKit/FlipperKitHighlightOverlay
- FlipperKit/FlipperKitLayoutHelpers
- FlipperKit/FlipperKitLayoutPlugin (0.201.0):
- FlipperKit/Core
- FlipperKit/FlipperKitHighlightOverlay
- FlipperKit/FlipperKitLayoutHelpers
- FlipperKit/FlipperKitLayoutIOSDescriptors
- FlipperKit/FlipperKitLayoutTextSearchable
- FlipperKit/FlipperKitLayoutTextSearchable (0.201.0)
- FlipperKit/FlipperKitNetworkPlugin (0.201.0):
- FlipperKit/Core
- FlipperKit/FlipperKitReactPlugin (0.201.0):
- FlipperKit/Core
- FlipperKit/FlipperKitUserDefaultsPlugin (0.201.0):
- FlipperKit/Core
- FlipperKit/SKIOSNetworkPlugin (0.201.0):
- FlipperKit/Core
- FlipperKit/FlipperKitNetworkPlugin
- fmt (6.2.1)
- glog (0.3.5)
- hermes-engine (0.73.5):
- hermes-engine/Pre-built (= 0.73.5)
- hermes-engine/Pre-built (0.73.5)
- libevent (2.1.12)
- OpenSSL-Universal (1.1.1100)
- RCT-Folly (2022.05.16.00):
- boost
- DoubleConversion
Expand Down Expand Up @@ -946,8 +888,8 @@ PODS:
- React-Mapbuffer (0.73.5):
- glog
- React-debug
- react-native-ts-accountprotection (0.1.0):
- AccountProtection (~> 2.1.0)
- react-native-ts-accountprotection (0.1.2):
- AccountProtection (~> 2.1.12)
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
Expand Down Expand Up @@ -1119,38 +1061,17 @@ PODS:
- React-logger (= 0.73.5)
- React-perflogger (= 0.73.5)
- SocketRocket (0.6.1)
- TSCoreSDK (1.0.21)
- TSCoreSDK (1.0.27)
- Yoga (1.14.0)

DEPENDENCIES:
- boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`)
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
- FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`)
- Flipper (= 0.201.0)
- Flipper-Boost-iOSX (= 1.76.0.1.11)
- Flipper-DoubleConversion (= 3.2.0.1)
- Flipper-Fmt (= 7.1.7)
- Flipper-Folly (= 2.6.10)
- Flipper-Glog (= 0.5.0.5)
- Flipper-PeerTalk (= 0.0.4)
- FlipperKit (= 0.201.0)
- FlipperKit/Core (= 0.201.0)
- FlipperKit/CppBridge (= 0.201.0)
- FlipperKit/FBCxxFollyDynamicConvert (= 0.201.0)
- FlipperKit/FBDefines (= 0.201.0)
- FlipperKit/FKPortForwarding (= 0.201.0)
- FlipperKit/FlipperKitHighlightOverlay (= 0.201.0)
- FlipperKit/FlipperKitLayoutPlugin (= 0.201.0)
- FlipperKit/FlipperKitLayoutTextSearchable (= 0.201.0)
- FlipperKit/FlipperKitNetworkPlugin (= 0.201.0)
- FlipperKit/FlipperKitReactPlugin (= 0.201.0)
- FlipperKit/FlipperKitUserDefaultsPlugin (= 0.201.0)
- FlipperKit/SKIOSNetworkPlugin (= 0.201.0)
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
- hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)
- libevent (~> 2.1.12)
- OpenSSL-Universal (= 1.1.1100)
- RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
- RCT-Folly/Fabric (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
- RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`)
Expand All @@ -1159,7 +1080,6 @@ DEPENDENCIES:
- React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`)
- React-Codegen (from `build/generated/ios`)
- React-Core (from `../node_modules/react-native/`)
- React-Core/DevSupport (from `../node_modules/react-native/`)
- React-Core/RCTWebSocket (from `../node_modules/react-native/`)
- React-CoreModules (from `../node_modules/react-native/React/CoreModules`)
- React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`)
Expand Down Expand Up @@ -1201,18 +1121,8 @@ DEPENDENCIES:
SPEC REPOS:
trunk:
- AccountProtection
- CocoaAsyncSocket
- Flipper
- Flipper-Boost-iOSX
- Flipper-DoubleConversion
- Flipper-Fmt
- Flipper-Folly
- Flipper-Glog
- Flipper-PeerTalk
- FlipperKit
- fmt
- libevent
- OpenSSL-Universal
- SocketRocket
- TSCoreSDK

Expand Down Expand Up @@ -1318,25 +1228,15 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native/ReactCommon/yoga"

SPEC CHECKSUMS:
AccountProtection: 549c37697c3ff4cb50b69c20cd5e4223601812a7
AccountProtection: 871ae6927d64aa608c396b25000be08e6a53d767
boost: d3f49c53809116a5d38da093a8aa78bf551aed09
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953
FBLazyVector: 56e0e498dbb513b96c40bac6284729ba4e62672d
FBReactNativeSpec: 146c741a3f40361f6bc13a4ba284678cbedb5881
Flipper: c7a0093234c4bdd456e363f2f19b2e4b27652d44
Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c
Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30
Flipper-Fmt: 60cbdd92fc254826e61d669a5d87ef7015396a9b
Flipper-Folly: 584845625005ff068a6ebf41f857f468decd26b3
Flipper-Glog: 70c50ce58ddaf67dc35180db05f191692570f446
Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9
FlipperKit: 37525a5d056ef9b93d1578e04bc3ea1de940094f
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2
hermes-engine: 1d1835b2cc54c381909d94d1b3c8e0a2f1a94a0e
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0
RCTRequired: 2544c0f1081a5fa12e108bb8cb40e5f4581ccd87
RCTTypeSafety: 50efabe2b115c11ed03fbf3fd79e2f163ddb5d7c
Expand All @@ -1358,7 +1258,7 @@ SPEC CHECKSUMS:
React-jsinspector: 32db5e364bcae8fca8cdf8891830636275add0c5
React-logger: 0331362115f0f5b392bd7ed14636d1a3ea612479
React-Mapbuffer: 7c35cd53a22d0be04d3f26f7881c7fb7dd230216
react-native-ts-accountprotection: 4338eb8b785a384e1d3b4445e9c884435e131894
react-native-ts-accountprotection: ac24ef89b922a60a07c6cc8cac1ef2241ca62f88
React-nativeconfig: 1166714a4f7ea57a0df5c2cb44fbc70f98d580f9
React-NativeModulesApple: 726664e9829eb5eed8170241000e46ead269a05f
React-perflogger: 0dd9f1725d55f8264b81efadd373fe1d9cca7dc2
Expand All @@ -1380,9 +1280,9 @@ SPEC CHECKSUMS:
React-utils: 987a4526a2fc0acdfaf87888adfe0bf9d0452066
ReactCommon: 2947b0bffd82ea0e58ca7928881152d4c6dae9af
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
TSCoreSDK: e30a537480334e5b9971f955ec3d3cdaa334f0a4
TSCoreSDK: 750f7723e2c8c8e7501f050021674bc30e48de37
Yoga: a716eea57d0d3430219c0a5a233e1e93ee931eb7

PODFILE CHECKSUM: 1447f917ade423bbfebc1fa4bdb3a16dbb406f4c
PODFILE CHECKSUM: f4bf8cd8d354e08c7c833a720648a16bd26f7e54

COCOAPODS: 1.14.2
COCOAPODS: 1.15.2
10 changes: 8 additions & 2 deletions example/ios/TsAccountprotectionExample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,10 @@
"-DFOLLY_USE_LIBCPP=1",
"-DFOLLY_CFG_NO_COROUTINES=1",
);
OTHER_LDFLAGS = "$(inherited) ";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
Expand Down Expand Up @@ -654,7 +657,10 @@
"-DFOLLY_USE_LIBCPP=1",
"-DFOLLY_CFG_NO_COROUTINES=1",
);
OTHER_LDFLAGS = "$(inherited) ";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
Expand Down
29 changes: 15 additions & 14 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { SafeAreaView, Keyboard, Alert, Platform } from 'react-native';

import TSAccountProtectionSDKModule, { TSAccountProtectionSDK } from 'react-native-ts-accountprotection';

Check failure on line 5 in example/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

Replace `·TSAccountProtectionSDK·` with `⏎··TSAccountProtectionSDK,⏎`
import MockServer from './mock-server';

import Login from './screens/login';
Expand All @@ -14,7 +14,7 @@
payerName: string;
payeeName: string;
amount: string;
}

Check failure on line 17 in example/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `;`

export type State = {
currentScreen: AppScreen;
Expand All @@ -22,38 +22,38 @@
isLoading: boolean;
};

export type Props = {

Check failure on line 25 in example/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

Delete `⏎⏎`

};

const enum AppScreen {
Login = 'Login',

Check warning on line 30 in example/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

'Login' is already declared in the upper scope on line 8 column 8
AuthenticatedUser = 'AuthenticatedUser'

Check warning on line 31 in example/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

'AuthenticatedUser' is already declared in the upper scope on line 9 column 10

Check failure on line 31 in example/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `,`
}

export default class App extends React.Component<Props, State> {

Check failure on line 35 in example/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

Replace `⏎··private·mockServer·=·new·MockServer(config.baseUrl,·config.clientId,·config.secret` with `··private·mockServer·=·new·MockServer(⏎····config.baseUrl,⏎····config.clientId,⏎····config.secret⏎··`
private mockServer = new MockServer(config.baseUrl, config.clientId, config.secret);

constructor(props: Props) {
super(props);
this.state = {
currentScreen: AppScreen.Login,
errorMessage: "",

Check failure on line 42 in example/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

Replace `""` with `''`
isLoading: false

Check failure on line 43 in example/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

Insert `,`
};
}

componentDidMount(): void {
this.onAppReady().catch(e => void e);

Check failure on line 48 in example/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

Replace `e` with `(e)`

Check warning on line 48 in example/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

Expected 'undefined' and instead saw 'void'
}

render() {
return (
<SafeAreaView style={{ flex: 1 }}>

Check warning on line 53 in example/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

Inline style: { flex: 1 }
{

Check failure on line 54 in example/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

Delete `⏎··········`
this.state.currentScreen === AppScreen.Login ? (
<Login onLogin={this.handleLogin} errorMessage={this.state.errorMessage} />

Check failure on line 56 in example/src/App.tsx

View workflow job for this annotation

GitHub Actions / lint

Replace `··<Login·onLogin={this.handleLogin}·errorMessage={this.state.errorMessage}` with `<Login⏎············onLogin={this.handleLogin}⏎············errorMessage={this.state.errorMessage}⏎·········`
) : (
<AuthenticatedUser
onSubmitMoneyTransferRequest={this.handleSubmitMoneyTransferRequest}
Expand All @@ -71,7 +71,7 @@

private onAppReady = async (): Promise<void> => {
// this is for iOS only, Android TSAccountProtectionSDK is initialized from application onCreate.
if(Platform.OS === 'ios'){
if (Platform.OS === 'ios') {
await TSAccountProtectionSDKModule.initializeIOS(config.clientId);
}
}
Expand Down Expand Up @@ -119,17 +119,18 @@
this.convertMoneyTransferDTOToEventOptions(requestDTO)
);

const recommendationResponse = await this.mockServer.fetchRecommendation(triggerActionResponse.actionToken);
console.log("Server returned recomendation for action:");
console.log(recommendationResponse);
const recommendationResponse = await this.mockServer.fetchRecommendation(triggerActionResponse.actionToken);
console.log("Server returned recomendation for action:");
console.log(recommendationResponse);
Alert.alert("Recommendation Received", JSON.stringify(recommendationResponse));

const recomendation = recommendationResponse.recommendation;
if (recomendation) {
const message = `Recommendation: ${recomendation.type} | Risk Score: ${recommendationResponse.risk_score}`;
Alert.alert("Recommendation Received", message);
}
const recomendation = recommendationResponse.recommendation;
if (recomendation) {
const message = `Recommendation: ${recomendation.type} | Risk Score: ${recommendationResponse.risk_score}`;
Alert.alert("Recommendation Received", message);
}

this.setState({ errorMessage: "", isLoading: false });
this.setState({ errorMessage: "", isLoading: false });

} catch (error) {
this.setState({ errorMessage: `${error}`, isLoading: false });
Expand All @@ -139,10 +140,10 @@
private handleTriggerActionLoginExample = async () => {
const triggerActionResponse = await TSAccountProtectionSDKModule.triggerAction(
TSAccountProtectionSDK.TSAction.login,
{
correlationId: "CORRELATION_ID",
claimUserId: "CLAIM_USER_ID",
referenceUserId: "REFERENCE_USER_ID",
{
correlationId: "CORRELATION_ID",
claimUserId: "CLAIM_USER_ID",
referenceUserId: "REFERENCE_USER_ID",
transactionData: undefined
}
)
Expand Down
2 changes: 1 addition & 1 deletion react-native-ts-accountprotection.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Pod::Spec.new do |s|
s.platforms = { :ios => min_ios_version_supported }
s.source = { :git => "https://github.com/TransmitSecurity/react-native-ts-accountprotection.git", :tag => "#{s.version}" }

s.dependency 'AccountProtection', '~> 2.1.0'
s.dependency 'AccountProtection', '~> 2.1.12'
s.source_files = "ios/**/*.{h,m,mm,swift}"

# Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
Expand Down
Loading