mirror of
https://github.com/selfxyz/self.git
synced 2026-04-27 03:01:15 -04:00
Mobile SDK: NFC scanning through SelfClient (#1214)
This commit is contained in:
committed by
GitHub
parent
5d63c60457
commit
8cbb7c252e
@@ -12,7 +12,7 @@ import {
|
||||
SdkEvents,
|
||||
SelfClientProvider as SDKSelfClientProvider,
|
||||
type TrackEventParams,
|
||||
webScannerShim,
|
||||
webNFCScannerShim,
|
||||
type WsConn,
|
||||
} from '@selfxyz/mobile-sdk-alpha';
|
||||
|
||||
@@ -29,7 +29,7 @@ type GlobalCrypto = { crypto?: { subtle?: Crypto['subtle'] } };
|
||||
* Provides a configured Self SDK client instance to all descendants.
|
||||
*
|
||||
* Adapters:
|
||||
* - `webScannerShim` for basic MRZ/QR scanning stubs
|
||||
* - `webNFCScannerShim` for basic NFC scanning stubs on web
|
||||
* - `fetch`/`WebSocket` for network communication
|
||||
* - Web Crypto hashing with a stub signer
|
||||
*/
|
||||
@@ -38,7 +38,7 @@ export const SelfClientProvider = ({ children }: PropsWithChildren) => {
|
||||
const adapters: Adapters = useMemo(
|
||||
() => ({
|
||||
scanner:
|
||||
Platform.OS === 'web' ? webScannerShim : reactNativeScannerAdapter,
|
||||
Platform.OS === 'web' ? webNFCScannerShim : reactNativeScannerAdapter,
|
||||
network: {
|
||||
http: {
|
||||
fetch: (input: RequestInfo, init?: RequestInit) => fetch(input, init),
|
||||
|
||||
Reference in New Issue
Block a user