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

[UI-666] Integrate lido warehouse packages #82

Open
wants to merge 24 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5662f73
Merge pull request #40 from lidofinance/develop
infoster42 May 3, 2023
5c21727
Merge pull request #51 from lidofinance/develop
infoster42 May 22, 2023
337ff40
Merge pull request #54 from lidofinance/develop
infoster42 May 22, 2023
6c8f55d
Merge pull request #58 from lidofinance/develop
hexnickk4997 May 24, 2023
7f9b286
Merge pull request #62 from lidofinance/develop
infoster42 May 30, 2023
d6e5a0b
Merge pull request #66 from lidofinance/develop
infoster42 Jun 5, 2023
3a5dec0
Merge pull request #72 from lidofinance/develop
infoster42 Jun 23, 2023
4f5debc
Merge pull request #75 from lidofinance/develop
vtrush88 Jul 10, 2023
972fda4
Merge pull request #79 from lidofinance/develop
infoster42 Jul 20, 2023
e5cf71d
Merge pull request #81 from lidofinance/develop
infoster42 Jul 20, 2023
b0028f2
feat: update deps
solidovic Jul 26, 2023
3eeaa37
feat: use wareouse layout
solidovic Jul 26, 2023
bae216b
feat: use `eth-ui-wallet-modal` from warehouse
solidovic Jul 26, 2023
1206dd6
feat: use `ui-primitives` from warehouse
solidovic Jul 26, 2023
a6b43c1
Merge remote-tracking branch 'origin/main' into integrate-lido-wareho…
solidovic Jul 31, 2023
4b0f7a0
fix: types errors
solidovic Jul 31, 2023
c29c7c5
refactor: codestyle
solidovic Jul 31, 2023
826867e
fix: env import for local development
solidovic Aug 1, 2023
1b2df9e
refactor: use ConnectWalletButton instead WalletConnectButton
solidovic Aug 15, 2023
17c6afd
refactor: use ConnectWalletButton instead WalletConnectButton
solidovic Aug 15, 2023
8580fd4
refactor: use ConnectWalletButton instead WalletConnectButton
solidovic Aug 15, 2023
86fa262
refactor: use CHAINS from local
solidovic Aug 15, 2023
8221754
refactor: not use fallback fo FormatToken and TokenToWallet
solidovic Aug 15, 2023
93131f8
chore: update warehouse pkgs
solidovic Aug 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config/rpc.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CHAINS } from 'config/chains';
import getConfig from 'next/config';
import { CHAINS } from 'config/chains';

const { serverRuntimeConfig } = getConfig();
const { infuraApiKey, alchemyApiKey } = serverRuntimeConfig;
Expand Down
4 changes: 2 additions & 2 deletions features/aragon/aragonFormDisconnected.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { ConnectWalletButton } from '@lidofinance/eth-ui-wallet-modal';
import { InputGroupStyled, InputNumber, Main } from 'shared/ui';
import { WalletConnect } from 'features/walletModal';

export const AragonFormDisconnected = () => {
return (
<Main.Card>
<InputGroupStyled fullwidth>
<InputNumber fullwidth label="Vote ID" disabled />
</InputGroupStyled>
<WalletConnect fullwidth />
<ConnectWalletButton fullwidth />
</Main.Card>
);
};
9 changes: 6 additions & 3 deletions features/aragon/aragonWallet.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import { useWeb3 } from 'reef-knot/web3-react';

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mind removing spaces? All codebase is without them 🤔

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but wants some order in imports

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets make it in next PR (because will be many change files) via https://github.com/azat-io/eslint-plugin-perfectionist

import { InlineLoader } from '@lidofinance/lido-ui';
import { WALLET_MODAL, useModal } from '@lidofinance/eth-ui-wallet-modal';

import { useAccountVestings } from 'features/vesting';
import { MODAL, useModal } from 'features/walletModal';
import { useWeb3 } from 'reef-knot/web3-react';
import { AddressBadge, Main } from 'shared/ui';

import { AddressBadgeWrapper, AragonWalletStyle } from './aragonWalletStyles';

export const AragonWallet = () => {
const { data: vestings } = useAccountVestings();
const { account } = useWeb3();
const { openModal } = useModal(MODAL.wallet);
const { openModal } = useModal(WALLET_MODAL.wallet);

return (
<AragonWalletStyle>
Expand Down
5 changes: 3 additions & 2 deletions features/claim/claimFormDisconnected.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Button, Input } from '@lidofinance/lido-ui';
import { WalletConnect } from 'features/walletModal';
import { ConnectWalletButton } from '@lidofinance/eth-ui-wallet-modal';

import { InputGroupStyled, Main } from 'shared/ui';

export const ClaimFormDisconnected = () => {
Expand All @@ -18,7 +19,7 @@ export const ClaimFormDisconnected = () => {
placeholder="0"
/>
</InputGroupStyled>
<WalletConnect fullwidth />
<ConnectWalletButton fullwidth />
</Main.Card>
);
};
23 changes: 15 additions & 8 deletions features/claim/wallet.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
import { InlineLoader } from '@lidofinance/lido-ui';
import { FC, useMemo } from 'react';
import { useWeb3 } from 'reef-knot/web3-react';

import { InlineLoader } from '@lidofinance/lido-ui';
import { WALLET_MODAL, useModal } from '@lidofinance/eth-ui-wallet-modal';
import { FormatToken, TokenToWallet } from '@lidofinance/eth-ui-primitives';

import {
useAccountVestings,
useVestingsLocked,
useVestingsUnclaimed,
useVestingToken,
} from 'features/vesting';
import { AddressBadge, Main } from 'shared/ui';
import { useLdoPrice } from 'shared/lib/useLdoPrice';

import {
AddressBadgeWrapper,
SecondaryText,
TokensAmount,
AmountTitle,
} from './walletStyles';
import { FC, useMemo } from 'react';
import { AddressBadge, FormatToken, Main, TokenToWallet } from 'shared/ui';
import { MODAL, useModal } from 'features/walletModal';
import { useLdoPrice } from 'shared/lib/useLdoPrice';

export const Wallet: FC = () => {
const { account } = useWeb3();
const { openModal } = useModal(MODAL.wallet);
const { openModal } = useModal(WALLET_MODAL.wallet);
const { data: vestings } = useAccountVestings();
const { data: token, isLoading: tokenIsLoading } = useVestingToken();

Expand Down Expand Up @@ -99,10 +103,13 @@ export const Wallet: FC = () => {
<>
<div>
<TokensAmount>
<FormatToken amount={locked} symbol={token?.symbol} />
<FormatToken
amount={locked}
symbol={token?.symbol || ''}
/>
</TokensAmount>
&nbsp;
<TokenToWallet address={token?.address} />
<TokenToWallet address={token?.address || ''} />
</div>
<div>
{lockedAmountUsdLoading ? (
Expand Down
89 changes: 0 additions & 89 deletions features/header/header.tsx

This file was deleted.

112 changes: 0 additions & 112 deletions features/header/headerStyles.tsx

This file was deleted.

28 changes: 0 additions & 28 deletions features/header/headerWallet.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions features/header/index.ts

This file was deleted.

30 changes: 30 additions & 0 deletions features/headerActions/headerActions.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React, { FC } from 'react';
import { getChainColor } from '@lido-sdk/constants';
import {
WalletButton,
ConnectWalletButton,
} from '@lidofinance/eth-ui-wallet-modal';
import { useWeb3 } from 'reef-knot/web3-react';
import { CHAINS } from 'config/chains';
import { HeaderWalletChainStyle } from './headerActionsStyles';

export const HeaderActions: FC = () => {
const { active, chainId } = useWeb3();

const chainName = chainId ? CHAINS[chainId] : CHAINS.Mainnet;
const testNet = chainId !== CHAINS.Mainnet;
const showNet = testNet && active;

return (
<>
{showNet && (
<HeaderWalletChainStyle
$color={getChainColor(chainId || CHAINS.Mainnet)}
>
{chainName}
</HeaderWalletChainStyle>
)}
{active ? <WalletButton /> : <ConnectWalletButton size="sm" />}
</>
);
};
2 changes: 2 additions & 0 deletions features/headerActions/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './headerActions';
export * from './headerActionsStyles';
1 change: 0 additions & 1 deletion features/layout/index.ts

This file was deleted.

14 changes: 0 additions & 14 deletions features/layout/layout.tsx

This file was deleted.

Loading
Loading