diff --git a/dapp/.eslintrc b/dapp/.eslintrc index 441891d36..c6a162b85 100644 --- a/dapp/.eslintrc +++ b/dapp/.eslintrc @@ -3,6 +3,15 @@ "extends": ["@thesis-co"], "rules": { "import/no-extraneous-dependencies": "off", - "import/prefer-default-export": "off" + "import/prefer-default-export": "off", + // TypeScript allows us to declare props that are non-optional internally + // but are interpreted as optional externally if they have defaultProps + // defined; the following two adjustments disable eslint-plugin-react + // checks that predate this ability for TS and that no longer apply. + "react/default-props-match-prop-types": [ + 2, + { "allowRequiredDefaults": true } + ], + "react/require-default-props": [0] } } diff --git a/dapp/src/components/Header/ConnectWallet.tsx b/dapp/src/components/Header/ConnectWallet.tsx index 8b35a010b..a5c3ef3bb 100644 --- a/dapp/src/components/Header/ConnectWallet.tsx +++ b/dapp/src/components/Header/ConnectWallet.tsx @@ -20,7 +20,7 @@ import { formatSatoshiAmount, truncateAddress } from "../../utils" export type ConnectButtonsProps = { leftIcon: typeof Icon rightIcon: typeof Icon - account: Account | undefined + account?: Account requestAccount: () => Promise }