Skip to content

Commit 099a74a

Browse files
authored
ref: register flow (#719)
* feat: refactor register flow * ref: registerSummary * fix: registerSummary * fix: registerSummary & set as main id * ref: execute and add checkout tx in tx manager * feat: add confirmation page * fix: show searchbar on step1 * fix: styling mobile * fix: limitPrice computation * feat: add visuals on confirmation page * fix; clear form on tx sent * fix: show upsell card on duration = 1 * feat: create renewalV2 component * feat: add renewal page * fix: clear form * fix: add upsell discounts in evergreen file * fix: typing in upselleCard * fix: remove log * fix: move Form context to renewal and register only * fix: revert changes in typing Discount * text: add getPriceForDuration tests * fix: move get_whitelisted_contracts & fetch_nfts in a hook * fix: typing metadatahash * fix: build error * fix: FormProvider location in register & renewal * ref: evergreen utils file * fix: revert quantumLeap price typing * fix: link in confirmation component * fix: confirmation page styling * fix: move btn text & disable state in const * fix: decrement & increment duration * fix: numberTextField changeDuration * dev: add comment in getTitle * fix: remove brackets * fix: move color in const + update maindomain checkbox text * fix: rename picture * fix: image name * fix: register steps * fix: gift img on upsell card * fix: remove concat in registerSummary * feat: cache domain data on registration * fix: time comparison in cachedData * fix: register steps * fix: update discountID
1 parent fde16d5 commit 099a74a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2640
-164
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import React, { FunctionComponent } from "react";
2+
3+
const CartIcon: FunctionComponent<IconProps> = ({
4+
width,
5+
color,
6+
secondColor,
7+
}) => {
8+
return (
9+
<svg
10+
width={width}
11+
height={width}
12+
viewBox="0 0 24 24"
13+
fill="none"
14+
xmlns="http://www.w3.org/2000/svg"
15+
>
16+
<circle cx="11.6562" cy="12" r="11" fill={secondColor} />
17+
<path
18+
d="M12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0ZM5.95166 5.06982L8.0874 5.74072C8.37014 5.83358 8.55846 6.09614 8.5913 6.36474L8.71142 7.54098L18.3823 8.62056C18.7976 8.701 19.0894 9.07594 19.0312 9.46138L18.4307 12.8451C18.3542 13.1991 18.0611 13.4417 17.7349 13.4457H9.14356L8.9751 14.4052H17.1343C17.5609 14.4202 17.8734 14.7451 17.8784 15.1244C17.8607 15.5572 17.5119 15.8405 17.1343 15.8451H8.11084C7.65572 15.8075 7.3216 15.4468 7.3916 15.0058L7.77538 12.8935L7.1748 6.98876L5.51952 6.46144C5.32752 6.39744 5.1834 6.27706 5.0874 6.10106C4.90576 5.72042 5.07542 5.29898 5.39942 5.11668C5.58434 5.02056 5.76494 5.00858 5.95166 5.06982ZM9.20362 16.2598C9.82494 16.2598 10.3286 16.7634 10.3286 17.3848C10.3286 18.0061 9.82494 18.5098 9.20362 18.5098C8.58234 18.5098 8.07862 18.0061 8.07862 17.3848C8.07862 16.7634 8.5823 16.2598 9.20362 16.2598ZM15.8071 16.2598C16.4284 16.2598 16.9321 16.7634 16.9321 17.3848C16.9321 18.0061 16.4284 18.5098 15.8071 18.5098C15.1858 18.5098 14.6821 18.0061 14.6821 17.3848C14.6821 16.7634 15.1858 16.2598 15.8071 16.2598Z"
19+
fill={color}
20+
/>
21+
</svg>
22+
);
23+
};
24+
25+
export default CartIcon;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React, { FunctionComponent } from "react";
2+
3+
const ContactCardIcon: FunctionComponent<IconProps> = ({ width, color }) => {
4+
return (
5+
<svg
6+
width={width}
7+
height={width}
8+
viewBox="0 0 25 24"
9+
fill="none"
10+
xmlns="http://www.w3.org/2000/svg"
11+
>
12+
<rect x="0.5" width="24" height="24" rx="12" fill={color} />
13+
<path
14+
d="M7.25 6C6.78587 6 6.34075 6.18437 6.01256 6.51256C5.68437 6.84075 5.5 7.28587 5.5 7.75V14.25C5.5 15.216 6.284 16 7.25 16H9.535C9.43842 15.3181 9.5434 14.6229 9.837 14C9.4937 14.0065 9.15106 13.9675 8.818 13.884L8.765 13.871C8.40353 13.7806 8.08267 13.572 7.85345 13.2783C7.62422 12.9845 7.49981 12.6226 7.5 12.25C7.5 11.775 7.884 11.391 8.358 11.391H11.165C11.601 11.391 11.962 11.717 12.015 12.139C12.335 12.0459 12.6667 11.9988 13 11.999H17C17.98 11.999 18.865 12.401 19.5 13.049V7.749C19.4997 7.28504 19.3152 6.84018 18.9871 6.51221C18.6589 6.18424 18.214 6 17.75 6H7.25ZM11.118 9.357C11.1229 9.53824 11.0915 9.71862 11.0255 9.8875C10.9596 10.0564 10.8604 10.2103 10.734 10.3403C10.6075 10.4702 10.4563 10.5735 10.2893 10.644C10.1223 10.7145 9.9428 10.7508 9.7615 10.7508C9.5802 10.7508 9.40073 10.7145 9.2337 10.644C9.06667 10.5735 8.91547 10.4702 8.78902 10.3403C8.66257 10.2103 8.56344 10.0564 8.49748 9.8875C8.43153 9.71862 8.40008 9.53824 8.405 9.357C8.4146 9.00361 8.56172 8.66792 8.81507 8.42135C9.06842 8.17479 9.40798 8.03683 9.7615 8.03683C10.115 8.03683 10.4546 8.17479 10.7079 8.42135C10.9613 8.66792 11.1084 9.00361 11.118 9.357ZM13.5 9.5C13.5 9.36739 13.5527 9.24021 13.6464 9.14645C13.7402 9.05268 13.8674 9 14 9H17C17.1326 9 17.2598 9.05268 17.3536 9.14645C17.4473 9.24021 17.5 9.36739 17.5 9.5C17.5 9.63261 17.4473 9.75979 17.3536 9.85355C17.2598 9.94732 17.1326 10 17 10H14C13.8674 10 13.7402 9.94732 13.6464 9.85355C13.5527 9.75979 13.5 9.63261 13.5 9.5ZM13 13C12.337 13 11.7011 13.2634 11.2322 13.7322C10.7634 14.2011 10.5 14.837 10.5 15.5C10.5 16.163 10.7634 16.7989 11.2322 17.2678C11.7011 17.7366 12.337 18 13 18H13.5C13.6326 18 13.7598 17.9473 13.8536 17.8536C13.9473 17.7598 14 17.6326 14 17.5C14 17.3674 13.9473 17.2402 13.8536 17.1464C13.7598 17.0527 13.6326 17 13.5 17H13C12.6022 17 12.2206 16.842 11.9393 16.5607C11.658 16.2794 11.5 15.8978 11.5 15.5C11.5 15.1022 11.658 14.7206 11.9393 14.4393C12.2206 14.158 12.6022 14 13 14H13.5C13.6326 14 13.7598 13.9473 13.8536 13.8536C13.9473 13.7598 14 13.6326 14 13.5C14 13.3674 13.9473 13.2402 13.8536 13.1464C13.7598 13.0527 13.6326 13 13.5 13H13ZM16.5 13C16.3674 13 16.2402 13.0527 16.1464 13.1464C16.0527 13.2402 16 13.3674 16 13.5C16 13.6326 16.0527 13.7598 16.1464 13.8536C16.2402 13.9473 16.3674 14 16.5 14H17C17.3978 14 17.7794 14.158 18.0607 14.4393C18.342 14.7206 18.5 15.1022 18.5 15.5C18.5 15.8978 18.342 16.2794 18.0607 16.5607C17.7794 16.842 17.3978 17 17 17H16.5C16.3674 17 16.2402 17.0527 16.1464 17.1464C16.0527 17.2402 16 17.3674 16 17.5C16 17.6326 16.0527 17.7598 16.1464 17.8536C16.2402 17.9473 16.3674 18 16.5 18H17C17.663 18 18.2989 17.7366 18.7678 17.2678C19.2366 16.7989 19.5 16.163 19.5 15.5C19.5 14.837 19.2366 14.2011 18.7678 13.7322C18.2989 13.2634 17.663 13 17 13H16.5ZM13 15C12.8674 15 12.7402 15.0527 12.6464 15.1464C12.5527 15.2402 12.5 15.3674 12.5 15.5C12.5 15.6326 12.5527 15.7598 12.6464 15.8536C12.7402 15.9473 12.8674 16 13 16H17C17.1326 16 17.2598 15.9473 17.3536 15.8536C17.4473 15.7598 17.5 15.6326 17.5 15.5C17.5 15.3674 17.4473 15.2402 17.3536 15.1464C17.2598 15.0527 17.1326 15 17 15H13Z"
15+
fill="white"
16+
/>
17+
</svg>
18+
);
19+
};
20+
21+
export default ContactCardIcon;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import React, { FunctionComponent } from "react";
2+
3+
const PfpIcon: FunctionComponent<IconProps> = ({
4+
width,
5+
color,
6+
secondColor,
7+
}) => {
8+
return (
9+
<svg
10+
width={width}
11+
height={width}
12+
viewBox="0 0 24 24"
13+
fill="none"
14+
xmlns="http://www.w3.org/2000/svg"
15+
>
16+
<rect width="24" height="24" rx="12" fill={color} />
17+
<path
18+
d="M17.7718 10.2135C17.5275 8.52776 16.5235 7.36201 14.844 6.69601C15.1302 6.54476 15.3153 6.46901 15.3153 6.46901C14.5063 6.18401 13.804 6.01801 13.196 5.94251C13.5157 5.70176 13.7292 5.61026 13.7292 5.61026C8.79125 4.91376 6.35625 7.66026 6.20325 10.2173C5.23575 10.387 4.5 11.2278 4.5 12.2425C4.5 13.2468 5.22075 14.081 6.174 14.2625C6.283 16.6163 8.849 18.5003 11.9998 18.5003C15.151 18.5003 17.717 16.6163 17.826 14.2625C18.779 14.0808 19.5 13.2463 19.5 12.2425C19.5 11.2195 18.7513 10.373 17.7718 10.2135ZM6.22525 13.5345C5.64775 13.3845 5.2195 12.8658 5.2195 12.2425C5.2195 11.6385 5.62275 11.133 6.1735 10.966C6.18575 11.5065 6.328 12.0233 6.577 12.4995C6.40742 12.8245 6.28879 13.1735 6.22525 13.5345ZM15.137 13.9813C15.469 14.3953 15.6635 14.8788 15.6635 15.3975C15.6635 16.918 14.023 18.15 11.9998 18.15C9.9765 18.15 8.33625 16.918 8.33625 15.3975C8.33625 14.8788 8.5305 14.3953 8.863 13.9813C7.72375 13.2918 6.9945 12.2363 6.9945 11.0515C6.9945 6.81801 11.9998 9.51501 11.9998 9.51501C11.9998 9.51501 17.0052 6.81826 17.0052 11.0515C17.0052 12.236 16.276 13.2918 15.137 13.9813ZM17.7747 13.5345C17.7111 13.1735 17.5926 12.8244 17.4233 12.4993C17.6722 12.023 17.8142 11.5063 17.8265 10.9658C18.3772 11.133 18.7802 11.6383 18.7802 12.2423C18.7802 12.8658 18.3523 13.3845 17.7747 13.5345Z"
19+
fill={secondColor}
20+
/>
21+
<path
22+
d="M12.5417 14.2014C12.68 14.2014 12.7917 13.9716 12.7917 13.6871C12.7917 13.4039 12.68 13.1724 12.5417 13.1724C12.4032 13.1724 12.2917 13.4039 12.2917 13.6871C12.2917 13.9716 12.4032 14.2014 12.5417 14.2014ZM11.4688 14.2014C11.607 14.2014 11.7188 13.9716 11.7188 13.6871C11.7188 13.4039 11.607 13.1724 11.4688 13.1724C11.3302 13.1724 11.2188 13.4039 11.2188 13.6871C11.2188 13.9716 11.3302 14.2014 11.4688 14.2014Z"
23+
fill={secondColor}
24+
/>
25+
<path
26+
d="M14.1719 13.062C14.6551 13.062 15.0469 12.5583 15.0469 11.937C15.0469 11.3157 14.6551 10.812 14.1719 10.812C13.6886 10.812 13.2969 11.3157 13.2969 11.937C13.2969 12.5583 13.6886 13.062 14.1719 13.062Z"
27+
fill={secondColor}
28+
/>
29+
<path
30+
d="M9.82812 13.062C10.3114 13.062 10.7031 12.5583 10.7031 11.937C10.7031 11.3157 10.3114 10.812 9.82812 10.812C9.34488 10.812 8.95312 11.3157 8.95312 11.937C8.95312 12.5583 9.34488 13.062 9.82812 13.062Z"
31+
fill={secondColor}
32+
/>
33+
</svg>
34+
);
35+
};
36+
37+
export default PfpIcon;

components/UI/nftCard.tsx

+20-17
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,43 @@
11
import React, { FunctionComponent } from "react";
22
import styles from "../../styles/components/profilePic.module.css";
33
import theme from "../../styles/theme";
4-
import AddIcon from "./iconsComponents/icons/addIcon";
5-
import { useMediaQuery } from "@mui/material";
64
import { getImgUrl } from "../../utils/stringService";
5+
import DoneFilledIcon from "./iconsComponents/icons/doneFilledIcon";
76

87
type NftCardProps = {
98
image: string;
109
name: string;
1110
selectPicture: () => void;
1211
isHovered: boolean;
12+
isSelected?: boolean;
1313
};
1414

1515
const NftCard: FunctionComponent<NftCardProps> = ({
1616
image,
1717
name,
1818
selectPicture,
1919
isHovered,
20+
isSelected,
2021
}) => {
21-
const isMobile = useMediaQuery("(max-width:425px)");
22-
2322
return (
2423
<div className={styles.nftCard}>
25-
{!isHovered || isMobile ? (
26-
<div
27-
className={styles.nftImg}
28-
onClick={() => isMobile && selectPicture()}
29-
>
30-
<img src={getImgUrl(image)} alt={`Image of ${name}`} />
31-
</div>
32-
) : (
33-
<div className={styles.nftHovered} onClick={selectPicture}>
34-
<AddIcon width="28" color={theme.palette.secondary.main} />
35-
<p>Add this NFT</p>
36-
</div>
37-
)}
24+
<div
25+
className={`${styles.nftImg} ${
26+
isHovered || isSelected ? styles.nftImgSelected : ""
27+
}`}
28+
onClick={selectPicture}
29+
>
30+
{isHovered || isSelected ? (
31+
<div className={styles.selectedIcon}>
32+
<DoneFilledIcon
33+
width="28"
34+
color="#FFF"
35+
secondColor={theme.palette.primary.main}
36+
/>
37+
</div>
38+
) : null}
39+
<img src={getImgUrl(image)} alt={`Image of ${name}`} />
40+
</div>
3841
</div>
3942
);
4043
};

components/discount/registerDiscount.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ const RegisterDiscount: FunctionComponent<RegisterDiscountProps> = ({
188188
if (displayedCurrency !== CurrencyType.ETH && !quoteData) return;
189189
// Variables
190190
const newTokenId: number = Math.floor(Math.random() * 1000000000000);
191-
const txMetadataHash = "0x" + metadataHash;
191+
const txMetadataHash = ("0x" + metadataHash) as HexString;
192192
const addressesMatch =
193193
hexToDecimal(address) === hexToDecimal(targetAddress);
194194

components/domains/freeRenewal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ const FreeRenewal: FunctionComponent<FreeRenewalProps> = ({ groups }) => {
257257
...registrationCalls.multiCallRenewal(
258258
selectedDomainsToEncodedArray(selectedDomains),
259259
duration,
260-
metadataHash
260+
`0x${metadataHash}`
261261
),
262262
];
263263

components/domains/registerCheckboxes.tsx

+25-6
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ type RegisterCheckboxes = {
1212
variant?: "default" | "white";
1313
isArOnforced?: boolean;
1414
ethRenewalPrice?: string;
15+
showMainDomainBox?: boolean;
16+
onChangeMainDomainBox?: () => void;
17+
mainDomainBox?: boolean;
18+
domain?: string;
1519
};
1620

1721
const RegisterCheckboxes: FunctionComponent<RegisterCheckboxes> = ({
@@ -21,11 +25,15 @@ const RegisterCheckboxes: FunctionComponent<RegisterCheckboxes> = ({
2125
renewalBox,
2226
variant = "default",
2327
isArOnforced,
24-
ethRenewalPrice = "X",
28+
ethRenewalPrice,
29+
mainDomainBox,
30+
onChangeMainDomainBox,
31+
showMainDomainBox = false,
32+
domain,
2533
}) => {
2634
return (
2735
<div className="w-full mb-3">
28-
<div className="flex mt-2 flex-col gap-3">
36+
<div className="flex flex-col gap-3">
2937
<div
3038
className="flex items-center justify-left text-xs mr-2 cursor-pointer"
3139
onClick={onChangeTermsBox}
@@ -63,22 +71,33 @@ const RegisterCheckboxes: FunctionComponent<RegisterCheckboxes> = ({
6371
</div>
6472
{!isArOnforced ? (
6573
<InputHelper
66-
helperText={`Enabling a subscription permits Starknet ID to renew your domain automatically every year for you! This approval gives us only the possibility to renew your domain once per year maximum (${gweiToEth(
67-
ethRenewalPrice
68-
)} ETH/year) and we'll cover the transaction fee for you!`}
74+
helperText={`Enabling a subscription permits Starknet ID to renew your domain automatically every year for you! This approval gives us only the possibility to renew your domain once per year maximum ${
75+
ethRenewalPrice ? `(${gweiToEth(ethRenewalPrice)} ETH/year)` : ""
76+
} and we'll cover the transaction fee for you!`}
6977
>
7078
<div
7179
className="flex items-center justify-left text-xs cursor-pointer"
7280
onClick={onChangeRenewalBox}
7381
>
7482
<Checkbox checked={renewalBox} sx={{ padding: 0 }} />
75-
<p className="ml-2 text-left flex items-center gap-2 relative">
83+
<p className="ml-2 mr-10 text-left flex items-center gap-2 relative">
7684
Enable subscription and don&apos;t pay gas for your yearly
7785
renewal
7886
</p>
7987
</div>
8088
</InputHelper>
8189
) : null}
90+
{showMainDomainBox ? (
91+
<div
92+
className="flex items-center justify-left text-xs cursor-pointer"
93+
onClick={onChangeMainDomainBox}
94+
>
95+
<Checkbox checked={mainDomainBox} sx={{ padding: 0 }} />
96+
<p className="ml-2 mr-10 text-left flex items-center gap-2 relative">
97+
Set {domain ?? ""} as your main domain
98+
</p>
99+
</div>
100+
) : null}
82101
</div>
83102
</div>
84103
);

components/domains/registerSummary.tsx

+52-12
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ import React, {
44
useEffect,
55
useState,
66
} from "react";
7-
import styles from "../../styles/components/registerV2.module.css";
7+
import styles from "../../styles/components/registerV3.module.css";
88
import { gweiToEth, numberToFixedString } from "../../utils/feltService";
99
import { CurrencyType } from "../../utils/constants";
1010
import CurrencyDropdown from "./currencyDropdown";
1111
import { Skeleton } from "@mui/material";
12+
import ArrowRightIcon from "../UI/iconsComponents/icons/arrowRightIcon";
1213

1314
type RegisterSummaryProps = {
1415
duration: number;
@@ -22,6 +23,9 @@ type RegisterSummaryProps = {
2223
displayedCurrency: CurrencyType;
2324
onCurrencySwitch: (type: CurrencyType) => void;
2425
loadingPrice?: boolean;
26+
isUpselled?: boolean;
27+
discountedPrice?: string; // price the user will pay after discount
28+
discountedDuration?: number; // years the user will have the domain for after discount
2529
};
2630

2731
const RegisterSummary: FunctionComponent<RegisterSummaryProps> = ({
@@ -36,6 +40,9 @@ const RegisterSummary: FunctionComponent<RegisterSummaryProps> = ({
3640
displayedCurrency,
3741
onCurrencySwitch,
3842
loadingPrice,
43+
isUpselled = false,
44+
discountedPrice,
45+
discountedDuration,
3946
}) => {
4047
const [ethUsdPrice, setEthUsdPrice] = useState<string>("0"); // price of 1ETH in USD
4148
const [usdRegistrationPrice, setUsdRegistrationPrice] = useState<string>("0");
@@ -56,19 +63,42 @@ const RegisterSummary: FunctionComponent<RegisterSummaryProps> = ({
5663
function computeUsdPrice() {
5764
if (ethUsdPrice) {
5865
return (
59-
Number(ethUsdPrice) * Number(gweiToEth(ethRegistrationPrice))
66+
Number(ethUsdPrice) *
67+
Number(gweiToEth(ethRegistrationPrice)) *
68+
duration
6069
).toFixed(2);
6170
}
6271
return "0";
6372
}
6473

6574
setUsdRegistrationPrice(computeUsdPrice());
66-
}, [ethRegistrationPrice, ethUsdPrice]);
75+
}, [ethRegistrationPrice, ethUsdPrice, duration]);
6776

6877
function displayPrice(priceToPay: string, salesTaxInfo: string): ReactNode {
6978
return (
7079
<div className="flex items-center justify-center">
71-
<span className={styles.price}>{priceToPay}</span>
80+
<span className={styles.price}>
81+
{priceToPay} {displayedCurrency} {recurrence}
82+
</span>
83+
{isSwissResident ? (
84+
<p className={styles.legend}>&nbsp;{salesTaxInfo}</p>
85+
) : null}
86+
</div>
87+
);
88+
}
89+
90+
function displayDiscountedPrice(
91+
price: string,
92+
priceDiscounted: string,
93+
salesTaxInfo: string
94+
): ReactNode {
95+
return (
96+
<div className="flex items-center justify-center">
97+
<span className={styles.priceCrossed}>{price}</span>
98+
<ArrowRightIcon width="25" color="#454545" />
99+
<span className={styles.price}>
100+
{priceDiscounted} {displayedCurrency} {recurrence} 🔥
101+
</span>
72102
{isSwissResident ? (
73103
<p className={styles.legend}>&nbsp;{salesTaxInfo}</p>
74104
) : null}
@@ -87,24 +117,34 @@ const RegisterSummary: FunctionComponent<RegisterSummaryProps> = ({
87117
)}$ worth of ${displayedCurrency} for Swiss VAT)`
88118
: "";
89119

120+
if (isUpselled && discountedPrice) {
121+
return displayDiscountedPrice(
122+
numberToFixedString(Number(gweiToEth(registrationPrice)), 3),
123+
numberToFixedString(Number(gweiToEth(discountedPrice)), 3),
124+
salesTaxInfo
125+
);
126+
}
90127
return displayPrice(
91-
numberToFixedString(Number(gweiToEth(registrationPrice)), 3)
92-
.concat(` ${displayedCurrency} `)
93-
.concat(recurrence),
128+
numberToFixedString(Number(gweiToEth(registrationPrice)), 3),
94129
salesTaxInfo
95130
);
96131
}
97132

133+
function getMessage() {
134+
if (customMessage) return customMessage;
135+
else {
136+
return `${gweiToEth(ethRegistrationPrice)} ETH x ${
137+
isUpselled ? discountedDuration : duration
138+
} ${isUpselled || duration > 1 ? "years" : "year"}`;
139+
}
140+
}
141+
98142
return (
99143
<div className={styles.pricesSummary}>
100144
<div className={styles.totalDue}>
101145
<h4 className={styles.totalDueTitle}>Total due:</h4>
102146
<div className={styles.priceContainer}>
103-
<p className={styles.legend}>
104-
{customMessage
105-
? customMessage
106-
: `For ${duration} ${duration === 1 ? "year" : "years"}`}
107-
</p>
147+
<p className={styles.legend}>{getMessage()}</p>
108148
{loadingPrice ? (
109149
<Skeleton variant="text" width="150px" height="24px" />
110150
) : (

components/domains/registerV2.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ const RegisterV2: FunctionComponent<RegisterV2Props> = ({ domain, groups }) => {
253253
if (displayedCurrency !== CurrencyType.ETH && !quoteData) return;
254254
// Variables
255255
const newTokenId: number = Math.floor(Math.random() * 1000000000000);
256-
const txMetadataHash = "0x" + metadataHash;
256+
const txMetadataHash = ("0x" + metadataHash) as HexString;
257257

258258
// Common calls
259259
const calls = [

0 commit comments

Comments
 (0)