diff --git a/sonar-project.properties b/sonar-project.properties index 98f064f6a..081be0602 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1 +1 @@ -sonar.projectKey=oraichain_oraiscan-frontend_AYa6x_5MjQmnUOm4jDP9 \ No newline at end of file +sonar.projectKey=oraichain_oraiscan-frontend_AYoDFGkVkauZkVxG9Y0Q \ No newline at end of file diff --git a/src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimCardList/ClaimCardList.js b/src/components/DelegatedValidator/DelegatedClaim/ClaimCardList/ClaimCardList.js similarity index 95% rename from src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimCardList/ClaimCardList.js rename to src/components/DelegatedValidator/DelegatedClaim/ClaimCardList/ClaimCardList.js index c0bde7e3e..8cad54c07 100644 --- a/src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimCardList/ClaimCardList.js +++ b/src/components/DelegatedValidator/DelegatedClaim/ClaimCardList/ClaimCardList.js @@ -12,7 +12,7 @@ import {walletStation} from "src/lib/walletStation"; import {notification} from "antd"; import {handleTransactionResponse} from "src/helpers/transaction"; import LoadingOverlay from "src/components/common/LoadingOverlay"; -import {handleErrorMessage} from "../../../../../lib/scripts"; +import {handleErrorMessage} from "src/lib/scripts.js"; import styles from "./ClaimCardList.module.scss"; const cx = classNames.bind(styles); diff --git a/src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimCardList/ClaimCardList.module.scss b/src/components/DelegatedValidator/DelegatedClaim/ClaimCardList/ClaimCardList.module.scss similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimCardList/ClaimCardList.module.scss rename to src/components/DelegatedValidator/DelegatedClaim/ClaimCardList/ClaimCardList.module.scss diff --git a/src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimCardList/ClaimCardListSkeleton.js b/src/components/DelegatedValidator/DelegatedClaim/ClaimCardList/ClaimCardListSkeleton.js similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimCardList/ClaimCardListSkeleton.js rename to src/components/DelegatedValidator/DelegatedClaim/ClaimCardList/ClaimCardListSkeleton.js diff --git a/src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimCardList/index.js b/src/components/DelegatedValidator/DelegatedClaim/ClaimCardList/index.js similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimCardList/index.js rename to src/components/DelegatedValidator/DelegatedClaim/ClaimCardList/index.js diff --git a/src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwAllBtn/ClaimRwAllBtn.js b/src/components/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwAllBtn/ClaimRwAllBtn.js similarity index 97% rename from src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwAllBtn/ClaimRwAllBtn.js rename to src/components/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwAllBtn/ClaimRwAllBtn.js index e06cce3c2..dc4fbefe4 100644 --- a/src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwAllBtn/ClaimRwAllBtn.js +++ b/src/components/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwAllBtn/ClaimRwAllBtn.js @@ -4,7 +4,6 @@ import cn from "classnames/bind"; import {useForm} from "react-hook-form"; import {useDispatch, useSelector} from "react-redux"; import _ from "lodash"; -import * as yup from "yup"; import {useHistory} from "react-router-dom"; import {handleTransactionResponse, payloadTransaction} from "src/helpers/transaction"; import amountConsts from "src/constants/amount"; @@ -12,7 +11,7 @@ import DialogForm from "src/components/DialogForm"; import {walletStation} from "src/lib/walletStation"; import {notification} from "antd"; import LoadingOverlay from "src/components/common/LoadingOverlay"; -import {handleErrorMessage} from "../../../../../../lib/scripts"; +import {handleErrorMessage} from "src/lib/scripts.js"; import styles from "../ClaimRwBtn/ClaimRwBtn.module.scss"; const cx = cn.bind(styles); diff --git a/src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwAllBtn/index.js b/src/components/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwAllBtn/index.js similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwAllBtn/index.js rename to src/components/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwAllBtn/index.js diff --git a/src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwBtn/ClaimRwBtn.js b/src/components/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwBtn/ClaimRwBtn.js similarity index 96% rename from src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwBtn/ClaimRwBtn.js rename to src/components/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwBtn/ClaimRwBtn.js index c439cb437..f80cbc04f 100644 --- a/src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwBtn/ClaimRwBtn.js +++ b/src/components/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwBtn/ClaimRwBtn.js @@ -10,12 +10,11 @@ import {showAlert} from "src/store/modules/global"; import {useHistory} from "react-router-dom"; import {handleTransactionResponse, payloadTransaction} from "src/helpers/transaction"; import amountConsts from "src/constants/amount"; -import {calculateAmount} from "src/helpers/calculateAmount"; import DialogForm from "src/components/DialogForm"; import {walletStation} from "src/lib/walletStation"; import {notification} from "antd"; import LoadingOverlay from "src/components/common/LoadingOverlay"; -import {handleErrorMessage} from "../../../../../../lib/scripts"; +import {handleErrorMessage} from "src/lib/scripts.js"; import styles from "./ClaimRwBtn.module.scss"; const cx = cn.bind(styles); diff --git a/src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwBtn/ClaimRwBtn.module.scss b/src/components/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwBtn/ClaimRwBtn.module.scss similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwBtn/ClaimRwBtn.module.scss rename to src/components/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwBtn/ClaimRwBtn.module.scss diff --git a/src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwBtn/index.js b/src/components/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwBtn/index.js similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwBtn/index.js rename to src/components/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimRwBtn/index.js diff --git a/src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimTable.js b/src/components/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimTable.js similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimTable.js rename to src/components/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimTable.js diff --git a/src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimTable.module.scss b/src/components/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimTable.module.scss similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimTable.module.scss rename to src/components/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimTable.module.scss diff --git a/src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimTableSkeleton.js b/src/components/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimTableSkeleton.js similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimTableSkeleton.js rename to src/components/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimTableSkeleton.js diff --git a/src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimTable/index.js b/src/components/DelegatedValidator/DelegatedClaim/ClaimTable/index.js similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimTable/index.js rename to src/components/DelegatedValidator/DelegatedClaim/ClaimTable/index.js diff --git a/src/components/Wallet/DelegatedValidator/DelegatedClaim/DelegatedClaim.js b/src/components/DelegatedValidator/DelegatedClaim/DelegatedClaim.js similarity index 69% rename from src/components/Wallet/DelegatedValidator/DelegatedClaim/DelegatedClaim.js rename to src/components/DelegatedValidator/DelegatedClaim/DelegatedClaim.js index 4c877b34a..f188231f5 100644 --- a/src/components/Wallet/DelegatedValidator/DelegatedClaim/DelegatedClaim.js +++ b/src/components/DelegatedValidator/DelegatedClaim/DelegatedClaim.js @@ -5,10 +5,10 @@ import cn from "classnames/bind"; import {useTheme} from "@material-ui/core/styles"; import useMediaQuery from "@material-ui/core/useMediaQuery"; import consts from "src/constants/consts"; -import ClaimTable from "src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimTable"; -import ClaimTableSkeleton from "src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimTableSkeleton"; -import ClaimCardList from "src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimCardList/ClaimCardList"; -import ClaimCardListSkeleton from "src/components/Wallet/DelegatedValidator/DelegatedClaim/ClaimCardList/ClaimCardListSkeleton"; +import ClaimTable from "src/components/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimTable"; +import ClaimTableSkeleton from "src/components/DelegatedValidator/DelegatedClaim/ClaimTable/ClaimTableSkeleton"; +import ClaimCardList from "src/components/DelegatedValidator/DelegatedClaim/ClaimCardList/ClaimCardList"; +import ClaimCardListSkeleton from "src/components/DelegatedValidator/DelegatedClaim/ClaimCardList/ClaimCardListSkeleton"; import NoResult from "src/components/common/NoResult"; import arrowIcon from "src/assets/wallet/arrow.svg"; import styles from "./DelegatedClaim.module.scss"; @@ -43,10 +43,6 @@ export default function({setActiveTab, address}) {
Claim Reward
-
{tableSection}
diff --git a/src/components/Wallet/DelegatedValidator/DelegatedClaim/DelegatedClaim.module.scss b/src/components/DelegatedValidator/DelegatedClaim/DelegatedClaim.module.scss similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedClaim/DelegatedClaim.module.scss rename to src/components/DelegatedValidator/DelegatedClaim/DelegatedClaim.module.scss diff --git a/src/components/Wallet/DelegatedValidator/DelegatedClaim/DelegatedTable/Claim/Claim.js b/src/components/DelegatedValidator/DelegatedClaim/DelegatedTable/Claim/Claim.js similarity index 99% rename from src/components/Wallet/DelegatedValidator/DelegatedClaim/DelegatedTable/Claim/Claim.js rename to src/components/DelegatedValidator/DelegatedClaim/DelegatedTable/Claim/Claim.js index fb48d719b..ab2213a68 100644 --- a/src/components/Wallet/DelegatedValidator/DelegatedClaim/DelegatedTable/Claim/Claim.js +++ b/src/components/DelegatedValidator/DelegatedClaim/DelegatedTable/Claim/Claim.js @@ -15,7 +15,7 @@ import BigNumber from "bignumber.js"; import {formatOrai, amountCoinDecimal} from "src/helpers/helper"; import consts from "src/constants/consts"; import {useFetch, useHistory} from "src/hooks"; -import {walletStation} from "src/lib/walletStation"; +import {walletStation} from "src/lib/walletStation.js"; import {handleTransactionResponse} from "src/helpers/transaction"; import {notification} from "antd"; import LoadingOverlay from "src/components/common/LoadingOverlay"; diff --git a/src/components/Wallet/DelegatedValidator/DelegatedClaim/DelegatedTable/Claim/Claim.module.scss b/src/components/DelegatedValidator/DelegatedClaim/DelegatedTable/Claim/Claim.module.scss similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedClaim/DelegatedTable/Claim/Claim.module.scss rename to src/components/DelegatedValidator/DelegatedClaim/DelegatedTable/Claim/Claim.module.scss diff --git a/src/components/Wallet/DelegatedValidator/DelegatedClaim/DelegatedTable/Claim/index.js b/src/components/DelegatedValidator/DelegatedClaim/DelegatedTable/Claim/index.js similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedClaim/DelegatedTable/Claim/index.js rename to src/components/DelegatedValidator/DelegatedClaim/DelegatedTable/Claim/index.js diff --git a/src/components/Wallet/DelegatedValidator/DelegatedClaim/DelegatedTable/DelegatedTable.js b/src/components/DelegatedValidator/DelegatedClaim/DelegatedTable/DelegatedTable.js similarity index 98% rename from src/components/Wallet/DelegatedValidator/DelegatedClaim/DelegatedTable/DelegatedTable.js rename to src/components/DelegatedValidator/DelegatedClaim/DelegatedTable/DelegatedTable.js index 70670d599..21cdb2c79 100644 --- a/src/components/Wallet/DelegatedValidator/DelegatedClaim/DelegatedTable/DelegatedTable.js +++ b/src/components/DelegatedValidator/DelegatedClaim/DelegatedTable/DelegatedTable.js @@ -9,7 +9,7 @@ import {formatOrai} from "src/helpers/helper"; import {tableThemes} from "src/constants/tableThemes"; import ThemedTable from "src/components/common/ThemedTable"; import GiftIcon from "./Gift"; -import {walletStation} from "src/lib/walletStation"; +import {walletStation} from "src/lib/walletStation.js"; import {handleTransactionResponse} from "src/helpers/transaction"; import {notification} from "antd"; import LoadingOverlay from "src/components/common/LoadingOverlay"; diff --git a/src/components/Wallet/DelegatedValidator/DelegatedClaim/index.js b/src/components/DelegatedValidator/DelegatedClaim/index.js similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedClaim/index.js rename to src/components/DelegatedValidator/DelegatedClaim/index.js diff --git a/src/components/Wallet/DelegatedValidator/DelegatedWithdraw/DelegatedWithdraw.js b/src/components/DelegatedValidator/DelegatedWithdraw/DelegatedWithdraw.js similarity index 69% rename from src/components/Wallet/DelegatedValidator/DelegatedWithdraw/DelegatedWithdraw.js rename to src/components/DelegatedValidator/DelegatedWithdraw/DelegatedWithdraw.js index 9612d6008..b62c7df09 100644 --- a/src/components/Wallet/DelegatedValidator/DelegatedWithdraw/DelegatedWithdraw.js +++ b/src/components/DelegatedValidator/DelegatedWithdraw/DelegatedWithdraw.js @@ -6,10 +6,10 @@ import {useTheme} from "@material-ui/core/styles"; import useMediaQuery from "@material-ui/core/useMediaQuery"; import consts from "src/constants/consts"; import NoResult from "src/components/common/NoResult"; -import WithdrawTable from "src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawTable"; -import WithdrawTableSkeleton from "src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawTableSkeleton"; -import WithdrawCardList from "src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawCardList/WithdrawCardList"; -import WithdrawCardListSkeleton from "src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawCardList/WithdrawCardListSkeleton"; +import WithdrawTable from "src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawTable"; +import WithdrawTableSkeleton from "src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawTableSkeleton"; +import WithdrawCardList from "src/components/DelegatedValidator/DelegatedWithdraw/WithdrawCardList/WithdrawCardList"; +import WithdrawCardListSkeleton from "src/components/DelegatedValidator/DelegatedWithdraw/WithdrawCardList/WithdrawCardListSkeleton"; import arrowIcon from "src/assets/wallet/arrow.svg"; import styles from "./DelegatedWithdraw.module.scss"; @@ -46,10 +46,6 @@ export default function({setActiveTab, address}) {
Withdraw tokens

Please be aware that you have to wait 14 days to complete unbonding your funds from validators.

- {tableSection} diff --git a/src/components/Wallet/DelegatedValidator/DelegatedWithdraw/DelegatedWithdraw.module.scss b/src/components/DelegatedValidator/DelegatedWithdraw/DelegatedWithdraw.module.scss similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedWithdraw/DelegatedWithdraw.module.scss rename to src/components/DelegatedValidator/DelegatedWithdraw/DelegatedWithdraw.module.scss diff --git a/src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawCardList/WithdrawCardList.js b/src/components/DelegatedValidator/DelegatedWithdraw/WithdrawCardList/WithdrawCardList.js similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawCardList/WithdrawCardList.js rename to src/components/DelegatedValidator/DelegatedWithdraw/WithdrawCardList/WithdrawCardList.js diff --git a/src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawCardList/WithdrawCardList.module.scss b/src/components/DelegatedValidator/DelegatedWithdraw/WithdrawCardList/WithdrawCardList.module.scss similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawCardList/WithdrawCardList.module.scss rename to src/components/DelegatedValidator/DelegatedWithdraw/WithdrawCardList/WithdrawCardList.module.scss diff --git a/src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawCardList/WithdrawCardListSkeleton.js b/src/components/DelegatedValidator/DelegatedWithdraw/WithdrawCardList/WithdrawCardListSkeleton.js similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawCardList/WithdrawCardListSkeleton.js rename to src/components/DelegatedValidator/DelegatedWithdraw/WithdrawCardList/WithdrawCardListSkeleton.js diff --git a/src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawCardList/index.js b/src/components/DelegatedValidator/DelegatedWithdraw/WithdrawCardList/index.js similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawCardList/index.js rename to src/components/DelegatedValidator/DelegatedWithdraw/WithdrawCardList/index.js diff --git a/src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/RedelegateBtn/RedelegateBtn.js b/src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/RedelegateBtn/RedelegateBtn.js similarity index 98% rename from src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/RedelegateBtn/RedelegateBtn.js rename to src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/RedelegateBtn/RedelegateBtn.js index b7fcf44a4..e96425d75 100644 --- a/src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/RedelegateBtn/RedelegateBtn.js +++ b/src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/RedelegateBtn/RedelegateBtn.js @@ -16,7 +16,7 @@ import {calculateAmount} from "src/helpers/calculateAmount"; import {walletStation} from "src/lib/walletStation"; import {notification} from "antd"; import LoadingOverlay from "src/components/common/LoadingOverlay"; -import {handleErrorMessage} from "../../../../../../lib/scripts"; +import {handleErrorMessage} from "src/lib/scripts.js"; import styles from "./RedelegateBtn.module.scss"; import { amountCoinDecimal } from 'src/helpers/helper' import consts from "src/constants/consts"; diff --git a/src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/RedelegateBtn/RedelegateBtn.module.scss b/src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/RedelegateBtn/RedelegateBtn.module.scss similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/RedelegateBtn/RedelegateBtn.module.scss rename to src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/RedelegateBtn/RedelegateBtn.module.scss diff --git a/src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/RedelegateBtn/index.js b/src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/RedelegateBtn/index.js similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/RedelegateBtn/index.js rename to src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/RedelegateBtn/index.js diff --git a/src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawBtn/WithdrawBtn.js b/src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawBtn/WithdrawBtn.js similarity index 98% rename from src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawBtn/WithdrawBtn.js rename to src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawBtn/WithdrawBtn.js index 0d661072e..fa9c3aa47 100644 --- a/src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawBtn/WithdrawBtn.js +++ b/src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawBtn/WithdrawBtn.js @@ -18,7 +18,7 @@ import {calculateAmount} from "src/helpers/calculateAmount"; import {walletStation} from "src/lib/walletStation"; import {notification} from "antd"; import LoadingOverlay from "src/components/common/LoadingOverlay"; -import {handleErrorMessage} from "../../../../../../lib/scripts"; +import {handleErrorMessage} from "src/lib/scripts.js"; import styles from "./WithdrawBtn.module.scss"; const cx = cn.bind(styles); diff --git a/src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawBtn/WithdrawBtn.module.scss b/src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawBtn/WithdrawBtn.module.scss similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawBtn/WithdrawBtn.module.scss rename to src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawBtn/WithdrawBtn.module.scss diff --git a/src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawBtn/index.js b/src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawBtn/index.js similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawBtn/index.js rename to src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawBtn/index.js diff --git a/src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawTable.js b/src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawTable.js similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawTable.js rename to src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawTable.js diff --git a/src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawTable.module.scss b/src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawTable.module.scss similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawTable.module.scss rename to src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawTable.module.scss diff --git a/src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawTableSkeleton.js b/src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawTableSkeleton.js similarity index 93% rename from src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawTableSkeleton.js rename to src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawTableSkeleton.js index dee8182e2..5f099b1a0 100644 --- a/src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawTableSkeleton.js +++ b/src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawTableSkeleton.js @@ -3,7 +3,7 @@ import Skeleton from "@material-ui/lab/Skeleton"; import classNames from "classnames/bind"; import {tableThemes} from "src/constants/tableThemes"; import ThemedTable from "src/components/common/ThemedTable"; -import {getHeaderRow} from "src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawTable"; +import {getHeaderRow} from "src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/WithdrawTable"; import styles from "./WithdrawTable.module.scss"; const WithdrawTableSkeleton = memo(({rows = 5}) => { diff --git a/src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/index.js b/src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/index.js similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedWithdraw/WithdrawTable/index.js rename to src/components/DelegatedValidator/DelegatedWithdraw/WithdrawTable/index.js diff --git a/src/components/Wallet/DelegatedValidator/DelegatedWithdraw/index.js b/src/components/DelegatedValidator/DelegatedWithdraw/index.js similarity index 100% rename from src/components/Wallet/DelegatedValidator/DelegatedWithdraw/index.js rename to src/components/DelegatedValidator/DelegatedWithdraw/index.js diff --git a/src/components/Wallet/DelegatedValidator/DelegatedValidator.js b/src/components/Wallet/DelegatedValidator/DelegatedValidator.js deleted file mode 100644 index 6cf32ee02..000000000 --- a/src/components/Wallet/DelegatedValidator/DelegatedValidator.js +++ /dev/null @@ -1,18 +0,0 @@ -/* eslint-disable react-hooks/exhaustive-deps */ -import * as React from "react"; -import cn from "classnames/bind"; -import DelegatedClaim from "src/components/Wallet/DelegatedValidator/DelegatedClaim"; -import DelegatedWithdraw from "src/components/Wallet/DelegatedValidator/DelegatedWithdraw"; -import styles from "./DelegatedValidator.module.scss"; - -const cx = cn.bind(styles); - -export default function({address}) { - const [activeTab, setActiveTab] = React.useState(0); - return ( -
- {activeTab === 0 && } - {activeTab === 1 && } -
- ); -} diff --git a/src/components/Wallet/DelegatedValidator/index.js b/src/components/Wallet/DelegatedValidator/index.js deleted file mode 100644 index 582178415..000000000 --- a/src/components/Wallet/DelegatedValidator/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import DelegatedValidator from "./DelegatedValidator"; - -export default DelegatedValidator; diff --git a/src/components/Wallet/Tabs/Tabs.js b/src/components/Wallet/Tabs/Tabs.js index f29b3be5b..d5c8c548c 100644 --- a/src/components/Wallet/Tabs/Tabs.js +++ b/src/components/Wallet/Tabs/Tabs.js @@ -4,7 +4,6 @@ import cn from "classnames/bind"; import {useGet} from "restful-react"; import ContactIcon from "src/icons/Tabs/ProposalsTabIcon"; import ValidatorsIcon from "src/icons/Tabs/ValidatorsTabIcon"; -import DelegatedIcon from "src/icons/Validators/ValidatorsIcon"; import TransactionsIcon from "src/icons/Tabs/TransactionsTabIcon"; import {getListCwToken} from "src/lib/api"; import styles from "./Tabs.module.scss"; @@ -33,10 +32,6 @@ export default function({activeTab, setActiveTab, isBecomeValidator, address}) {
Your Delegators
)} -
setActiveTab(2)}> - -
Delegated Validator
-
setActiveTab(4)}>
Contact
diff --git a/src/containers/DelegatedValidator/DelegatedValidator.js b/src/containers/DelegatedValidator/DelegatedValidator.js new file mode 100644 index 000000000..bedc53ce2 --- /dev/null +++ b/src/containers/DelegatedValidator/DelegatedValidator.js @@ -0,0 +1,32 @@ +/* eslint-disable react-hooks/exhaustive-deps */ +import * as React from "react"; +import cn from "classnames/bind"; +import {useSelector} from "react-redux"; +import {useGet} from "restful-react"; +import {_} from "src/lib/scripts"; +import consts from "src/constants/consts"; +import DelegatedClaim from "src/components/DelegatedValidator/DelegatedClaim"; +import DelegatedWithdraw from "src/components/DelegatedValidator/DelegatedWithdraw"; +import styles from "./DelegatedValidator.module.scss"; + +const cx = cn.bind(styles); + +export default function(props) { + const [activeTab, setActiveTab] = React.useState(0); + const {address} = useSelector(state => state.wallet); + const path = consts.API.VALIDATOR + "/" + address; + const {data} = useGet({ + path: path, + }); + + return ( +
+
+ +
+
+ +
+
+ ); +} \ No newline at end of file diff --git a/src/components/Wallet/DelegatedValidator/DelegatedValidator.module.scss b/src/containers/DelegatedValidator/DelegatedValidator.module.scss similarity index 92% rename from src/components/Wallet/DelegatedValidator/DelegatedValidator.module.scss rename to src/containers/DelegatedValidator/DelegatedValidator.module.scss index efdb219b1..1b13c4422 100644 --- a/src/components/Wallet/DelegatedValidator/DelegatedValidator.module.scss +++ b/src/containers/DelegatedValidator/DelegatedValidator.module.scss @@ -2,6 +2,7 @@ padding: 0; background: transparent; box-shadow: none; + margin-bottom: 40px; @media screen and (min-width: 1280px) { padding: 20px; @@ -9,4 +10,4 @@ box-shadow: 0px 2px 8px var(--common-boxShadowColor); border-radius: 8px; } -} +} \ No newline at end of file diff --git a/src/containers/DelegatedValidator/index.js b/src/containers/DelegatedValidator/index.js new file mode 100644 index 000000000..2840b4457 --- /dev/null +++ b/src/containers/DelegatedValidator/index.js @@ -0,0 +1,3 @@ +import DelegatedValidator from "./DelegatedValidator1"; + +export default DelegatedValidator; diff --git a/src/containers/Router/Router.js b/src/containers/Router/Router.js index 04798b11e..3871de90d 100644 --- a/src/containers/Router/Router.js +++ b/src/containers/Router/Router.js @@ -37,7 +37,8 @@ const OracleReportDetail = lazy(() => lazyRetry(() => import(/* webpackChunkName const ExportData = lazy(() => lazyRetry(() => import(/* webpackChunkName: "ExportData" */ 'src/containers/ExportData'), 'ExportData')); const WasmCodeDetail = lazy(() => lazyRetry(() => import(/* webpackChunkName: "WasmCodeDetail" */ 'src/containers/WasmCode'), 'WasmCodeDetail')); const BlockList = lazy(() => lazyRetry(() => import(/* webpackChunkName: "BlockListV2" */ 'src/containers/BlockListV2'), "BlockListV2")); - +const DelegatedValidator = lazy(() => lazyRetry(() => import(/* webpackChunkName: "DelegatedValidator" */ 'src/containers/DelegatedValidator/DelegatedValidator'), "DelegatedValidator")); + // a function to retry loading a chunk to avoid chunk load error for out of date code const lazyRetry = function(componentImport, name) { return new Promise((resolve, reject) => { @@ -60,7 +61,6 @@ const lazyRetry = function(componentImport, name) { }); }; - export default function(props) { // preload stuff that needs preloading usePreload(); @@ -97,6 +97,7 @@ export default function(props) { + } /> diff --git a/src/containers/Router/Router.module.scss b/src/containers/Router/Router.module.scss index da33138f9..9bcd5556e 100644 --- a/src/containers/Router/Router.module.scss +++ b/src/containers/Router/Router.module.scss @@ -7,6 +7,10 @@ // padding: var(--heightHeader) 0 0 0; min-height: calc(100vh - var(--heightFooter)); min-width: 360px; + max-width: 1280px; + margin-left: auto; + margin-right: auto; + padding: 0 24px; @include media(" { title: "Accounts", activePath: "/accounts", }, + { + pathName: "/delegated-validator", + title: "Delegated Validator", + activePath: "/delegated-validator", + }, ], Transactions: [ { diff --git a/src/containers/Wallet/Wallet.js b/src/containers/Wallet/Wallet.js index 544e0a0af..7b45c7599 100644 --- a/src/containers/Wallet/Wallet.js +++ b/src/containers/Wallet/Wallet.js @@ -11,10 +11,8 @@ import TitleWrapper from "src/components/common/TitleWrapper"; import StatusBar from "src/components/Wallet/StatusBar"; import Tabs from "src/components/Wallet/Tabs"; import {RegisterDetail} from "src/components/Wallet/Register"; -import DelegatedValidator from "src/components/Wallet/DelegatedValidator"; import Transaction from "src/components/Wallet/Transaction"; import Contact from "src/components/Wallet/Contact"; -import AiServiceFee from "src/components/Wallet/AiServiceFee"; import CwToken from "src/components/Wallet/CwToken"; import styles from "./Wallet.module.scss"; @@ -43,9 +41,8 @@ export default function(props) { {activeTab === 0 && } {activeTab === 6 && } - {activeTab === 2 && } {activeTab === 3 && isBecomeValidator && } {activeTab === 4 && } - + ); }