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 7, 2024
2 parents 5f995b8 + 3d8011c commit f860c4f
Show file tree
Hide file tree
Showing 41 changed files with 180 additions and 106 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
29 changes: 15 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 @@ -209,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 @@ -227,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 Down Expand Up @@ -372,6 +372,7 @@ export {
DeregistrationLightIcon,
RegistrationDarkIcon,
RegistrationLightIcon,

// React component
ExchangeIcon,
PolygonDarkIcon,
Expand Down Expand Up @@ -456,12 +457,12 @@ export {
DelegatorsDrepIcon,
LifetimeVoteDrepIcon,
governanceVotesIcon,
DisclaimerIcon,
DropdownIcon,
VotesIcon,
VotesYesIcon,
VotesNoIcon,
VotesAbstainIcon,
DisclaimerIcon,
DropdownIcon,
VotesNoneIcon,
ArrowLeftWhiteIcon,
GovernanceIdIcon,
Expand Down Expand Up @@ -849,9 +850,6 @@ export {
CheckedCIPIcon,
SmallInfoIcon,
CIP60WarningIcon,
PlusSquareIcon,
CloseSquareIcon,
MinusSquareIcon,
OpenTimeLock,
LockedTimelock,
SigNative,
Expand All @@ -861,5 +859,8 @@ export {
NativeType,
NativeOneMint,
BolsiniAddress,
DrawerClose
DrawerClose,
PlusSquareIcon,
CloseSquareIcon,
MinusSquareIcon
};
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
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
1 change: 1 addition & 0 deletions src/components/DynamicEllipsisText/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const DynamicEllipsisText = ({
sx?: SxProps<Theme>;
customTruncateFold?: [number, number];
isNoLimitPixel?: boolean;
isSeparateCopyIcon?: boolean;
whiteSpace?: "nowrap" | "normal";
}) => {
const randomIdRef = useRef(`ELIPSIS_${useId()}`);
Expand Down
23 changes: 13 additions & 10 deletions src/components/GovernanceVotes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
ButtonGroup,
FormControlLabel,
Grid,
Link,
Radio,
RadioGroup,
Skeleton,
Expand All @@ -20,15 +21,15 @@ import {
TableRow,
Typography,
useTheme,
ClickAwayListener,
Link
ClickAwayListener
} from "@mui/material";
import { IoIosArrowDown, IoIosArrowUp } from "react-icons/io";
import moment from "moment";
import { isEmpty, isUndefined, omitBy } from "lodash";
import { JsonViewer } from "@textea/json-viewer";
import { isEmpty, isUndefined, omitBy } from "lodash";
import moment from "moment";
import { BsFillCheckCircleFill } from "react-icons/bs";
import { IoIosArrowDown, IoIosArrowUp } from "react-icons/io";

import useFetchList from "src/commons/hooks/useFetchList";
import {
ActionTypeIcon,
AnchorTextIcon,
Expand All @@ -48,7 +49,6 @@ import { formatDateTimeLocal } from "src/commons/utils/helper";
import CustomIcon from "src/components/commons/CustomIcon";
import CustomModal from "src/components/commons/CustomModal";
import { FooterTable } from "src/components/commons/Table";
import useFetchList from "src/commons/hooks/useFetchList";
import {
AccordionContainer,
AccordionDetailsFilter,
Expand All @@ -63,10 +63,10 @@ import FormNowMessage from "src/components/commons/FormNowMessage";
import useFetch from "src/commons/hooks/useFetch";
import { useScreen } from "src/commons/hooks/useScreen";

import { TimeDuration } from "../TransactionLists/styles";
import NoRecord from "../commons/NoRecord";
import DynamicEllipsisText from "../DynamicEllipsisText";
import { ViewJson } from "../ScriptModal/styles";
import { TimeDuration } from "../TransactionLists/styles";
import NoRecord from "../commons/NoRecord";
import { AntSwitch, HashName, StyledArea } from "./styles";
import DatetimeTypeTooltip from "../commons/DatetimeTypeTooltip";
import OverviewVote from "./OverviewVote";
Expand Down Expand Up @@ -664,6 +664,7 @@ const FilterGovernanceVotes: React.FC<FilterGovernanceVotes> = ({ query, setQuer
const handleFilter = () => {
setExpanded(false);
setOpen(false);
setParams(params);
setParamsFilter(params);
setQuery({
tab: query.tab,
Expand Down Expand Up @@ -949,7 +950,7 @@ const FilterGovernanceVotes: React.FC<FilterGovernanceVotes> = ({ query, setQuer
sx={{ maxHeight: "170px", display: "block", overflowX: "hidden", overflowY: "auto" }}
>
<RadioGroup
ata-testid="governance.filter.currentStatusValue"
data-testid="governance.filter.currentStatusValue"
aria-labelledby="demo-controlled-radio-buttons-group"
name="controlled-radio-buttons-group"
sx={{ p: "0px 16px" }}
Expand Down Expand Up @@ -1079,7 +1080,9 @@ const FilterGovernanceVotes: React.FC<FilterGovernanceVotes> = ({ query, setQuer
toDate: moment(toDate, DATETIME_PARTTEN).endOf("d").utc().format(DATETIME_PARTTEN)
});
}}
onClose={() => setOpenDateRange(false)}
onClose={() => {
setOpenDateRange(false);
}}
onClearValue={() => setDateRange({ fromDate: "", toDate: "" })}
/>
</AccordionSummary>
Expand Down
2 changes: 1 addition & 1 deletion src/components/GovernanceVotes/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export const HashName = styled(Typography)(({ theme }) => ({
fontWeight: 600,
lineHeight: "28px",
textAlign: "center",
paddingLeft: "20px",
color: theme.isDark ? theme.palette.secondary.main : theme.palette.secondary.light,
paddingLeft: "20px",
[theme.breakpoints.down("lg")]: {
fontSize: "24px"
},
Expand Down
1 change: 1 addition & 0 deletions src/components/StakeDetail/ModalAllAddress/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const ModalAllAddress: React.FC<ModalAllAddressProps> = ({ stake, ...props }) =>
handleCloseModal={props.onClose}
title={t("common.addressList")}
width={"600px"}
height={"auto"}
contentStyle={{ overflowY: "unset" }}
isCenterWithoutPosition={true}
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/TabularView/StakeTab/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const StakeTab: React.FC<StackTabProps> = ({ tabs, tabActive, onChangeTab, tabsR
if (newExpanded) {
setTimeout(() => {
tabRef?.current?.scrollIntoView({ behavior: "smooth", block: "nearest" });
}, 100);
}, 150);
tabRef?.current?.removeEventListener("transitionend", handleTransitionEnd);
}
};
Expand Down
3 changes: 1 addition & 2 deletions src/components/TokenDetail/TokenTableData/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { useHistory, useParams } from "react-router-dom";

import { details } from "src/commons/routers";
import CustomAccordion, { TTab } from "src/components/commons/CustomAccordion";
import { UnionTokenIcon, PeopleIcon, TransactionIcon, MetadataIcon } from "src/commons/resources";

import { MetadataIcon, PeopleIcon, TransactionIcon, UnionTokenIcon } from "../../../commons/resources";
import TokenMetaData from "./TokenMetadata";
import TokenMinting from "./TokenMinting";
import TokenTopHolder from "./TokenTopHolder";
Expand Down Expand Up @@ -75,7 +75,6 @@ const TokenTableData: React.FC<ITokenTableData> = ({
const handleTabChange = (tab: string) => {
history.replace(details.token(tokenId, tab));
};

return (
<Box mt={3}>
<CustomAccordion tabs={tabs} onTabChange={handleTabChange} loading={loading} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ const ItemCollateral = ({ data, type }: { data: CollateralResponses[]; type: "in
fontWeight="bold"
fontFamily={"var(--font-family-text)"}
color={(theme) => theme.palette.primary.main}
width={"100%"}
>
<EllipsisContainer>
<DynamicEllipsisText
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import React, { useEffect, useState } from "react";
import { Box, Button, CircularProgress, IconButton, Typography, alpha, styled, useTheme } from "@mui/material";
import { useHistory, useLocation, useParams } from "react-router-dom";
import { IoMdClose } from "react-icons/io";
import { useSelector } from "react-redux";
import { t } from "i18next";
import { useSelector } from "react-redux";

import { BolsiniAddress, InvalidIcon, SeeMoreIconHome, VerifiedIcon } from "src/commons/resources";
import { details } from "src/commons/routers";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const StakeKeyBox = ({ data }: TProps) => {
}}
>
{value.map((item) => (
<Box key={item}>
<Box className="ValueItem" key={item}>
<TextValue>
<Link to={details.stake(item || "")}>
<EllipsisContainer width={"100%"}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ const SummaryItems = ({
sx={{
display: "flex",
alignItems: "center",
height: "fit-content"
height: "fit-content",
width: "100%"
}}
>
<WrapItemsInfo
Expand Down Expand Up @@ -210,6 +211,7 @@ const SummaryItems = ({
<Box
display="flex"
alignItems="center"
width={"100%"}
sx={{
height: tokensSent.length > 0 ? `${height}px` : "0px"
}}
Expand Down Expand Up @@ -328,7 +330,7 @@ const SummaryItems = ({
</Box>
</Box>
{tokensReceived && tokensReceived.length === 1 && (
<Box display={"flex"} alignItems={"center"} mt={1}>
<Box display={"flex"} alignItems={"center"} mt={1} className="CONTAINERRR">
<TokenLink
token={tokensReceived[0]}
isSummary={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const Withdrawals: React.FC<WithdrawalsProps> = ({ data }) => {
<AddressLink
to={address.startsWith("addr") ? details.address(address) : details.stake(address)}
>
<EllipsisContainer>
<EllipsisContainer fontSize={14}>
<DynamicEllipsisText value={address} isCopy isTooltip customTruncateFold={[8, 6]} />
</EllipsisContainer>
</AddressLink>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import {
import { details } from "src/commons/routers";
import { TRANSACTION_STATUS } from "src/commons/utils/constants";
import ContractsList from "src/components/Contracts";
import { CustomNumberBadge } from "src/components/commons/CustomNumberBadge";
import { StyledAccordion } from "src/components/commons/CustomAccordion/styles";
import { CustomNumberBadge } from "src/components/commons/CustomNumberBadge";

import Collaterals from "./Collaterals";
import Delegations from "./Delegations";
Expand Down

0 comments on commit f860c4f

Please sign in to comment.