Skip to content

Commit

Permalink
reader undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
nazli-stripe committed Dec 5, 2023
1 parent 0abfaa3 commit fcd5faf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 0 additions & 2 deletions ios/StripeTerminalReactNative.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1012,8 +1012,6 @@ class StripeTerminalReactNative: RCTEventEmitter, DiscoveryDelegate, BluetoothRe
})
}



sendEvent(withName: ReactNativeConstants.FORWARD_PAYMENT_INTENT.rawValue, body: body)
}

Expand Down
6 changes: 6 additions & 0 deletions src/hooks/useStripeTerminal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ export function useStripeTerminal(props?: Props) {

const didChangeOfflineStatus = useCallback(
({ result }: { result: OfflineStatus }) => {
if (!result.reader?.networkStatus) {
result.reader = undefined;
}
onDidChangeOfflineStatus?.(result);
},
[onDidChangeOfflineStatus]
Expand Down Expand Up @@ -835,6 +838,9 @@ export function useStripeTerminal(props?: Props) {
throw Error(NOT_INITIALIZED_ERROR_MESSAGE);
}
const response = await getOfflineStatus();
if (response.reader?.networkStatus) {
response.reader = undefined;
}
return response;
}, [_isInitialized]);

Expand Down

0 comments on commit fcd5faf

Please sign in to comment.