File tree 1 file changed +1
-7
lines changed 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change 1
1
import { useEffect } from 'react' ;
2
2
import { openLink , useDeepLinkRedirector , usePlaidEmitter } from 'react-native-plaid-link-sdk' ;
3
3
import Log from '../../libs/Log' ;
4
- import CONST from '../../CONST' ;
5
4
import { plaidLinkPropTypes , plaidLinkDefaultProps } from './plaidLinkPropTypes' ;
6
5
7
6
function PlaidLink ( props ) {
8
7
useDeepLinkRedirector ( ) ;
9
8
usePlaidEmitter ( ( event ) => {
10
9
Log . info ( '[PlaidLink] Handled Plaid Event: ' , false , event ) ;
11
- if ( event . eventName === CONST . PLAID . EVENT . ERROR ) {
12
- props . onError ( event . metadata ) ;
13
- }
10
+ props . onEvent ( event . eventName , event . metadata ) ;
14
11
} ) ;
15
12
useEffect ( ( ) => {
16
13
openLink ( {
@@ -20,9 +17,6 @@ function PlaidLink(props) {
20
17
onSuccess : ( { publicToken, metadata} ) => {
21
18
props . onSuccess ( { publicToken, metadata} ) ;
22
19
} ,
23
- onEvent : ( event , metadata ) => {
24
- props . onEvent ( event , metadata ) ;
25
- } ,
26
20
onExit : ( exitError , metadata ) => {
27
21
Log . info ( '[PlaidLink] Exit: ' , false , { exitError, metadata} ) ;
28
22
props . onExit ( ) ;
You can’t perform that action at this time.
0 commit comments