Skip to content

Commit

Permalink
fix: TagResponseNfcErrorBase -> TagResopnseError
Browse files Browse the repository at this point in the history
  • Loading branch information
whitedogg13 committed May 15, 2021
1 parent e190066 commit 3c44eab
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ declare module 'react-native-nfc-manager' {
// transceive errors
export class TagConnectionLost extends NfcErrorBase {}
export class RetryExceeded extends NfcErrorBase {}
export class TagResponseNfcErrorBase extends Error {}
export class TagResponseError extends NfcErrorBase {}
export class SessionInvalidated extends NfcErrorBase {}
export class TagNotConnected extends NfcErrorBase {}
export class PacketTooLong extends NfcErrorBase {}
Expand Down
2 changes: 1 addition & 1 deletion src/NfcError.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class RadioDisabled extends NfcErrorBase {}
// transceive errors
export class TagConnectionLost extends NfcErrorBase {}
export class RetryExceeded extends NfcErrorBase {}
export class TagResponseNfcErrorBase extends Error {}
export class TagResponseError extends NfcErrorBase {}
export class SessionInvalidated extends NfcErrorBase {}
export class TagNotConnected extends NfcErrorBase {}
export class PacketTooLong extends NfcErrorBase {}
Expand Down
4 changes: 2 additions & 2 deletions src/NfcManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {NdefHandler, NdefStatus} from './NfcTech/NdefHandler';
import {NfcAHandler} from './NfcTech/NfcAHandler';
import {IsoDepHandler} from './NfcTech/IsoDepHandler';
import {
handleNativeException,
buildNfcExceptionIOS,
handleNativeException,
buildNfcExceptionIOS,
UserCancel,
} from './NfcError';

Expand Down
1 change: 1 addition & 0 deletions src/__mocks__/NativeNfcManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const NfcManagerEmitter = {
};

const callNative = jest.fn((...args) => {
// eslint-disable-next-line no-unused-vars
const [methodName, ...rest] = args;
if (_nextError && (!methodName || methodName === _nextErrorMethod)) {
const err = _nextError;
Expand Down

0 comments on commit 3c44eab

Please sign in to comment.