Skip to content

Commit

Permalink
[Updated] correct type for location.state.autoConnect
Browse files Browse the repository at this point in the history
  • Loading branch information
greedyboi committed Jan 24, 2024
1 parent f1a3b54 commit cc2a00b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/Deposit/Deposit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const Deposit = () => {
const { isDark } = useColorScheme();

const amountToDeposit = useMemo(() => {
const state = location.state as { amountToDeposit?: string };
const state = location.state as { amountToDeposit?: number };

return state.amountToDeposit;
}, [location]);
Expand Down Expand Up @@ -156,7 +156,7 @@ const Deposit = () => {

const transferForm = useFormik({
initialValues: {
amount: amountToDeposit || '',
amount: amountToDeposit?.toFixed(6) || '',
},
validationSchema: yup.object().shape({
amount: yup
Expand Down Expand Up @@ -979,7 +979,7 @@ const Deposit = () => {
price={prices?.[denom || ''] || 0}
lumWallet={lumWallet}
otherWallets={otherWallets}
amountFromLocationState={Number(amountToDeposit)}
amountFromLocationState={amountToDeposit}
/>
{isShareStep && (
<Lottie
Expand Down

0 comments on commit cc2a00b

Please sign in to comment.