Skip to content

Commit

Permalink
Merge branch 'main' into main-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kpyszkowski committed Jan 11, 2024
2 parents 710a811 + 94b3f2a commit ef56860
Show file tree
Hide file tree
Showing 77 changed files with 28 additions and 5,235 deletions.
20 changes: 20 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
REACT_APP_SUPPORTED_CHAIN_ID=1337
REACT_APP_ETH_HOSTNAME_HTTP=http://localhost:8545
REACT_APP_ETH_HOSTNAME_WS=ws://localhost:8545
REACT_APP_MULTICALL_ADDRESS=$MULTICALL_ADDRESS
REACT_APP_DAPP_DEVELOPMENT_TESTNET_CONTRACTS=$DAPP_DEVELOPMENT_TESTNET_CONTRACTS

REACT_APP_FEATURE_FLAG_TBTC_V2=true
REACT_APP_FEATURE_FLAG_TBTC_V2_REDEMPTION=true
REACT_APP_FEATURE_FLAG_MULTI_APP_STAKING=true
REACT_APP_FEATURE_FLAG_POSTHOG=false
REACT_APP_FEATURE_FLAG_SENTRY=$SENTRY_SUPPORT
REACT_APP_FEATURE_FLAG_LEDGER_LIVE=true
REACT_APP_SENTRY_DSN=$SENTRY_DSN

REACT_APP_ELECTRUM_PROTOCOL=$ELECTRUM_PROTOCOL
REACT_APP_ELECTRUM_HOST=$ELECTRUM_HOST
REACT_APP_ELECTRUM_PORT=$ELECTRUM_PORT
REACT_APP_MOCK_BITCOIN_CLIENT=true

REACT_APP_WALLET_CONNECT_PROJECT_ID=$WALLET_CONNECT_PROJECT_ID
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ cypress/plugins
# Yarn
node_modules/
yarn-error.log

.env
3 changes: 0 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ import {
import { useSentry } from "./hooks/sentry"

const Web3EventHandlerComponent = () => {
useSubscribeToERC20TransferEvent(Token.Keep)
useSubscribeToERC20TransferEvent(Token.Nu)
useSubscribeToERC20TransferEvent(Token.T)
useSubscribeToERC20TransferEvent(Token.TBTCV2)
useSubscribeToDepositRevealedEvent()
useSubscribeToOptimisticMintingFinalizedEvent()
Expand Down
25 changes: 0 additions & 25 deletions src/components/BundledRewardsAlert/index.tsx

This file was deleted.

118 changes: 0 additions & 118 deletions src/components/Forms/TokenAmountForm.tsx

This file was deleted.

1 change: 0 additions & 1 deletion src/components/Forms/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from "./TokenAmountForm"
export * from "./Form"
export * from "./FormikInput"
export * from "./FormikTokenBalanceInput"
30 changes: 0 additions & 30 deletions src/components/Link/SharedLinks.tsx

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/Link/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,4 @@ const Link: FC<LinkProps> = forwardRef(
}
)

export * from "./SharedLinks"

export default Link
26 changes: 0 additions & 26 deletions src/components/NotificationPill/index.tsx

This file was deleted.

63 changes: 0 additions & 63 deletions src/components/StatHighlightCard.tsx

This file was deleted.

14 changes: 1 addition & 13 deletions src/components/TokenBalance.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ComponentType, FC, useMemo } from "react"
import { FC, useMemo } from "react"
import {
BodyLg,
BodySm,
Expand All @@ -10,11 +10,9 @@ import {
useColorModeValue,
Tooltip,
BoxProps,
Icon,
} from "@threshold-network/components"
import { useWeb3React } from "@web3-react/core"
import { formatTokenAmount } from "../utils/formatAmount"
import tokenIconMap, { TokenIcon } from "../static/icons/tokenIconMap"

export interface TokenBalanceProps {
tokenAmount: string | number
Expand All @@ -23,8 +21,6 @@ export interface TokenBalanceProps {
withUSDBalance?: boolean
withSymbol?: boolean
tokenDecimals?: number
icon?: TokenIcon | ComponentType
iconSize?: string
isLarge?: boolean
tokenFormat?: string
withHigherPrecision?: boolean
Expand Down Expand Up @@ -86,8 +82,6 @@ const TokenBalance: FC<TokenBalanceProps & TextProps> = ({
withUSDBalance = false,
withSymbol = false,
tokenDecimals,
icon,
iconSize = "32px",
isLarge,
tokenFormat,
precision,
Expand All @@ -110,12 +104,6 @@ const TokenBalance: FC<TokenBalanceProps & TextProps> = ({
return (
<Box>
<HStack alignItems="center">
{icon && (
<Icon
as={tokenIconMap[icon as TokenIcon] ?? icon}
boxSize={iconSize}
/>
)}{" "}
<BalanceTag {...restProps}>
{shouldRenderTokenAmount ? (
withHigherPrecision ? (
Expand Down
8 changes: 1 addition & 7 deletions src/components/TokenBalanceCard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import { FC } from "react"
import { Token } from "../../enums"
import TokenBalanceCardTemplate from "./TokenBalanceCardTemplate"
import KeepCircleBrand from "../../static/icons/KeepCircleBrand"
import NuCircleBrand from "../../static/icons/NuCircleBrand"
import T from "../../static/icons/Ttoken"
import { useToken } from "../../hooks/useToken"
import { tBTCFillBlack } from "../../static/icons/tBTCFillBlack"
import { TokenBalanceProps } from "../TokenBalance"

export type TokenBalanceCardProps = {
token: Exclude<Token, Token.TBTC>
token: Extract<Token, Token.TBTCV2>
title?: string | JSX.Element
tokenSymbol?: string
withSymbol?: boolean
Expand All @@ -19,9 +16,6 @@ export type TokenBalanceCardProps = {
>

const tokenToIconMap = {
[Token.Keep]: KeepCircleBrand,
[Token.Nu]: NuCircleBrand,
[Token.T]: T,
[Token.TBTCV2]: tBTCFillBlack,
}

Expand Down
Loading

0 comments on commit ef56860

Please sign in to comment.