Skip to content

[v4.0.0-beta.7] Wrong typing for NfcManager.mifareClassicHandlerAndroid.mifareClassicReadBlock #818

Description

@mi1ton-dprim

Hello! Nice and useful library, thank you!

Typing says:

(property) MifareClassicHandlerAndroid.mifareClassicReadBlock: (block: ArrayLike<number>) => Promise<ArrayLike<number>>

but native side -- nah,

E | ReactNativeJS ▶︎ [Error: Exception in HostFunction: Expected argument 0 of method "mifareClassicReadBlock" to be a number, but got an object]

Also -- NfcManager.mifareClassicHandlerAndroid.mifareClassicAuthenticateA/B expect sector number, but there is only one utility mifareClassicSectorToBlock (yes, block < 32 * 4 ? Math.floor(block / 4) : 32 + Math.floor((block - 128) / 16) is working, but it would be great, if it was out of the box).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions