fix lint errors
This commit is contained in:
@@ -1,23 +1,11 @@
|
||||
import React, { useContext } from 'react';
|
||||
import {
|
||||
Box,
|
||||
IconButton,
|
||||
ListItem,
|
||||
ListItemAvatar,
|
||||
ListItemButton,
|
||||
ListItemIcon,
|
||||
ListItemText,
|
||||
Tooltip,
|
||||
Typography,
|
||||
} from '@mui/material';
|
||||
import { Edit } from '@mui/icons-material';
|
||||
import { Box, ListItem, ListItemAvatar, ListItemButton, ListItemText, Tooltip, Typography } from '@mui/material';
|
||||
import { useClipboard } from 'use-clipboard-copy';
|
||||
import { AccountsContext } from 'src/context';
|
||||
import { AccountAvatar } from './AccountAvatar';
|
||||
|
||||
export const AccountItem = ({ name, address }: { name: string; address: string }) => {
|
||||
const { selectedAccount, handleSelectAccount, handleAccountToEdit, setDialogToDisplay, setAccountMnemonic } =
|
||||
useContext(AccountsContext);
|
||||
const { selectedAccount, handleSelectAccount, setDialogToDisplay, setAccountMnemonic } = useContext(AccountsContext);
|
||||
const { copy, copied } = useClipboard({ copiedTimeout: 1000 });
|
||||
return (
|
||||
<ListItem
|
||||
|
||||
@@ -17,15 +17,7 @@ export const MockAccountsProvider: React.FC = ({ children }) => {
|
||||
const [error, setError] = useState<string>();
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
const handleAddAccount = async ({
|
||||
accountName,
|
||||
mnemonic,
|
||||
password,
|
||||
}: {
|
||||
accountName: string;
|
||||
mnemonic: string;
|
||||
password: string;
|
||||
}) => {
|
||||
const handleAddAccount = async ({ accountName }: { accountName: string; mnemonic: string; password: string }) => {
|
||||
setIsLoading(true);
|
||||
try {
|
||||
setAccounts((accs) => [...accs, { address: 'abc123', id: accountName }]);
|
||||
@@ -51,7 +43,7 @@ export const MockAccountsProvider: React.FC = ({ children }) => {
|
||||
}
|
||||
};
|
||||
|
||||
const handleGetAcccountMnemonic = async ({ password, accountName }: { password: string; accountName: string }) => {
|
||||
const handleGetAcccountMnemonic = async ({ accountName }: { password: string; accountName: string }) => {
|
||||
try {
|
||||
setIsLoading(true);
|
||||
const mnemonic = 'test mnemonic';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useCallback, useEffect, useState } from 'react';
|
||||
import { invoke } from '@tauri-apps/api';
|
||||
import { VestingAccountInfo } from 'src/types/rust/vestingaccountinfo';
|
||||
import { Balance, Coin, Network, OriginalVestingResponse, Period } from '../types';
|
||||
import { Balance, Coin, OriginalVestingResponse, Period } from '../types';
|
||||
import {
|
||||
getVestingCoins,
|
||||
getVestedCoins,
|
||||
|
||||
Reference in New Issue
Block a user