-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:centrifuge/apps into feat/portfolio…
…-page
- Loading branch information
Showing
169 changed files
with
4,574 additions
and
1,964 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
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,34 @@ | ||
name: "Moonbeam dev (alpha) deployments (manual)" | ||
on: | ||
push: | ||
branches: main | ||
pull_request: | ||
paths: | ||
- '.github/workflows/moonbeam-alpha-deploy.yml' | ||
|
||
jobs: | ||
app-moonbeam-alpha: | ||
uses: ./.github/workflows/centrifuge-app.yml | ||
secrets: inherit | ||
with: | ||
deploy_env: moonbeam-alpha | ||
|
||
|
||
pinning-moonbeam-alpha: | ||
uses: ./.github/workflows/pinning-api.yml | ||
secrets: inherit | ||
with: | ||
deploy_env: moonbeam-alpha | ||
|
||
|
||
onboarding-moonbeam-alpha: | ||
uses: ./.github/workflows/onboarding-api.yml | ||
secrets: inherit | ||
with: | ||
deploy_env: moonbeam-alpha | ||
|
||
# faucet-moonbeam-alpha: | ||
# uses: ./.github/workflows/faucet-api.yml | ||
# secrets: inherit | ||
# with: | ||
# deploy_env: moonbeam-alpha |
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 |
---|---|---|
|
@@ -31,3 +31,4 @@ yarn-error.log | |
!.env.demo | ||
!.env.catalyst | ||
!.env.production | ||
!.env.moonbeam-alpha |
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
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,20 @@ | ||
REACT_APP_COLLATOR_WSS_URL=wss://fullnode.moonbase-dev.cntrfg.com/public-ws | ||
REACT_APP_DEFAULT_NODE_URL=https://pod.moonbeam-alpha.k-f.dev | ||
REACT_APP_DEFAULT_UNLIST_POOLS=true | ||
REACT_APP_FAUCET_URL=https://europe-central2-peak-vista-185616.cloudfunctions.net/faucet-api-moonbean-alpha | ||
REACT_APP_IPFS_GATEWAY=https://centrifuge.mypinata.cloud/ | ||
REACT_APP_IS_DEMO=true | ||
REACT_APP_ONBOARDING_API_URL=https://europe-central2-peak-vista-185616.cloudfunctions.net/onboarding-api-moonbean-alpha | ||
REACT_APP_PINNING_API_URL=https://europe-central2-peak-vista-185616.cloudfunctions.net/pinning-api-moonbean-alpha | ||
REACT_APP_POOL_CREATION_TYPE=immediate | ||
REACT_APP_RELAY_WSS_URL=wss://frag-moonbase-relay-rpc-ws.g.moonbase.moonbeam.network | ||
REACT_APP_SUBQUERY_URL=https://api.subquery.network/sq/centrifuge/pools-demo | ||
REACT_APP_SUBSCAN_URL= | ||
REACT_APP_TINLAKE_NETWORK=goerli | ||
REACT_APP_INFURA_KEY=bf808e7d3d924fbeb74672d9341d0550 | ||
REACT_APP_WHITELISTED_ACCOUNTS= | ||
REACT_APP_NETWORK=centrifuge | ||
REACT_APP_REWARDS_TREE_URL=https://storage.googleapis.com/rad-rewards-trees-kovan-staging/latest.json | ||
REACT_APP_MEMBERLIST_ADMIN_PURE_PROXY=kALwmJutBq95s41U9fWnoApCUgvPqPGTh1GSmFnQh5f9fWo93 | ||
REACT_APP_WALLETCONNECT_ID=c32fa79350803519804a67fcab0b742a | ||
REACT_APP_TINLAKE_SUBGRAPH_URL=https://graph.centrifuge.io/tinlake |
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,92 @@ | ||
import { Box, Stack, Text, TextWithPlaceholder, Tooltip } from '@centrifuge/fabric' | ||
import * as React from 'react' | ||
import { useTheme } from 'styled-components' | ||
import { config } from '../config' | ||
import { formatDate } from '../utils/date' | ||
import { Dec } from '../utils/Decimal' | ||
import { formatBalance } from '../utils/formatting' | ||
import { useListedPools } from '../utils/useListedPools' | ||
import { DataPoint, TotalValueLocked } from './Charts/TotalValueLocked' | ||
import { tooltipText } from './Tooltips' | ||
|
||
export function CardTotalValueLocked() { | ||
const { colors } = useTheme() | ||
const [hovered, setHovered] = React.useState<DataPoint | undefined>(undefined) | ||
const [, listedTokens] = useListedPools() | ||
|
||
const chartHeight = 100 | ||
const balanceProps = { | ||
as: 'strong', | ||
fontSize: [28, 32], | ||
} | ||
const headingProps = { | ||
as: 'h2', | ||
variant: 'heading3', | ||
} | ||
|
||
const totalValueLocked = React.useMemo(() => { | ||
return ( | ||
listedTokens | ||
?.map((tranche) => ({ | ||
valueLocked: tranche.totalIssuance | ||
.toDecimal() | ||
.mul(tranche.tokenPrice?.toDecimal() ?? Dec(0)) | ||
.toNumber(), | ||
})) | ||
.reduce((prev, curr) => prev.add(curr.valueLocked), Dec(0)) ?? Dec(0) | ||
) | ||
}, [listedTokens]) | ||
|
||
return ( | ||
<Box | ||
role="article" | ||
borderRadius="card" | ||
borderStyle="solid" | ||
borderWidth={1} | ||
borderColor="borderSecondary" | ||
p={3} | ||
pb={chartHeight * 0.6} | ||
position="relative" | ||
style={{ | ||
boxShadow: `0px 3px 2px -2px ${colors.borderPrimary}`, | ||
}} | ||
> | ||
<Stack style={{ pointerEvents: 'none' }}> | ||
{hovered ? ( | ||
<> | ||
<Text {...headingProps}> | ||
TVL on{' '} | ||
<time dateTime={new Date(hovered.dateInMilliseconds).toISOString()}> | ||
{formatDate(hovered.dateInMilliseconds)} | ||
</time> | ||
</Text> | ||
<Text {...balanceProps}>{formatBalance(Dec(hovered?.tvl || 0), config.baseCurrency)}</Text> | ||
</> | ||
) : ( | ||
<> | ||
<Tooltip body={tooltipText.tvl.body} style={{ pointerEvents: 'auto' }}> | ||
<Text {...headingProps}>{tooltipText.tvl.label}</Text> | ||
</Tooltip> | ||
<TextWithPlaceholder {...balanceProps} isLoading={!totalValueLocked}> | ||
{formatBalance(Dec(totalValueLocked || 0), config.baseCurrency)} | ||
</TextWithPlaceholder> | ||
</> | ||
)} | ||
</Stack> | ||
|
||
<Box | ||
as="figure" | ||
position="absolute" | ||
right={0} | ||
bottom={0} | ||
width="100%" | ||
height={chartHeight} | ||
overflow="hidden" | ||
borderBottomRightRadius="card" | ||
borderBottomLeftRadius="card" | ||
> | ||
<TotalValueLocked setHovered={setHovered} chainTVL={totalValueLocked} /> | ||
</Box> | ||
</Box> | ||
) | ||
} |
Oops, something went wrong.