@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
|
@@ -248,7 +248,7 @@ var getDepositTickets = exports.getDepositTickets = function getDepositTickets()
|
|
|
248
248
|
depositTickets = _context4.v;
|
|
249
249
|
// Temporarily inject AmlTravelRulePendingUserInput status into every other row
|
|
250
250
|
modifiedTickets = depositTickets.map(function (ticket, index) {
|
|
251
|
-
return index % 2 === 0 ? _objectSpread(_objectSpread({}, ticket), {}, {
|
|
251
|
+
return index % 2 === 0 && ticket.Status !== 'AddressBlacklisted' ? _objectSpread(_objectSpread({}, ticket), {}, {
|
|
252
252
|
Status: 'AmlTravelRulePendingUserInput'
|
|
253
253
|
}) : ticket;
|
|
254
254
|
});
|
|
@@ -667,6 +667,76 @@ describe('depositActions', function () {
|
|
|
667
667
|
}
|
|
668
668
|
}, _callee22);
|
|
669
669
|
})));
|
|
670
|
+
it('should not overwrite the Status of AddressBlacklisted tickets', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee23() {
|
|
671
|
+
return _regenerator().w(function (_context23) {
|
|
672
|
+
while (1) switch (_context23.n) {
|
|
673
|
+
case 0:
|
|
674
|
+
apiActions.setReturnValue('GetDepositTickets', [{
|
|
675
|
+
TicketNumber: 1,
|
|
676
|
+
Status: 'AddressBlacklisted'
|
|
677
|
+
}, {
|
|
678
|
+
TicketNumber: 2,
|
|
679
|
+
Status: 'AddressBlacklisted'
|
|
680
|
+
}, {
|
|
681
|
+
TicketNumber: 3,
|
|
682
|
+
Status: 'AddressBlacklisted'
|
|
683
|
+
}]);
|
|
684
|
+
_context23.n = 1;
|
|
685
|
+
return store.dispatch(actions.getDepositTickets());
|
|
686
|
+
case 1:
|
|
687
|
+
expect(store.getActions()).toContainEqual({
|
|
688
|
+
type: actions.RECEIVE_DEPOSIT_TICKETS,
|
|
689
|
+
payload: [{
|
|
690
|
+
TicketNumber: 1,
|
|
691
|
+
Status: 'AddressBlacklisted'
|
|
692
|
+
}, {
|
|
693
|
+
TicketNumber: 2,
|
|
694
|
+
Status: 'AddressBlacklisted'
|
|
695
|
+
}, {
|
|
696
|
+
TicketNumber: 3,
|
|
697
|
+
Status: 'AddressBlacklisted'
|
|
698
|
+
}]
|
|
699
|
+
});
|
|
700
|
+
case 2:
|
|
701
|
+
return _context23.a(2);
|
|
702
|
+
}
|
|
703
|
+
}, _callee23);
|
|
704
|
+
})));
|
|
705
|
+
it('should still inject AmlTravelRulePendingUserInput into even-index tickets that are not AddressBlacklisted', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee24() {
|
|
706
|
+
return _regenerator().w(function (_context24) {
|
|
707
|
+
while (1) switch (_context24.n) {
|
|
708
|
+
case 0:
|
|
709
|
+
apiActions.setReturnValue('GetDepositTickets', [{
|
|
710
|
+
TicketNumber: 1,
|
|
711
|
+
Status: 'Pending'
|
|
712
|
+
}, {
|
|
713
|
+
TicketNumber: 2,
|
|
714
|
+
Status: 'Pending'
|
|
715
|
+
}, {
|
|
716
|
+
TicketNumber: 3,
|
|
717
|
+
Status: 'AddressBlacklisted'
|
|
718
|
+
}]);
|
|
719
|
+
_context24.n = 1;
|
|
720
|
+
return store.dispatch(actions.getDepositTickets());
|
|
721
|
+
case 1:
|
|
722
|
+
expect(store.getActions()).toContainEqual({
|
|
723
|
+
type: actions.RECEIVE_DEPOSIT_TICKETS,
|
|
724
|
+
payload: [{
|
|
725
|
+
TicketNumber: 1,
|
|
726
|
+
Status: 'AmlTravelRulePendingUserInput'
|
|
727
|
+
}, {
|
|
728
|
+
TicketNumber: 2,
|
|
729
|
+
Status: 'Pending'
|
|
730
|
+
}, {
|
|
731
|
+
TicketNumber: 3,
|
|
732
|
+
Status: 'AddressBlacklisted'
|
|
733
|
+
}]
|
|
734
|
+
});
|
|
735
|
+
case 2:
|
|
736
|
+
return _context24.a(2);
|
|
737
|
+
}
|
|
738
|
+
}, _callee24);
|
|
739
|
+
})));
|
|
670
740
|
});
|
|
671
741
|
describe('createDepositTicket action', function () {
|
|
672
742
|
beforeEach(function () {
|
|
@@ -675,10 +745,10 @@ describe('depositActions', function () {
|
|
|
675
745
|
});
|
|
676
746
|
apiActions.setReturnValue('GetDepositTickets', []);
|
|
677
747
|
});
|
|
678
|
-
it('should call CreateDepositTicket via callAPI', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
748
|
+
it('should call CreateDepositTicket via callAPI', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee25() {
|
|
679
749
|
var depositInfoPayload;
|
|
680
|
-
return _regenerator().w(function (
|
|
681
|
-
while (1) switch (
|
|
750
|
+
return _regenerator().w(function (_context25) {
|
|
751
|
+
while (1) switch (_context25.n) {
|
|
682
752
|
case 0:
|
|
683
753
|
depositInfoPayload = JSON.stringify({
|
|
684
754
|
fullname: 'John Doe',
|
|
@@ -688,7 +758,7 @@ describe('depositActions', function () {
|
|
|
688
758
|
success: true,
|
|
689
759
|
requestCode: 'abcd-efgh-1234-5678'
|
|
690
760
|
});
|
|
691
|
-
|
|
761
|
+
_context25.n = 1;
|
|
692
762
|
return store.dispatch(actions.createDepositTicket({
|
|
693
763
|
ProductId: 1,
|
|
694
764
|
amount: 100,
|
|
@@ -707,15 +777,15 @@ describe('depositActions', function () {
|
|
|
707
777
|
Status: 'New'
|
|
708
778
|
});
|
|
709
779
|
case 2:
|
|
710
|
-
return
|
|
780
|
+
return _context25.a(2);
|
|
711
781
|
}
|
|
712
|
-
},
|
|
782
|
+
}, _callee25);
|
|
713
783
|
})));
|
|
714
784
|
});
|
|
715
|
-
it("should dispatch ".concat(actions.RECEIVE_DEPOSIT_TICKET, " action"), /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
785
|
+
it("should dispatch ".concat(actions.RECEIVE_DEPOSIT_TICKET, " action"), /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee26() {
|
|
716
786
|
var createTicketResponse;
|
|
717
|
-
return _regenerator().w(function (
|
|
718
|
-
while (1) switch (
|
|
787
|
+
return _regenerator().w(function (_context26) {
|
|
788
|
+
while (1) switch (_context26.n) {
|
|
719
789
|
case 0:
|
|
720
790
|
store = getStoreMock({
|
|
721
791
|
UseGetDepositWorkflow: false
|
|
@@ -726,7 +796,7 @@ describe('depositActions', function () {
|
|
|
726
796
|
requestCode: 'abcd-efgh-1234-5678'
|
|
727
797
|
};
|
|
728
798
|
apiActions.setReturnValue('CreateDepositTicket', createTicketResponse);
|
|
729
|
-
|
|
799
|
+
_context26.n = 1;
|
|
730
800
|
return store.dispatch(actions.createDepositTicket({
|
|
731
801
|
ProductId: 1,
|
|
732
802
|
amount: 100,
|
|
@@ -739,14 +809,14 @@ describe('depositActions', function () {
|
|
|
739
809
|
payload: createTicketResponse
|
|
740
810
|
});
|
|
741
811
|
case 2:
|
|
742
|
-
return
|
|
812
|
+
return _context26.a(2);
|
|
743
813
|
}
|
|
744
|
-
},
|
|
814
|
+
}, _callee26);
|
|
745
815
|
})));
|
|
746
|
-
it("should call showSnack if response result is false", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
816
|
+
it("should call showSnack if response result is false", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee27() {
|
|
747
817
|
var createTicketResponse;
|
|
748
|
-
return _regenerator().w(function (
|
|
749
|
-
while (1) switch (
|
|
818
|
+
return _regenerator().w(function (_context27) {
|
|
819
|
+
while (1) switch (_context27.n) {
|
|
750
820
|
case 0:
|
|
751
821
|
store = getStoreMock({
|
|
752
822
|
UseGetDepositWorkflow: false
|
|
@@ -755,7 +825,7 @@ describe('depositActions', function () {
|
|
|
755
825
|
result: false
|
|
756
826
|
};
|
|
757
827
|
apiActions.setReturnValue('CreateDepositTicket', createTicketResponse);
|
|
758
|
-
|
|
828
|
+
_context27.n = 1;
|
|
759
829
|
return store.dispatch(actions.createDepositTicket({
|
|
760
830
|
ProductId: 1,
|
|
761
831
|
amount: 100,
|
|
@@ -765,28 +835,28 @@ describe('depositActions', function () {
|
|
|
765
835
|
case 1:
|
|
766
836
|
expect(snackbarActions.showSnack).toHaveBeenCalled();
|
|
767
837
|
case 2:
|
|
768
|
-
return
|
|
838
|
+
return _context27.a(2);
|
|
769
839
|
}
|
|
770
|
-
},
|
|
840
|
+
}, _callee27);
|
|
771
841
|
})));
|
|
772
842
|
describe('subscribeToDeposits', function () {
|
|
773
|
-
it('should call subscribeToDeposits', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
774
|
-
return _regenerator().w(function (
|
|
775
|
-
while (1) switch (
|
|
843
|
+
it('should call subscribeToDeposits', /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee28() {
|
|
844
|
+
return _regenerator().w(function (_context28) {
|
|
845
|
+
while (1) switch (_context28.n) {
|
|
776
846
|
case 0:
|
|
777
|
-
|
|
847
|
+
_context28.n = 1;
|
|
778
848
|
return store.dispatch(actions.subscribeToDeposits());
|
|
779
849
|
case 1:
|
|
780
850
|
expect(_depositSubscriptionService["default"].subscribe).toHaveBeenCalled();
|
|
781
851
|
case 2:
|
|
782
|
-
return
|
|
852
|
+
return _context28.a(2);
|
|
783
853
|
}
|
|
784
|
-
},
|
|
854
|
+
}, _callee28);
|
|
785
855
|
})));
|
|
786
|
-
it("should dispatch ".concat(actions.ADD_DEPOSIT, " action with update when subscribed"), /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
856
|
+
it("should dispatch ".concat(actions.ADD_DEPOSIT, " action with update when subscribed"), /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee29() {
|
|
787
857
|
var updates, expectedActions;
|
|
788
|
-
return _regenerator().w(function (
|
|
789
|
-
while (1) switch (
|
|
858
|
+
return _regenerator().w(function (_context29) {
|
|
859
|
+
while (1) switch (_context29.n) {
|
|
790
860
|
case 0:
|
|
791
861
|
updates = [];
|
|
792
862
|
expectedActions = [{
|
|
@@ -794,14 +864,14 @@ describe('depositActions', function () {
|
|
|
794
864
|
payload: updates
|
|
795
865
|
}];
|
|
796
866
|
_depositSubscriptionService["default"].setUpdateData(updates);
|
|
797
|
-
|
|
867
|
+
_context29.n = 1;
|
|
798
868
|
return store.dispatch(actions.subscribeToDeposits());
|
|
799
869
|
case 1:
|
|
800
870
|
expect(store.getActions()).toEqual(expectedActions);
|
|
801
871
|
case 2:
|
|
802
|
-
return
|
|
872
|
+
return _context29.a(2);
|
|
803
873
|
}
|
|
804
|
-
},
|
|
874
|
+
}, _callee29);
|
|
805
875
|
})));
|
|
806
876
|
});
|
|
807
877
|
});
|