From a94120597d6649cbd614792c15423a4b9a1ec7c3 Mon Sep 17 00:00:00 2001 From: dtroupe Date: Fri, 24 May 2024 14:15:33 -0700 Subject: [PATCH] financekit --- src/PlaidLink.tsx | 6 +++--- src/fabric/NativePlaidLinkModuleiOS.ts | 4 ++-- src/index.ts | 4 +++- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/PlaidLink.tsx b/src/PlaidLink.tsx index 4f72044a..73a5c849 100644 --- a/src/PlaidLink.tsx +++ b/src/PlaidLink.tsx @@ -133,10 +133,10 @@ export const syncFinanceKit = ( () => { completion() }, - (errorType: FinanceKitErrorType, message: string) => { + (error: FinanceKitError) => { completion({ - type: errorType, - message: message, + type: error.type, + message: error.message, }) } ) diff --git a/src/fabric/NativePlaidLinkModuleiOS.ts b/src/fabric/NativePlaidLinkModuleiOS.ts index b2d0bdce..82aa7711 100644 --- a/src/fabric/NativePlaidLinkModuleiOS.ts +++ b/src/fabric/NativePlaidLinkModuleiOS.ts @@ -3,7 +3,7 @@ import {TurboModuleRegistry, TurboModule} from 'react-native'; import {Int32} from 'react-native/Libraries/Types/CodegenTypes'; import {UnsafeObject} from './fabricUtils'; -import {LinkSuccess, LinkExit, LinkError, FinanceKitErrorType} from '../Types'; +import {LinkSuccess, LinkExit, LinkError, FinanceKitError} from '../Types'; export interface Spec extends TurboModule { create(token: string, noLoadingState: boolean): void; @@ -20,7 +20,7 @@ export interface Spec extends TurboModule { token: string, requestAuthorizationIfNeeded: boolean, onSuccess: (success: void) => void, - onError: (error: FinanceKitErrorType, message: string) => void + onError: (error: FinanceKitError) => void ): void } diff --git a/src/index.ts b/src/index.ts index 71f554ba..cc3f2fd3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,10 +1,11 @@ import { openLink, + PlaidLink, create, open, dismissLink, usePlaidEmitter, - PlaidLink, + syncFinanceKit, } from './PlaidLink'; export * from './Types'; @@ -18,6 +19,7 @@ export { open, dismissLink, usePlaidEmitter, + syncFinanceKit }; // Components