Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup and ordering, part1 #559

Merged
merged 12 commits into from
Apr 2, 2024
2 changes: 1 addition & 1 deletion src/common/WalletGauge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export default function WalletGauge(props: Props) {
<Spinner animation="border" />
<p>Transfer successful, waiting for the transaction to be finalized.</p>
<p>Note that this may take up to 30 seconds. If you want to proceed, you can safely
click on cancel but your transaction may not show up yet.</p>
click on close but your transaction may not show up yet.</p>
</Alert>
}
</Dialog>
Expand Down
5 changes: 0 additions & 5 deletions src/components/identity/IdentityLocRequestDetails.css

This file was deleted.

17 changes: 0 additions & 17 deletions src/components/identity/IdentityLocRequestDetails.test.tsx

This file was deleted.

93 changes: 0 additions & 93 deletions src/components/identity/IdentityLocRequestDetails.tsx

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useCallback } from 'react';
import { useNavigate } from "react-router-dom";
import { requestLocPath } from "./UserRouter";
import Button from '../common/Button';
import { requestLocPath } from "../../wallet-user/UserPaths";
import Button from '../../common/Button';
import { LocType } from "@logion/node-api";

export interface Props {
Expand All @@ -10,7 +10,7 @@ export interface Props {
locType: LocType;
}

export default function LocCreation(props: Props) {
export default function LocRequestButton(props: Props) {
const { locType } = props;
const navigate = useNavigate();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
jest.mock("../logion-chain");
jest.mock("../common/CommonContext");

import ContextualizedWallet from './ContextualizedWallet';
import LegalOfficerDashboard from './LegalOfficerDashboard';
import { DEFAULT_LEGAL_OFFICER } from "../common/TestData";
import { shallowRender, mockAccount } from '../tests';
import { setContextMock } from '../logion-chain/__mocks__/LogionChainMock';
Expand All @@ -14,6 +14,6 @@ test('renders', () => {
]
});
setCurrentAddress(DEFAULT_LEGAL_OFFICER_ACCOUNT);
const tree = shallowRender(<ContextualizedWallet />);
const tree = shallowRender(<LegalOfficerDashboard />);
expect(tree).toMatchSnapshot();
});
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { useLogionChain } from '../logion-chain';
import WarningDialog from 'src/common/WarningDialog';
import { MenuItemData } from 'src/common/MenuItem';

export default function ContextualizedWallet() {
export default function LegalOfficerDashboard() {
const { accounts } = useLogionChain();
const { colorTheme, refresh, availableLegalOfficers, backendConfig } = useCommonContext();
const { refreshRequests, missingSettings, refreshLocs, refreshVotes } = useLegalOfficerContext();
Expand Down
6 changes: 3 additions & 3 deletions src/legal-officer/LegalOfficerRouter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import {
INVITED_CONTRIBUTORS_RELATIVE_PATH,
} from './LegalOfficerPaths';

import Home from './Home';
import RecoveryRequests from './RecoveryRequests';
import Home from './home/Home';
import RecoveryRequests from './recovery/RecoveryRequests';
import Settings from '../settings/Settings';
import RecoveryDetails from "./RecoveryDetails";
import RecoveryDetails from "./recovery/RecoveryDetails";
import Transactions from "../common/Transactions";
import LocDetails, { VoterLocDetails } from "../loc/LocDetails";
import IdentityProtection from './transaction-protection/IdentityProtection';
Expand Down
85 changes: 0 additions & 85 deletions src/legal-officer/LocIdFormGroup.tsx

This file was deleted.

4 changes: 2 additions & 2 deletions src/legal-officer/Main.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useLogionChain } from '../logion-chain';

import { LegalOfficerContextProvider } from './LegalOfficerContext';
import ContextualizedWallet from './ContextualizedWallet';
import LegalOfficerDashboard from './LegalOfficerDashboard';

export default function LegalOfficerWallet() {
const { injectedAccounts } = useLogionChain();
Expand All @@ -12,7 +12,7 @@ export default function LegalOfficerWallet() {

return (
<LegalOfficerContextProvider>
<ContextualizedWallet />
<LegalOfficerDashboard />
</LegalOfficerContextProvider>
);
}
Loading
Loading