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 { AnchorProvider } from '@coral-xyz/anchor'
export const DISTRIBUTION_NUMBER_PREFIX = 117
export const DISTRIBUTION_NUMBER_PREFIX = 118
type AccountTier = {
mango_account: string

View File

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