diff --git a/packages/web/components/complex/asset-fieldset.tsx b/packages/web/components/complex/asset-fieldset.tsx index 642ba60f20..ed6711b6e9 100644 --- a/packages/web/components/complex/asset-fieldset.tsx +++ b/packages/web/components/complex/asset-fieldset.tsx @@ -101,23 +101,22 @@ const AssetFieldsetHeaderBalance = observer( } ); -const calcScale = (numChars: number, isMobile: boolean): string => { +const calcFontSize = (numChars: number, isMobile: boolean): string => { const sizeMapping: { [key: number]: string } = isMobile ? { - 8: "1", - 10: "0.90", - 12: "0.80", - 18: "0.70", - 100: "0.48", + 9: "48px", + 15: "38px", + 24: "32px", + 100: "16px", } : { - 8: "1", - 12: "0.90", - 18: "0.90", - 100: "0.48", + 7: "48px", + 12: "38px", + 16: "28px", + 33: "24px", + 100: "16px", }; - console.log(numChars); for (const [key, value] of Object.entries(sizeMapping)) { if (numChars <= Number(key)) { return value; @@ -141,24 +140,24 @@ const AssetFieldsetInput = forwardRef< >(({ inputPrefix, inputValue, onInputChange, outputValue }, ref) => { const { isMobile } = useWindowSize(); - const scale = useMemo( - () => calcScale((inputValue ?? "").length, isMobile), + const fontSize = useMemo( + () => calcFontSize((inputValue ?? "").length, isMobile), [inputValue, isMobile] ); return ( -