@alphapoint/apex-web 5.5.6 → 5.8.0
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.
- package/lib/apex.integration.test.js +435 -0
- package/lib/apex.js +37 -1
- package/lib/apex.test.js +138 -0
- package/lib/components/2FA/PasskeyOption.js +126 -0
- package/lib/components/2FA/TwoFactorAuthComponent.js +24 -5
- package/lib/components/2FA/TwoFactorAuthComponent.test.js +94 -0
- package/lib/components/2FA/TwoFactorAuthContainer.js +139 -27
- package/lib/components/2FA/TwoFactorAuthContainer.test.js +627 -0
- package/lib/components/AccountsDropdown/AccountsDropdownComponent.css +6 -0
- package/lib/components/AccountsDropdown/AccountsDropdownComponent.js +6 -2
- package/lib/components/AccountsDropdown/AccountsDropdownComponent.test.js +43 -0
- package/lib/components/AccountsDropdown/AccountsDropdownContainer.js +3 -1
- package/lib/components/BalancesList/BalancesListContainer.js +4 -1
- package/lib/components/ConfirmBlockTradeModal/ConfirmBlockTradeModalContainer.js +34 -6
- package/lib/components/ConfirmBlockTradeModal/ConfirmBlockTradeModalContainer.test.js +298 -0
- package/lib/components/ConfirmOrderModal/ConfirmOrderModalComponent.js +26 -4
- package/lib/components/ConfirmOrderModal/ConfirmOrderModalContainer.js +4 -1
- package/lib/components/DigitalAssets/digitalAssetsPriceLabel.test.js +238 -0
- package/lib/components/EnableTwoFactorAuth/Disable2FAForm.js +22 -7
- package/lib/components/EnableTwoFactorAuth/Disable2FAModal.js +15 -5
- package/lib/components/EnableTwoFactorAuth/Disable2FAModal.test.js +460 -0
- package/lib/components/EnableTwoFactorAuth/Disable2FAModalContainer.js +108 -16
- package/lib/components/EnableTwoFactorAuth/EnableTwoFactorAuthComponent.js +7 -0
- package/lib/components/EnableTwoFactorAuth/EnableTwoFactorAuthComponent.test.js +105 -0
- package/lib/components/EnableTwoFactorAuth/EnableTwoFactorAuthContainerFactory.js +15 -3
- package/lib/components/FusionAuth/UnlinkOAuthIdentityModal.css +13 -0
- package/lib/components/FusionAuth/UnlinkOAuthIdentityModal.js +246 -0
- package/lib/components/FusionAuth/UnlinkOAuthIdentityModal.test.js +521 -0
- package/lib/components/InstrumentPositions/InstrumentPositionsContainer.js +4 -1
- package/lib/components/Login/LoginFormComponent.js +1 -1
- package/lib/components/MarginBalances/MarginDepositWithdraw/MarginDepositModal/MarginDepositFormContainer.js +2 -1
- package/lib/components/NoAccountBanner/NoAccountBanner.css +9 -0
- package/lib/components/NoAccountBanner/NoAccountBanner.js +58 -0
- package/lib/components/NoAccountBanner/index.js +16 -0
- package/lib/components/NoAccountPlaceholder/NoAccountPlaceholder.css +31 -0
- package/lib/components/NoAccountPlaceholder/NoAccountPlaceholder.js +33 -0
- package/lib/components/NoAccountPlaceholder/index.js +9 -0
- package/lib/components/OrderEntryComponents/advancedForm/AdvancedOrderFormContainer.js +2 -0
- package/lib/components/OrderEntryComponents/common/FormAmountFields.js +5 -0
- package/lib/components/OrderEntryComponents/common/TwapScheduleFields.js +98 -0
- package/lib/components/OrderEntryComponents/defaultForm/OrderEntryAnchoring.js +86 -39
- package/lib/components/OrderEntryComponents/defaultForm/OrderEntryAnchoring.test.js +326 -0
- package/lib/components/OrderEntryComponents/defaultForm/OrderEntryContainer.js +10 -2
- package/lib/components/OrderHistoryComponents/DepositsStatus/DepositsStatusComponent.js +1 -1
- package/lib/components/OrderHistoryComponents/DepositsStatus/DepositsStatusComponent.test.js +99 -0
- package/lib/components/OrderHistoryComponents/InactiveOrders/InactiveOrdersComponent.js +1 -1
- package/lib/components/OrderHistoryComponents/OpenOrders/OpenOrdersComponent.js +1 -1
- package/lib/components/OrderHistoryComponents/WithdrawStatus/WithdrawStatusComponent.js +1 -1
- package/lib/components/OrderHistoryComponents/WithdrawStatus/WithdrawStatusComponent.test.js +113 -0
- package/lib/components/Settings/ProfileAndSecurity/PasskeysSettingsCard/PasskeysSettingsCard.css +108 -0
- package/lib/components/Settings/ProfileAndSecurity/PasskeysSettingsCard/PasskeysSettingsCard.test.js +983 -0
- package/lib/components/Settings/ProfileAndSecurity/PasskeysSettingsCard/PasskeysSettingsCardComponent.js +500 -0
- package/lib/components/Settings/ProfileAndSecurity/PasskeysSettingsCard/index.js +9 -0
- package/lib/components/Settings/ProfileAndSecurity/ProfileSettingsCard/ProfileForm/SsoLinkRowComponent.css +4 -0
- package/lib/components/Settings/ProfileAndSecurity/ProfileSettingsCard/ProfileForm/SsoLinkRowComponent.js +29 -17
- package/lib/components/Settings/ProfileAndSecurity/ProfileSettingsCard/ProfileForm/SsoLinkRowComponent.test.js +135 -0
- package/lib/components/Settings/ProfileAndSecurity/TwoFactorAuthSettingsCard/EnableTwoFactorAuth/EnableTwoFactorAuthComponent.js +12 -4
- package/lib/components/Settings/ProfileAndSecurity/TwoFactorAuthSettingsCard/EnableTwoFactorAuth/EnableTwoFactorAuthComponent.test.js +268 -0
- package/lib/components/TwoFactorAuthForm/TwoFactorAuthForm.test.js +475 -0
- package/lib/components/TwoFactorAuthForm/TwoFactorAuthFormComponent.js +26 -5
- package/lib/components/TwoFactorAuthForm/TwoFactorAuthFormContainer.js +50 -32
- package/lib/components/common/APAutoTabInput/APAutoTabInput.js +5 -2
- package/lib/components/common/APSelect/APSelect.js +3 -1
- package/lib/components/common/ErrorBoundary/ErrorBoundary.css +35 -0
- package/lib/components/common/ErrorBoundary/ErrorBoundary.js +87 -0
- package/lib/config/CONFIG.md +4 -0
- package/lib/config/configDefault.json +2 -1
- package/lib/constants/sendOrder/orderEntryFormConstants.js +23 -4
- package/lib/constants/sendOrder/timeInForceConstants.js +3 -1
- package/lib/constants/sendOrder/twapRejectReasons.js +26 -0
- package/lib/helpers/errorTextFormatter.js +13 -4
- package/lib/helpers/errorTextFormatter.test.js +26 -0
- package/lib/helpers/orderHistoryHelper.js +13 -1
- package/lib/helpers/orderHistoryHelper.test.js +58 -13
- package/lib/helpers/passkeyApi.js +228 -0
- package/lib/helpers/passkeyApi.test.js +171 -0
- package/lib/helpers/placeOrderHelper.js +76 -61
- package/lib/helpers/placeOrderHelper.test.js +169 -10
- package/lib/helpers/recalculateOrderHelper.js +4 -1
- package/lib/helpers/recalculateOrderHelper.test.js +88 -2
- package/lib/helpers/twapOrderHelper.js +265 -0
- package/lib/helpers/twapOrderHelper.test.js +467 -0
- package/lib/helpers/twoFactorAuthCancellation.js +38 -0
- package/lib/helpers/webauthnHelper.js +300 -0
- package/lib/helpers/webauthnHelper.test.js +199 -0
- package/lib/hocs/forAccount.js +33 -0
- package/lib/hocs/forAccount.test.js +50 -0
- package/lib/hocs/forVerified.js +16 -2
- package/lib/hocs/withAuthentication.js +3 -1
- package/lib/hocs/withOneSubmission.js +168 -0
- package/lib/index.js +3 -2
- package/lib/layouts/HeaderLayout/HeaderLayout.js +2 -1
- package/lib/layouts/WalletsLayout/WalletsLayoutContainer.js +3 -1
- package/lib/layouts/WalletsLayout/WalletsLayoutContainer.test.js +84 -0
- package/lib/redux/actions/apiActions.js +77 -9
- package/lib/redux/actions/apiActions.test.js +233 -0
- package/lib/redux/actions/authActions.js +514 -198
- package/lib/redux/actions/authActions.test.js +627 -47
- package/lib/redux/actions/depositActions.js +1 -1
- package/lib/redux/actions/depositActions.test.js +100 -30
- package/lib/redux/actions/fusionAuthActions.test.js +265 -84
- package/lib/redux/actions/interestAccountActions.js +12 -3
- package/lib/redux/actions/interestAccountActions.test.js +73 -0
- package/lib/redux/actions/modalActions.js +1 -0
- package/lib/redux/actions/orderEntryActions.blockTrade.test.js +306 -0
- package/lib/redux/actions/orderEntryActions.js +74 -22
- package/lib/redux/actions/orderEntryActions.test.js +63 -11
- package/lib/redux/actions/orderHistoryActions.js +20 -8
- package/lib/redux/actions/orderHistoryActions.test.js +63 -0
- package/lib/redux/actions/userActions.js +379 -179
- package/lib/redux/actions/userActions.test.js +925 -234
- package/lib/redux/actions/withdrawActions.js +62 -29
- package/lib/redux/actions/withdrawActions.test.js +246 -73
- package/lib/redux/actions/withdrawActions.travelRule.test.js +17 -3
- package/lib/redux/margin/actions/marginActions.js +6 -3
- package/lib/redux/margin/actions/marginActions.test.js +166 -0
- package/lib/redux/middlewares/authMiddleware.js +5 -0
- package/lib/redux/middlewares/authMiddleware.test.js +88 -29
- package/lib/redux/reducers/authReducer.js +1 -0
- package/lib/redux/reducers/authReducer.test.js +38 -0
- package/lib/redux/reducers/userReducer.js +10 -0
- package/lib/redux/reducers/userReducer.test.js +29 -0
- package/lib/redux/selectors/orderEntrySelector.js +19 -8
- package/lib/redux/selectors/orderEntrySelector.test.js +209 -0
- package/lib/redux/selectors/orderTotalSelector.test.js +40 -1
- package/lib/redux/selectors/recentActivitySelector.js +8 -2
- package/lib/redux/selectors/recentActivitySelector.v2.test.js +33 -0
- package/lib/redux/selectors/userSelectors.js +6 -1
- package/lib/redux/selectors/userSelectors.test.js +28 -0
- package/lib/services/fms/fms.js +2 -0
- package/lib/services/fms/fms.test.js +35 -0
- package/package.json +4 -4
|
@@ -9,6 +9,7 @@ var _withdrawSubscriptionService = _interopRequireDefault(require("../../service
|
|
|
9
9
|
var _snackbarActions = require("./snackbarActions");
|
|
10
10
|
var _sidePaneActions = require("./sidePaneActions");
|
|
11
11
|
var _errorTextFormatter = require("../../helpers/errorTextFormatter");
|
|
12
|
+
var _twoFactorAuthCancellation = require("../../helpers/twoFactorAuthCancellation");
|
|
12
13
|
var _modalActions = require("./modalActions");
|
|
13
14
|
var _fusionStepUp = require("../../helpers/fusionStepUp");
|
|
14
15
|
var _config = _interopRequireDefault(require("../../config"));
|
|
@@ -219,16 +220,32 @@ var createWithdrawTicket = exports.createWithdrawTicket = function createWithdra
|
|
|
219
220
|
var submitWithdrawTicket = exports.submitWithdrawTicket = function submitWithdrawTicket(payload) {
|
|
220
221
|
return /*#__PURE__*/function () {
|
|
221
222
|
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(dispatch) {
|
|
222
|
-
var withdrawStatus, workflowDetail, _t2;
|
|
223
|
+
var withdrawStatus, workflowDetail, _t2, _t3;
|
|
223
224
|
return _regenerator().w(function (_context4) {
|
|
224
225
|
while (1) switch (_context4.p = _context4.n) {
|
|
225
226
|
case 0:
|
|
227
|
+
_context4.p = 0;
|
|
226
228
|
_context4.n = 1;
|
|
227
|
-
return dispatch((0, _apiActions.callAPI)('CreateWithdrawTicket', payload
|
|
229
|
+
return dispatch((0, _apiActions.callAPI)('CreateWithdrawTicket', payload, {
|
|
230
|
+
rejectOnCancel: true
|
|
231
|
+
}));
|
|
228
232
|
case 1:
|
|
229
233
|
withdrawStatus = _context4.v;
|
|
234
|
+
_context4.n = 4;
|
|
235
|
+
break;
|
|
236
|
+
case 2:
|
|
237
|
+
_context4.p = 2;
|
|
238
|
+
_t2 = _context4.v;
|
|
239
|
+
if (!(0, _twoFactorAuthCancellation.isTwoFactorAuthCancellation)(_t2)) {
|
|
240
|
+
_context4.n = 3;
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
return _context4.a(2, undefined);
|
|
244
|
+
case 3:
|
|
245
|
+
throw _t2;
|
|
246
|
+
case 4:
|
|
230
247
|
if (!(_config["default"].FusionAuth && _config["default"].FusionAuth.enabled && withdrawStatus && withdrawStatus.Authorized === false)) {
|
|
231
|
-
_context4.n =
|
|
248
|
+
_context4.n = 5;
|
|
232
249
|
break;
|
|
233
250
|
}
|
|
234
251
|
(0, _fusionStepUp.stashPendingAction)({
|
|
@@ -236,9 +253,9 @@ var submitWithdrawTicket = exports.submitWithdrawTicket = function submitWithdra
|
|
|
236
253
|
payload: payload
|
|
237
254
|
});
|
|
238
255
|
return _context4.a(2, dispatch((0, _modalActions.openModal)(_modalActions.MODAL_TYPES.FUSION_STEP_UP)));
|
|
239
|
-
case
|
|
240
|
-
if (!(withdrawStatus.result
|
|
241
|
-
_context4.n =
|
|
256
|
+
case 5:
|
|
257
|
+
if (!(!withdrawStatus || withdrawStatus.result !== true)) {
|
|
258
|
+
_context4.n = 6;
|
|
242
259
|
break;
|
|
243
260
|
}
|
|
244
261
|
return _context4.a(2, dispatch((0, _snackbarActions.showSnack)({
|
|
@@ -246,21 +263,21 @@ var submitWithdrawTicket = exports.submitWithdrawTicket = function submitWithdra
|
|
|
246
263
|
text: (0, _errorTextFormatter.formatErrorText)(withdrawStatus),
|
|
247
264
|
type: 'warning'
|
|
248
265
|
})));
|
|
249
|
-
case
|
|
250
|
-
_context4.p =
|
|
266
|
+
case 6:
|
|
267
|
+
_context4.p = 6;
|
|
251
268
|
workflowDetail = JSON.parse(withdrawStatus.detail);
|
|
252
269
|
if (!(_typeof(workflowDetail) === 'object' && workflowDetail.ReplyObject && workflowDetail.ReplyObject !== '0')) {
|
|
253
|
-
_context4.n =
|
|
270
|
+
_context4.n = 7;
|
|
254
271
|
break;
|
|
255
272
|
}
|
|
256
273
|
return _context4.a(2, dispatch(receiveWithdrawWorkflowInfo(workflowDetail)));
|
|
257
|
-
case
|
|
258
|
-
_context4.n =
|
|
274
|
+
case 7:
|
|
275
|
+
_context4.n = 9;
|
|
259
276
|
break;
|
|
260
|
-
case
|
|
261
|
-
_context4.p =
|
|
262
|
-
|
|
263
|
-
case
|
|
277
|
+
case 8:
|
|
278
|
+
_context4.p = 8;
|
|
279
|
+
_t3 = _context4.v;
|
|
280
|
+
case 9:
|
|
264
281
|
dispatch((0, _sidePaneActions.closeWithdrawSidePane)());
|
|
265
282
|
dispatch((0, _snackbarActions.showSnack)({
|
|
266
283
|
id: 'withdrawSuccessSnack',
|
|
@@ -271,7 +288,7 @@ var submitWithdrawTicket = exports.submitWithdrawTicket = function submitWithdra
|
|
|
271
288
|
dispatch(receiveWithdrawTicket(withdrawStatus));
|
|
272
289
|
return _context4.a(2, dispatch(getWithdrawTickets(payload.AccountId, payload.OMSId)));
|
|
273
290
|
}
|
|
274
|
-
}, _callee4, null, [[
|
|
291
|
+
}, _callee4, null, [[6, 8], [0, 2]]);
|
|
275
292
|
}));
|
|
276
293
|
return function (_x7) {
|
|
277
294
|
return _ref5.apply(this, arguments);
|
|
@@ -281,7 +298,7 @@ var submitWithdrawTicket = exports.submitWithdrawTicket = function submitWithdra
|
|
|
281
298
|
var getWithdrawFee = exports.getWithdrawFee = function getWithdrawFee(ProductId, Amount, AccountProviderId) {
|
|
282
299
|
return /*#__PURE__*/function () {
|
|
283
300
|
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(dispatch, getState) {
|
|
284
|
-
var OMSId, AccountId, payload, withdrawFee,
|
|
301
|
+
var OMSId, AccountId, payload, withdrawFee, _t4;
|
|
285
302
|
return _regenerator().w(function (_context5) {
|
|
286
303
|
while (1) switch (_context5.p = _context5.n) {
|
|
287
304
|
case 0:
|
|
@@ -306,8 +323,8 @@ var getWithdrawFee = exports.getWithdrawFee = function getWithdrawFee(ProductId,
|
|
|
306
323
|
break;
|
|
307
324
|
case 3:
|
|
308
325
|
_context5.p = 3;
|
|
309
|
-
|
|
310
|
-
console.error(
|
|
326
|
+
_t4 = _context5.v;
|
|
327
|
+
console.error(_t4);
|
|
311
328
|
case 4:
|
|
312
329
|
if (!(withdrawFee && withdrawFee.result === false)) {
|
|
313
330
|
_context5.n = 5;
|
|
@@ -334,9 +351,9 @@ var cancelWithdrawTicket = exports.cancelWithdrawTicket = function cancelWithdra
|
|
|
334
351
|
var RequestCode = _ref7.RequestCode;
|
|
335
352
|
return /*#__PURE__*/function () {
|
|
336
353
|
var _ref8 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(dispatch, getState) {
|
|
337
|
-
var _getState$user$userIn, OMSId, UserId, AccountId, payload, withdrawStatus;
|
|
354
|
+
var _getState$user$userIn, OMSId, UserId, AccountId, payload, withdrawStatus, _t5;
|
|
338
355
|
return _regenerator().w(function (_context6) {
|
|
339
|
-
while (1) switch (_context6.n) {
|
|
356
|
+
while (1) switch (_context6.p = _context6.n) {
|
|
340
357
|
case 0:
|
|
341
358
|
_getState$user$userIn = getState().user.userInfo, OMSId = _getState$user$userIn.OMSId, UserId = _getState$user$userIn.UserId;
|
|
342
359
|
AccountId = getState().user.selectedAccountId;
|
|
@@ -346,12 +363,28 @@ var cancelWithdrawTicket = exports.cancelWithdrawTicket = function cancelWithdra
|
|
|
346
363
|
AccountId: AccountId,
|
|
347
364
|
RequestCode: RequestCode
|
|
348
365
|
};
|
|
349
|
-
_context6.
|
|
350
|
-
|
|
351
|
-
|
|
366
|
+
_context6.p = 1;
|
|
367
|
+
_context6.n = 2;
|
|
368
|
+
return dispatch((0, _apiActions.callAPI)('CancelWithdraw', payload, {
|
|
369
|
+
rejectOnCancel: true
|
|
370
|
+
}));
|
|
371
|
+
case 2:
|
|
352
372
|
withdrawStatus = _context6.v;
|
|
353
|
-
|
|
354
|
-
|
|
373
|
+
_context6.n = 5;
|
|
374
|
+
break;
|
|
375
|
+
case 3:
|
|
376
|
+
_context6.p = 3;
|
|
377
|
+
_t5 = _context6.v;
|
|
378
|
+
if (!(0, _twoFactorAuthCancellation.isTwoFactorAuthCancellation)(_t5)) {
|
|
379
|
+
_context6.n = 4;
|
|
380
|
+
break;
|
|
381
|
+
}
|
|
382
|
+
return _context6.a(2, undefined);
|
|
383
|
+
case 4:
|
|
384
|
+
throw _t5;
|
|
385
|
+
case 5:
|
|
386
|
+
if (!(!withdrawStatus || withdrawStatus.result !== true)) {
|
|
387
|
+
_context6.n = 6;
|
|
355
388
|
break;
|
|
356
389
|
}
|
|
357
390
|
return _context6.a(2, dispatch((0, _snackbarActions.showSnack)({
|
|
@@ -359,7 +392,7 @@ var cancelWithdrawTicket = exports.cancelWithdrawTicket = function cancelWithdra
|
|
|
359
392
|
text: (0, _errorTextFormatter.formatErrorText)(withdrawStatus),
|
|
360
393
|
type: 'warning'
|
|
361
394
|
})));
|
|
362
|
-
case
|
|
395
|
+
case 6:
|
|
363
396
|
// t('Your withdraw has been successfully canceled')
|
|
364
397
|
dispatch((0, _snackbarActions.showSnack)({
|
|
365
398
|
id: 'cancelWithdrawSuccessSnack',
|
|
@@ -367,10 +400,10 @@ var cancelWithdrawTicket = exports.cancelWithdrawTicket = function cancelWithdra
|
|
|
367
400
|
type: 'success'
|
|
368
401
|
}));
|
|
369
402
|
dispatch(getWithdrawTickets(AccountId, OMSId));
|
|
370
|
-
case
|
|
403
|
+
case 7:
|
|
371
404
|
return _context6.a(2);
|
|
372
405
|
}
|
|
373
|
-
}, _callee6);
|
|
406
|
+
}, _callee6, null, [[1, 3]]);
|
|
374
407
|
}));
|
|
375
408
|
return function (_x0, _x1) {
|
|
376
409
|
return _ref8.apply(this, arguments);
|