Open dakkor71 opened 1 year ago
Confirmed this is still the case in ^0.0.10-beta.15
// OK
if (discoverReadersError.code === 'Canceled') return;
// This comparison appears to be unintentional because the types 'CommonError.Failed | CommonError.Unknown' and '"AlreadyDiscovering"' have no overlap.ts(2367)
if (discoverReadersError.code === 'AlreadyDiscovering') {}
// This comparison appears to be unintentional because the types 'CommonError.Failed | CommonError.Unknown' and '"READER_ERROR.READER_BUSY"' have no overlap.
if (discoverReadersError.code === 'READER_ERROR.READER_BUSY') { }
This is also related to https://github.com/stripe/stripe-terminal-react-native/issues/634
Describe the bug
collectPaymentMethod
method (I would also check other methods in this hook) fromuseStripeTerminal
returns an object containing a properror
typed aserror: StripeError;
and it should return values from:In the real world, it is returning:
Because of this issue, we can't use
CommonError
to check which error was returned.Stripe Terminal React Native SDK version
^0.0.1-beta.13
^0.0.1-beta.12