Skip to content

Commit 27a2ea8

Browse files
committed
fix deserialization error [ci]
Signed-off-by: Paweł Perek <pawel.perek@digitalasset.com>
1 parent f76f6d4 commit 27a2ea8

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

apps/sv/frontend/src/utils/buildAmuletRulesConfigFromChanges.ts

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ export function buildAmuletRulesConfigFromChanges(
6262
const futureValues: Tuple2<RelTime, IssuanceConfig>[] = [];
6363
for (let i = 0; i < futureValuesCount; i++) {
6464
const time = { microseconds: getValue(`issuanceCurveFutureValues${i}`) };
65+
const futureOptDevelopmentFundPercentage = getValue(
66+
`issuanceCurveFutureValues${i}OptDevelopmentFundPercentage`
67+
);
6568
const config: IssuanceConfig = {
6669
amuletToIssuePerYear: getValue(`issuanceCurveFutureValues${i}AmuletToIssuePerYear`),
6770
validatorRewardPercentage: getValue(`issuanceCurveFutureValues${i}ValidatorRewardPercentage`),
@@ -70,19 +73,22 @@ export function buildAmuletRulesConfigFromChanges(
7073
featuredAppRewardCap: getValue(`issuanceCurveFutureValues${i}FeaturedAppRewardCap`),
7174
unfeaturedAppRewardCap: getValue(`issuanceCurveFutureValues${i}UnfeaturedAppRewardCap`),
7275
optValidatorFaucetCap: getValue(`issuanceCurveFutureValues${i}OptValidatorFaucetCap`),
73-
optDevelopmentFundPercentage: getValue(
74-
`issuanceCurveFutureValues${i}OptDevelopmentFundPercentage`
75-
),
76+
optDevelopmentFundPercentage:
77+
futureOptDevelopmentFundPercentage === '' ? null : futureOptDevelopmentFundPercentage,
7678
};
7779
futureValues.push({ _1: time, _2: config });
7880
}
7981

8082
const transferPreapprovalFee = getValue('transferPreapprovalFee');
83+
const optDevelopmentFundManager = getValue('optDevelopmentFundManager');
84+
const initialOptDevelopmentFundPercentage = getValue(
85+
'issuanceCurveInitialValueOptDevelopmentFundPercentage'
86+
);
8187
const amuletConfig: AmuletConfig<'USD'> = {
8288
tickDuration: { microseconds: getValue('tickDuration') },
8389
transferPreapprovalFee: transferPreapprovalFee === '' ? null : transferPreapprovalFee,
8490
featuredAppActivityMarkerAmount: getValue('featuredAppActivityMarkerAmount'),
85-
optDevelopmentFundManager: getValue('optDevelopmentFundManager'),
91+
optDevelopmentFundManager: optDevelopmentFundManager === '' ? null : optDevelopmentFundManager,
8692

8793
transferConfig: {
8894
createFee: { fee: getValue('transferConfigCreateFee') },
@@ -107,9 +113,8 @@ export function buildAmuletRulesConfigFromChanges(
107113
featuredAppRewardCap: getValue('issuanceCurveInitialValueFeaturedAppRewardCap'),
108114
unfeaturedAppRewardCap: getValue('issuanceCurveInitialValueUnfeaturedAppRewardCap'),
109115
optValidatorFaucetCap: getValue('issuanceCurveInitialValueOptValidatorFaucetCap'),
110-
optDevelopmentFundPercentage: getValue(
111-
'issuanceCurveInitialValueOptDevelopmentFundPercentage'
112-
),
116+
optDevelopmentFundPercentage:
117+
initialOptDevelopmentFundPercentage === '' ? null : initialOptDevelopmentFundPercentage,
113118
},
114119
futureValues: futureValues,
115120
},

0 commit comments

Comments
 (0)