Skip to content

Commit

Permalink
fix: linting warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mchappell committed Nov 21, 2024
1 parent 563362c commit d7ec0bc
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const WalletAccounts = ({ isPopup, onBack }: { isPopup: boolean; onBack:
clearSecrets();
closeDropdownAndShowAccountActivated(accountName);
},
[wallet.walletId, activateWallet, accountsData, closeDropdownAndShowAccountActivated, analytics]
[wallet.walletId, activateWallet, accountsData, closeDropdownAndShowAccountActivated, analytics, clearSecrets]
);

const editAccount = useCallback(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const MigrationContainer = ({ children, appMode }: MigrationContainerProp
}
setPassword(target);
},
[isValidPassword]
[isValidPassword, setPassword]
);

const lockAndMigrate = useCallback(async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const SignData = (): React.ReactElement => {
clearSecrets();
setIsLoading(false);
}
}, [password, redirectToSignFailure, redirectToSignSuccess, request]);
}, [password, redirectToSignFailure, redirectToSignSuccess, request, clearSecrets]);

const confirmIsDisabled = useMemo(() => {
if (request.walletType !== WalletType.InMemory) return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const SignTransaction = (): React.ReactElement => {
passphrase.fill(0);
setIsLoading(false);
}
}, [password, analytics, redirectToSignFailure, redirectToSignSuccess, request]);
}, [password, analytics, redirectToSignFailure, redirectToSignSuccess, request, clearSecrets]);

const confirmIsDisabled = useMemo(() => {
if (request.walletType !== WalletType.InMemory) return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const CreateCollateral = ({
clearSecrets();
}
setIsSubmitting(false);
}, [collateralTx, collateralInfo.amount, inMemoryWallet, password, confirm]);
}, [collateralTx, collateralInfo.amount, inMemoryWallet, password, confirm, clearSecrets]);

const confirmButtonLabel = useMemo(() => {
if (isInMemoryWallet) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const UnlockWalletContainer = ({ validateMnemonic }: UnlockWalletContaine
}
setPassword(target);
},
[isValidPassword]
[isValidPassword, setPassword]
);

useEffect(() => {
Expand Down
11 changes: 10 additions & 1 deletion packages/nami/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ import { ChakraProvider, extendTheme } from '@chakra-ui/react';
import { theme } from '../src/ui/theme';
import { Scrollbars } from 'react-custom-scrollbars-2';
import { OutsideHandlesProvider } from '../src/features/outside-handles-provider';
import { CommonOutsideHandlesProvider } from '../src/features/common-outside-handles-provider';
import {
CommonOutsideHandlesProvider,
NetworkConnectionStates,
} from '../src/features/common-outside-handles-provider';
import { WalletType } from '@cardano-sdk/web-extension';

const noop = (async () => {}) as any;
Expand Down Expand Up @@ -64,6 +67,10 @@ export const decorators = [
clearSecrets: noop,
password: { input: noop, value: 'pw' },
setPassword: noop,
passwordConfirmation: { input: noop, value: 'pw' },
repeatedPassword: { input: noop, value: '' },
setPasswordConfirmation: noop,
setRepeatedConfirmation: noop,
}}
delegationTxFee="200"
delegationStoreDelegationTxBuilder={noop}
Expand Down Expand Up @@ -106,6 +113,8 @@ export const decorators = [
sendEventToPostHog={noop}
handleResolver={noop}
withSignTxConfirmation={noop}
useNetworkError={noop}
networkConnection={NetworkConnectionStates.CONNNECTED}
>
<ChakraProvider
theme={extendTheme({
Expand Down

0 comments on commit d7ec0bc

Please sign in to comment.