├── .babelrc ├── .env.template ├── .eslintignore ├── .eslintrc.js ├── .github └── workflows │ ├── ci.yaml │ └── pull_request_template.md ├── .gitignore ├── .htaccess ├── .husky ├── pre-commit └── pre-push ├── .lintstagedrc ├── .nvmrc ├── .prettierignore ├── .prettierrc.js ├── .storybook ├── main.js └── preview.js ├── .stylelintrc.js ├── Dockerfile ├── Dockerfile.local ├── LICENSE ├── README.md ├── app.json ├── docker-compose.yaml ├── ecosystem.json ├── i18next-parser.config.js ├── nginx_default.conf ├── package.json ├── patches └── @stylelint+postcss-css-in-js+0.37.2.patch ├── public ├── coins │ ├── aave.png │ ├── ada.png │ ├── bch.png │ ├── beth.png │ ├── bnb.png │ ├── btcb.png │ ├── busd.png │ ├── cake.png │ ├── dai.png │ ├── doge.png │ ├── dot.png │ ├── eth.png │ ├── fil.png │ ├── link.png │ ├── ltc.png │ ├── luna.png │ ├── matic.png │ ├── sxp.png │ ├── trx.png │ ├── tusd.png │ ├── usdc.png │ ├── usdt.png │ ├── ust.png │ ├── vaave.png │ ├── vada.png │ ├── vai.svg │ ├── vbch.png │ ├── vbeth.png │ ├── vbnb.png │ ├── vbtc.png │ ├── vbusd.png │ ├── vcake.png │ ├── vdai.png │ ├── vdoge.png │ ├── vdot.png │ ├── veth.png │ ├── vfil.png │ ├── vlink.png │ ├── vltc.png │ ├── vluna.png │ ├── vmatic.png │ ├── vrt.svg │ ├── vsxp.png │ ├── vtrx.png │ ├── vtusd.png │ ├── vusdc.png │ ├── vusdt.png │ ├── vust.png │ ├── vxrp.png │ ├── vxvs.png │ ├── xrp.png │ ├── xvs.png │ └── xvs.svg ├── index.html ├── maintainance.html ├── maintenance.jpg ├── manifest.json └── mockServiceWorker.js ├── pull_request_template.md ├── regconfig.json ├── src ├── __mocks__ │ ├── CSSStub.js │ ├── api │ │ ├── governance.json │ │ ├── proposals.json │ │ ├── transactions.json │ │ ├── voterAccounts.json │ │ ├── voterDetails.json │ │ ├── voterHistory.json │ │ └── voters.json │ ├── contracts │ │ ├── comptroller.ts │ │ ├── governanceBravoDelegate.ts │ │ ├── vaiUnitroller.ts │ │ ├── vaiVault.ts │ │ ├── vrtVault.ts │ │ └── xvsVault.ts │ └── models │ │ ├── address.ts │ │ ├── asset.ts │ │ ├── assetsInAccount.ts │ │ ├── marketSnapshots.ts │ │ ├── markets.ts │ │ ├── pools.ts │ │ ├── proposals.ts │ │ ├── transactionReceipt.ts │ │ ├── transactions.ts │ │ ├── vTokenApySimulations.ts │ │ ├── vTokenBalanceTreasury.ts │ │ ├── vTokenBalancesAccount.ts │ │ ├── vaults.ts │ │ ├── voterAccounts.ts │ │ ├── voterDetails.ts │ │ ├── voterHistory.ts │ │ └── voters.ts ├── assets │ ├── fonts │ │ └── proximaNova │ │ │ ├── proximaNovaBold.ttf │ │ │ ├── proximaNovaBold.woff │ │ │ ├── proximaNovaBold.woff2 │ │ │ ├── proximaNovaBoldIt.ttf │ │ │ ├── proximaNovaBoldIt.woff │ │ │ ├── proximaNovaBoldIt.woff2 │ │ │ ├── proximaNovaRegular.ttf │ │ │ ├── proximaNovaRegular.woff │ │ │ ├── proximaNovaRegular.woff2 │ │ │ ├── proximaNovaRegularIt.ttf │ │ │ ├── proximaNovaRegularIt.woff │ │ │ ├── proximaNovaRegularIt.woff2 │ │ │ ├── proximaNovaSemibold.ttf │ │ │ ├── proximaNovaSemibold.woff │ │ │ ├── proximaNovaSemibold.woff2 │ │ │ ├── proximaNovaSemiboldIt.ttf │ │ │ ├── proximaNovaSemiboldIt.woff │ │ │ └── proximaNovaSemiboldIt.woff2 │ ├── img │ │ ├── mark.svg │ │ ├── tokens │ │ │ ├── aave.png │ │ │ ├── ada.png │ │ │ ├── bch.png │ │ │ ├── beth.png │ │ │ ├── bnb.png │ │ │ ├── btc.png │ │ │ ├── btcb.png │ │ │ ├── busd.png │ │ │ ├── cake.png │ │ │ ├── dai.png │ │ │ ├── doge.png │ │ │ ├── dot.png │ │ │ ├── eth.png │ │ │ ├── fil.png │ │ │ ├── link.png │ │ │ ├── ltc.png │ │ │ ├── luna.png │ │ │ ├── matic.png │ │ │ ├── sxp.png │ │ │ ├── trx.png │ │ │ ├── tusd.png │ │ │ ├── usdc.png │ │ │ ├── usdt.png │ │ │ ├── ust.png │ │ │ ├── vaave.png │ │ │ ├── vada.png │ │ │ ├── vai.svg │ │ │ ├── vbch.png │ │ │ ├── vbeth.png │ │ │ ├── vbnb.png │ │ │ ├── vbtc.png │ │ │ ├── vbusd.png │ │ │ ├── vcake.png │ │ │ ├── vdai.png │ │ │ ├── vdoge.png │ │ │ ├── vdot.png │ │ │ ├── veth.png │ │ │ ├── vfil.png │ │ │ ├── vlink.png │ │ │ ├── vltc.png │ │ │ ├── vluna.png │ │ │ ├── vmatic.png │ │ │ ├── vrt.svg │ │ │ ├── vsxp.png │ │ │ ├── vtrx.png │ │ │ ├── vtusd.png │ │ │ ├── vusdc.png │ │ │ ├── vusdt.png │ │ │ ├── vust.png │ │ │ ├── vxrp.png │ │ │ ├── vxvs.png │ │ │ ├── xrp.png │ │ │ └── xvs.svg │ │ ├── venusLogoPure.svg │ │ ├── venusLogoWithText.svg │ │ └── wallets │ │ │ ├── binanceChainWalletLogo.svg │ │ │ ├── bitKeepLogo.svg │ │ │ ├── braveWalletLogo.svg │ │ │ ├── coinbaseWalletLogo.svg │ │ │ ├── infinityWalletLogo.svg │ │ │ ├── ledgerLogo.svg │ │ │ ├── metaMaskLogo.svg │ │ │ ├── operaWalletLogo.svg │ │ │ ├── trustWalletLogo.svg │ │ │ └── walletConnectLogo.svg │ └── styles │ │ ├── App.scss │ │ ├── Global.scss │ │ ├── index.scss │ │ └── normalize.scss ├── clients │ ├── api │ │ ├── __mocks__ │ │ │ └── index.ts │ │ ├── index.ts │ │ ├── mutations │ │ │ ├── approveToken │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useApproveToken.ts │ │ │ ├── borrowVToken │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useBorrowVToken.ts │ │ │ ├── cancelProposal │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useCancelProposal.ts │ │ │ ├── claimVaiVaultReward │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useClaimVaiVaultReward.ts │ │ │ ├── claimVrtVaultReward │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useClaimVrtVaultReward.ts │ │ │ ├── claimXvsReward │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useClaimXvsReward.ts │ │ │ ├── claimXvsVaultReward │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useClaimXvsVaultReward.ts │ │ │ ├── convertVrt │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useConvertVrt.ts │ │ │ ├── createProposal │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useCreateProposal.ts │ │ │ ├── enterMarkets │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useEnterMarkets.ts │ │ │ ├── executeProposal │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useExecuteProposal.ts │ │ │ ├── executeWithdrawalFromXvsVault │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.tsx │ │ │ │ └── useExecuteWithdrawalFromXvsVault.ts │ │ │ ├── exitMarket │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useExitMarket.ts │ │ │ ├── mintVai │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useMintVai.ts │ │ │ ├── queueProposal │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useQueueProposal.ts │ │ │ ├── redeem │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useRedeem.ts │ │ │ ├── redeemUnderlying │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useRedeemUnderlying.ts │ │ │ ├── repayBnb │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useRepayBnb.ts │ │ │ ├── repayNonBnbVToken │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useRepayNonBnbVToken.ts │ │ │ ├── repayVai │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useRepayVai.ts │ │ │ ├── requestWithdrawalFromXvsVault │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.tsx │ │ │ │ └── useRequestWithdrawalFromXvsVault.ts │ │ │ ├── setVoteDelegate │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useSetVoteDelegate.ts │ │ │ ├── stakeInVaiVault │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useStakeInVaiVault.ts │ │ │ ├── stakeInVrtVault │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useStakeInVrtVault.ts │ │ │ ├── stakeInXvsVault │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useStakeInXvsVault.ts │ │ │ ├── supplyBnb │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useSupplyBnb.ts │ │ │ ├── supplyNonBnb │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useSupplyNonBnb.ts │ │ │ ├── useRepayVToken.ts │ │ │ ├── useSupply.ts │ │ │ ├── vote │ │ │ │ ├── castVote.spec.ts │ │ │ │ ├── castVote.ts │ │ │ │ ├── castVoteWithReason.spec.ts │ │ │ │ ├── castVoteWithReason.ts │ │ │ │ ├── useCastVote.ts │ │ │ │ └── useCastVoteWithReason.ts │ │ │ ├── withdrawFromVaiVault │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useWithdrawFromVaiVault.ts │ │ │ ├── withdrawFromVrtVault │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useWithdrawFromVrtVault.ts │ │ │ └── withdrawXvs │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useWithdrawXvs.ts │ │ ├── queries │ │ │ ├── getAllowance │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ ├── setCachedTokenAllowanceToMax.ts │ │ │ │ └── useGetAllowance.ts │ │ │ ├── getAssetsInAccount │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetAssetsInAccount.ts │ │ │ ├── getBalanceOf │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetBalanceOf.ts │ │ │ ├── getBlockNumber │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetBlockNumber.ts │ │ │ ├── getCurrentVotes │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetCurrentVotes.ts │ │ │ ├── getDailyXvs │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetDailyXvs.ts │ │ │ ├── getHypotheticalAccountLiquidity │ │ │ │ ├── index.spec.ts │ │ │ │ └── index.ts │ │ │ ├── getLatestProposalIdByProposer │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetLatestProposalIdByProposer.ts │ │ │ ├── getMarketHistory │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetMarketHistory.ts │ │ │ ├── getMarkets │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetMarkets.ts │ │ │ ├── getMintableVai │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── index.spec.ts.snap │ │ │ │ ├── formatToOutput.ts │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ ├── types.ts │ │ │ │ └── useGetMintableVai.ts │ │ │ ├── getMintedVai │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetMintedVai.ts │ │ │ ├── getProposalEta │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── index.spec.ts.snap │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetProposalEta.ts │ │ │ ├── getProposalState │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetProposalState.ts │ │ │ ├── getProposalThreshold │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetProposalThreshold.ts │ │ │ ├── getProposals │ │ │ │ ├── __snapshots__ │ │ │ │ │ ├── getProposal.spec.ts.snap │ │ │ │ │ └── index.spec.ts.snap │ │ │ │ ├── getProposal.spec.ts │ │ │ │ ├── getProposal.ts │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ ├── types.ts │ │ │ │ ├── useGetProposal.ts │ │ │ │ └── useGetProposals.ts │ │ │ ├── getTransactions │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── index.spec.ts.snap │ │ │ │ ├── formatTransaction.ts │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ ├── types.ts │ │ │ │ └── useGetTransactions.ts │ │ │ ├── getVTokenApySimulations │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── index.spec.ts.snap │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetVTokenApySimulations.ts │ │ │ ├── getVTokenBalanceOf │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetVTokenBalanceOf.ts │ │ │ ├── getVTokenBalancesAll │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── index.spec.ts.snap │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetVTokenBalancesAll.ts │ │ │ ├── getVTokenBorrowRate │ │ │ │ ├── index.spec.ts │ │ │ │ └── index.ts │ │ │ ├── getVTokenCash │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetVTokenCash.ts │ │ │ ├── getVTokenInterestRateModel │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetVTokenInterestRateModel.ts │ │ │ ├── getVTokenSupplyRate │ │ │ │ ├── index.spec.ts │ │ │ │ └── index.ts │ │ │ ├── getVaiTreasuryPercentage │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetVaiTreasuryPercentage.ts │ │ │ ├── getVaiVaultPendingXvs │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetVaiVaultPendingXvs.ts │ │ │ ├── getVaiVaultUserInfo │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── index.spec.ts.snap │ │ │ │ ├── formatToUserInfo.ts │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ ├── types.ts │ │ │ │ └── useGetVaiVaultUserInfo.ts │ │ │ ├── getVenusVaiVaultDailyRate │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetVenusVaiVaultDailyRate.ts │ │ │ ├── getVoteDelegateAddress │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetVoteDelegateAddress.ts │ │ │ ├── getVoteReceipt │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── index.spec.ts.snap │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetVoteReceipt.ts │ │ │ ├── getVoterAccounts │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── index.spec.ts.snap │ │ │ │ ├── formatVoterAccountResponse.ts │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ ├── types.ts │ │ │ │ └── useGetVoterAccounts.ts │ │ │ ├── getVoterDetails │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── index.spec.ts.snap │ │ │ │ ├── formatVoterDetailsResponse.ts │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ ├── types.ts │ │ │ │ └── useGetVoterDetails.ts │ │ │ ├── getVoterHistory │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── index.spec.ts.snap │ │ │ │ ├── formatVoterHistoryResponse.ts │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ ├── types.ts │ │ │ │ └── useGetVoterHistory.ts │ │ │ ├── getVoters │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── index.spec.ts.snap │ │ │ │ ├── formatToVoters.ts │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ ├── types.ts │ │ │ │ └── useGetVoters.ts │ │ │ ├── getVrtConversionEndTime │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetVrtConversionEndTime.ts │ │ │ ├── getVrtConversionRatio │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetVrtConversionRatio.ts │ │ │ ├── getVrtVaultAccruedInterest │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetVrtVaultAccruedInterest.ts │ │ │ ├── getVrtVaultInterestRatePerBlock │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetVrtVaultInterestRatePerBlock.ts │ │ │ ├── getVrtVaultUserInfo │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── index.spec.ts.snap │ │ │ │ ├── formatToUserInfo.ts │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ ├── types.ts │ │ │ │ └── useGetVrtVaultUserInfo.ts │ │ │ ├── getXvsReward │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetXvsReward.ts │ │ │ ├── getXvsVaultLockedDeposits │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── index.spec.ts.snap │ │ │ │ ├── formatToLockedDeposit.ts │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ ├── types.ts │ │ │ │ └── useGetXvsVaultLockedDeposits.ts │ │ │ ├── getXvsVaultPendingReward │ │ │ │ ├── index.spec.ts │ │ │ │ └── index.ts │ │ │ ├── getXvsVaultPoolCount │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetXvsVaultPoolCount.ts │ │ │ ├── getXvsVaultPoolInfo │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── index.spec.ts.snap │ │ │ │ ├── formatToPoolInfo.ts │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ ├── types.ts │ │ │ │ └── useGetXvsVaultPoolInfo.ts │ │ │ ├── getXvsVaultRewardPerBlock │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetXvsVaultRewardPerBlock.ts │ │ │ ├── getXvsVaultTotalAllocationPoints │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetXvsVaultTotalAllocationPoints.ts │ │ │ ├── getXvsVaultUserInfo │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── index.spec.ts.snap │ │ │ │ ├── formatToUserInfo.ts │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ ├── types.ts │ │ │ │ └── useGetXvsVaultUserInfo.ts │ │ │ ├── getXvsWithdrawableAmount │ │ │ │ ├── index.spec.ts │ │ │ │ ├── index.ts │ │ │ │ └── useGetXvsWithdrawableAmount.ts │ │ │ ├── useGetTreasuryTotals │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── index.spec.tsx.snap │ │ │ │ ├── index.spec.tsx │ │ │ │ └── index.ts │ │ │ ├── useGetUserMarketInfo │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── index.spec.tsx.snap │ │ │ │ ├── index.spec.tsx │ │ │ │ └── index.ts │ │ │ └── useGetVaults │ │ │ │ ├── __snapshots__ │ │ │ │ └── index.spec.tsx.snap │ │ │ │ ├── index.spec.tsx │ │ │ │ ├── index.ts │ │ │ │ ├── useGetVaiVault.ts │ │ │ │ ├── useGetVestingVaults │ │ │ │ ├── index.ts │ │ │ │ ├── useGetXvsVaultPoolBalances.ts │ │ │ │ └── useGetXvsVaultPools.ts │ │ │ │ └── useGetVrtVault.ts │ │ └── queryClient.ts │ ├── contracts │ │ ├── __mocks__ │ │ │ └── index.ts │ │ ├── getters.ts │ │ ├── hooks.ts │ │ ├── index.ts │ │ └── types.ts │ └── web3 │ │ ├── Web3Wrapper │ │ ├── Web3ReactManager.tsx │ │ └── index.tsx │ │ ├── addTokenToWallet.ts │ │ ├── connectors.ts │ │ ├── getWeb3NoAccount.ts │ │ ├── index.ts │ │ ├── types.ts │ │ ├── useAuth │ │ ├── index.spec.tsx │ │ ├── index.ts │ │ └── setUpNetwork.ts │ │ ├── useEagerConnect.ts │ │ ├── useInactiveListener.ts │ │ ├── useWeb3.ts │ │ └── walletDetectionUtils.ts ├── components │ ├── Accordion │ │ ├── index.tsx │ │ └── styles.ts │ ├── ActiveVotingProgress │ │ ├── index.tsx │ │ └── styles.tsx │ ├── AuthModal │ │ ├── AccountDetails │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── WalletList │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── constants.ts │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── types.ts │ ├── BscLink │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── Button │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ ├── styles.tsx │ │ └── types.ts │ ├── ButtonGroup │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.tsx │ ├── CellGroup │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── Checkbox │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── Chip │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── ConnectWallet │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── Countdown │ │ ├── index.tsx │ │ └── styles.ts │ ├── Delimiter │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── EllipseAddress │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ ├── styles.ts │ │ └── types.ts │ ├── EnableToken │ │ ├── index.spec.tsx │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── Form │ │ ├── FormikMarkdownEditor.tsx │ │ ├── FormikSubmitButton.tsx │ │ ├── FormikTextField.tsx │ │ ├── FormikTokenTextField.tsx │ │ └── index.ts │ ├── Icon │ │ ├── icons │ │ │ ├── arrowRight.tsx │ │ │ ├── arrowShaft.tsx │ │ │ ├── arrowUp.tsx │ │ │ ├── attention.tsx │ │ │ ├── bubble.tsx │ │ │ ├── burger.tsx │ │ │ ├── check.tsx │ │ │ ├── checkInline.tsx │ │ │ ├── checkboxBorder.tsx │ │ │ ├── checked.tsx │ │ │ ├── chevronLeft.tsx │ │ │ ├── chevronRight.tsx │ │ │ ├── close.tsx │ │ │ ├── convert.tsx │ │ │ ├── copy.tsx │ │ │ ├── countdown.tsx │ │ │ ├── dashboard.tsx │ │ │ ├── discord.tsx │ │ │ ├── dots.tsx │ │ │ ├── exclamation.tsx │ │ │ ├── fee.tsx │ │ │ ├── gauge.tsx │ │ │ ├── github.tsx │ │ │ ├── history.tsx │ │ │ ├── index.ts │ │ │ ├── info.tsx │ │ │ ├── loading.tsx │ │ │ ├── logoMobile.tsx │ │ │ ├── longArrow.tsx │ │ │ ├── magnifier.tsx │ │ │ ├── mark.tsx │ │ │ ├── market.tsx │ │ │ ├── mask.tsx │ │ │ ├── medium.tsx │ │ │ ├── notice.tsx │ │ │ ├── open.tsx │ │ │ ├── person.tsx │ │ │ ├── shield.tsx │ │ │ ├── sort.tsx │ │ │ ├── tokens │ │ │ │ ├── aave.tsx │ │ │ │ ├── ada.tsx │ │ │ │ ├── bch.tsx │ │ │ │ ├── beth.tsx │ │ │ │ ├── bnb.tsx │ │ │ │ ├── btcb.tsx │ │ │ │ ├── busd.tsx │ │ │ │ ├── cake.tsx │ │ │ │ ├── dai.tsx │ │ │ │ ├── doge.tsx │ │ │ │ ├── dot.tsx │ │ │ │ ├── eth.tsx │ │ │ │ ├── fil.tsx │ │ │ │ ├── link.tsx │ │ │ │ ├── ltc.tsx │ │ │ │ ├── luna.tsx │ │ │ │ ├── matic.tsx │ │ │ │ ├── sxp.tsx │ │ │ │ ├── trx.tsx │ │ │ │ ├── tusd.tsx │ │ │ │ ├── usdc.tsx │ │ │ │ ├── usdt.tsx │ │ │ │ ├── ust.tsx │ │ │ │ ├── vai.tsx │ │ │ │ ├── vrt.tsx │ │ │ │ ├── xrp.tsx │ │ │ │ └── xvs.tsx │ │ │ ├── twitter.tsx │ │ │ ├── vaiOutline.tsx │ │ │ ├── vault.tsx │ │ │ ├── venus.tsx │ │ │ ├── vote.tsx │ │ │ ├── vrt.tsx │ │ │ ├── wallet.tsx │ │ │ ├── xvs.tsx │ │ │ ├── xvsOutlined.tsx │ │ │ └── xvsPrediction.tsx │ │ ├── index.stories.tsx │ │ └── index.tsx │ ├── InfoIcon │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── IsolatedAssetWarning │ │ ├── AssetTable │ │ │ ├── index.tsx │ │ │ ├── styles.ts │ │ │ └── testIds.ts │ │ ├── __snapshots__ │ │ │ └── index.spec.tsx.snap │ │ ├── index.spec.tsx │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ ├── styles.ts │ │ └── types.ts │ ├── LabeledInlineContent │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── LayeredValues │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── Layout │ │ ├── ClaimXvsRewardButton │ │ │ ├── index.spec.tsx │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── ConnectButton │ │ │ └── index.tsx │ │ ├── Footer │ │ │ ├── constants.ts │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── Header │ │ │ ├── Breadcrumbs │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── index.spec.tsx.snap │ │ │ │ ├── index.spec.tsx │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── PageContainer │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── Sidebar │ │ │ ├── Link │ │ │ │ └── index.tsx │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── Toolbar │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── constants.tsx │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ ├── styles.ts │ │ ├── testIds.ts │ │ └── types.ts │ ├── LottieAnimation │ │ ├── files │ │ │ ├── index.ts │ │ │ └── spinner.json │ │ └── index.tsx │ ├── LunaUstWarningModal │ │ ├── index.tsx │ │ └── styles.ts │ ├── Markdown │ │ ├── Editor │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ ├── styles-overrides.scss │ │ │ ├── styles.scss │ │ │ └── styles.ts │ │ ├── Viewer │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── index.ts │ │ └── previewOptions.ts │ ├── Modal │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── Notice │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ ├── styles.ts │ │ └── types.ts │ ├── Pagination │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ ├── styles.ts │ │ └── usePagination.ts │ ├── ProgressBar │ │ ├── AccountHealth │ │ │ ├── index.stories.tsx │ │ │ └── index.tsx │ │ ├── LabeledProgressBar │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ └── styles.tsx │ │ ├── PercentageRepresentation │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── ProposalCard │ │ ├── index.tsx │ │ └── styles.ts │ ├── ReadableActionSignature │ │ ├── formatSignature.ts │ │ ├── getContractName.ts │ │ ├── index.tsx │ │ └── styles.ts │ ├── ResetScrollOnRouteChange │ │ └── index.tsx │ ├── RiskLevel │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── Select │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── Spinner │ │ ├── index.tsx │ │ ├── styles.ts │ │ └── testIds.ts │ ├── SuccessfulTransactionModal │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── Table │ │ ├── Head.tsx │ │ ├── TableCards.tsx │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ ├── storiesUtils.tsx │ │ ├── styles.ts │ │ └── types.ts │ ├── Tabs │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.tsx │ ├── TextField │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── Toast │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── Toggle │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── Token │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── TokenGroup │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── TokenTextField │ │ ├── index.spec.tsx │ │ ├── index.stories.tsx │ │ └── index.tsx │ ├── Tooltip │ │ ├── Tooltip.tsx │ │ ├── index.stories.tsx │ │ ├── index.ts │ │ └── styles.ts │ ├── ValueUpdate │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── charts │ │ ├── ApyChart │ │ │ ├── formatToReadableDate.ts │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── InterestRateChart │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── TooltipContent │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ └── styles.ts │ └── index.ts ├── config │ └── index.ts ├── constants │ ├── address.ts │ ├── allowanceAmountWei.ts │ ├── bsc.ts │ ├── compoundMantissa.ts │ ├── contracts │ │ ├── abis │ │ │ ├── bep20.json │ │ │ ├── comptroller.json │ │ │ ├── governorBravoDelegate.json │ │ │ ├── interestModel.json │ │ │ ├── maximillion.json │ │ │ ├── oracle.json │ │ │ ├── vBep20.json │ │ │ ├── vBnbToken.json │ │ │ ├── vaiToken.json │ │ │ ├── vaiUnitroller.json │ │ │ ├── vaiVault.json │ │ │ ├── vault.json │ │ │ ├── venusLens.json │ │ │ ├── vote.json │ │ │ ├── vrtConverter.json │ │ │ ├── vrtToken.json │ │ │ ├── vrtVault.json │ │ │ ├── xvsToken.json │ │ │ ├── xvsVault.json │ │ │ ├── xvsVaultStore.json │ │ │ └── xvsVesting.json │ │ ├── addresses │ │ │ ├── main.json │ │ │ ├── tokens.json │ │ │ └── vBepTokens.json │ │ └── errorReporter.ts │ ├── createProposalThresholdWei.ts │ ├── daysPerYear.ts │ ├── defaultRefetchInterval.ts │ ├── endpoints.ts │ ├── functionKey.ts │ ├── indexedVotingSupportNames.ts │ ├── localStorageKeys.ts │ ├── maxUint256.ts │ ├── placeholderKey.ts │ ├── routing.ts │ ├── safeBorrowLimitPercentage.ts │ ├── smartContractPercentageDecimal.ts │ ├── tokens.ts │ └── xvs.ts ├── containers │ ├── AmountForm │ │ ├── index.tsx │ │ └── validationSchema.ts │ └── MarketTable │ │ ├── index.tsx │ │ ├── styles.ts │ │ ├── types.ts │ │ └── useGenerateData.tsx ├── context │ ├── AuthContext.tsx │ ├── DisableLunaUstWarning │ │ ├── index.spec.tsx │ │ └── index.tsx │ ├── IncludeXvsContext.tsx │ └── SuccessfulTransactionModalContext.tsx ├── errors │ ├── VError.ts │ ├── formatVErrorToReadableString.ts │ ├── index.ts │ ├── interactionErrorPhrases.ts │ ├── transactionErrorPhrases.ts │ ├── transactionErrors.ts │ └── unexpectedErrorPhrases.ts ├── hooks │ ├── __mocks__ │ │ ├── useClaimVaultReward.ts │ │ ├── useStakeInVault.ts │ │ └── useSuccessfulTransactionModal.ts │ ├── responsive.ts │ ├── useBatchRequest.ts │ ├── useBorrowRepayModal │ │ ├── Modal │ │ │ ├── AccountData │ │ │ │ └── index.tsx │ │ │ ├── Borrow │ │ │ │ ├── index.spec.tsx │ │ │ │ ├── index.tsx │ │ │ │ └── testIds.ts │ │ │ ├── Repay │ │ │ │ ├── index.spec.tsx │ │ │ │ ├── index.tsx │ │ │ │ ├── styles.ts │ │ │ │ └── testIds.ts │ │ │ ├── index.spec.tsx │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ └── index.tsx │ ├── useClaimVaultReward.spec.tsx │ ├── useClaimVaultReward.ts │ ├── useCollateral │ │ ├── CollateralConfirmModal │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ └── index.tsx │ ├── useConvertWeiToReadableTokenString.ts │ ├── useCopyToClipboard.ts │ ├── useDailyXvsDistributionInterests.ts │ ├── useHandleTransactionMutation.ts │ ├── useIsMounted.ts │ ├── useStakeInVault.spec.tsx │ ├── useStakeInVault.ts │ ├── useSuccessfulTransactionModal.ts │ ├── useSupplyWithdrawModal │ │ ├── Modal │ │ │ ├── SupplyWithdrawForm.tsx │ │ │ ├── index.spec.tsx │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ └── index.tsx │ └── useVote.ts ├── index.tsx ├── pages │ ├── Account │ │ ├── PoolBreakdown │ │ │ ├── Tables │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ ├── __snapshots__ │ │ │ │ └── index.spec.tsx.snap │ │ │ ├── index.spec.tsx │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ ├── styles.ts │ │ │ ├── testIds.ts │ │ │ └── useExtractData.ts │ │ ├── __snapshots__ │ │ │ └── index.spec.tsx.snap │ │ ├── index.spec.tsx │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ ├── styles.ts │ │ └── testIds.ts │ ├── App.tsx │ ├── ConvertVrt │ │ ├── Convert │ │ │ ├── index.spec.tsx │ │ │ ├── index.tsx │ │ │ └── testIds.ts │ │ ├── Withdraw │ │ │ ├── index.spec.tsx │ │ │ └── index.tsx │ │ ├── constants.ts │ │ ├── index.spec.tsx │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── Dashboard │ │ ├── ConnectWalletBanner │ │ │ ├── illustration.png │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── HigherRiskTokensNotice │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── index.spec.tsx │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── History │ │ ├── Filters │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── HistoryTable │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── index.spec.tsx │ │ ├── index.stories.tsx │ │ └── index.tsx │ ├── Market │ │ ├── Card │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── MarketInfo │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── __snapshots__ │ │ │ └── index.spec.tsx.snap │ │ ├── index.spec.tsx │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ ├── styles.ts │ │ ├── testIds.ts │ │ ├── types.ts │ │ ├── useGetChartData.ts │ │ └── useGetMarketData.ts │ ├── Pool │ │ ├── Table │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── index.spec.tsx │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── Pools │ │ ├── Header │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── PoolTable │ │ │ ├── index.spec.tsx │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── index.spec.tsx │ │ └── index.tsx │ ├── Proposal │ │ ├── Description │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── ProposalSummary │ │ │ ├── Stepper │ │ │ │ ├── index.stories.tsx │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ ├── index.tsx │ │ │ ├── styles.ts │ │ │ └── testIds.ts │ │ ├── VoteModal │ │ │ ├── index.tsx │ │ │ ├── styles.ts │ │ │ └── testIds.ts │ │ ├── VoteSummary │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── index.spec.tsx │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ ├── styles.ts │ │ └── testIds.ts │ ├── Vai │ │ ├── MintVai │ │ │ ├── getReadableFeeVai.ts │ │ │ ├── index.spec.tsx │ │ │ └── index.tsx │ │ ├── RepayVai │ │ │ ├── index.spec.tsx │ │ │ └── index.tsx │ │ ├── constants.ts │ │ ├── index.spec.tsx │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── Vault │ │ ├── TransactionForm │ │ │ ├── __snapshots__ │ │ │ │ └── index.spec.tsx.snap │ │ │ ├── index.spec.tsx │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ ├── styles.ts │ │ │ └── testIds.ts │ │ ├── VaultItem │ │ │ ├── __snapshots__ │ │ │ │ └── index.spec.tsx.snap │ │ │ ├── index.spec.tsx │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ ├── styles.ts │ │ │ └── testIds.ts │ │ ├── __snapshots__ │ │ │ └── index.spec.tsx.snap │ │ ├── index.spec.tsx │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ ├── modals │ │ │ ├── ActionModal │ │ │ │ ├── index.spec.tsx │ │ │ │ ├── index.stories.tsx │ │ │ │ └── index.tsx │ │ │ ├── StakeModal │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── index.spec.tsx.snap │ │ │ │ ├── index.spec.tsx │ │ │ │ ├── index.stories.tsx │ │ │ │ └── index.tsx │ │ │ ├── WithdrawFromVaiVaultModal │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── index.spec.tsx.snap │ │ │ │ ├── index.spec.tsx │ │ │ │ ├── index.stories.tsx │ │ │ │ └── index.tsx │ │ │ ├── WithdrawFromVestingVaultModal │ │ │ │ ├── RequestWithdrawal │ │ │ │ │ ├── __snapshots__ │ │ │ │ │ │ └── index.spec.tsx.snap │ │ │ │ │ ├── index.spec.tsx │ │ │ │ │ ├── index.tsx │ │ │ │ │ └── styles.ts │ │ │ │ ├── Withdraw │ │ │ │ │ ├── __snapshots__ │ │ │ │ │ │ └── index.spec.tsx.snap │ │ │ │ │ ├── index.spec.tsx │ │ │ │ │ ├── index.tsx │ │ │ │ │ ├── styles.ts │ │ │ │ │ └── testIds.ts │ │ │ │ ├── WithdrawalRequestList │ │ │ │ │ ├── __snapshots__ │ │ │ │ │ │ └── index.spec.tsx.snap │ │ │ │ │ ├── index.spec.tsx │ │ │ │ │ ├── index.tsx │ │ │ │ │ ├── styles.ts │ │ │ │ │ └── testIds.ts │ │ │ │ ├── index.spec.tsx │ │ │ │ ├── index.stories.tsx │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ └── index.ts │ │ └── styles.ts │ ├── Vote │ │ ├── CreateProposalModal │ │ │ ├── ActionAccordion │ │ │ │ ├── CallDataFields.tsx │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ ├── ProposalPreview │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ ├── encodeCallData.ts │ │ │ ├── formatIfArray.ts │ │ │ ├── formatProposalPayload.ts │ │ │ ├── index.spec.tsx │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ ├── proposalSchema.ts │ │ │ └── styles.ts │ │ ├── DelegateModal │ │ │ ├── addressValidationSchema.ts │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── Governance │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── GovernanceProposal │ │ │ ├── index.stories.tsx │ │ │ ├── index.tsx │ │ │ ├── styles.ts │ │ │ └── testIds.ts │ │ ├── VotingWallet │ │ │ ├── index.tsx │ │ │ ├── styles.ts │ │ │ └── testIds.ts │ │ ├── index.spec.tsx │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── VoterDetails │ │ ├── History │ │ │ ├── VoterProposal │ │ │ │ ├── index.stories.tsx │ │ │ │ ├── index.tsx │ │ │ │ └── styles.ts │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── Holding │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── Transactions │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── index.spec.tsx │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ ├── VoterLeaderboard │ │ ├── LeaderboardTable │ │ │ ├── index.spec.tsx │ │ │ ├── index.tsx │ │ │ └── styles.ts │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts │ └── Xvs │ │ ├── Header │ │ └── index.tsx │ │ ├── Table │ │ └── index.tsx │ │ ├── constants.ts │ │ ├── index.spec.tsx │ │ ├── index.stories.tsx │ │ ├── index.tsx │ │ └── styles.ts ├── react-app-env.d.ts ├── setupTests.ts ├── stories │ ├── Typography.stories.tsx │ └── decorators.tsx ├── testUtils │ └── renderComponent.tsx ├── theme │ └── MuiThemeProvider │ │ ├── index.tsx │ │ └── muiTheme.ts ├── translation │ ├── index.tsx │ └── translations │ │ └── en.json ├── types │ ├── declarations.d.ts │ ├── index.ts │ ├── mui.d.ts │ └── tsfixme.d.ts └── utilities │ ├── __mocks__ │ └── restService.ts │ ├── calculateCollateralValue.spec.ts │ ├── calculateCollateralValue.ts │ ├── calculateDailyEarningsCents.spec.ts │ ├── calculateDailyEarningsCents.ts │ ├── calculateNetApy.spec.ts │ ├── calculateNetApy.ts │ ├── calculatePercentage.ts │ ├── calculateYearlyEarnings.spec.ts │ ├── calculateYearlyEarnings.ts │ ├── convertPercentageFromSmartContract.ts │ ├── convertTokensToWei.ts │ ├── convertWeiToTokens.ts │ ├── encodeParameters.ts │ ├── featureFlags.ts │ ├── formatCentsToReadableValue.ts │ ├── formatPercentage.ts │ ├── formatToProposal.ts │ ├── formatToReadablePercentage.ts │ ├── formatTokensToReadableValue.spec.ts │ ├── formatTokensToReadableValue.ts │ ├── generateBscScanUrl.ts │ ├── getArgs.ts │ ├── getBigNumber.ts │ ├── getContractAddress.ts │ ├── getToken.ts │ ├── getTokenByAddress.ts │ ├── getTokenIdFromVAddress.ts │ ├── getVBepToken.ts │ ├── index.ts │ ├── indexBy.ts │ ├── notNull.ts │ ├── notUndefined.ts │ ├── parseFunctionSignature.ts │ ├── promisify.ts │ ├── restService.ts │ ├── shortenTokensWithSuffix.ts │ └── truncateAddress.ts ├── static.json ├── tsconfig.eslint.json ├── tsconfig.json └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env", 4 | "@babel/preset-react", 5 | "@babel/preset-typescript" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /.env.template: -------------------------------------------------------------------------------- 1 | NODE_ENV=development 2 | ESLINT_NO_DEV_ERRORS=true 3 | TSC_COMPILE_ON_ERROR=true 4 | #REACT_APP_CHAIN_ID should be 97 for testnet 5 | REACT_APP_CHAIN_ID=97 6 | REACT_APP_GOOGLE_ANALYTICS_ID= 7 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .eslintrc.js 3 | public 4 | build 5 | storybook-static 6 | i18next-parser.config.js 7 | coverage 8 | -------------------------------------------------------------------------------- /.github/workflows/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Jira ticket(s) 2 | 3 | [VEN-XXX](VEN-XXX) 4 | 5 | ## Changes 6 | 7 | - 8 | -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | 2 | Header always append X-Frame-Options DENY 3 | Header set X-XSS-Protection "1; mode=block" 4 | Header set X-Content-Type-Options nosniff 5 | Header set Content-Security-Policy "default-src 'self';" 6 | Header set Strict-Transport-Security "max-age=31536000; includeSubDomains;" 7 | 8 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | yarn lint-staged 5 | -------------------------------------------------------------------------------- /.husky/pre-push: -------------------------------------------------------------------------------- 1 | yarn tsc 2 | -------------------------------------------------------------------------------- /.lintstagedrc: -------------------------------------------------------------------------------- 1 | { 2 | "*{.ts,*.tsx,*.js,*.jsx}": ["eslint --fix", "prettier --write --check", "stylelint --fix"], 3 | "*.json": ["prettier --write --check"], 4 | "*.html": ["prettier --write --check"], 5 | "*.scss": ["stylelint --fix"] 6 | } 7 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | v16.14.2 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | src/assets/images 2 | src/assets/font 3 | src/types/contracts -------------------------------------------------------------------------------- /.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | ...require('prettier-airbnb-config'), 3 | trailingComma: 'all', 4 | bracketSpacing: true, 5 | importOrder: [ 6 | '(__mocks__|assets|clients|components|config|constants|containers|context|errors|hooks|pages|stories|testUtils|theme|translation|types|utilities)/(.*)$', 7 | '^[./]', 8 | ], 9 | importOrderSeparation: true, 10 | importOrderSortSpecifiers: true, 11 | }; 12 | -------------------------------------------------------------------------------- /.storybook/main.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | stories: [ 3 | !!process.env.IS_CI_ENV 4 | ? // Only build root page stories when running on CI pipeline 5 | '../src/pages/*/*.stories.@(js|jsx|ts|tsx)' 6 | : '../src/**/*.stories.@(js|jsx|ts|tsx)', 7 | ], 8 | addons: [ 9 | '@storybook/addon-links', 10 | '@storybook/addon-essentials', 11 | '@storybook/preset-create-react-app', 12 | ], 13 | framework: '@storybook/react', 14 | env: config => ({ 15 | ...config, 16 | // Always run Storybook in test environment 17 | REACT_APP_CHAIN_ID: 97, 18 | }), 19 | }; 20 | -------------------------------------------------------------------------------- /Dockerfile.local: -------------------------------------------------------------------------------- 1 | FROM node:12.19.0-alpine3.12 2 | 3 | # must use development so that "npm run build" works 4 | ENV NODE_ENV development 5 | ENV NODE_PATH=src/ 6 | 7 | RUN apk add --update --no-cache python3 git openssh 8 | 9 | WORKDIR /usr/app 10 | 11 | EXPOSE 3001 -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Venus", 3 | "scripts": {}, 4 | "env": {}, 5 | "formation": { 6 | "web": { 7 | "quantity": 1 8 | } 9 | }, 10 | "addons": [], 11 | "buildpacks": [ 12 | { 13 | "url": "https://github.com/mars/create-react-app-buildpack.git" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /docker-compose.yaml: -------------------------------------------------------------------------------- 1 | version: '3.9' 2 | 3 | services: 4 | venus-ui-dev: 5 | build: 6 | context: . 7 | dockerfile: Dockerfile.local 8 | command: 9 | - sh 10 | - -c 11 | - | 12 | npm install 13 | npm start 14 | ports: 15 | - 3001:3001 16 | volumes: 17 | - ./:/usr/app 18 | restart: always 19 | 20 | venus-ui-prod: 21 | build: . 22 | ports: 23 | - 3001:80 24 | restart: always 25 | -------------------------------------------------------------------------------- /i18next-parser.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | defaultValue: 'TRANSLATION NEEDED', 3 | locales: ['en'], 4 | output: './src/translation/translations/$LOCALE.json', 5 | input: './src/**/*.{ts,tsx}', 6 | sort: true, 7 | createOldCatalogs: false, 8 | }; 9 | -------------------------------------------------------------------------------- /nginx_default.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | listen [::]:80; 4 | server_name localhost; 5 | 6 | location / { 7 | root /usr/share/nginx/html; 8 | index index.html index.htm; 9 | try_files $uri /index.html; 10 | } 11 | } -------------------------------------------------------------------------------- /public/coins/aave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/aave.png -------------------------------------------------------------------------------- /public/coins/ada.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/ada.png -------------------------------------------------------------------------------- /public/coins/bch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/bch.png -------------------------------------------------------------------------------- /public/coins/beth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/beth.png -------------------------------------------------------------------------------- /public/coins/bnb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/bnb.png -------------------------------------------------------------------------------- /public/coins/btcb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/btcb.png -------------------------------------------------------------------------------- /public/coins/busd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/busd.png -------------------------------------------------------------------------------- /public/coins/cake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/cake.png -------------------------------------------------------------------------------- /public/coins/dai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/dai.png -------------------------------------------------------------------------------- /public/coins/doge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/doge.png -------------------------------------------------------------------------------- /public/coins/dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/dot.png -------------------------------------------------------------------------------- /public/coins/eth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/eth.png -------------------------------------------------------------------------------- /public/coins/fil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/fil.png -------------------------------------------------------------------------------- /public/coins/link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/link.png -------------------------------------------------------------------------------- /public/coins/ltc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/ltc.png -------------------------------------------------------------------------------- /public/coins/luna.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/luna.png -------------------------------------------------------------------------------- /public/coins/matic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/matic.png -------------------------------------------------------------------------------- /public/coins/sxp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/sxp.png -------------------------------------------------------------------------------- /public/coins/trx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/trx.png -------------------------------------------------------------------------------- /public/coins/tusd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/tusd.png -------------------------------------------------------------------------------- /public/coins/usdc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/usdc.png -------------------------------------------------------------------------------- /public/coins/usdt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/usdt.png -------------------------------------------------------------------------------- /public/coins/ust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/ust.png -------------------------------------------------------------------------------- /public/coins/vaave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vaave.png -------------------------------------------------------------------------------- /public/coins/vada.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vada.png -------------------------------------------------------------------------------- /public/coins/vbch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vbch.png -------------------------------------------------------------------------------- /public/coins/vbeth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vbeth.png -------------------------------------------------------------------------------- /public/coins/vbnb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vbnb.png -------------------------------------------------------------------------------- /public/coins/vbtc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vbtc.png -------------------------------------------------------------------------------- /public/coins/vbusd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vbusd.png -------------------------------------------------------------------------------- /public/coins/vcake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vcake.png -------------------------------------------------------------------------------- /public/coins/vdai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vdai.png -------------------------------------------------------------------------------- /public/coins/vdoge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vdoge.png -------------------------------------------------------------------------------- /public/coins/vdot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vdot.png -------------------------------------------------------------------------------- /public/coins/veth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/veth.png -------------------------------------------------------------------------------- /public/coins/vfil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vfil.png -------------------------------------------------------------------------------- /public/coins/vlink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vlink.png -------------------------------------------------------------------------------- /public/coins/vltc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vltc.png -------------------------------------------------------------------------------- /public/coins/vluna.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vluna.png -------------------------------------------------------------------------------- /public/coins/vmatic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vmatic.png -------------------------------------------------------------------------------- /public/coins/vsxp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vsxp.png -------------------------------------------------------------------------------- /public/coins/vtrx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vtrx.png -------------------------------------------------------------------------------- /public/coins/vtusd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vtusd.png -------------------------------------------------------------------------------- /public/coins/vusdc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vusdc.png -------------------------------------------------------------------------------- /public/coins/vusdt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vusdt.png -------------------------------------------------------------------------------- /public/coins/vust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vust.png -------------------------------------------------------------------------------- /public/coins/vxrp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vxrp.png -------------------------------------------------------------------------------- /public/coins/vxvs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/vxvs.png -------------------------------------------------------------------------------- /public/coins/xrp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/xrp.png -------------------------------------------------------------------------------- /public/coins/xvs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/coins/xvs.png -------------------------------------------------------------------------------- /public/maintenance.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/public/maintenance.jpg -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Venus", 3 | "name": "Venus", 4 | "icons": [ 5 | { 6 | "src": "icon16.png", 7 | "sizes": "16x16", 8 | "type": "image/png" 9 | }, 10 | { 11 | "src": "icon32.png", 12 | "sizes": "32x32", 13 | "type": "image/png" 14 | } 15 | ], 16 | "start_url": "./index.html", 17 | "display": "standalone", 18 | "theme_color": "#3A78FF", 19 | "background_color": "#1F2028" 20 | } 21 | -------------------------------------------------------------------------------- /pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Jira ticket(s) 2 | 3 | VEN-XXX 4 | 5 | ## Changes 6 | 7 | - 8 | -------------------------------------------------------------------------------- /regconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "core": { 3 | "workingDir": ".reg", 4 | "actualDir": ".loki/reference", 5 | "thresholdRate": 0.5, 6 | "addIgnore": true, 7 | "ximgdiff": { 8 | "invocationType": "client" 9 | } 10 | }, 11 | "plugins": { 12 | "reg-keygen-git-hash-plugin": true, 13 | "reg-notify-github-plugin": { 14 | "prComment": true, 15 | "prCommentBehavior": "default", 16 | "clientId": "MzazNDSzNDM11y9LzSst1i0oyi/JT87P0c3MK0ktSktMTtU3MjYEqjE21w8DqQiAKgAA" 17 | }, 18 | "reg-publish-s3-plugin": { 19 | "bucketName": "tf-venus-prod-vizreg" 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/__mocks__/CSSStub.js: -------------------------------------------------------------------------------- 1 | module.exports = {}; 2 | -------------------------------------------------------------------------------- /src/__mocks__/contracts/vaiUnitroller.ts: -------------------------------------------------------------------------------- 1 | import { VaiUnitroller } from 'types/contracts'; 2 | 3 | const vaiUnitrollerResponses: { 4 | getMintableVAI: Awaited< 5 | ReturnType['call']> 6 | >; 7 | } = { 8 | getMintableVAI: { 9 | 0: '20000000000000000000', 10 | 1: '40000000000000000000', 11 | }, 12 | }; 13 | 14 | export default vaiUnitrollerResponses; 15 | -------------------------------------------------------------------------------- /src/__mocks__/contracts/vaiVault.ts: -------------------------------------------------------------------------------- 1 | import { VaiVault } from 'types/contracts'; 2 | 3 | const vaiVaultResponses: { 4 | userInfo: Awaited['call']>>; 5 | pendingXVS: Awaited['call']>>; 6 | } = { 7 | userInfo: { 8 | amount: '100000000000000000000000', 9 | rewardDebt: '2000', 10 | 0: '100000000000000000000000', 11 | 1: '4000', 12 | }, 13 | pendingXVS: '600000000', 14 | }; 15 | 16 | export default vaiVaultResponses; 17 | -------------------------------------------------------------------------------- /src/__mocks__/models/address.ts: -------------------------------------------------------------------------------- 1 | const address = '0x3d759121234cd36F8124C21aFe1c6852d2bEd848'; 2 | 3 | export const altAddress = '0x3d759121234cd36F8124C21aFe1c6852d2bEd850'; 4 | 5 | export default address; 6 | -------------------------------------------------------------------------------- /src/__mocks__/models/pools.ts: -------------------------------------------------------------------------------- 1 | import { Pool } from 'types'; 2 | 3 | import { assetData } from '__mocks__/models/asset'; 4 | 5 | export const poolData: Pool[] = [ 6 | { 7 | id: '1', 8 | assets: assetData, 9 | name: 'Venus', 10 | riskLevel: 'MINIMAL', 11 | description: 'Fake description 1', 12 | isIsolated: false, 13 | }, 14 | { 15 | id: '2', 16 | assets: assetData, 17 | name: 'Metaverse', 18 | riskLevel: 'VERY_HIGH', 19 | description: 'Fake description 2', 20 | isIsolated: true, 21 | }, 22 | { 23 | id: '3', 24 | assets: assetData, 25 | name: 'Gaming', 26 | riskLevel: 'MEDIUM', 27 | description: 'Fake description 3', 28 | isIsolated: true, 29 | }, 30 | ]; 31 | -------------------------------------------------------------------------------- /src/__mocks__/models/proposals.ts: -------------------------------------------------------------------------------- 1 | import { formatToProposal } from 'utilities'; 2 | 3 | import { ProposalsApiResponse } from 'clients/api/queries/getProposals'; 4 | 5 | import proposalResponse from '../api/proposals.json'; 6 | 7 | const proposals = proposalResponse.result.map(p => 8 | formatToProposal(p as ProposalsApiResponse['result'][number]), 9 | ); 10 | 11 | export default proposals; 12 | -------------------------------------------------------------------------------- /src/__mocks__/models/transactionReceipt.ts: -------------------------------------------------------------------------------- 1 | import type { TransactionReceipt } from 'web3-core/types'; 2 | 3 | const transactionReceipt: TransactionReceipt = { 4 | status: true, 5 | transactionHash: 'fake-transaction-hash', 6 | transactionIndex: 0, 7 | blockHash: 'fake-block-hash', 8 | blockNumber: 0, 9 | from: 'fake-from', 10 | to: 'fake-to', 11 | cumulativeGasUsed: 99999, 12 | effectiveGasPrice: 99999, 13 | gasUsed: 99999, 14 | logs: [], 15 | logsBloom: 'fake-logs-bloom', 16 | }; 17 | 18 | export default transactionReceipt; 19 | -------------------------------------------------------------------------------- /src/__mocks__/models/vaults.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | import { Vault } from 'types'; 3 | 4 | export const vaults: Vault[] = [ 5 | { 6 | rewardTokenId: 'xvs', 7 | stakedTokenId: 'vai', 8 | lockingPeriodMs: 300000, 9 | dailyEmissionWei: new BigNumber('144000000000000000000'), 10 | totalStakedWei: new BigNumber('415000000000000000000'), 11 | stakingAprPercentage: 12665.060240963856, 12 | }, 13 | { 14 | rewardTokenId: 'xvs', 15 | stakedTokenId: 'xvs', 16 | lockingPeriodMs: 300000, 17 | dailyEmissionWei: new BigNumber('144000000000000000000'), 18 | totalStakedWei: new BigNumber('400000000000000000000000000'), 19 | stakingAprPercentage: 12.92281835063781, 20 | }, 21 | ]; 22 | -------------------------------------------------------------------------------- /src/__mocks__/models/voterAccounts.ts: -------------------------------------------------------------------------------- 1 | import formatVoterAccountResponse from 'clients/api/queries/getVoterAccounts/formatVoterAccountResponse'; 2 | 3 | import voterAccountsResponse from '../api/voterAccounts.json'; 4 | 5 | const voterAccounts = formatVoterAccountResponse(voterAccountsResponse.data); 6 | 7 | export default voterAccounts; 8 | -------------------------------------------------------------------------------- /src/__mocks__/models/voterDetails.ts: -------------------------------------------------------------------------------- 1 | import formatVoterDetailsResponse from 'clients/api/queries/getVoterDetails/formatVoterDetailsResponse'; 2 | import { GetVoterDetailsResponse } from 'clients/api/queries/getVoterDetails/types'; 3 | import { NULL_ADDRESS } from 'constants/address'; 4 | 5 | import voterDetailsResponse from '../api/voterDetails.json'; 6 | 7 | const voterDetails = formatVoterDetailsResponse( 8 | voterDetailsResponse.data as GetVoterDetailsResponse, 9 | NULL_ADDRESS, 10 | ); 11 | 12 | export default voterDetails; 13 | -------------------------------------------------------------------------------- /src/__mocks__/models/voterHistory.ts: -------------------------------------------------------------------------------- 1 | import formatVoterHistoryResponse from 'clients/api/queries/getVoterHistory/formatVoterHistoryResponse'; 2 | import { GetVoterHistoryResponse } from 'clients/api/queries/getVoterHistory/types'; 3 | 4 | import voterHistoryResponse from '../api/voterHistory.json'; 5 | 6 | const voterHistory = formatVoterHistoryResponse( 7 | voterHistoryResponse.data as GetVoterHistoryResponse, 8 | ); 9 | 10 | export default voterHistory; 11 | -------------------------------------------------------------------------------- /src/__mocks__/models/voters.ts: -------------------------------------------------------------------------------- 1 | import { GetVotersApiResponse } from 'clients/api/queries/getVoters'; 2 | import formatToVoters from 'clients/api/queries/getVoters/formatToVoters'; 3 | 4 | import votersResponse from '../api/voters.json'; 5 | 6 | const voters = formatToVoters(votersResponse.data as GetVotersApiResponse); 7 | 8 | export default voters; 9 | -------------------------------------------------------------------------------- /src/assets/fonts/proximaNova/proximaNovaBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/fonts/proximaNova/proximaNovaBold.ttf -------------------------------------------------------------------------------- /src/assets/fonts/proximaNova/proximaNovaBold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/fonts/proximaNova/proximaNovaBold.woff -------------------------------------------------------------------------------- /src/assets/fonts/proximaNova/proximaNovaBold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/fonts/proximaNova/proximaNovaBold.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/proximaNova/proximaNovaBoldIt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/fonts/proximaNova/proximaNovaBoldIt.ttf -------------------------------------------------------------------------------- /src/assets/fonts/proximaNova/proximaNovaBoldIt.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/fonts/proximaNova/proximaNovaBoldIt.woff -------------------------------------------------------------------------------- /src/assets/fonts/proximaNova/proximaNovaBoldIt.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/fonts/proximaNova/proximaNovaBoldIt.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/proximaNova/proximaNovaRegular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/fonts/proximaNova/proximaNovaRegular.ttf -------------------------------------------------------------------------------- /src/assets/fonts/proximaNova/proximaNovaRegular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/fonts/proximaNova/proximaNovaRegular.woff -------------------------------------------------------------------------------- /src/assets/fonts/proximaNova/proximaNovaRegular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/fonts/proximaNova/proximaNovaRegular.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/proximaNova/proximaNovaRegularIt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/fonts/proximaNova/proximaNovaRegularIt.ttf -------------------------------------------------------------------------------- /src/assets/fonts/proximaNova/proximaNovaRegularIt.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/fonts/proximaNova/proximaNovaRegularIt.woff -------------------------------------------------------------------------------- /src/assets/fonts/proximaNova/proximaNovaRegularIt.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/fonts/proximaNova/proximaNovaRegularIt.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/proximaNova/proximaNovaSemibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/fonts/proximaNova/proximaNovaSemibold.ttf -------------------------------------------------------------------------------- /src/assets/fonts/proximaNova/proximaNovaSemibold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/fonts/proximaNova/proximaNovaSemibold.woff -------------------------------------------------------------------------------- /src/assets/fonts/proximaNova/proximaNovaSemibold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/fonts/proximaNova/proximaNovaSemibold.woff2 -------------------------------------------------------------------------------- /src/assets/fonts/proximaNova/proximaNovaSemiboldIt.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/fonts/proximaNova/proximaNovaSemiboldIt.ttf -------------------------------------------------------------------------------- /src/assets/fonts/proximaNova/proximaNovaSemiboldIt.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/fonts/proximaNova/proximaNovaSemiboldIt.woff -------------------------------------------------------------------------------- /src/assets/fonts/proximaNova/proximaNovaSemiboldIt.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/fonts/proximaNova/proximaNovaSemiboldIt.woff2 -------------------------------------------------------------------------------- /src/assets/img/mark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/assets/img/tokens/aave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/aave.png -------------------------------------------------------------------------------- /src/assets/img/tokens/ada.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/ada.png -------------------------------------------------------------------------------- /src/assets/img/tokens/bch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/bch.png -------------------------------------------------------------------------------- /src/assets/img/tokens/beth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/beth.png -------------------------------------------------------------------------------- /src/assets/img/tokens/bnb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/bnb.png -------------------------------------------------------------------------------- /src/assets/img/tokens/btc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/btc.png -------------------------------------------------------------------------------- /src/assets/img/tokens/btcb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/btcb.png -------------------------------------------------------------------------------- /src/assets/img/tokens/busd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/busd.png -------------------------------------------------------------------------------- /src/assets/img/tokens/cake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/cake.png -------------------------------------------------------------------------------- /src/assets/img/tokens/dai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/dai.png -------------------------------------------------------------------------------- /src/assets/img/tokens/doge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/doge.png -------------------------------------------------------------------------------- /src/assets/img/tokens/dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/dot.png -------------------------------------------------------------------------------- /src/assets/img/tokens/eth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/eth.png -------------------------------------------------------------------------------- /src/assets/img/tokens/fil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/fil.png -------------------------------------------------------------------------------- /src/assets/img/tokens/link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/link.png -------------------------------------------------------------------------------- /src/assets/img/tokens/ltc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/ltc.png -------------------------------------------------------------------------------- /src/assets/img/tokens/luna.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/luna.png -------------------------------------------------------------------------------- /src/assets/img/tokens/matic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/matic.png -------------------------------------------------------------------------------- /src/assets/img/tokens/sxp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/sxp.png -------------------------------------------------------------------------------- /src/assets/img/tokens/trx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/trx.png -------------------------------------------------------------------------------- /src/assets/img/tokens/tusd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/tusd.png -------------------------------------------------------------------------------- /src/assets/img/tokens/usdc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/usdc.png -------------------------------------------------------------------------------- /src/assets/img/tokens/usdt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/usdt.png -------------------------------------------------------------------------------- /src/assets/img/tokens/ust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/ust.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vaave.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vaave.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vada.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vada.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vbch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vbch.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vbeth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vbeth.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vbnb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vbnb.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vbtc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vbtc.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vbusd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vbusd.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vcake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vcake.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vdai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vdai.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vdoge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vdoge.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vdot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vdot.png -------------------------------------------------------------------------------- /src/assets/img/tokens/veth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/veth.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vfil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vfil.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vlink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vlink.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vltc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vltc.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vluna.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vluna.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vmatic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vmatic.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vsxp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vsxp.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vtrx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vtrx.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vtusd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vtusd.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vusdc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vusdc.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vusdt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vusdt.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vust.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vxrp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vxrp.png -------------------------------------------------------------------------------- /src/assets/img/tokens/vxvs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/vxvs.png -------------------------------------------------------------------------------- /src/assets/img/tokens/xrp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/multijump/venus-protocol-interface/3c5e9fa0ea772e79a05665018ec1d6d9fc70d878/src/assets/img/tokens/xrp.png -------------------------------------------------------------------------------- /src/assets/img/wallets/binanceChainWalletLogo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/assets/img/wallets/ledgerLogo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/assets/styles/index.scss: -------------------------------------------------------------------------------- 1 | @import './App.scss'; 2 | -------------------------------------------------------------------------------- /src/clients/api/mutations/cancelProposal/index.ts: -------------------------------------------------------------------------------- 1 | import type { TransactionReceipt } from 'web3-core'; 2 | 3 | import { GovernorBravoDelegate } from 'types/contracts'; 4 | 5 | export interface CancelProposalInput { 6 | governorBravoContract: GovernorBravoDelegate; 7 | accountAddress: string; 8 | proposalId: number; 9 | } 10 | 11 | export type CancelProposalOutput = TransactionReceipt; 12 | 13 | const cancelProposal = async ({ 14 | governorBravoContract, 15 | accountAddress, 16 | proposalId, 17 | }: CancelProposalInput): Promise => 18 | governorBravoContract.methods.cancel(proposalId).send({ from: accountAddress }); 19 | 20 | export default cancelProposal; 21 | -------------------------------------------------------------------------------- /src/clients/api/mutations/claimVaiVaultReward/index.ts: -------------------------------------------------------------------------------- 1 | import type { TransactionReceipt } from 'web3-core/types'; 2 | 3 | import { VaiVault } from 'types/contracts'; 4 | 5 | export interface ClaimVaiVaultRewardInput { 6 | vaiVaultContract: VaiVault; 7 | fromAccountAddress: string; 8 | } 9 | 10 | export type ClaimVaiVaultRewardOutput = TransactionReceipt; 11 | 12 | const claimVaiVaultReward = async ({ 13 | vaiVaultContract, 14 | fromAccountAddress, 15 | }: ClaimVaiVaultRewardInput): Promise => { 16 | const resp = await vaiVaultContract.methods.claim().send({ from: fromAccountAddress }); 17 | return resp; 18 | }; 19 | 20 | export default claimVaiVaultReward; 21 | -------------------------------------------------------------------------------- /src/clients/api/mutations/convertVrt/index.ts: -------------------------------------------------------------------------------- 1 | import type { TransactionReceipt } from 'web3-core/types'; 2 | 3 | import { VrtConverter } from 'types/contracts'; 4 | 5 | export interface ConvertVrtInput { 6 | vrtConverterContract: VrtConverter; 7 | amountWei: string; 8 | accountAddress: string; 9 | } 10 | 11 | export type ConvertVrtOutput = TransactionReceipt; 12 | 13 | const convertVrt = async ({ 14 | vrtConverterContract, 15 | amountWei, 16 | accountAddress, 17 | }: ConvertVrtInput): Promise => 18 | vrtConverterContract.methods.convert(amountWei).send({ 19 | from: accountAddress, 20 | }); 21 | 22 | export default convertVrt; 23 | -------------------------------------------------------------------------------- /src/clients/api/mutations/executeProposal/index.ts: -------------------------------------------------------------------------------- 1 | import type { TransactionReceipt } from 'web3-core'; 2 | 3 | import { GovernorBravoDelegate } from 'types/contracts'; 4 | 5 | export interface ExecuteProposalInput { 6 | governorBravoContract: GovernorBravoDelegate; 7 | accountAddress: string; 8 | proposalId: number; 9 | } 10 | 11 | export type ExecuteProposalOutput = TransactionReceipt; 12 | 13 | const executeProposal = async ({ 14 | governorBravoContract, 15 | accountAddress, 16 | proposalId, 17 | }: ExecuteProposalInput): Promise => 18 | governorBravoContract.methods.execute(proposalId).send({ from: accountAddress }); 19 | 20 | export default executeProposal; 21 | -------------------------------------------------------------------------------- /src/clients/api/mutations/queueProposal/index.ts: -------------------------------------------------------------------------------- 1 | import type { TransactionReceipt } from 'web3-core'; 2 | 3 | import { GovernorBravoDelegate } from 'types/contracts'; 4 | 5 | export interface QueueProposalInput { 6 | governorBravoContract: GovernorBravoDelegate; 7 | accountAddress: string; 8 | proposalId: number; 9 | } 10 | 11 | export type QueueProposalOutput = TransactionReceipt; 12 | 13 | const queueProposal = async ({ 14 | governorBravoContract, 15 | accountAddress, 16 | proposalId, 17 | }: QueueProposalInput): Promise => 18 | governorBravoContract.methods.queue(proposalId).send({ from: accountAddress }); 19 | 20 | export default queueProposal; 21 | -------------------------------------------------------------------------------- /src/clients/api/mutations/setVoteDelegate/index.ts: -------------------------------------------------------------------------------- 1 | import type { TransactionReceipt } from 'web3-core'; 2 | 3 | import { XvsVault } from 'types/contracts'; 4 | 5 | export interface SetVoteDelegateInput { 6 | xvsVaultContract: XvsVault; 7 | accountAddress: string; 8 | delegateAddress: string; 9 | } 10 | 11 | export type SetVoteDelegateOutput = TransactionReceipt; 12 | 13 | const setVoteDelegate = async ({ 14 | xvsVaultContract, 15 | accountAddress, 16 | delegateAddress, 17 | }: SetVoteDelegateInput) => 18 | xvsVaultContract.methods.delegate(delegateAddress).send({ from: accountAddress }); 19 | 20 | export default setVoteDelegate; 21 | -------------------------------------------------------------------------------- /src/clients/api/mutations/stakeInVrtVault/index.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | import type { TransactionReceipt } from 'web3-core/types'; 3 | 4 | import { VrtVault } from 'types/contracts'; 5 | 6 | export interface StakeInVrtVaultInput { 7 | vrtVaultContract: VrtVault; 8 | fromAccountAddress: string; 9 | amountWei: BigNumber; 10 | } 11 | 12 | export type StakeInVrtVaultOutput = TransactionReceipt; 13 | 14 | const stakeInVrtVault = async ({ 15 | vrtVaultContract, 16 | fromAccountAddress, 17 | amountWei, 18 | }: StakeInVrtVaultInput): Promise => 19 | vrtVaultContract.methods.deposit(amountWei.toFixed()).send({ from: fromAccountAddress }); 20 | 21 | export default stakeInVrtVault; 22 | -------------------------------------------------------------------------------- /src/clients/api/mutations/vote/castVote.ts: -------------------------------------------------------------------------------- 1 | import type { TransactionReceipt } from 'web3-core/types'; 2 | 3 | import { GovernorBravoDelegate } from 'types/contracts'; 4 | 5 | export interface CastVoteInput { 6 | governorBravoContract: GovernorBravoDelegate; 7 | fromAccountAddress: string; 8 | proposalId: number; 9 | voteType: 0 | 1 | 2; 10 | } 11 | 12 | export type CastVoteOutput = TransactionReceipt; 13 | 14 | const castVote = async ({ 15 | governorBravoContract, 16 | fromAccountAddress, 17 | proposalId, 18 | voteType, 19 | }: CastVoteInput): Promise => 20 | governorBravoContract.methods.castVote(proposalId, voteType).send({ from: fromAccountAddress }); 21 | 22 | export default castVote; 23 | -------------------------------------------------------------------------------- /src/clients/api/mutations/withdrawFromVrtVault/index.ts: -------------------------------------------------------------------------------- 1 | import type { TransactionReceipt } from 'web3-core/types'; 2 | 3 | import { VrtVault } from 'types/contracts'; 4 | 5 | export interface WithdrawFromVrtVaultInput { 6 | vrtVaultContract: VrtVault; 7 | fromAccountAddress: string; 8 | } 9 | 10 | export type WithdrawFromVrtVaultOutput = TransactionReceipt; 11 | 12 | const withdrawFromVrtVault = async ({ 13 | vrtVaultContract, 14 | fromAccountAddress, 15 | }: WithdrawFromVrtVaultInput): Promise => 16 | vrtVaultContract.methods.withdraw().send({ from: fromAccountAddress }); 17 | 18 | export default withdrawFromVrtVault; 19 | -------------------------------------------------------------------------------- /src/clients/api/mutations/withdrawXvs/index.ts: -------------------------------------------------------------------------------- 1 | import type { TransactionReceipt } from 'web3-core/types'; 2 | 3 | import { XvsVesting } from 'types/contracts'; 4 | 5 | export interface WithdrawXvsInput { 6 | xvsVestingContract: XvsVesting; 7 | accountAddress: string; 8 | } 9 | 10 | export type WithdrawXvsOutput = TransactionReceipt; 11 | 12 | const withdrawXvs = ({ 13 | xvsVestingContract, 14 | accountAddress, 15 | }: WithdrawXvsInput): Promise => 16 | xvsVestingContract.methods.withdraw().send({ 17 | from: accountAddress, 18 | }); 19 | 20 | export default withdrawXvs; 21 | -------------------------------------------------------------------------------- /src/clients/api/queries/getAssetsInAccount/index.ts: -------------------------------------------------------------------------------- 1 | import { Comptroller } from 'types/contracts'; 2 | 3 | export interface GetAssetsInAccountInput { 4 | comptrollerContract: Comptroller; 5 | accountAddress: string; 6 | } 7 | 8 | export type GetAssetsInAccountOutput = { 9 | tokenAddresses: string[]; 10 | }; 11 | 12 | const getAssetsInAccount = async ({ 13 | comptrollerContract, 14 | accountAddress, 15 | }: GetAssetsInAccountInput): Promise => { 16 | const tokenAddresses = await comptrollerContract.methods.getAssetsIn(accountAddress).call(); 17 | 18 | return { 19 | tokenAddresses, 20 | }; 21 | }; 22 | 23 | export default getAssetsInAccount; 24 | -------------------------------------------------------------------------------- /src/clients/api/queries/getBalanceOf/index.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import { Bep20, VaiToken, VrtToken, XvsToken } from 'types/contracts'; 4 | 5 | export interface GetBalanceOfInput { 6 | tokenContract: VrtToken | XvsToken | Bep20 | VaiToken; 7 | accountAddress: string; 8 | } 9 | 10 | export type GetBalanceOfOutput = { 11 | balanceWei: BigNumber; 12 | }; 13 | 14 | const getBalanceOf = async ({ 15 | tokenContract, 16 | accountAddress, 17 | }: GetBalanceOfInput): Promise => { 18 | const resp = await tokenContract.methods.balanceOf(accountAddress).call(); 19 | 20 | return { 21 | balanceWei: new BigNumber(resp), 22 | }; 23 | }; 24 | 25 | export default getBalanceOf; 26 | -------------------------------------------------------------------------------- /src/clients/api/queries/getBlockNumber/index.spec.ts: -------------------------------------------------------------------------------- 1 | import Web3 from 'web3'; 2 | 3 | import getBlockNumber from '.'; 4 | 5 | describe('api/queries/getBlockNumber', () => { 6 | test('calls passed web3 object correctly and returns the latest block number on success', async () => { 7 | const fakeBlockNumber = 123456789; 8 | 9 | const fakeWeb3 = { 10 | eth: { 11 | getBlockNumber: async () => fakeBlockNumber, 12 | }, 13 | } as unknown as Web3; 14 | 15 | const res = await getBlockNumber({ web3: fakeWeb3 }); 16 | 17 | expect(res).toStrictEqual({ 18 | blockNumber: fakeBlockNumber, 19 | }); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /src/clients/api/queries/getBlockNumber/index.ts: -------------------------------------------------------------------------------- 1 | import Web3 from 'web3'; 2 | 3 | export interface GetBlockNumberInput { 4 | web3: Web3; 5 | } 6 | 7 | export interface GetBlockNumberOutput { 8 | blockNumber: number; 9 | } 10 | 11 | const getBlockNumber = async ({ web3 }: GetBlockNumberInput): Promise => { 12 | const blockNumber = await web3.eth.getBlockNumber(); 13 | 14 | return { 15 | blockNumber, 16 | }; 17 | }; 18 | 19 | export default getBlockNumber; 20 | -------------------------------------------------------------------------------- /src/clients/api/queries/getCurrentVotes/index.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import { XvsVault } from 'types/contracts'; 4 | 5 | export interface GetCurrentVotesInput { 6 | xvsVaultContract: XvsVault; 7 | accountAddress: string; 8 | } 9 | 10 | export type GetCurrentVotesOutput = { 11 | votesWei: BigNumber; 12 | }; 13 | 14 | const getCurrentVotes = async ({ 15 | xvsVaultContract, 16 | accountAddress, 17 | }: GetCurrentVotesInput): Promise => { 18 | const resp = await xvsVaultContract.methods.getCurrentVotes(accountAddress).call(); 19 | 20 | return { 21 | votesWei: new BigNumber(resp), 22 | }; 23 | }; 24 | 25 | export default getCurrentVotes; 26 | -------------------------------------------------------------------------------- /src/clients/api/queries/getMarketHistory/useGetMarketHistory.ts: -------------------------------------------------------------------------------- 1 | import { QueryObserverOptions, useQuery } from 'react-query'; 2 | 3 | import getMarketHistory, { 4 | GetMarketHistoryInput, 5 | GetMarketHistoryOutput, 6 | } from 'clients/api/queries/getMarketHistory'; 7 | import FunctionKey from 'constants/functionKey'; 8 | 9 | type Options = QueryObserverOptions< 10 | GetMarketHistoryOutput, 11 | Error, 12 | GetMarketHistoryOutput, 13 | GetMarketHistoryOutput, 14 | FunctionKey.GET_MARKET_HISTORY 15 | >; 16 | 17 | const useGetMarketHistory = (input: GetMarketHistoryInput, options?: Options) => 18 | useQuery(FunctionKey.GET_MARKET_HISTORY, () => getMarketHistory(input), options); 19 | 20 | export default useGetMarketHistory; 21 | -------------------------------------------------------------------------------- /src/clients/api/queries/getMarkets/useGetMarkets.ts: -------------------------------------------------------------------------------- 1 | import { QueryObserverOptions, useQuery } from 'react-query'; 2 | 3 | import getMarkets, { GetMarketsOutput } from 'clients/api/queries/getMarkets'; 4 | import { DEFAULT_REFETCH_INTERVAL_MS } from 'constants/defaultRefetchInterval'; 5 | import FunctionKey from 'constants/functionKey'; 6 | 7 | type Options = QueryObserverOptions< 8 | GetMarketsOutput, 9 | Error, 10 | GetMarketsOutput, 11 | GetMarketsOutput, 12 | FunctionKey.GET_MARKETS 13 | >; 14 | 15 | const useGetMarkets = (options?: Options) => 16 | useQuery(FunctionKey.GET_MARKETS, getMarkets, { 17 | refetchInterval: DEFAULT_REFETCH_INTERVAL_MS, 18 | ...options, 19 | }); 20 | 21 | export default useGetMarkets; 22 | -------------------------------------------------------------------------------- /src/clients/api/queries/getMintableVai/__snapshots__/index.spec.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`api/queries/getMintableVai returns the mintable VAI in the correct format on success 1`] = ` 4 | Object { 5 | "mintableVaiWei": "40000000000000000000", 6 | } 7 | `; 8 | -------------------------------------------------------------------------------- /src/clients/api/queries/getMintableVai/formatToOutput.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import { VaiUnitroller } from 'types/contracts'; 4 | 5 | import { GetMintableVaiOutput } from './types'; 6 | 7 | const formatToProposal = ( 8 | response: Awaited['call']>>, 9 | ): GetMintableVaiOutput => ({ 10 | mintableVaiWei: new BigNumber(response[1]), 11 | }); 12 | 13 | export default formatToProposal; 14 | -------------------------------------------------------------------------------- /src/clients/api/queries/getMintableVai/index.ts: -------------------------------------------------------------------------------- 1 | import formatToOutput from './formatToOutput'; 2 | import { GetMintableVaiInput, GetMintableVaiOutput } from './types'; 3 | 4 | export * from './types'; 5 | 6 | const getMintableVai = async ({ 7 | vaiControllerContract, 8 | accountAddress, 9 | }: GetMintableVaiInput): Promise => { 10 | const res = await vaiControllerContract.methods.getMintableVAI(accountAddress).call(); 11 | 12 | return formatToOutput(res); 13 | }; 14 | 15 | export default getMintableVai; 16 | -------------------------------------------------------------------------------- /src/clients/api/queries/getMintableVai/types.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import { VaiUnitroller } from 'types/contracts'; 4 | 5 | export interface GetMintableVaiInput { 6 | vaiControllerContract: VaiUnitroller; 7 | accountAddress: string; 8 | } 9 | 10 | export interface GetMintableVaiOutput { 11 | mintableVaiWei: BigNumber; 12 | } 13 | -------------------------------------------------------------------------------- /src/clients/api/queries/getMintedVai/index.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import { Comptroller } from 'types/contracts'; 4 | 5 | export interface GetMintedVaiInput { 6 | comptrollerContract: Comptroller; 7 | accountAddress: string; 8 | } 9 | 10 | export type GetMintedVaiOutput = { 11 | mintedVaiWei: BigNumber; 12 | }; 13 | 14 | const getMintedVai = async ({ 15 | comptrollerContract, 16 | accountAddress, 17 | }: GetMintedVaiInput): Promise => { 18 | const res = await comptrollerContract.methods.mintedVAIs(accountAddress).call(); 19 | 20 | return { 21 | mintedVaiWei: new BigNumber(res), 22 | }; 23 | }; 24 | 25 | export default getMintedVai; 26 | -------------------------------------------------------------------------------- /src/clients/api/queries/getProposalEta/__snapshots__/index.spec.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`api/queries/getProposalEta returns ETA in correct format on success 1`] = ` 4 | Object { 5 | "eta": 2022-07-13T09:48:26.000Z, 6 | } 7 | `; 8 | -------------------------------------------------------------------------------- /src/clients/api/queries/getProposalEta/index.ts: -------------------------------------------------------------------------------- 1 | import { GovernorBravoDelegate } from 'types/contracts'; 2 | 3 | export interface GetProposalEtaInput { 4 | governorBravoContract: GovernorBravoDelegate; 5 | proposalId: number; 6 | } 7 | 8 | export type GetProposalEtaOutput = { 9 | eta: Date; 10 | }; 11 | 12 | const getProposalEta = async ({ 13 | governorBravoContract, 14 | proposalId, 15 | }: GetProposalEtaInput): Promise => { 16 | const resp = await governorBravoContract.methods.proposals(proposalId).call(); 17 | 18 | // Convert ETA expressed in seconds to milliseconds 19 | const eta = new Date(+resp.eta * 1000); 20 | 21 | return { 22 | eta, 23 | }; 24 | }; 25 | 26 | export default getProposalEta; 27 | -------------------------------------------------------------------------------- /src/clients/api/queries/getProposalState/index.ts: -------------------------------------------------------------------------------- 1 | import { GovernorBravoDelegate } from 'types/contracts'; 2 | 3 | export interface GetProposalStateInput { 4 | governorBravoContract: GovernorBravoDelegate; 5 | proposalId: string; 6 | } 7 | 8 | export type GetProposalStateOutput = { 9 | state: string; 10 | }; 11 | 12 | const getProposalState = async ({ 13 | governorBravoContract, 14 | proposalId, 15 | }: GetProposalStateInput): Promise => { 16 | const state = await governorBravoContract.methods.state(proposalId).call(); 17 | 18 | return { state }; 19 | }; 20 | 21 | export default getProposalState; 22 | -------------------------------------------------------------------------------- /src/clients/api/queries/getProposalThreshold/index.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import { GovernorBravoDelegate } from 'types/contracts'; 4 | 5 | export interface GetProposalThresholdInput { 6 | governorBravoContract: GovernorBravoDelegate; 7 | } 8 | 9 | export type GetProposalThresholdOutput = { 10 | thresholdWei: BigNumber; 11 | }; 12 | 13 | const getProposalThreshold = async ({ 14 | governorBravoContract, 15 | }: GetProposalThresholdInput): Promise => { 16 | const resp = await governorBravoContract.methods.proposalThreshold().call(); 17 | 18 | return { 19 | thresholdWei: new BigNumber(resp), 20 | }; 21 | }; 22 | 23 | export default getProposalThreshold; 24 | -------------------------------------------------------------------------------- /src/clients/api/queries/getTransactions/types.ts: -------------------------------------------------------------------------------- 1 | export interface TransactionResponse { 2 | amount: number; 3 | blockNumber: number; 4 | category: string; 5 | createdAt: string; 6 | event: string; 7 | from: string; 8 | id: number; 9 | timestamp: string | null; 10 | to: string; 11 | transactionHash: string; 12 | updatedAt: string; 13 | vTokenAddress: string; 14 | } 15 | -------------------------------------------------------------------------------- /src/clients/api/queries/getVTokenBalanceOf/index.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import { VBep20, VBnbToken } from 'types/contracts'; 4 | 5 | export interface GetVTokenBalanceOfInput { 6 | vTokenContract: VBep20 | VBnbToken; 7 | accountAddress: string; 8 | } 9 | 10 | export type GetVTokenBalanceOfOutput = { 11 | balanceWei: BigNumber; 12 | }; 13 | 14 | const getVTokenBalanceOf = async ({ 15 | vTokenContract, 16 | accountAddress, 17 | }: GetVTokenBalanceOfInput): Promise => { 18 | const res = await vTokenContract.methods.balanceOf(accountAddress).call(); 19 | 20 | return { 21 | balanceWei: new BigNumber(res), 22 | }; 23 | }; 24 | 25 | export default getVTokenBalanceOf; 26 | -------------------------------------------------------------------------------- /src/clients/api/queries/getVTokenBalancesAll/__snapshots__/index.spec.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`api/queries/getVTokenBalancesAll returns the APY simulations in the correct format on success 1`] = ` 4 | Object { 5 | "balances": Array [ 6 | Object { 7 | "balanceOf": "10000", 8 | "balanceOfUnderlying": "20000", 9 | "borrowBalanceCurrent": "300", 10 | "tokenAllowance": "40000000000000000", 11 | "tokenBalance": "5000", 12 | "vToken": "0x3d759121234cd36F8124C21aFe1c6852d2bEd848", 13 | }, 14 | ], 15 | } 16 | `; 17 | -------------------------------------------------------------------------------- /src/clients/api/queries/getVTokenCash/index.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import { VBep20, VBnbToken } from 'types/contracts'; 4 | 5 | export interface GetVTokenCashInput { 6 | vTokenContract: VBep20 | VBnbToken; 7 | } 8 | 9 | export type GetVTokenCashOutput = { 10 | cashWei: BigNumber; 11 | }; 12 | 13 | const getVTokenCash = async ({ 14 | vTokenContract, 15 | }: GetVTokenCashInput): Promise => { 16 | const res = await vTokenContract.methods.getCash().call(); 17 | 18 | return { 19 | cashWei: new BigNumber(res), 20 | }; 21 | }; 22 | 23 | export default getVTokenCash; 24 | -------------------------------------------------------------------------------- /src/clients/api/queries/getVTokenInterestRateModel/index.ts: -------------------------------------------------------------------------------- 1 | import { VBep20, VBnbToken } from 'types/contracts'; 2 | 3 | export interface GetVTokenInterestRateModelInput { 4 | vTokenContract: VBep20 | VBnbToken; 5 | } 6 | 7 | export type GetVTokenInterestRateModelOutput = { 8 | contractAddress: string; 9 | }; 10 | 11 | const getVTokenInterestRateModel = async ({ 12 | vTokenContract, 13 | }: GetVTokenInterestRateModelInput): Promise => { 14 | const contractAddress = await vTokenContract.methods.interestRateModel().call(); 15 | 16 | return { 17 | contractAddress, 18 | }; 19 | }; 20 | 21 | export default getVTokenInterestRateModel; 22 | -------------------------------------------------------------------------------- /src/clients/api/queries/getVaiVaultPendingXvs/index.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import { VaiVault } from 'types/contracts'; 4 | 5 | export interface GetVaiVaultPendingXvsInput { 6 | vaiVaultContract: VaiVault; 7 | accountAddress: string; 8 | } 9 | 10 | export type GetVaiVaultPendingXvsOutput = { 11 | pendingXvsWei: BigNumber; 12 | }; 13 | 14 | const getVaiVaultPendingXvs = async ({ 15 | vaiVaultContract, 16 | accountAddress, 17 | }: GetVaiVaultPendingXvsInput): Promise => { 18 | const res = await vaiVaultContract.methods.pendingXVS(accountAddress).call(); 19 | 20 | return { 21 | pendingXvsWei: new BigNumber(res), 22 | }; 23 | }; 24 | 25 | export default getVaiVaultPendingXvs; 26 | -------------------------------------------------------------------------------- /src/clients/api/queries/getVaiVaultUserInfo/__snapshots__/index.spec.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`api/queries/getVaiVaultUserInfo returns the user info in the correct format 1`] = ` 4 | Object { 5 | "stakedVaiWei": "1e+23", 6 | } 7 | `; 8 | -------------------------------------------------------------------------------- /src/clients/api/queries/getVaiVaultUserInfo/formatToUserInfo.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import { VaiVault } from 'types/contracts'; 4 | 5 | import { GetVaiVaultUserInfoOutput } from './types'; 6 | 7 | const formatToUserInfo = ({ 8 | amount, 9 | }: Awaited< 10 | ReturnType['call']> 11 | >): GetVaiVaultUserInfoOutput => ({ 12 | stakedVaiWei: new BigNumber(amount), 13 | }); 14 | 15 | export default formatToUserInfo; 16 | -------------------------------------------------------------------------------- /src/clients/api/queries/getVaiVaultUserInfo/index.ts: -------------------------------------------------------------------------------- 1 | import formatToUserInfo from './formatToUserInfo'; 2 | import { GetVaiVaultUserInfoInput, GetVaiVaultUserInfoOutput } from './types'; 3 | 4 | export * from './types'; 5 | 6 | const getVaiVaultUserInfo = async ({ 7 | vaiVaultContract, 8 | accountAddress, 9 | }: GetVaiVaultUserInfoInput): Promise => { 10 | const res = await vaiVaultContract.methods.userInfo(accountAddress).call(); 11 | return formatToUserInfo(res); 12 | }; 13 | 14 | export default getVaiVaultUserInfo; 15 | -------------------------------------------------------------------------------- /src/clients/api/queries/getVaiVaultUserInfo/types.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import { VaiVault } from 'types/contracts'; 4 | 5 | export interface GetVaiVaultUserInfoInput { 6 | vaiVaultContract: VaiVault; 7 | accountAddress: string; 8 | } 9 | 10 | export interface GetVaiVaultUserInfoOutput { 11 | stakedVaiWei: BigNumber; 12 | } 13 | -------------------------------------------------------------------------------- /src/clients/api/queries/getVoteReceipt/__snapshots__/index.spec.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`api/queries/getVoteReceipt returns the correct string depending on what the contract call returns 1`] = ` 4 | Object { 5 | "voteSupport": "AGAINST", 6 | } 7 | `; 8 | 9 | exports[`api/queries/getVoteReceipt returns the correct string depending on what the contract call returns 2`] = ` 10 | Object { 11 | "voteSupport": "FOR", 12 | } 13 | `; 14 | 15 | exports[`api/queries/getVoteReceipt returns the correct string depending on what the contract call returns 3`] = ` 16 | Object { 17 | "voteSupport": "ABSTAIN", 18 | } 19 | `; 20 | -------------------------------------------------------------------------------- /src/clients/api/queries/getVoterAccounts/formatVoterAccountResponse.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import { GetVoterAccountsResponse } from './types'; 4 | 5 | const formatVoterResponse = (data: GetVoterAccountsResponse) => ({ 6 | limit: data.limit, 7 | offset: data.offset, 8 | total: data.total, 9 | voterAccounts: data.result.map(d => ({ 10 | address: d.address, 11 | createdAt: new Date(d.createdAt), 12 | id: d.id, 13 | proposalsVoted: d.proposalsVoted, 14 | updatedAt: new Date(d.updatedAt), 15 | voteWeightPercent: d.voteWeight, 16 | votesWei: new BigNumber(d.votes), 17 | })), 18 | }); 19 | 20 | export default formatVoterResponse; 21 | -------------------------------------------------------------------------------- /src/clients/api/queries/getVoterAccounts/types.ts: -------------------------------------------------------------------------------- 1 | export interface GetVoterAccountsResponse { 2 | limit: number; 3 | offset: number; 4 | total: number; 5 | result: { 6 | address: string; 7 | createdAt: string; 8 | id: string; 9 | proposalsVoted: number; 10 | updatedAt: string; 11 | voteWeight: number; 12 | votes: string; 13 | votes2: string; 14 | }[]; 15 | } 16 | -------------------------------------------------------------------------------- /src/clients/api/queries/getVoterHistory/types.ts: -------------------------------------------------------------------------------- 1 | import { ProposalApiResponse } from '../getProposals'; 2 | 3 | export interface GetVoterHistoryResponse { 4 | limit: number; 5 | offset: number; 6 | total: number; 7 | result: { 8 | address: string; 9 | blockNumber: number; 10 | blockTimestamp: number; 11 | createdAt: string; 12 | hasVoted: boolean; 13 | id: string; 14 | proposal: Omit; 15 | proposalId: number; 16 | reason: null | string; 17 | support: 0 | 1 | 2; 18 | updatedAt: string; 19 | votes: string; 20 | }[]; 21 | } 22 | -------------------------------------------------------------------------------- /src/clients/api/queries/getVrtConversionEndTime/index.ts: -------------------------------------------------------------------------------- 1 | import { VrtConverter } from 'types/contracts'; 2 | 3 | export interface GetVrtConversionEndTimeInput { 4 | vrtConverterContract: VrtConverter; 5 | } 6 | 7 | export type GetVrtConversionEndTimeOutput = { 8 | conversionEndTime: Date; 9 | }; 10 | 11 | const getVrtConverstionEndTime = async ({ 12 | vrtConverterContract, 13 | }: GetVrtConversionEndTimeInput): Promise => { 14 | const resp = await vrtConverterContract.methods.conversionEndTime().call(); 15 | 16 | // End Date is returned as unix timestamp; 17 | return { 18 | conversionEndTime: new Date(+resp * 1000), 19 | }; 20 | }; 21 | 22 | export default getVrtConverstionEndTime; 23 | -------------------------------------------------------------------------------- /src/clients/api/queries/getVrtConversionRatio/index.ts: -------------------------------------------------------------------------------- 1 | import { VrtConverter } from 'types/contracts'; 2 | 3 | export interface VrtConversionRatioInput { 4 | vrtConverterContract: VrtConverter; 5 | } 6 | 7 | export type GetVrtConversionRatioOutput = { 8 | conversionRatio: string; 9 | }; 10 | 11 | const getVrtConversionRatio = async ({ 12 | vrtConverterContract, 13 | }: VrtConversionRatioInput): Promise => { 14 | const conversionRatio = await vrtConverterContract.methods.conversionRatio().call(); 15 | 16 | return { conversionRatio }; 17 | }; 18 | 19 | export default getVrtConversionRatio; 20 | -------------------------------------------------------------------------------- /src/clients/api/queries/getVrtVaultUserInfo/__snapshots__/index.spec.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`api/queries/getVrtVaultUserInfo returns the user info in the correct format 1`] = ` 4 | Object { 5 | "stakedVrtWei": "100000000000000", 6 | } 7 | `; 8 | -------------------------------------------------------------------------------- /src/clients/api/queries/getVrtVaultUserInfo/formatToUserInfo.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import { VrtVault } from 'types/contracts'; 4 | 5 | import { GetVrtVaultUserInfoOutput } from './types'; 6 | 7 | const formatToUserInfo = ({ 8 | totalPrincipalAmount, 9 | }: Awaited< 10 | ReturnType['call']> 11 | >): GetVrtVaultUserInfoOutput => ({ 12 | stakedVrtWei: new BigNumber(totalPrincipalAmount), 13 | }); 14 | 15 | export default formatToUserInfo; 16 | -------------------------------------------------------------------------------- /src/clients/api/queries/getVrtVaultUserInfo/index.ts: -------------------------------------------------------------------------------- 1 | import formatToUserInfo from './formatToUserInfo'; 2 | import { GetVrtVaultUserInfoInput, GetVrtVaultUserInfoOutput } from './types'; 3 | 4 | export * from './types'; 5 | 6 | const getVrtVaultUserInfo = async ({ 7 | vrtVaultContract, 8 | accountAddress, 9 | }: GetVrtVaultUserInfoInput): Promise => { 10 | const res = await vrtVaultContract.methods.userInfo(accountAddress).call(); 11 | return formatToUserInfo(res); 12 | }; 13 | 14 | export default getVrtVaultUserInfo; 15 | -------------------------------------------------------------------------------- /src/clients/api/queries/getVrtVaultUserInfo/types.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import { VrtVault } from 'types/contracts'; 4 | 5 | export interface GetVrtVaultUserInfoInput { 6 | vrtVaultContract: VrtVault; 7 | accountAddress: string; 8 | } 9 | 10 | export interface GetVrtVaultUserInfoOutput { 11 | stakedVrtWei: BigNumber; 12 | } 13 | -------------------------------------------------------------------------------- /src/clients/api/queries/getXvsVaultLockedDeposits/__snapshots__/index.spec.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`api/queries/getXvsVaultLockedDeposits returns withdrawal requests on success 1`] = ` 4 | Object { 5 | "lockedDeposits": Array [ 6 | Object { 7 | "amountWei": "1000000000000000000", 8 | "unlockedAt": 2022-06-29T10:43:24.000Z, 9 | }, 10 | Object { 11 | "amountWei": "2000000000000000000", 12 | "unlockedAt": 2022-06-30T14:30:04.000Z, 13 | }, 14 | Object { 15 | "amountWei": "3000000000000000000", 16 | "unlockedAt": 2022-07-01T18:16:44.000Z, 17 | }, 18 | ], 19 | } 20 | `; 21 | -------------------------------------------------------------------------------- /src/clients/api/queries/getXvsVaultLockedDeposits/formatToLockedDeposit.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | import { LockedDeposit } from 'types'; 3 | 4 | import { XvsVault } from 'types/contracts'; 5 | 6 | const formatToLockedDeposit = ([amount, lockedUntil]: Awaited< 7 | ReturnType['call']> 8 | >[number]): LockedDeposit => { 9 | // lockedUntil is a timestamp expressed in seconds, so we convert it to milliseconds 10 | const lockedUntilMs = +lockedUntil * 1000; 11 | const unlockedAt = new Date(lockedUntilMs); 12 | 13 | return { 14 | amountWei: new BigNumber(amount), 15 | unlockedAt, 16 | }; 17 | }; 18 | 19 | export default formatToLockedDeposit; 20 | -------------------------------------------------------------------------------- /src/clients/api/queries/getXvsVaultLockedDeposits/types.ts: -------------------------------------------------------------------------------- 1 | import { LockedDeposit } from 'types'; 2 | 3 | import { XvsVault } from 'types/contracts'; 4 | 5 | export interface GetXvsVaultLockedDepositsInput { 6 | xvsVaultContract: XvsVault; 7 | rewardTokenAddress: string; 8 | poolIndex: number; 9 | accountAddress: string; 10 | } 11 | 12 | export type GetXvsVaultLockedDepositsOutput = { 13 | lockedDeposits: LockedDeposit[]; 14 | }; 15 | -------------------------------------------------------------------------------- /src/clients/api/queries/getXvsVaultPoolCount/index.ts: -------------------------------------------------------------------------------- 1 | import { getToken } from 'utilities'; 2 | 3 | import { XvsVault } from 'types/contracts'; 4 | 5 | export interface GetXvsVaultPoolCountInput { 6 | xvsVaultContract: XvsVault; 7 | } 8 | 9 | export type GetXvsVaultPoolCountOutput = { 10 | poolCount: number; 11 | }; 12 | 13 | const getXvsVaultPoolCount = async ({ 14 | xvsVaultContract, 15 | }: GetXvsVaultPoolCountInput): Promise => { 16 | const xvsTokenAddress = getToken('xvs').address; 17 | const xvsVaultPoolLength = await xvsVaultContract.methods.poolLength(xvsTokenAddress).call(); 18 | 19 | return { 20 | poolCount: +xvsVaultPoolLength, 21 | }; 22 | }; 23 | 24 | export default getXvsVaultPoolCount; 25 | -------------------------------------------------------------------------------- /src/clients/api/queries/getXvsVaultPoolInfo/__snapshots__/index.spec.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`api/queries/getXvsVaultPoolInfo returns the pool infos on success 1`] = ` 4 | Object { 5 | "accRewardPerShare": "123871680", 6 | "allocationPoint": 10, 7 | "lastRewardBlock": 100000, 8 | "lockingPeriodMs": 200000, 9 | "stakedTokenAddress": "0x4B7268FC7C727B88c5Fc127D41b491BfAe63e144", 10 | } 11 | `; 12 | -------------------------------------------------------------------------------- /src/clients/api/queries/getXvsVaultPoolInfo/index.ts: -------------------------------------------------------------------------------- 1 | import formatToPoolInfo from './formatToPoolInfo'; 2 | import { GetXvsVaultPoolInfoInput, GetXvsVaultPoolInfoOutput } from './types'; 3 | 4 | export * from './types'; 5 | 6 | const getXvsVaultPoolInfo = async ({ 7 | xvsVaultContract, 8 | rewardTokenAddress, 9 | poolIndex, 10 | }: GetXvsVaultPoolInfoInput): Promise => { 11 | const res = await xvsVaultContract.methods.poolInfos(rewardTokenAddress, poolIndex).call(); 12 | return formatToPoolInfo(res); 13 | }; 14 | 15 | export default getXvsVaultPoolInfo; 16 | -------------------------------------------------------------------------------- /src/clients/api/queries/getXvsVaultPoolInfo/types.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import { XvsVault } from 'types/contracts'; 4 | 5 | export interface GetXvsVaultPoolInfoInput { 6 | xvsVaultContract: XvsVault; 7 | rewardTokenAddress: string; 8 | poolIndex: number; 9 | } 10 | 11 | export interface GetXvsVaultPoolInfoOutput { 12 | stakedTokenAddress: string; 13 | allocationPoint: number; 14 | lastRewardBlock: number; 15 | accRewardPerShare: BigNumber; 16 | lockingPeriodMs: number; 17 | } 18 | -------------------------------------------------------------------------------- /src/clients/api/queries/getXvsVaultTotalAllocationPoints/index.ts: -------------------------------------------------------------------------------- 1 | import { XvsVault } from 'types/contracts'; 2 | 3 | export interface GetXvsVaultTotalAllocPointsInput { 4 | xvsVaultContract: XvsVault; 5 | tokenAddress: string; 6 | } 7 | 8 | export type GetXvsVaultTotalAllocPointsOutput = { 9 | totalAllocationPoints: number; 10 | }; 11 | 12 | const getXvsVaultTotalAllocationPoints = async ({ 13 | xvsVaultContract, 14 | tokenAddress, 15 | }: GetXvsVaultTotalAllocPointsInput): Promise => { 16 | const res = await xvsVaultContract.methods.totalAllocPoints(tokenAddress).call(); 17 | 18 | return { 19 | totalAllocationPoints: +res, 20 | }; 21 | }; 22 | 23 | export default getXvsVaultTotalAllocationPoints; 24 | -------------------------------------------------------------------------------- /src/clients/api/queries/getXvsVaultUserInfo/__snapshots__/index.spec.ts.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`api/queries/getXvsVaultUserInfo returns user info related to XVS vault in correct format on success 1`] = ` 4 | Object { 5 | "pendingWithdrawalsTotalAmountWei": "1000000000000000000", 6 | "rewardDebtAmountWei": "2000000000000000000", 7 | "stakedAmountWei": "30000000000000000000", 8 | } 9 | `; 10 | -------------------------------------------------------------------------------- /src/clients/api/queries/getXvsVaultUserInfo/formatToUserInfo.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import { XvsVault } from 'types/contracts'; 4 | 5 | import { GetXvsVaultUserInfoOutput } from './types'; 6 | 7 | const formatToUserInfo = ({ 8 | amount, 9 | pendingWithdrawals, 10 | rewardDebt, 11 | }: Awaited< 12 | ReturnType['call']> 13 | >): GetXvsVaultUserInfoOutput => ({ 14 | stakedAmountWei: new BigNumber(amount), 15 | pendingWithdrawalsTotalAmountWei: new BigNumber(pendingWithdrawals), 16 | rewardDebtAmountWei: new BigNumber(rewardDebt), 17 | }); 18 | 19 | export default formatToUserInfo; 20 | -------------------------------------------------------------------------------- /src/clients/api/queries/getXvsVaultUserInfo/index.ts: -------------------------------------------------------------------------------- 1 | import formatToUserInfo from './formatToUserInfo'; 2 | import { GetXvsVaultUserInfoInput, GetXvsVaultUserInfoOutput } from './types'; 3 | 4 | export * from './types'; 5 | 6 | const getXvsVaultUserInfo = async ({ 7 | xvsVaultContract, 8 | rewardTokenAddress, 9 | poolIndex, 10 | accountAddress, 11 | }: GetXvsVaultUserInfoInput): Promise => { 12 | const res = await xvsVaultContract.methods 13 | .getUserInfo(rewardTokenAddress, poolIndex, accountAddress) 14 | .call(); 15 | 16 | return formatToUserInfo(res); 17 | }; 18 | 19 | export default getXvsVaultUserInfo; 20 | -------------------------------------------------------------------------------- /src/clients/api/queries/getXvsVaultUserInfo/types.ts: -------------------------------------------------------------------------------- 1 | import BigNumber from 'bignumber.js'; 2 | 3 | import { XvsVault } from 'types/contracts'; 4 | 5 | export interface GetXvsVaultUserInfoInput { 6 | xvsVaultContract: XvsVault; 7 | rewardTokenAddress: string; 8 | poolIndex: number; 9 | accountAddress: string; 10 | } 11 | 12 | export interface GetXvsVaultUserInfoOutput { 13 | stakedAmountWei: BigNumber; 14 | pendingWithdrawalsTotalAmountWei: BigNumber; 15 | rewardDebtAmountWei: BigNumber; 16 | } 17 | -------------------------------------------------------------------------------- /src/clients/api/queryClient.ts: -------------------------------------------------------------------------------- 1 | import { QueryClient } from 'react-query'; 2 | 3 | const queryClient = new QueryClient({ 4 | defaultOptions: { 5 | queries: { 6 | // Set a stale time of 10 seconds so query results don't get wiped out of 7 | // the cache instantly after their hook unmounts (see documentation for 8 | // more info: https://react-query.tanstack.com/guides/important-defaults) 9 | staleTime: 10000, 10 | }, 11 | }, 12 | }); 13 | export default queryClient; 14 | -------------------------------------------------------------------------------- /src/clients/contracts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './getters'; 2 | export * from './hooks'; 3 | -------------------------------------------------------------------------------- /src/clients/contracts/types.ts: -------------------------------------------------------------------------------- 1 | import { TokenId, VTokenId } from 'types'; 2 | 3 | import { Bep20, VBep20, VBnbToken, VaiToken, VrtToken, XvsToken } from 'types/contracts'; 4 | 5 | export type TokenContract = T extends 'xvs' 6 | ? XvsToken 7 | : T extends 'vai' 8 | ? VaiToken 9 | : T extends 'vrt' 10 | ? VrtToken 11 | : Bep20; 12 | 13 | export type VTokenContract = T extends 'bnb' ? VBnbToken : VBep20; 14 | -------------------------------------------------------------------------------- /src/clients/web3/Web3Wrapper/index.tsx: -------------------------------------------------------------------------------- 1 | import { Web3ReactProvider } from '@web3-react/core'; 2 | import React from 'react'; 3 | 4 | import Web3ReactManager from './Web3ReactManager'; 5 | 6 | const Web3Wrapper: React.FC = ({ children }) => ( 7 | provider}> 8 | {children} 9 | 10 | ); 11 | 12 | export default Web3Wrapper; 13 | -------------------------------------------------------------------------------- /src/clients/web3/getWeb3NoAccount.ts: -------------------------------------------------------------------------------- 1 | import config from 'config'; 2 | import Web3 from 'web3'; 3 | 4 | // @todo: we will get the "No 'Access-Control-Allow-Origin' header is present on the requested resource" 5 | // error on the frontend in testnet when the wallet is unconnected, because the bsc official testnet endpoints 6 | // don't support CORS request right now, and we didn't find any working testnet endpoints for 7 | // HTTPProvider or WebSocketProvider neither. 8 | const getWeb3NoAccount = () => { 9 | const httpProvider = new Web3.providers.HttpProvider(config.rpcUrl, { 10 | timeout: 10000, 11 | }); 12 | const web3NoAccount = new Web3(httpProvider); 13 | return web3NoAccount; 14 | }; 15 | 16 | export default getWeb3NoAccount; 17 | -------------------------------------------------------------------------------- /src/clients/web3/index.ts: -------------------------------------------------------------------------------- 1 | export { useWeb3React as useWeb3Account } from '@web3-react/core'; 2 | 3 | export { default as useWeb3 } from './useWeb3'; 4 | export { default as useEagerConnect } from './useEagerConnect'; 5 | export { default as useInactiveListener } from './useInactiveListener'; 6 | export { default as useAuth } from './useAuth'; 7 | export { default as getWeb3NoAccount } from './getWeb3NoAccount'; 8 | export { default as Web3Wrapper } from './Web3Wrapper'; 9 | export * from './connectors'; 10 | export * from './types'; 11 | -------------------------------------------------------------------------------- /src/clients/web3/types.ts: -------------------------------------------------------------------------------- 1 | export enum Connector { 2 | MetaMask = 'MetaMask', 3 | TrustWallet = 'TrustWallet', 4 | WalletConnect = 'WalletConnect', 5 | CoinbaseWallet = 'CoinbaseWallet', 6 | BinanceChainWallet = 'BinanceChainWallet', 7 | BraveWallet = 'BraveWallet', 8 | InfinityWallet = 'InfinityWallet', 9 | OperaWallet = 'OperaWallet', 10 | BitKeep = 'BitKeep', 11 | } 12 | -------------------------------------------------------------------------------- /src/clients/web3/useWeb3.ts: -------------------------------------------------------------------------------- 1 | import { useWeb3React } from '@web3-react/core'; 2 | import { useEffect, useRef, useState } from 'react'; 3 | import Web3 from 'web3'; 4 | 5 | import getWeb3NoAccount from './getWeb3NoAccount'; 6 | 7 | const useWeb3 = () => { 8 | const { library } = useWeb3React(); 9 | const refEth = useRef(library); 10 | const [web3, setWeb3] = useState(library ? new Web3(library) : getWeb3NoAccount()); 11 | 12 | useEffect(() => { 13 | if (library !== refEth.current) { 14 | setWeb3(library ? new Web3(library) : getWeb3NoAccount()); 15 | refEth.current = library; 16 | } 17 | }, [library]); 18 | 19 | return web3; 20 | }; 21 | 22 | export default useWeb3; 23 | -------------------------------------------------------------------------------- /src/clients/web3/walletDetectionUtils.ts: -------------------------------------------------------------------------------- 1 | export const isRunningInOperaBrowser = () => window.ethereum?.isOpera; 2 | 3 | export const isRunningInBinanceChainWallet = () => !!window.BinanceChain; 4 | -------------------------------------------------------------------------------- /src/components/ActiveVotingProgress/styles.tsx: -------------------------------------------------------------------------------- 1 | import { css } from '@emotion/react'; 2 | import { useTheme } from '@mui/material'; 3 | 4 | export const useStyles = () => { 5 | const theme = useTheme(); 6 | return { 7 | votesWrapper: css` 8 | display: flex; 9 | flex-direction: column; 10 | width: 100%; 11 | `, 12 | bar: css` 13 | :nth-of-type(2) { 14 | margin: ${theme.spacing(6)} 0; 15 | } 16 | `, 17 | }; 18 | }; 19 | -------------------------------------------------------------------------------- /src/components/AuthModal/types.ts: -------------------------------------------------------------------------------- 1 | import { Connector } from 'clients/web3'; 2 | 3 | export type BaseWallet = { 4 | name: string; 5 | Logo: React.FC>; 6 | }; 7 | 8 | export type Wallet = BaseWallet & { 9 | connector: Connector; 10 | mainnetOnly?: boolean; 11 | }; 12 | 13 | // Integrated wallets represent wallets that are integrated through third-party 14 | // apps but not directly from our dApp. These wallets are displayed on the UI as 15 | // options that on click redirect to a web page explaining how to set them up 16 | // through a third-party app (e.g.: MetaMask). 17 | export type IntegratedWallet = BaseWallet & { 18 | linkUrl: string; 19 | }; 20 | -------------------------------------------------------------------------------- /src/components/BscLink/index.stories.tsx: -------------------------------------------------------------------------------- 1 | import { ComponentMeta } from '@storybook/react'; 2 | import React from 'react'; 3 | 4 | import { withCenterStory, withThemeProvider } from 'stories/decorators'; 5 | 6 | import { BscLink } from '.'; 7 | 8 | export default { 9 | title: 'Components/BscLink', 10 | component: BscLink, 11 | decorators: [withThemeProvider, withCenterStory({ width: 600 })], 12 | } as ComponentMeta; 13 | 14 | export const Default = () => ( 15 | 16 | ); 17 | -------------------------------------------------------------------------------- /src/components/Button/types.ts: -------------------------------------------------------------------------------- 1 | export type Variant = 'primary' | 'secondary' | 'tertiary' | 'text'; 2 | -------------------------------------------------------------------------------- /src/components/Checkbox/styles.ts: -------------------------------------------------------------------------------- 1 | import { css } from '@emotion/react'; 2 | import { useTheme } from '@mui/material'; 3 | 4 | export const useStyles = () => { 5 | const theme = useTheme(); 6 | return { 7 | root: css` 8 | padding: 0; 9 | 10 | svg { 11 | height: ${theme.spacing(6)}; 12 | width: ${theme.spacing(6)}; 13 | } 14 | :hover { 15 | svg { 16 | color: ${theme.palette.interactive.primary}; 17 | } 18 | } 19 | `, 20 | }; 21 | }; 22 | 23 | export default useStyles; 24 | -------------------------------------------------------------------------------- /src/components/ConnectWallet/index.stories.tsx: -------------------------------------------------------------------------------- 1 | import { ComponentMeta } from '@storybook/react'; 2 | import noop from 'noop-ts'; 3 | import React from 'react'; 4 | 5 | import { withCenterStory } from 'stories/decorators'; 6 | 7 | import { Prompt as PromptUi } from '.'; 8 | 9 | export default { 10 | title: 'Components/ConnectWallet', 11 | component: PromptUi, 12 | decorators: [withCenterStory({ width: 450 })], 13 | } as ComponentMeta; 14 | 15 | export const Prompt = () => ( 16 | 17 | Protected content 18 | 19 | ); 20 | -------------------------------------------------------------------------------- /src/components/ConnectWallet/styles.ts: -------------------------------------------------------------------------------- 1 | import { css } from '@emotion/react'; 2 | import { useTheme } from '@mui/material'; 3 | 4 | export const useStyles = () => { 5 | const theme = useTheme(); 6 | 7 | return { 8 | container: css` 9 | width: 100%; 10 | `, 11 | notice: css` 12 | margin-bottom: ${theme.spacing(10)}; 13 | `, 14 | }; 15 | }; 16 | -------------------------------------------------------------------------------- /src/components/Countdown/styles.ts: -------------------------------------------------------------------------------- 1 | import { css } from '@emotion/react'; 2 | import { useTheme } from '@mui/material'; 3 | 4 | export const useStyles = () => { 5 | const theme = useTheme(); 6 | 7 | return { 8 | activeUntilDate: css` 9 | padding-left: ${theme.spacing(1)}; 10 | `, 11 | }; 12 | }; 13 | -------------------------------------------------------------------------------- /src/components/Delimiter/index.stories.tsx: -------------------------------------------------------------------------------- 1 | import { ComponentMeta } from '@storybook/react'; 2 | import React from 'react'; 3 | 4 | import { withCenterStory, withThemeProvider } from 'stories/decorators'; 5 | 6 | import { Delimiter } from '.'; 7 | 8 | export default { 9 | title: 'Components/Delimiter', 10 | component: Delimiter, 11 | decorators: [withThemeProvider, withCenterStory({ width: 650 })], 12 | } as ComponentMeta; 13 | 14 | export const Default = () => ( 15 | <> 16 | Some text 17 | 18 | and some more text 19 | 20 | ); 21 | -------------------------------------------------------------------------------- /src/components/Delimiter/index.tsx: -------------------------------------------------------------------------------- 1 | /** @jsxImportSource @emotion/react */ 2 | import React from 'react'; 3 | 4 | import { useDelimiterStyles as useStyles } from './styles'; 5 | 6 | interface DelimiterProps { 7 | className?: string; 8 | } 9 | 10 | export const Delimiter = ({ className }: DelimiterProps) => { 11 | const styles = useStyles(); 12 | return
; 13 | }; 14 | -------------------------------------------------------------------------------- /src/components/Delimiter/styles.ts: -------------------------------------------------------------------------------- 1 | import { css } from '@emotion/react'; 2 | import { useTheme } from '@mui/material'; 3 | 4 | export const useDelimiterStyles = () => { 5 | const theme = useTheme(); 6 | 7 | return { 8 | root: css` 9 | margin-top: 0; 10 | margin-bottom: 0; 11 | border-color: ${theme.palette.secondary.light}; 12 | border-style: solid; 13 | `, 14 | }; 15 | }; 16 | -------------------------------------------------------------------------------- /src/components/EllipseAddress/index.stories.tsx: -------------------------------------------------------------------------------- 1 | import { ComponentMeta } from '@storybook/react'; 2 | import React from 'react'; 3 | 4 | import fakeAddress from '__mocks__/models/address'; 5 | import { withCenterStory } from 'stories/decorators'; 6 | 7 | import { EllipseAddress } from '.'; 8 | 9 | export default { 10 | title: 'Components/EnableToken', 11 | component: EllipseAddress, 12 | decorators: [withCenterStory({ width: 450 })], 13 | } as ComponentMeta; 14 | 15 | export const Default = () => ; 16 | 17 | export const WithEllipseBreakpoint = () => ( 18 | 19 | ); 20 | -------------------------------------------------------------------------------- /src/components/EllipseAddress/types.ts: -------------------------------------------------------------------------------- 1 | import { BREAKPOINTS } from 'theme/MuiThemeProvider/muiTheme'; 2 | 3 | export type Breakpoint = keyof typeof BREAKPOINTS.values; 4 | -------------------------------------------------------------------------------- /src/components/Form/index.ts: -------------------------------------------------------------------------------- 1 | export * from './FormikSubmitButton'; 2 | export * from './FormikTokenTextField'; 3 | export * from './FormikTextField'; 4 | export * from './FormikMarkdownEditor'; 5 | -------------------------------------------------------------------------------- /src/components/Icon/icons/arrowRight.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgArrowRight = (props: SVGProps) => ( 5 | 6 | 7 | 8 | ); 9 | 10 | export default SvgArrowRight; 11 | -------------------------------------------------------------------------------- /src/components/Icon/icons/arrowShaft.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgArrowShaft = (props: SVGProps) => ( 5 | 6 | 7 | 8 | ); 9 | 10 | export default SvgArrowShaft; 11 | -------------------------------------------------------------------------------- /src/components/Icon/icons/arrowUp.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgarrowUp = (props: SVGProps) => ( 5 | 6 | 10 | 11 | ); 12 | 13 | export default SvgarrowUp; 14 | -------------------------------------------------------------------------------- /src/components/Icon/icons/bubble.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgBubble = (props: SVGProps) => ( 5 | 6 | 13 | 14 | ); 15 | 16 | export default SvgBubble; 17 | -------------------------------------------------------------------------------- /src/components/Icon/icons/burger.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgBurger = (props: SVGProps) => ( 5 | 6 | 7 | 8 | ); 9 | 10 | export default SvgBurger; 11 | -------------------------------------------------------------------------------- /src/components/Icon/icons/check.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgCheck = (props: SVGProps) => ( 5 | 12 | 13 | 20 | 21 | ); 22 | 23 | export default SvgCheck; 24 | -------------------------------------------------------------------------------- /src/components/Icon/icons/checkInline.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgCheckInline = (props: SVGProps) => ( 5 | 6 | 11 | 18 | 19 | ); 20 | 21 | export default SvgCheckInline; 22 | -------------------------------------------------------------------------------- /src/components/Icon/icons/checkboxBorder.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgCheckboxBorder = (props: SVGProps) => ( 5 | 6 | 7 | 8 | ); 9 | 10 | export default SvgCheckboxBorder; 11 | -------------------------------------------------------------------------------- /src/components/Icon/icons/checked.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgChecked = (props: SVGProps) => ( 5 | 6 | 7 | 14 | 15 | ); 16 | 17 | export default SvgChecked; 18 | -------------------------------------------------------------------------------- /src/components/Icon/icons/chevronLeft.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgChevronLeft = (props: SVGProps) => ( 5 | 6 | 7 | 8 | ); 9 | 10 | export default SvgChevronLeft; 11 | -------------------------------------------------------------------------------- /src/components/Icon/icons/chevronRight.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgChevronRight = (props: SVGProps) => ( 5 | 6 | 7 | 8 | ); 9 | 10 | export default SvgChevronRight; 11 | -------------------------------------------------------------------------------- /src/components/Icon/icons/close.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgClose = (props: SVGProps) => ( 5 | 6 | 7 | 8 | 9 | ); 10 | 11 | export default SvgClose; 12 | -------------------------------------------------------------------------------- /src/components/Icon/icons/convert.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgConvert = (props: SVGProps) => ( 5 | 6 | 13 | 14 | ); 15 | 16 | export default SvgConvert; 17 | -------------------------------------------------------------------------------- /src/components/Icon/icons/copy.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgCopy = (props: SVGProps) => ( 5 | 6 | 10 | 11 | ); 12 | 13 | export default SvgCopy; 14 | -------------------------------------------------------------------------------- /src/components/Icon/icons/dashboard.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgDashboard = (props: SVGProps) => ( 5 | 6 | 7 | 12 | 13 | ); 14 | 15 | export default SvgDashboard; 16 | -------------------------------------------------------------------------------- /src/components/Icon/icons/dots.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgDots = (props: SVGProps) => ( 5 | 13 | 14 | 15 | 16 | 17 | ); 18 | 19 | export default SvgDots; 20 | -------------------------------------------------------------------------------- /src/components/Icon/icons/exclamation.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgExclamation = (props: SVGProps) => ( 5 | 6 | 7 | 8 | 9 | ); 10 | 11 | export default SvgExclamation; 12 | -------------------------------------------------------------------------------- /src/components/Icon/icons/info.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgInfo = (props: SVGProps) => ( 5 | 6 | 11 | 12 | 13 | 14 | ); 15 | 16 | export default SvgInfo; 17 | -------------------------------------------------------------------------------- /src/components/Icon/icons/loading.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgLoading = (props: SVGProps) => ( 5 | 6 | 10 | 19 | 20 | 21 | ); 22 | 23 | export default SvgLoading; 24 | -------------------------------------------------------------------------------- /src/components/Icon/icons/longArrow.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgLongArrow = (props: SVGProps) => ( 5 | 6 | 7 | 8 | ); 9 | 10 | export default SvgLongArrow; 11 | -------------------------------------------------------------------------------- /src/components/Icon/icons/mark.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgMark = (props: SVGProps) => ( 5 | 6 | 13 | 14 | ); 15 | 16 | export default SvgMark; 17 | -------------------------------------------------------------------------------- /src/components/Icon/icons/market.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgMarket = (props: SVGProps) => ( 5 | 6 | 7 | 8 | 9 | 10 | ); 11 | 12 | export default SvgMarket; 13 | -------------------------------------------------------------------------------- /src/components/Icon/icons/mask.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgMask = (props: SVGProps) => ( 5 | 6 | 7 | 8 | ); 9 | 10 | export default SvgMask; 11 | -------------------------------------------------------------------------------- /src/components/Icon/icons/medium.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgMedium = (props: SVGProps) => ( 5 | 6 | 10 | 11 | ); 12 | 13 | export default SvgMedium; 14 | -------------------------------------------------------------------------------- /src/components/Icon/icons/open.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgOpen = (props: SVGProps) => ( 5 | 6 | 10 | 11 | ); 12 | 13 | export default SvgOpen; 14 | -------------------------------------------------------------------------------- /src/components/Icon/icons/shield.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgShield = (props: SVGProps) => ( 5 | 6 | 10 | 11 | 12 | ); 13 | 14 | export default SvgShield; 15 | -------------------------------------------------------------------------------- /src/components/Icon/icons/sort.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgSort = (props: SVGProps) => ( 5 | 6 | 7 | 8 | ); 9 | 10 | export default SvgSort; 11 | -------------------------------------------------------------------------------- /src/components/Icon/icons/tokens/busd.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgBusd = (props: SVGProps) => ( 5 | 6 | 7 | 11 | 12 | ); 13 | 14 | export default SvgBusd; 15 | -------------------------------------------------------------------------------- /src/components/Icon/icons/tokens/link.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgLink = (props: SVGProps) => ( 5 | 6 | 7 | 11 | 12 | ); 13 | 14 | export default SvgLink; 15 | -------------------------------------------------------------------------------- /src/components/Icon/icons/tokens/tusd.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgTusd = (props: SVGProps) => ( 5 | 6 | 7 | 11 | 12 | ); 13 | 14 | export default SvgTusd; 15 | -------------------------------------------------------------------------------- /src/components/Icon/icons/tokens/vrt.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgVrt = (props: SVGProps) => ( 5 | 6 | 7 | 13 | 14 | ); 15 | 16 | export default SvgVrt; 17 | -------------------------------------------------------------------------------- /src/components/Icon/icons/tokens/xrp.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgXrp = (props: SVGProps) => ( 5 | 6 | 7 | 11 | 12 | ); 13 | 14 | export default SvgXrp; 15 | -------------------------------------------------------------------------------- /src/components/Icon/icons/twitter.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgTwitter = (props: SVGProps) => ( 5 | 6 | 10 | 11 | ); 12 | 13 | export default SvgTwitter; 14 | -------------------------------------------------------------------------------- /src/components/Icon/icons/vote.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgVote = (props: SVGProps) => ( 5 | 6 | 7 | 8 | 9 | 10 | 11 | ); 12 | 13 | export default SvgVote; 14 | -------------------------------------------------------------------------------- /src/components/Icon/icons/vrt.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgVrt = (props: SVGProps) => ( 5 | 6 | 7 | 13 | 14 | ); 15 | 16 | export default SvgVrt; 17 | -------------------------------------------------------------------------------- /src/components/Icon/icons/wallet.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { SVGProps } from 'react'; 3 | 4 | const SvgWallet = (props: SVGProps) => ( 5 | 6 | 7 | 12 | 13 | ); 14 | 15 | export default SvgWallet; 16 | -------------------------------------------------------------------------------- /src/components/InfoIcon/index.stories.tsx: -------------------------------------------------------------------------------- 1 | import { ComponentMeta } from '@storybook/react'; 2 | import React from 'react'; 3 | 4 | import { withCenterStory } from 'stories/decorators'; 5 | 6 | import { InfoIcon } from '.'; 7 | 8 | export default { 9 | title: 'Components/InfoIcon', 10 | component: InfoIcon, 11 | decorators: [withCenterStory({ width: 100 })], 12 | } as ComponentMeta; 13 | 14 | export const Default = () => ; 15 | -------------------------------------------------------------------------------- /src/components/InfoIcon/index.tsx: -------------------------------------------------------------------------------- 1 | /** @jsxImportSource @emotion/react */ 2 | import React from 'react'; 3 | 4 | import { Icon } from '../Icon'; 5 | import { Tooltip } from '../Tooltip'; 6 | import { useStyles } from './styles'; 7 | 8 | export interface InfoIconProps { 9 | tooltip: string; 10 | className?: string; 11 | } 12 | 13 | export const InfoIcon = ({ tooltip, className }: InfoIconProps) => { 14 | const styles = useStyles(); 15 | 16 | return ( 17 | 18 | 19 | 20 | ); 21 | }; 22 | -------------------------------------------------------------------------------- /src/components/InfoIcon/styles.ts: -------------------------------------------------------------------------------- 1 | import { css } from '@emotion/react'; 2 | 3 | export const useStyles = () => ({ 4 | container: css` 5 | display: inline-flex; 6 | `, 7 | icon: css` 8 | cursor: help; 9 | `, 10 | }); 11 | -------------------------------------------------------------------------------- /src/components/IsolatedAssetWarning/AssetTable/testIds.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | assetTable: 'isolated-asset-warning-asset-table', 3 | }; 4 | -------------------------------------------------------------------------------- /src/components/IsolatedAssetWarning/__snapshots__/index.spec.tsx.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`components/IsolatedAssetWarning displays list of assets correctly 1`] = `"USDC-5.36%$8,587.22BBUSD-4.05%$839.1MUSDT-4.97%$31.58MSXP-2.31%$709.26K"`; 4 | -------------------------------------------------------------------------------- /src/components/IsolatedAssetWarning/styles.ts: -------------------------------------------------------------------------------- 1 | import { css } from '@emotion/react'; 2 | import { useTheme } from '@mui/material'; 3 | 4 | export const useStyles = () => { 5 | const theme = useTheme(); 6 | 7 | return { 8 | container: css` 9 | position: relative; 10 | `, 11 | notice: css` 12 | padding: ${theme.spacing(3)}; 13 | border-radius: ${theme.spacing(3)}; 14 | margin-bottom: ${theme.spacing(2)}; 15 | `, 16 | description: css` 17 | margin-bottom: ${theme.spacing(2)}; 18 | `, 19 | inlineButton: css` 20 | padding: 0; 21 | 22 | > span { 23 | font-weight: ${theme.typography.body1.fontWeight}; 24 | } 25 | `, 26 | }; 27 | }; 28 | -------------------------------------------------------------------------------- /src/components/IsolatedAssetWarning/types.ts: -------------------------------------------------------------------------------- 1 | export type WarningType = 'borrow' | 'supply'; 2 | -------------------------------------------------------------------------------- /src/components/LayeredValues/index.stories.tsx: -------------------------------------------------------------------------------- 1 | import { ComponentMeta } from '@storybook/react'; 2 | import React from 'react'; 3 | 4 | import { withCenterStory } from 'stories/decorators'; 5 | 6 | import LayeredValue from '.'; 7 | 8 | export default { 9 | title: 'Components/LayeredValue', 10 | component: LayeredValue, 11 | decorators: [withCenterStory({ width: 55 })], 12 | } as ComponentMeta; 13 | 14 | export const Default = () => ; 15 | -------------------------------------------------------------------------------- /src/components/LayeredValues/styles.ts: -------------------------------------------------------------------------------- 1 | import { css } from '@emotion/react'; 2 | import { useTheme } from '@mui/material'; 3 | 4 | export const useStyles = () => { 5 | const theme = useTheme(); 6 | 7 | return { 8 | container: css` 9 | display: flex; 10 | flex-direction: column; 11 | `, 12 | topValue: css` 13 | color: ${theme.palette.text.primary}; 14 | `, 15 | }; 16 | }; 17 | -------------------------------------------------------------------------------- /src/components/Layout/ClaimXvsRewardButton/styles.ts: -------------------------------------------------------------------------------- 1 | import { css } from '@emotion/react'; 2 | import { useTheme } from '@mui/material'; 3 | 4 | export const useStyles = () => { 5 | const theme = useTheme(); 6 | 7 | return { 8 | button: css` 9 | white-space: nowrap; 10 | border-color: ${theme.palette.background.paper}; 11 | 12 | > span { 13 | display: flex; 14 | align-items: center; 15 | } 16 | `, 17 | icon: css` 18 | margin-left: ${theme.spacing(2)}; 19 | margin-right: ${theme.spacing(2)}; 20 | width: ${theme.spacing(6)}; 21 | height: ${theme.spacing(6)}; 22 | `, 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /src/components/Layout/Footer/constants.ts: -------------------------------------------------------------------------------- 1 | export const VENUS_MEDIUM_URL = 'https://medium.com/@Venus_protocol'; 2 | export const VENUS_DISCORD_URL = 'https://discord.com/invite/pTQ9EBHYtF'; 3 | export const VENUS_TWITTER_URL = 'https://twitter.com/VenusProtocol'; 4 | export const VENUS_GITHUB_URL = 'https://github.com/VenusProtocol/'; 5 | -------------------------------------------------------------------------------- /src/components/Layout/Footer/index.stories.tsx: -------------------------------------------------------------------------------- 1 | import { ComponentMeta } from '@storybook/react'; 2 | import React from 'react'; 3 | 4 | import { FooterUi } from '.'; 5 | 6 | export default { 7 | title: 'Components/Layout/Footer', 8 | component: FooterUi, 9 | } as ComponentMeta; 10 | 11 | export const FooterDefault = () => ; 12 | -------------------------------------------------------------------------------- /src/components/Layout/Header/index.stories.tsx: -------------------------------------------------------------------------------- 1 | import { ComponentMeta } from '@storybook/react'; 2 | import React from 'react'; 3 | import { MemoryRouter, Route } from 'react-router'; 4 | 5 | import { withRouter, withThemeProvider } from 'stories/decorators'; 6 | 7 | import Header from '.'; 8 | 9 | export default { 10 | title: 'Components/Layout/Header', 11 | component: Header, 12 | decorators: [withThemeProvider, withRouter], 13 | } as ComponentMeta; 14 | 15 | export const HeaderDefault = () => ( 16 |
17 | 18 | 19 | 20 |
21 | ); 22 | -------------------------------------------------------------------------------- /src/components/Layout/PageContainer/index.stories.tsx: -------------------------------------------------------------------------------- 1 | import { ComponentMeta } from '@storybook/react'; 2 | import React from 'react'; 3 | 4 | import { withRouter } from 'stories/decorators'; 5 | 6 | import { PageContainer } from '.'; 7 | 8 | export default { 9 | title: 'Components/Layout/PageContainer', 10 | component: PageContainer, 11 | decorators: [withRouter], 12 | } as ComponentMeta; 13 | 14 | export const PageContainerDefault = () => Hello from storybook; 15 | -------------------------------------------------------------------------------- /src/components/Layout/PageContainer/index.tsx: -------------------------------------------------------------------------------- 1 | /** @jsxImportSource @emotion/react */ 2 | import Box from '@mui/material/Box'; 3 | import React, { ReactNode } from 'react'; 4 | 5 | import Footer from '../Footer'; 6 | import { useStyles } from './styles'; 7 | 8 | interface PageContainerProps { 9 | children: ReactNode; 10 | } 11 | 12 | export const PageContainer = ({ children }: PageContainerProps) => { 13 | const styles = useStyles(); 14 | return ( 15 | <> 16 | 17 | {children} 18 | 19 | 20 |