fix naming of suggested values borrow weight and deposit weight

This commit is contained in:
Adrian Brzeziński 2023-09-11 21:13:54 +02:00
parent 38abc0cee2
commit 662d110ae0
3 changed files with 16 additions and 12 deletions

View File

@ -352,18 +352,18 @@ const DashboardSuggestedValues = ({
/>
<KeyValuePair
label="Deposit weight scale start quote"
value={`$${formattedBankValues.depositWeightScale}`}
value={`$${formattedBankValues.depositWeightScaleStartQuote}`}
proposedValue={
suggestedFields.depositWeightScale &&
`$${suggestedFields.depositWeightScale}`
suggestedFields.depositWeightScaleStartQuote &&
`$${suggestedFields.depositWeightScaleStartQuote}`
}
/>
<KeyValuePair
label="Borrow weight scale start quote"
value={`$${formattedBankValues.borrowWeightScale}`}
value={`$${formattedBankValues.borrowWeightScaleStartQuote}`}
proposedValue={
suggestedFields.borrowWeightScale &&
`$${suggestedFields.borrowWeightScale}`
suggestedFields.borrowWeightScaleStartQuote &&
`$${suggestedFields.borrowWeightScaleStartQuote}`
}
/>
<KeyValuePair

View File

@ -258,11 +258,11 @@ const Dashboard: NextPage = () => {
/>
<KeyValuePair
label="Deposit weight scale start quote"
value={`$${formattedBankValues.depositWeightScale}`}
value={`$${formattedBankValues.depositWeightScaleStartQuote}`}
/>
<KeyValuePair
label="Borrow weight scale start quote"
value={`$${formattedBankValues.borrowWeightScale}`}
value={`$${formattedBankValues.borrowWeightScaleStartQuote}`}
/>
<KeyValuePair
label="Rate params"

View File

@ -297,11 +297,11 @@ export const formatSuggestedValues = (
suggestedParams.netBorrowLimitPerWindowQuote,
6,
),
borrowWeightScale: toUiDecimals(
borrowWeightScaleStartQuote: toUiDecimals(
suggestedParams.borrowWeightScaleStartQuote,
6,
),
depositWeightScale: toUiDecimals(
depositWeightScaleStartQuote: toUiDecimals(
suggestedParams.depositWeightScaleStartQuote,
6,
),
@ -368,8 +368,12 @@ export const getFormattedBankValues = (group: Group, bank: Bank) => {
initLiabWeight: bank.initLiabWeight.toFixed(2),
scaledInitAssetWeight: bank.scaledInitAssetWeight(bank.price).toFixed(2),
scaledInitLiabWeight: bank.scaledInitLiabWeight(bank.price).toFixed(2),
depositWeightScale: toUiDecimalsForQuote(bank.depositWeightScaleStartQuote),
borrowWeightScale: toUiDecimalsForQuote(bank.borrowWeightScaleStartQuote),
depositWeightScaleStartQuote: toUiDecimalsForQuote(
bank.depositWeightScaleStartQuote,
),
borrowWeightScaleStartQuote: toUiDecimalsForQuote(
bank.borrowWeightScaleStartQuote,
),
rate0: (100 * bank.rate0.toNumber()).toFixed(2),
util0: (100 * bank.util0.toNumber()).toFixed(),
rate1: (100 * bank.rate1.toNumber()).toFixed(2),