Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,11 @@ export function BorrowIncreaseModal({
const minDebtUsd = useMinDebtUsd();

const currencyRates = useContextSelector(CurrencyRatesContext, (state) => state.currencyRates);
const currencyRate = Number(currencyRates?.[tokenName.toUpperCase() || '']);
const coreCurrencyRate = Number(currencyRates?.[coreDebtTokenName.toUpperCase() || '']);
const extraCurrencyRate = Number(currencyRates?.[extraDebtTokenName?.toUpperCase() || '']);
Comment thread
Artem1211 marked this conversation as resolved.

const minimumRequired = currencyRate * minDebtUsd;
const extraMinimumRequired = currencyRate * minDebtUsd;
const minimumRequired = coreCurrencyRate * minDebtUsd;
const extraMinimumRequired = extraCurrencyRate * minDebtUsd;

const isDebtBiggerThanMinimum = Number(value) >= minimumRequired;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export const getMaxDebt = (
availableToBorrow: number,
defaultBorrowCapacity: number,
priceInUsd: number,
) => Math.min(availableToBorrow, Number((defaultBorrowCapacity / priceInUsd).toFixed(3)));
) => Math.min(availableToBorrow, Number((defaultBorrowCapacity * priceInUsd).toFixed(3)));
Comment thread
Artem1211 marked this conversation as resolved.

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions packages/landing/src/widgets/landing/landing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import React from 'react';
import Image from 'next/image';
import { SubscriptionSection } from '@/widgets/landing/components/subscription-section/subscription-section';
import Typography from '@marginly/ui/components/typography';
import Button from '@marginly/ui/components/button';
import NextLink from 'next/link';
Expand Down Expand Up @@ -203,7 +202,6 @@ export function Landing({ posts }: Props) {
}}
/>
</LaunchBg>
<SubscriptionSection />
</Launch>
<Container>
<QuestionSection subscriptionAnchor={SUBSCRIPTION_ANCHOR} />
Expand Down
Loading