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

Develop to Main #511

Merged
merged 12 commits into from
Oct 16, 2024
Merged
14 changes: 6 additions & 8 deletions features/wsteth/shared/wallet/wallet.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { memo } from 'react';
import { useAccount } from 'wagmi';
import { useConnectorInfo } from 'reef-knot/core-react';

import { Divider, Text } from '@lidofinance/lido-ui';
import { useSDK } from '@lido-sdk/react';
Expand Down Expand Up @@ -140,23 +139,22 @@ const WalletComponent: WalletComponentType = (props) => {
};

export const Wallet: WalletComponentType = memo((props) => {
const { isLedgerLive } = useConnectorInfo();
const { chainId } = useAccount();
const { isDappActive, isDappActiveOnL2 } = useDappStatus();
const { showLidoMultichainFallback } = useLidoMultichainFallbackCondition();
const { chainName, isMatchDappChainAndWalletChain } = useDappChain();

if (isLedgerLive && chainName === OPTIMISM) {
const error = `Optimism is currently not supported in Ledger Live.`;
return <Fallback error={error} {...props} />;
}

if (isDappActive && !isMatchDappChainAndWalletChain(chainId)) {
const switchToEthereum =
config.defaultChain === CHAINS.Mainnet
? 'Ethereum'
: capitalizeFirstLetter(CHAINS[config.defaultChain]);

const switchToOptimism =
config.supportedChains.indexOf(CHAINS.Optimism) > -1
? capitalizeFirstLetter(OPTIMISM)
: 'Optimism Sepolia';
const error = `Wrong network. Please switch to ${chainName === OPTIMISM ? switchToOptimism : capitalizeFirstLetter(CHAINS[config.defaultChain])} in your wallet to wrap/unwrap.`;
const error = `Wrong network. Please switch to ${chainName === OPTIMISM ? switchToOptimism : switchToEthereum} in your wallet to wrap/unwrap.`;
return <Fallback error={error} {...props} />;
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"react-hook-form": "^7.45.2",
"react-is": "^18.2.0",
"react-transition-group": "^4.4.2",
"reef-knot": "5.6.0",
"reef-knot": "5.7.2",
"remark": "^13.0.0",
"remark-external-links": "^8.0.0",
"remark-html": "^13.0.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ const HeaderWallet: FC = () => {
chainName = 'Optimism Sepolia';
}

const testNet = chainId !== legacySDKCHAINS.Mainnet;
const testNet = !(
chainId === legacySDKCHAINS.Mainnet || chainId === CHAINS.Optimism
);
const showNet = testNet && isDappActive;
const queryTheme = router?.query?.theme;

Expand Down
48 changes: 24 additions & 24 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2898,10 +2898,10 @@
resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.24.tgz#58601079e11784d20f82d0585865bb42305c4df3"
integrity sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ==

"@reef-knot/connect-wallet-modal@5.4.0":
version "5.4.0"
resolved "https://registry.yarnpkg.com/@reef-knot/connect-wallet-modal/-/connect-wallet-modal-5.4.0.tgz#292e763fb5d3a132c554d9bd64bcb02f55732cc8"
integrity sha512-z9cUTg+P180Bi75v8z69yQhkgHinDuewwC+v0NZJ86FR+O+CZYFLLUJGGfA8IYuz/iLFDkzq7/1ZlfMic5sy3A==
"@reef-knot/connect-wallet-modal@5.5.0":
version "5.5.0"
resolved "https://registry.yarnpkg.com/@reef-knot/connect-wallet-modal/-/connect-wallet-modal-5.5.0.tgz#3ef1c1650796f978169998c974e22f20f1fb15a6"
integrity sha512-Mw0rl7wTOMDcJ0QXBbCN2Zw3I25VQeGuOaSejIK0gYDlkff6JVjd4CY4KlGcAsIp9vCGBnJ+8aJPfLG8R0+jow==
dependencies:
"@ledgerhq/hw-app-eth" "^6.37.1"
"@ledgerhq/hw-transport" "^6.31.0"
Expand All @@ -2911,15 +2911,15 @@
"@types/react" "18.2.45"
"@types/react-dom" "18.2.17"

"@reef-knot/core-react@4.2.1":
version "4.2.1"
resolved "https://registry.yarnpkg.com/@reef-knot/core-react/-/core-react-4.2.1.tgz#417d8a56f0ec00a99e186f554a327114fa30f9eb"
integrity sha512-XKlARTzauRhvOeLCH3zBIECaqj/FL/7Vdmw4YhbMDWnIlzYJWjv3NByoHRPtGu2+YeC9uTgbkwxaXSTV/bWznQ==
"@reef-knot/core-react@4.3.0":
version "4.3.0"
resolved "https://registry.yarnpkg.com/@reef-knot/core-react/-/core-react-4.3.0.tgz#1497607e1459299924ff31948a029316030d4677"
integrity sha512-TfyJrft9eQSqy5Vj8JFCRmFByzD/Y6LKsDyfjc4Q5H9kKjj+rE0V4+6fTDre1qWkXzzj+OSjErosqxsjNghOSw==

"@reef-knot/[email protected].0":
version "4.1.0"
resolved "https://registry.yarnpkg.com/@reef-knot/ledger-connector/-/ledger-connector-4.1.0.tgz#f47825ad1d479eda33b3d0c38084627fae3723e1"
integrity sha512-Bh+/AVeDff28etUNXmQnfbnWpAX1RjWxvfqLCCZQFqY1typq66+pF8eXKg05c1hcN9XNxMBxy2OlKCy8U1VttQ==
"@reef-knot/[email protected].2":
version "4.1.2"
resolved "https://registry.yarnpkg.com/@reef-knot/ledger-connector/-/ledger-connector-4.1.2.tgz#11da0fd2e7eb26674488152e2e206b71d5aed387"
integrity sha512-k8pZdAZPhRKslnmV5cZPbVdRbuvtw5/g5PUiBIw7yXebUeRhYMkLXKDijHo+rvGQDuzqu2STwSXcho14Kc+P8w==
dependencies:
"@ethersproject/abstract-signer" "^5.7.0"
"@ethersproject/address" "^5.7.0"
Expand All @@ -2943,10 +2943,10 @@
resolved "https://registry.yarnpkg.com/@reef-knot/types/-/types-2.1.0.tgz#ae9eea6c5c042b7ce4e8ceaf93a5d4cedef08850"
integrity sha512-Ty2D9EJucykIHycitieF2A8biHM/WX8yFA5xJqHoJ5T832X18/Da6gV2gOw9guSbvhnkTCPeFTjIGowOosDeag==

"@reef-knot/[email protected].3":
version "2.1.3"
resolved "https://registry.yarnpkg.com/@reef-knot/ui-react/-/ui-react-2.1.3.tgz#75721bda668ae908761b71c23c7c33fd12323caa"
integrity sha512-lvPDmzWgJKcSPp5ohNNBNEoeSFZ3mAnMqfsmNdLugFEE6O3pz5G7mXbjPEJ/DpODhI8wFJKNclKG3rV3zo87Iw==
"@reef-knot/[email protected].4":
version "2.1.4"
resolved "https://registry.yarnpkg.com/@reef-knot/ui-react/-/ui-react-2.1.4.tgz#20c676c80f73225e6b8be3e30a30b88869749ddb"
integrity sha512-aysfupaz/PMcKywkbg6ByXNDzPbESXR6oNDaBRea3u2fSruHDJhDRmDnpOK/DC+R46irrxFnIuwsuIG05QVNxw==
dependencies:
react-transition-group "4"
use-callback-ref "1.2.5"
Expand Down Expand Up @@ -9773,16 +9773,16 @@ redis-parser@^3.0.0:
dependencies:
redis-errors "^1.0.0"

reef-knot@5.6.0:
version "5.6.0"
resolved "https://registry.yarnpkg.com/reef-knot/-/reef-knot-5.6.0.tgz#da0076d811e83fc7191399ccec7788f1ba5fe16a"
integrity sha512-5JflqvV9nnqUQ+YfgTwW5mZ5ble13Keb3eFSvfgH4VLBoCAUfezrD+9WtVtSCXx/ozEoNPpvE5vNGjrM9GZZSg==
reef-knot@5.7.2:
version "5.7.2"
resolved "https://registry.yarnpkg.com/reef-knot/-/reef-knot-5.7.2.tgz#23dec3539718ffd53638b1670bee57bb5729c37c"
integrity sha512-f+yBBoZ2y4419E0DfcJFQ7Y+tiBymi3WjKbTgMtCy2POzj+H1P4Q+mIPi5YeSPIycLJD1LPSJn4nyxDGdCBI3g==
dependencies:
"@reef-knot/connect-wallet-modal" "5.4.0"
"@reef-knot/core-react" "4.2.1"
"@reef-knot/ledger-connector" "4.1.0"
"@reef-knot/connect-wallet-modal" "5.5.0"
"@reef-knot/core-react" "4.3.0"
"@reef-knot/ledger-connector" "4.1.2"
"@reef-knot/types" "2.1.0"
"@reef-knot/ui-react" "2.1.3"
"@reef-knot/ui-react" "2.1.4"
"@reef-knot/wallets-helpers" "2.1.0"
"@reef-knot/wallets-list" "2.3.0"
"@reef-knot/web3-react" "4.0.1"
Expand Down
Loading