-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #613 from threshold-network/coverage-pools-balance
Coverage Pools balance Closes: threshold-network/website#88 Implements the Coverage Pools balance in the dashboard. Note: In the project ([on release branch](https://github.com/threshold-network/token-dashboard/blob/releases/mainnet/v1.10.0/package.json#L14)) we are using `v1.0.0` version of `@keep-network/coverage-pools` which has contracts related to Keep. The T Coverage Pools are in `v2.0.0` version. Since we still use `v1.0.0` version in our dApp to display it in the TVL I've decided to install `v2.0.0` version next to the first one and call it `@threshold-network/coverage-pools`. On the `main` branch they both have `development` tag but on the release one we should set the correct version accordingly.
- Loading branch information
Showing
21 changed files
with
316 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,18 +61,30 @@ REACT_APP_MULTICALL_ADDRESS=$MULTICALL_ADDRESS | |
## Install Görli contracts | ||
|
||
``` | ||
yarn upgrade @threshold-network/solidity-contracts@goerli \ | ||
@keep-network/[email protected] \ | ||
yarn upgrade @keep-network/coverage-pools@goerli \ | ||
@keep-network/ecdsa@goerli \ | ||
@keep-network/keep-core@goerli \ | ||
@keep-network/keep-ecdsa@goerli \ | ||
@keep-network/random-beacon@goerli \ | ||
@keep-network/tbtc@goerli \ | ||
@keep-network/coverage-pools@goerli | ||
@keep-network/tbtc-v2@goerli \ | ||
@keep-network/tbtc-v2.ts@goerli \ | ||
@threshold-network/coverage-pools@npm:@keep-network/coverage-pools@goerli \ | ||
@threshold-network/solidity-contracts@goerli \ | ||
``` | ||
|
||
**NOTE 1:** We provide explicit version of the `keep-core` package, because | ||
using `goerli` tag results in `expected manifest` error - probably caused by bug | ||
in Yarn: https://github.com/yarnpkg/yarn/issues/4731. | ||
**NOTE 1:** We use the same Goerli versions for both | ||
`@keep-network/coverage-pools` and `@threshold-network/coverage-pools`, because | ||
we don't have the newest version of the package on Goerli network, only on the | ||
Mainnet. | ||
|
||
**NOTE 2:** The `token-dashboard` package contains an indirect dependency to | ||
**NOTE 2:** If you encounter an `expected manifest` error while executing this, | ||
then try providing an explicit version of the `keep-core` package: | ||
`@keep-network/[email protected]` | ||
The error is probably caused by a bug in Yarn: | ||
https://github.com/yarnpkg/yarn/issues/4731. | ||
|
||
**NOTE 3:** The `token-dashboard` package contains an indirect dependency to | ||
`@summa-tx/[email protected]` package, which downloads one of its sub-dependencies | ||
via unathenticated `git://` protocol. That protocol is no longer supported by | ||
GitHub. This means that in certain situations installation of the package or | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import { | ||
BoxProps, | ||
Card, | ||
H1, | ||
HStack, | ||
IconProps, | ||
LabelSm, | ||
TextProps, | ||
VStack, | ||
} from "@threshold-network/components" | ||
import { FC } from "react" | ||
import TooltipIcon from "./TooltipIcon" | ||
|
||
export const StatHighlightCard: FC<BoxProps> = ({ children, ...restProps }) => { | ||
return ( | ||
<Card h="100%" w="100%" {...restProps}> | ||
{children} | ||
</Card> | ||
) | ||
} | ||
|
||
export const StatHighlightTitle: FC<{ title: string } & TextProps> = ({ | ||
title, | ||
children, | ||
...restProps | ||
}) => { | ||
return ( | ||
<HStack> | ||
<LabelSm textTransform={"uppercase"} {...restProps}> | ||
{title} | ||
</LabelSm> | ||
{children} | ||
</HStack> | ||
) | ||
} | ||
|
||
export const StatHighlightTitleTooltip: FC< | ||
{ label: string | JSX.Element } & IconProps | ||
> = ({ label, ...restProps }) => { | ||
return ( | ||
<TooltipIcon | ||
color="unset" | ||
label={label} | ||
width="20px" | ||
height="20px" | ||
alignSelf="center" | ||
m="auto" | ||
verticalAlign="text-top" | ||
{...restProps} | ||
/> | ||
) | ||
} | ||
|
||
export const StatHighlightValue: FC<{ value: string & TextProps }> = ({ | ||
value, | ||
...restProps | ||
}) => { | ||
return ( | ||
<H1 mt="10" mb="9" textAlign="center" {...restProps}> | ||
{value} | ||
</H1> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.