Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
beforeEach(() => {
confirmRetirementDialogStub = sinon.stub().resolves({retirementConfirmation: true});
retirementSuccessfulDialogStub = sinon.stub().resolves();
continueAtlasRetirementDialogStub = sinon.stub().resolves({atlasRetirementConfirmation: true});
retirementStartSuccessfulDialogStub = sinon.stub().resolves();
retirementContinueDialogStub = sinon.stub().resolves();
retirementStopDialogStub = sinon.stub().resolves();
genericErrorDialogStub = sinon.stub().resolves();
atlasModeModelMock = {
getMode: sinon.stub().resolves({mode:'normal'}),
setMode: sinon.stub().resolves(true)
};
onboardMock = {
rolesWrapper: {
onboardedRole: sinon.stub().resolves(constants.APOLLO),
defaultAddress: '0x1234'
},
atlasStakeWrapper: {
isShelteringAny: sinon.stub().resolves(false),
defaultAddress: '0x1234'
},
retire: sinon.stub().resolves()
};
retireActionCall = retireAction(
atlasModeModelMock,
onboardMock,
confirmRetirementDialogStub,
retirementSuccessfulDialogStub,
continueAtlasRetirementDialogStub,
retirementStartSuccessfulDialogStub,
retirementContinueDialogStub,
/*
Copyright: Ambrosus Inc.
Email: tech@ambrosus.com
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
This Source Code Form is “Incompatible With Secondary Licenses”, as defined by the Mozilla Public License, v. 2.0.
*/
import {constants} from 'ambrosus-node-contracts';
export const APOLLO_CODE = constants.APOLLO;
export const HERMES_CODE = constants.HERMES;
export const ATLAS_CODE = constants.ATLAS;
export const NO_ROLE_CODE = constants.NONE;
export const ATLAS_1_STAKE = constants.ATLAS1_STAKE;
export const ATLAS_2_STAKE = constants.ATLAS2_STAKE;
export const ATLAS_3_STAKE = constants.ATLAS3_STAKE;
export const APOLLO = 'Apollo';
export const HERMES = 'Hermes';
export const ATLAS_1 = 'Atlas Zeta';
export const ATLAS_2 = 'Atlas Sigma';
export const ATLAS_3 = 'Atlas Omega';