Skip to content

Commit

Permalink
fix linting & ts errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzamontiel committed Nov 23, 2023
1 parent 95c5ce4 commit b094bd9
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 20 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"luxon": "^3.2.1",
"match-sorter": "^6.3.1",
"preact": "^10.12.1",
"react-daisyui": "^3.0.3",
"react-daisyui": "^4.0.0",
"react-device-detect": "^2.2.3",
"react-hook-form": "^7.43.2",
"react-router-dom": "^6.8.1",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Asset/Selector/Modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const AssetList = ({ assets, onSelect, selected }: AssetListProps): JSX.Element
className="w-full items-center justify-start gap-4 px-3 py-1 border-0 bg-[rgba(0,0,0,.2)] text-left hover:opacity-80 dark:bg-[rgba(255,255,255,.12)]"
>
<span className="relative">
<Avatar size="xs" letters={token.symbol} /* src={token.logoURI} */ shape="circle" className="text-xs" />
<Avatar letters={token.symbol} /* src={token.logoURI} */ shape="circle" className="text-xs " />
{selected == token.id && (
<CheckIcon className="absolute -right-1 -top-1 w-5 h-5 p-[3px] text-white bg-green-600 rounded-full" />
)}
Expand Down
8 changes: 4 additions & 4 deletions src/components/Layout/links.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { ChevronRightIcon } from '@heroicons/react/20/solid';
import { ComponentChildren } from 'preact';
import { HTMLAttributes } from 'preact/compat';
import DashboardIcon from '../../assets/dashboard';
import { NavLinkProps } from 'react-router-dom';
import { GlobalState } from '../../GlobalStateProvider';
import ExternalIcon from '../../assets/ExternalIcon';
import DashboardIcon from '../../assets/dashboard';
import GovernanceIcon from '../../assets/governance';
import NablaIcon from '../../assets/nabla';
import OnrampIcon from '../../assets/onramp';
Expand All @@ -11,15 +12,14 @@ import StakingIcon from '../../assets/staking';
import SwapIcon from '../../assets/swap';
import { config } from '../../config';
import { nablaConfig } from '../../config/apps/nabla';
import { GlobalState } from '../../GlobalStateProvider';
import { TenantName } from '../../models/Tenant';
import ComingSoonTag from './ComingSoonTag';

export type LinkParameter = { isActive?: boolean };
export type BaseLinkItem = {
link: string;
title: ComponentChildren;
props?: Omit<HTMLAttributes<HTMLAnchorElement>, 'className'> & {
props?: Omit<NavLinkProps, 'className'> & {
className?: (params?: LinkParameter) => string;
};
prefix?: ComponentChildren;
Expand Down
7 changes: 4 additions & 3 deletions src/components/Transaction/Settings/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Cog8ToothIcon, QuestionMarkCircleIcon } from '@heroicons/react/24/outline';
import { Button, Dropdown, Input } from 'react-daisyui';
import { InputProps } from 'react-daisyui/dist/Input/Input';
import { config } from '../../../config';

export interface TransactionSettingsProps {
setSlippage: (slippage: number | undefined) => void;
slippageProps: React.HTMLAttributes<HTMLInputElement>;
deadlineProps?: React.HTMLAttributes<HTMLInputElement>;
deadlineProps?: InputProps;
}

const inputCls = 'bg-neutral-100 dark:bg-neutral-900 text-right text-neutral-600 dark:text-neutral-200';
Expand Down Expand Up @@ -39,7 +40,7 @@ const TransactionSettings = ({
min={config.transaction.settings.slippage.min}
max={config.transaction.settings.slippage.max}
placeholder="Auto"
{...slippageProps}
{...deadlineProps}
/>
<div className="absolute right-0 top-0 w-5 h-full flex items-center">%</div>
</div>
Expand All @@ -56,7 +57,7 @@ const TransactionSettings = ({
<Input
size="sm"
bordered
className={`${inputCls} w-20 pr-2`}
className={`${inputCls} w-20 pr-2v `}
type="number"
placeholder="30"
min={config.transaction.settings.deadline.min}
Expand Down
3 changes: 1 addition & 2 deletions src/components/Wallet/WalletConnect/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const WalletConnect = ({ setWalletAccount }: WalletConnectProps) => {
setWalletAccount(await walletConnectService.init(session, chainId));
modal?.closeModal();
setLoading(false);
} catch (error) {
} catch (error: any) {
toast(error, { type: 'error' });
setLoading(false);
}
Expand All @@ -46,7 +46,6 @@ const WalletConnect = ({ setWalletAccount }: WalletConnectProps) => {
setModal(
new WalletConnectModal({
projectId: config.walletConnect.projectId,
walletConnectVersion: 2,
}),
);
}, [provider]);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Wallet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const OpenWallet = ({ dAppName }: { dAppName: string }): JSX.Element => {
return (
<>
{address ? (
<Dropdown vertical="end" end>
<Dropdown vertical="top" end>
<Button
size="sm"
color="ghost"
Expand Down
3 changes: 2 additions & 1 deletion src/hooks/spacewalk/useBridgeSettings.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import _ from 'lodash';
import { StateUpdater, useContext, useEffect, useMemo, useState } from 'preact/compat';
import { useContext, useEffect, useMemo, useState } from 'preact/compat';
import { StateUpdater } from 'preact/hooks';
import { Asset } from 'stellar-sdk';
import { convertCurrencyToStellarAsset } from '../../helpers/spacewalk';
import { stringifyStellarAsset } from '../../helpers/stellar';
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useClipboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function useClipboard() {
await navigator.clipboard.writeText(value);
const message = notificationMessage || `Copied ${value} to clipboard`;
toast(message, { type: 'info' });
} catch (error) {
} catch (error: any) {
toast(error, { type: 'error' });
}
},
Expand Down
22 changes: 16 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5520,6 +5520,15 @@ __metadata:
languageName: node
linkType: hard

"@types/node@npm:^18.14.1":
version: 18.18.12
resolution: "@types/node@npm:18.18.12"
dependencies:
undici-types: "npm:~5.26.4"
checksum: f7c4b95173f4014841d331da5b005ab613351d61498c8dca373cd4365b721a73fd1161e91c965c0f786132594b46e68c92dc1c92d657a7942816f2ea185ae1ba
languageName: node
linkType: hard

"@types/normalize-package-data@npm:^2.4.0, @types/normalize-package-data@npm:^2.4.1, @types/normalize-package-data@npm:^2.4.3":
version: 2.4.4
resolution: "@types/normalize-package-data@npm:2.4.4"
Expand Down Expand Up @@ -14725,6 +14734,7 @@ __metadata:
"@types/jest": "npm:^29.4.0"
"@types/lodash": "npm:^4"
"@types/luxon": "npm:^3.2.0"
"@types/node": "npm:^18.14.1"
"@types/react": "npm:^18.0.28"
"@types/react-table": "npm:^7.7.12"
"@types/testing-library__jest-dom": "npm:^5.14.5"
Expand All @@ -14751,7 +14761,7 @@ __metadata:
postcss: "npm:^8.4.21"
preact: "npm:^10.12.1"
prettier: "npm:^2.8.4"
react-daisyui: "npm:^3.0.3"
react-daisyui: "npm:^4.0.0"
react-device-detect: "npm:^2.2.3"
react-hook-form: "npm:^7.43.2"
react-router-dom: "npm:^6.8.1"
Expand Down Expand Up @@ -15689,15 +15699,15 @@ __metadata:
languageName: node
linkType: hard

"react-daisyui@npm:^3.0.3":
version: 3.1.2
resolution: "react-daisyui@npm:3.1.2"
"react-daisyui@npm:^4.0.0":
version: 4.1.2
resolution: "react-daisyui@npm:4.1.2"
peerDependencies:
daisyui: ^2.51.5
daisyui: ^3.0.22
react: ">=16"
react-dom: ">=16"
tailwindcss: ">=3.2.7"
checksum: 276eed03bb032e798ec9257a9864a2f39fe8f8e45b2e11c62cd99d77025df4dd813ff1b644953fc3fcc44280ac71a811e54ca06562a48e529416753f690ed63d
checksum: 9c39121acf79ee45f2beb30bde0c8a34c112043785d69429d2b5a715a4bd134e8124204f6702405d601b5434ad224ba35b22866891b64912b524ef5cb68d733e
languageName: node
linkType: hard

Expand Down

0 comments on commit b094bd9

Please sign in to comment.