@basiq/connect-auth 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,6 +5,8 @@ interface IProps {
5
5
  shadow: boolean;
6
6
  appName: string;
7
7
  authRequestId?: string;
8
+ smsSent: boolean;
9
+ setSmsSent: (code: boolean) => void;
8
10
  test?: boolean;
9
11
  }
10
12
  declare function StartScreen(props: IProps): JSX.Element;
@@ -931,6 +931,8 @@ function StartScreen(props) {
931
931
  shadow = props.shadow,
932
932
  authRequestId = props.authRequestId,
933
933
  showErrorScreen = props.showErrorScreen,
934
+ smsSent = props.smsSent,
935
+ setSmsSent = props.setSmsSent,
934
936
  test = props.test;
935
937
  var _useState = React.useState(false),
936
938
  loading = _useState[0],
@@ -954,8 +956,8 @@ function StartScreen(props) {
954
956
  while (1) switch (_context.prev = _context.next) {
955
957
  case 0:
956
958
  setLoading(true);
957
- if (!authRequestId) {
958
- _context.next = 6;
959
+ if (!(authRequestId && !smsSent)) {
960
+ _context.next = 8;
959
961
  break;
960
962
  }
961
963
  _context.next = 4;
@@ -966,12 +968,20 @@ function StartScreen(props) {
966
968
  case 4:
967
969
  response = _context.sent;
968
970
  if (response != null && response.ok) {
971
+ setSmsSent(true);
969
972
  setLoading(false);
970
973
  onContinue();
971
974
  } else {
972
975
  showErrorScreen(response == null ? void 0 : response.statusCode.toString());
973
976
  }
974
- case 6:
977
+ _context.next = 9;
978
+ break;
979
+ case 8:
980
+ if (smsSent) {
981
+ setLoading(false);
982
+ onContinue();
983
+ }
984
+ case 9:
975
985
  case "end":
976
986
  return _context.stop();
977
987
  }
@@ -1207,6 +1217,9 @@ function App(props) {
1207
1217
  var _useState9 = React.useState(''),
1208
1218
  errorCode = _useState9[0],
1209
1219
  setErrorCode = _useState9[1];
1220
+ var _useState10 = React.useState(false),
1221
+ smsSent = _useState10[0],
1222
+ setSmsSent = _useState10[1];
1210
1223
  var handleConnectionsScroll = function handleConnectionsScroll(event) {
1211
1224
  setShadow(detectScrollToBottom(event));
1212
1225
  };
@@ -1288,6 +1301,8 @@ function App(props) {
1288
1301
  return setCurrentScreen(2);
1289
1302
  },
1290
1303
  authRequestId: authId,
1304
+ smsSent: smsSent,
1305
+ setSmsSent: setSmsSent,
1291
1306
  test: test
1292
1307
  });
1293
1308
  case 2: