upgrade mango settings

This commit is contained in:
Adrian Brzeziński 2023-09-08 17:55:24 +02:00
parent 56f87e46b7
commit e78e579611
5 changed files with 20 additions and 14 deletions

View File

@ -468,14 +468,14 @@ const ListToken = ({ goBack }: { goBack: () => void }) => {
Number(tierPreset.maintLiabWeight),
Number(tierPreset.initLiabWeight),
Number(tierPreset.liquidationFee),
Number(tierPreset.delayIntervalSeconds),
Number(tierPreset.delayGrowthLimit),
Number(tierPreset.stableGrowthLimit),
Number(tierPreset.stablePriceDelayIntervalSeconds),
Number(tierPreset.stablePriceDelayGrowthLimit),
Number(tierPreset.stablePriceGrowthLimit),
Number(tierPreset.minVaultToDepositsRatio),
new BN(tierPreset.netBorrowLimitWindowSizeTs),
new BN(tierPreset.netBorrowLimitPerWindowQuote),
Number(tierPreset.borrowWeightScale),
Number(tierPreset.depositWeightScale),
Number(tierPreset.borrowWeightScaleStartQuote),
Number(tierPreset.depositWeightScaleStartQuote),
Number(tierPreset.reduceOnly),
Number(tierPreset.tokenConditionalSwapTakerFeeRate),
Number(tierPreset.tokenConditionalSwapMakerFeeRate),

View File

@ -189,8 +189,8 @@ const DashboardSuggestedValues = ({
getNullOrVal(fieldsToChange.netBorrowLimitWindowSizeTs)
? new BN(fieldsToChange.netBorrowLimitWindowSizeTs!)
: null,
getNullOrVal(fieldsToChange.borrowWeightScale),
getNullOrVal(fieldsToChange.depositWeightScale),
getNullOrVal(fieldsToChange.borrowWeightScaleStartQuote),
getNullOrVal(fieldsToChange.depositWeightScaleStartQuote),
false,
false,
bank.reduceOnly ? 0 : null,

View File

@ -23,7 +23,7 @@
"dependencies": {
"@blockworks-foundation/mango-feeds": "0.1.7",
"@blockworks-foundation/mango-v4": "^0.19.27",
"@blockworks-foundation/mango-v4-settings": "0.2.8",
"@blockworks-foundation/mango-v4-settings": "0.2.10",
"@headlessui/react": "1.6.6",
"@heroicons/react": "2.0.10",
"@metaplex-foundation/js": "0.19.4",

View File

@ -297,8 +297,14 @@ export const formatSuggestedValues = (
suggestedParams.netBorrowLimitPerWindowQuote,
6,
),
borrowWeightScale: toUiDecimals(suggestedParams.borrowWeightScale, 6),
depositWeightScale: toUiDecimals(suggestedParams.depositWeightScale, 6),
borrowWeightScale: toUiDecimals(
suggestedParams.borrowWeightScaleStartQuote,
6,
),
depositWeightScale: toUiDecimals(
suggestedParams.depositWeightScaleStartQuote,
6,
),
}
}

View File

@ -26,10 +26,10 @@
dependencies:
ws "^8.13.0"
"@blockworks-foundation/mango-v4-settings@0.2.8":
version "0.2.8"
resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-v4-settings/-/mango-v4-settings-0.2.8.tgz#fa88d6ddb6dcc1dd1cd8f75ab96bc0d41629799d"
integrity sha512-20h5+Vky3YZfd3ekcnMgUxp1XaddFgtSNE6SPCy1oOAOjzvDHgZ3AVJd95WTTjTONGTZqqmTbP2ReWIu4ZfP6w==
"@blockworks-foundation/mango-v4-settings@0.2.10":
version "0.2.10"
resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-v4-settings/-/mango-v4-settings-0.2.10.tgz#d09a74b743b1eb44bcad46b09680035fb8ec5a85"
integrity sha512-pQ7TfAxBdoF0fNVQ7PsT4TW5cpGibTjZadXcYlbyfetxQbTQS9mgghfGaq/TDFz/rHa6FS2FJ0xCJBoy7FNDbg==
dependencies:
bn.js "^5.2.1"
eslint-config-prettier "^9.0.0"