upgrade dist prefix

This commit is contained in:
Adrian Brzeziński 2024-01-22 13:27:02 +02:00
parent 55cf8b0d78
commit 5ca560f000
3 changed files with 27 additions and 14 deletions

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"cSpell.words": ["intrest"]
}

View File

@ -3,7 +3,7 @@ import { Provider } from '@project-serum/anchor'
import { MANGO_DATA_API_URL } from 'utils/constants' import { MANGO_DATA_API_URL } from 'utils/constants'
import { AnchorProvider } from '@coral-xyz/anchor' import { AnchorProvider } from '@coral-xyz/anchor'
export const DISTRIBUTION_NUMBER_PREFIX = 117 export const DISTRIBUTION_NUMBER_PREFIX = 118
type AccountTier = { type AccountTier = {
mango_account: string mango_account: string

View File

@ -155,17 +155,17 @@ const DashboardSuggestedValues = ({
const isThereNeedOfSendingOracleConfig = const isThereNeedOfSendingOracleConfig =
bank.oracleConfig.confFilter.toNumber() !== oracleConfFilter || bank.oracleConfig.confFilter.toNumber() !== oracleConfFilter ||
bank.oracleConfig.maxStalenessSlots.toNumber() !== maxStalenessSlots bank.oracleConfig.maxStalenessSlots.toNumber() !== maxStalenessSlots
// const rateConfigs = { const rateConfigs = {
// adjustmentFactor: getNullOrVal(fieldsToChange.adjustmentFactor), adjustmentFactor: getNullOrVal(fieldsToChange.adjustmentFactor),
// util0: getNullOrVal(fieldsToChange.util0), util0: getNullOrVal(fieldsToChange.util0),
// rate0: getNullOrVal(fieldsToChange.rate0), rate0: getNullOrVal(fieldsToChange.rate0),
// util1: getNullOrVal(fieldsToChange.util1), util1: getNullOrVal(fieldsToChange.util1),
// rate1: getNullOrVal(fieldsToChange.rate1), rate1: getNullOrVal(fieldsToChange.rate1),
// maxRate: getNullOrVal(fieldsToChange.maxRate), maxRate: getNullOrVal(fieldsToChange.maxRate),
// } }
// const isThereNeedOfSendingRateConfigs = Object.values(rateConfigs).filter( const isThereNeedOfSendingRateConfigs = Object.values(rateConfigs).filter(
// (x) => x !== null, (x) => x !== null,
// ).length ).length
const ix = await client!.program.methods const ix = await client!.program.methods
.tokenEdit( .tokenEdit(
null, null,
@ -188,7 +188,16 @@ const DashboardSuggestedValues = ({
fieldsToChange.groupInsuranceFund === undefined fieldsToChange.groupInsuranceFund === undefined
? null ? null
: fieldsToChange.groupInsuranceFund, : fieldsToChange.groupInsuranceFund,
null, isThereNeedOfSendingRateConfigs
? {
adjustmentFactor: fieldsToChange.adjustmentFactor!,
util0: fieldsToChange.util0!,
rate0: fieldsToChange.rate0!,
util1: fieldsToChange.util1!,
rate1: fieldsToChange.rate1!,
maxRate: fieldsToChange.maxRate!,
}
: null,
getNullOrVal(fieldsToChange.loanFeeRate), getNullOrVal(fieldsToChange.loanFeeRate),
getNullOrVal(fieldsToChange.loanOriginationFeeRate), getNullOrVal(fieldsToChange.loanOriginationFeeRate),
getNullOrVal(fieldsToChange.maintAssetWeight), getNullOrVal(fieldsToChange.maintAssetWeight),
@ -216,7 +225,8 @@ const DashboardSuggestedValues = ({
getNullOrVal(fieldsToChange.tokenConditionalSwapTakerFeeRate), getNullOrVal(fieldsToChange.tokenConditionalSwapTakerFeeRate),
getNullOrVal(fieldsToChange.tokenConditionalSwapMakerFeeRate), getNullOrVal(fieldsToChange.tokenConditionalSwapMakerFeeRate),
getNullOrVal(fieldsToChange.flashLoanSwapFeeRate), getNullOrVal(fieldsToChange.flashLoanSwapFeeRate),
getNullOrVal(fieldsToChange.interestCurveScaling), //do not edit of interest curve scaling
null,
getNullOrVal(fieldsToChange.interestTargetUtilization), getNullOrVal(fieldsToChange.interestTargetUtilization),
null, null,
null, null,