@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.
@@ -923,6 +923,8 @@ function StartScreen(props) {
923
923
  shadow = props.shadow,
924
924
  authRequestId = props.authRequestId,
925
925
  showErrorScreen = props.showErrorScreen,
926
+ smsSent = props.smsSent,
927
+ setSmsSent = props.setSmsSent,
926
928
  test = props.test;
927
929
  var _useState = useState(false),
928
930
  loading = _useState[0],
@@ -946,8 +948,8 @@ function StartScreen(props) {
946
948
  while (1) switch (_context.prev = _context.next) {
947
949
  case 0:
948
950
  setLoading(true);
949
- if (!authRequestId) {
950
- _context.next = 6;
951
+ if (!(authRequestId && !smsSent)) {
952
+ _context.next = 8;
951
953
  break;
952
954
  }
953
955
  _context.next = 4;
@@ -958,12 +960,20 @@ function StartScreen(props) {
958
960
  case 4:
959
961
  response = _context.sent;
960
962
  if (response != null && response.ok) {
963
+ setSmsSent(true);
961
964
  setLoading(false);
962
965
  onContinue();
963
966
  } else {
964
967
  showErrorScreen(response == null ? void 0 : response.statusCode.toString());
965
968
  }
966
- case 6:
969
+ _context.next = 9;
970
+ break;
971
+ case 8:
972
+ if (smsSent) {
973
+ setLoading(false);
974
+ onContinue();
975
+ }
976
+ case 9:
967
977
  case "end":
968
978
  return _context.stop();
969
979
  }
@@ -1199,6 +1209,9 @@ function App(props) {
1199
1209
  var _useState9 = useState(''),
1200
1210
  errorCode = _useState9[0],
1201
1211
  setErrorCode = _useState9[1];
1212
+ var _useState10 = useState(false),
1213
+ smsSent = _useState10[0],
1214
+ setSmsSent = _useState10[1];
1202
1215
  var handleConnectionsScroll = function handleConnectionsScroll(event) {
1203
1216
  setShadow(detectScrollToBottom(event));
1204
1217
  };
@@ -1280,6 +1293,8 @@ function App(props) {
1280
1293
  return setCurrentScreen(2);
1281
1294
  },
1282
1295
  authRequestId: authId,
1296
+ smsSent: smsSent,
1297
+ setSmsSent: setSmsSent,
1283
1298
  test: test
1284
1299
  });
1285
1300
  case 2: