chore: cleanup
This commit is contained in:
parent
61148c8c04
commit
f3c9a9bdcf
@ -11,13 +11,11 @@ import { DEFAULT_MAIN_CHAINS, DEFAULT_TEST_CHAINS } from "./constants";
|
||||
import { AccountAction, getLocalStorageTestnetFlag, setLocaleStorageTestnetFlag } from "./helpers";
|
||||
import Toggle from "./components/Toggle";
|
||||
import RequestModal from "./modals/RequestModal";
|
||||
import PairingModal from "./modals/PairingModal";
|
||||
import PingModal from "./modals/PingModal";
|
||||
import {
|
||||
SAccounts,
|
||||
SAccountsContainer,
|
||||
SButtonContainer,
|
||||
SConnectButton,
|
||||
SContent,
|
||||
SLanding,
|
||||
SLayout,
|
||||
@ -41,13 +39,11 @@ export default function App() {
|
||||
const [modal, setModal] = useState("");
|
||||
|
||||
const closeModal = () => setModal("");
|
||||
const openPairingModal = () => setModal("pairing");
|
||||
const openPingModal = () => setModal("ping");
|
||||
// const openPingModal = () => setModal("ping");
|
||||
const openRequestModal = () => setModal("request");
|
||||
|
||||
// Initialize the WalletConnect client.
|
||||
const {
|
||||
client,
|
||||
session,
|
||||
disconnect,
|
||||
chain,
|
||||
@ -190,12 +186,6 @@ export default function App() {
|
||||
// Renders the appropriate model for the given request that is currently in-flight.
|
||||
const renderModal = () => {
|
||||
switch (modal) {
|
||||
case "pairing":
|
||||
if (typeof client === "undefined") {
|
||||
throw new Error("WalletConnect is not initialized");
|
||||
}
|
||||
// return <PairingModal pairings={client.pairing.values} connect={onEnable} />;
|
||||
return null;
|
||||
case "request":
|
||||
return <RequestModal pending={isRpcRequestPending} result={rpcResult} />;
|
||||
case "ping":
|
||||
@ -222,9 +212,6 @@ export default function App() {
|
||||
{chainOptions.map(chainId => (
|
||||
<Blockchain key={chainId} chainId={chainId} chainData={chainData} onClick={onEnable} />
|
||||
))}
|
||||
{/* <SConnectButton left onClick={onEnable} disabled={!chains.length}>
|
||||
{"Connect"}
|
||||
</SConnectButton> */}
|
||||
</SButtonContainer>
|
||||
</SLanding>
|
||||
) : (
|
||||
|
@ -3,7 +3,7 @@ import styled from "styled-components";
|
||||
|
||||
import Icon from "./Icon";
|
||||
|
||||
import { AssetData, fromWad } from "../helpers";
|
||||
import { AssetData } from "../helpers";
|
||||
|
||||
import eth from "../assets/eth.svg";
|
||||
import erc20 from "../assets/erc20.svg";
|
||||
@ -35,6 +35,7 @@ const SAssetBalance = styled.div`
|
||||
display: flex;
|
||||
`;
|
||||
|
||||
// eslint-disable-next-line
|
||||
function getAssetIcon(asset: AssetData): JSX.Element {
|
||||
if (!!asset.contractAddress) {
|
||||
const src = `https://raw.githubusercontent.com/TrustWallet/tokens/master/tokens/${asset.contractAddress.toLowerCase()}.png`;
|
||||
|
@ -8,13 +8,7 @@ import Column from "./Column";
|
||||
import Loader from "./Loader";
|
||||
|
||||
import { getChainMetadata } from "../chains";
|
||||
import {
|
||||
AccountAction,
|
||||
ellipseAddress,
|
||||
AccountBalances,
|
||||
ChainMetadata,
|
||||
ChainNamespaces,
|
||||
} from "../helpers";
|
||||
import { AccountAction, ellipseAddress, ChainMetadata, ChainNamespaces } from "../helpers";
|
||||
import { fonts } from "../styles";
|
||||
|
||||
interface AccountStyleProps {
|
||||
@ -125,9 +119,6 @@ const Blockchain: FC<PropsWithChildren<BlockchainProps>> = (
|
||||
return null;
|
||||
}
|
||||
const name = chain.meta.name || chain.data.name;
|
||||
const account = typeof address !== "undefined" ? `${chainId}:${address}` : undefined;
|
||||
// const assets =
|
||||
// typeof account !== "undefined" && typeof balances !== "undefined" ? balances[account] : [];
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
|
Loading…
Reference in New Issue
Block a user