Skip to content

Commit

Permalink
fix: resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Sotatek-TaiTruong committed May 4, 2024
2 parents 7c93d4e + 70ee56a commit 19f5efc
Show file tree
Hide file tree
Showing 56 changed files with 1,278 additions and 137 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
.env.test.local
.env.production.local
env.global.js
yarn.lock

npm-debug.log*
yarn-debug.log*
Expand Down
6 changes: 6 additions & 0 deletions src/commons/resources/icons/DrepId.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/commons/resources/icons/activeStakeDrep.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/commons/resources/icons/king-icon.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/commons/resources/icons/tooltip-icon.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 24 additions & 14 deletions src/commons/resources/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import MediumIcon from "./icons/medium.svg";
import RocketBackground from "./icons/rocket-bg.svg";
import USDIcon from "./icons/usd.svg";
import SeeMoreIcon from "./icons/seemore.svg";
import SignOut from "./icons/sign-out.svg";
import FlintIcon from "./icons/flint.svg";
import NamiIcon from "./icons/nami.svg";
import EternlIcon from "./icons/eternl.svg";
Expand Down Expand Up @@ -87,6 +86,10 @@ import DownRedDarkmode from "./icons/downRedDark.svg";
import DownRedUtxoDarkmode from "./icons/downUtxoRedDark.svg";
import ArrowUpIcon from "./icons/arrow-up.svg";
import ArrowUpDarkIcon from "./icons/arrow-up-dark.svg";
import DisableArrowUpLightIcon from "./icons/disable-arrow-up-light.svg";
import DisableArrowDownLightIcon from "./icons/disable-arrow-down-light.svg";
import DisableArrowUpDarkIcon from "./icons/disable-arrow-up-dark.svg";
import DisableArrowDownDarkIcon from "./icons/disable-arrow-down-dark.svg";
import ArrowDownIcon from "./icons/arrow-down-red.svg";
import ArrowDownDarkIcon from "./icons/arrow-down-red-dark.svg";
import PolicyDark from "./icons/policy-dark.svg";
Expand All @@ -98,10 +101,6 @@ import PoolSizeDarkIcon from "./images/PoolSizeDark.png";
import PoolSizeLightIcon from "./images/PoolSizeLight.png";
import DelegatingToDarkIcon from "./images/DelegatingToDark.png";
import RewardsWithdrawDarkIcon from "./images/RewardsWithdrawDark.png";
import DisableArrowUpLightIcon from "./icons/disable-arrow-up-light.svg";
import DisableArrowDownLightIcon from "./icons/disable-arrow-down-light.svg";
import DisableArrowUpDarkIcon from "./icons/disable-arrow-up-dark.svg";
import DisableArrowDownDarkIcon from "./icons/disable-arrow-down-dark.svg";
import DeregistrationDarkIcon from "./icons/deregistration-icon-dark.svg";
import DeregistrationLightIcon from "./icons/deregistration-icon-light.svg";
import RegistrationDarkIcon from "./icons/registration-icon-dark.svg";
Expand Down Expand Up @@ -146,6 +145,7 @@ import LinkOff from "./icons/link-off.svg";
import User2 from "./icons/user2.svg";
import WhiteSearchIcon from "./icons/white-search-icon.svg";
import CopyOutlineIcon from "./icons/copy-outline.svg";
import SignOut from "./icons/sign-out.svg";
//only component

import SignOutComponent from "./icons/sign-out.svg?react";
Expand Down Expand Up @@ -195,6 +195,8 @@ import OutputIcon from "./icons/outputIcon.svg?react";
import CubeIconComponent from "./icons/blockIcon.svg?react";
import TxConfirm from "./icons/txConfirm.svg?react";
import SlotIcon from "./icons/slot.svg?react";
import KingIcon from "./icons/king-icon.svg?react";
import TooltipIcon from "./icons/tooltip-icon.svg?react";
import TxInputIcon from "./icons/txInput.svg?react";
import TxOutputIcon from "./icons/txOutput.svg?react";
import VerifiedIcon from "./icons/verified.svg?react";
Expand All @@ -207,12 +209,10 @@ import DelegatorsDrepIcon from "./icons/delegatorsDrep.svg?react";
import LifetimeVoteDrepIcon from "./icons/liifetimeVoteDrep.svg?react";
import governanceVotesIcon from "./icons/governanceVotes.svg?react";
import StakingLifecycleComponent from "./icons/menus/stakingLifecycle.svg?react";
import VotesIcon from "./icons/votes.svg?react";
import VotesYesIcon from "./icons/voteYes.svg?react";
import VotesNoIcon from "./icons/voteNo.svg?react";
import VotesAbstainIcon from "./icons/voteAbstain.svg?react";
import DropdownIcon from "./icons/dropdown.svg?react";
import DisclaimerIcon from "./icons/DisclaimerIcon.svg?react";
import VotesIcon from "./icons/votes.svg?react";
import VotesNoneIcon from "./icons/voteNone.svg?react";
import ArrowLeftWhiteIcon from "./icons/arrow-left-white.svg?react";
import GovernanceIdIcon from "./icons/governanceId.svg?react";
Expand All @@ -225,6 +225,8 @@ import ExpiryIcon from "./icons/expiry-date.svg?react";
import AnchorTextIcon from "./icons/anchor-text.svg?react";
import BlackWarningIcon from "./icons/warning-black.svg?react";
import BlackCircleIcon from "./icons/black-cirle-copy.svg?react";
import DropdownIcon from "./icons/dropdown.svg?react";
import DisclaimerIcon from "./icons/DisclaimerIcon.svg?react";
import RepeatVotesIcon from "./icons/repeat-votes.svg?react";
import historyIcon from "./icons/history.svg?react";
import multiYesIcon from "./icons/multiyes.svg?react";
Expand All @@ -238,6 +240,9 @@ import PoolSaturationIcon from "./icons/pool-saturation.svg?react";
import PoolBlocksIcon from "./icons/pool-block.svg?react";
import PoolParticipationIcon from "./icons/pool-participation.svg?react";
import PoolVotingIcon from "./icons/pool-voting.svg?react";
import DrepIdIcon from "./icons/DrepId.svg?react";
import ActiveStakeDrepIcon from "./icons/activeStakeDrep.svg?react";

// eslint-disable-next-line import/order
import TotalOutput from "./icons/totalOutput.svg?react";
export {
Expand Down Expand Up @@ -302,6 +307,8 @@ export {
UserIcon,
DropIcon,
DelegatorIcon,
DrepIdIcon,
ActiveStakeDrepIcon,
LightningIcon,
LinkOff,
SignOut,
Expand Down Expand Up @@ -365,11 +372,14 @@ export {
DeregistrationLightIcon,
RegistrationDarkIcon,
RegistrationLightIcon,

// React component
ExchangeIcon,
PolygonDarkIcon,
PolygonDarkRedIcon,
CubeIconComponent,
KingIcon,
TooltipIcon,
SlotIcon,
TimeIconComponent,
TimelineIconComponent,
Expand Down Expand Up @@ -447,12 +457,12 @@ export {
DelegatorsDrepIcon,
LifetimeVoteDrepIcon,
governanceVotesIcon,
DisclaimerIcon,
DropdownIcon,
VotesIcon,
VotesYesIcon,
VotesNoIcon,
VotesAbstainIcon,
DisclaimerIcon,
DropdownIcon,
VotesNoneIcon,
ArrowLeftWhiteIcon,
GovernanceIdIcon,
Expand Down Expand Up @@ -840,9 +850,6 @@ export {
CheckedCIPIcon,
SmallInfoIcon,
CIP60WarningIcon,
PlusSquareIcon,
CloseSquareIcon,
MinusSquareIcon,
OpenTimeLock,
LockedTimelock,
SigNative,
Expand All @@ -852,5 +859,8 @@ export {
NativeType,
NativeOneMint,
BolsiniAddress,
DrawerClose
DrawerClose,
PlusSquareIcon,
CloseSquareIcon,
MinusSquareIcon
};
1 change: 1 addition & 0 deletions src/commons/utils/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const API = {
},
POOL_CERTIFICATES_HISTORY: "pools/certificates-history",
POOL_RANGE_VALUES: "pools/range-values-for-filter",
DREP_RANGE_VALUES: "dreps/range-values-for-filter",
DREP_CERTIFICATES_HISTORY: "dreps/:drepId/certificates-history",
DREP_OVERVIEW: "dreps/:drepId/drep-details",
DREP_OVERVIEW_CHART: "dreps/:drepId/vote-procedure-chart",
Expand Down
2 changes: 1 addition & 1 deletion src/commons/utils/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const getShortHashXs = (address = "", firstpart?: number, lastPart?: numb
if (address?.length <= 18) return address;
return address ? `${address.slice(0, firstpart ? firstpart : 7)}...${address.slice(-(lastPart ? lastPart : 5))}` : "";
};

export const getShortValue = (address = "", length = 50) => {
return address.slice(0, length);
};
Expand Down Expand Up @@ -371,7 +372,6 @@ export function validateTokenExpired() {
return now.isBefore(exp);
} catch (e) {
removeAuthInfo();
return false;
}
}

Expand Down
5 changes: 4 additions & 1 deletion src/components/AddressDetail/AddressHeader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ const AddressHeader: React.FC<Props> = ({ data, loading, adaHanldeData }) => {
const {
data: dataStake,
loading: loadingStake,
lastUpdated
lastUpdated,
error
} = useFetch<WalletStake>(stakeKey ? `${API.STAKE.DETAIL}/${stakeKey}` : "", undefined, false, blockKey);

const theme = useTheme();
const { isMobile } = useScreen();
const history = useHistory();
Expand Down Expand Up @@ -202,6 +204,7 @@ const AddressHeader: React.FC<Props> = ({ data, loading, adaHanldeData }) => {
type="right"
address={data?.stakeAddress || ""}
item={itemRight}
error={error}
loading={loading || loadingStake}
addressDestination={details.stake(data?.stakeAddress)}
/>
Expand Down
38 changes: 36 additions & 2 deletions src/components/BlockDetail/BlockOverview/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Box } from "@mui/material";
import { useSelector } from "react-redux";
import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom";

import {
TimeIconComponent,
Expand All @@ -9,14 +10,18 @@ import {
ExchageAltIcon,
OutputIcon,
CubeIconComponent,
SlotIcon
SlotIcon,
KingIcon,
TooltipIcon
} from "src/commons/resources";
import { formatADAFull, formatDateTimeLocal, formatNameBlockNo } from "src/commons/utils/helper";
import { MAX_SLOT_EPOCH } from "src/commons/utils/constants";
import ADAicon from "src/components/commons/ADAIcon";
import DetailHeader from "src/components/commons/DetailHeader";
import CustomTooltip from "src/components/commons/CustomTooltip";
import DatetimeTypeTooltip from "src/components/commons/DatetimeTypeTooltip";
import DynamicEllipsisText from "src/components/DynamicEllipsisText";
import { details } from "src/commons/routers";

import { TitleCard, WrapConfirmation } from "./styles";

Expand All @@ -29,7 +34,7 @@ interface BlockOverviewProps {
const BlockOverview: React.FC<BlockOverviewProps> = ({ data, loading, lastUpdated }) => {
const { t } = useTranslation();
const { currentEpoch } = useSelector(({ system }: RootState) => system);

// eslint-disable-next-line no-console
const listOverview = [
{
icon: TimeIconComponent,
Expand Down Expand Up @@ -112,6 +117,35 @@ const BlockOverview: React.FC<BlockOverviewProps> = ({ data, loading, lastUpdate
</Box>
),
value: `${data?.epochSlotNo || ""} - ${data?.slotNo || ""}`
},
{
icon: KingIcon,
title: (
<Box display={"flex"} alignItems={"center"}>
<Box display={"flex"} alignItems="center">
<TitleCard mr={1}>{t("glossary.blockproducer")} </TitleCard>
</Box>
<CustomTooltip title="Block minted by">
<span>
<TooltipIcon />
</span>
</CustomTooltip>
</Box>
),
value: (
<Box
component={data?.poolView ? Link : Box}
color={({ palette }) => `${palette.primary.main}!important`}
to={details.delegation(data?.poolView)}
>
{data?.poolName ? (
data.poolName
) : (
<DynamicEllipsisText value={data?.poolView || ""} isTooltip={!!data?.poolView} />
)}{" "}
{data?.poolTicker && `- ${data.poolTicker}`}
</Box>
)
}
];
return (
Expand Down
6 changes: 6 additions & 0 deletions src/components/Contracts/common/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ export const CLButton = styled("button")`
}
`;

export const ContractAddressLabel = styled(Typography)`
font-weight: 600;
text-align: left;
color: ${({ theme }) => theme.palette.secondary.light};
`;

export const WrapLabel = styled(Typography)(({ theme }) => ({
fontWeight: 600,
color: theme.palette.secondary.light,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,9 @@ export const FixedCostBox = styled(Box)`
& > svg {
margin-top: -2px;
}
${({ theme }) => theme.breakpoints.down("sm")} {
& {
display: inline;
}
}
`;
1 change: 0 additions & 1 deletion src/components/DelegationPool/DelegationList/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export const SearchContainer = styled("div")(({ theme }) => ({
maxWidth: "unset"
}
}));

export const DelegationContainer = styled("div")(() => ({
"& .table-wrapper tbody": {
zIndex: 10
Expand Down

0 comments on commit 19f5efc

Please sign in to comment.