Skip to content

Commit

Permalink
Merge pull request #352 from Concordium/ensure-timeout-parameters-are…
Browse files Browse the repository at this point in the history
…-reduced

Ensure timeout parameters are reduced
  • Loading branch information
shjortConcordium authored Sep 25, 2023
2 parents 39a8ab5 + 69ea3ae commit a47b39e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "concordium-desktop-wallet",
"productName": "concordium-desktop-wallet",
"description": "concordium-desktop-wallet",
"version": "1.6.0-beta.0",
"version": "1.6.0-beta.1",
"main": "./main.prod.js",
"author": {
"name": "Concordium Software",
Expand Down
2 changes: 1 addition & 1 deletion app/pages/multisig/common/RelativeRateField/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const isValidRelativeRatePart = (v = '') =>
export const isPositiveNumber: Validate = (value: RelativeRateValue) =>
Object.values(value)
.map(validatePositiveNumber)
.every((v) => v === true) || 'Values must above 1';
.every((v) => v === true) || 'Values must be positive';

export const validBigIntValues: Validate = (value: RelativeRateValue) =>
Object.values(value)
Expand Down
9 changes: 5 additions & 4 deletions app/utils/transactionHandlers/TimeoutParametersHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { serializeTimeoutParameters } from '../UpdateSerialization';
import UpdateHandlerBase from './UpdateHandlerBase';
import { TimeoutParametersFields } from '~/pages/multisig/updates/TimeoutParameters/util';
import { assertChainParametersV2OrHigher } from '../blockSummaryHelpers';
import { getReducedFraction } from '../exchangeRateHelpers';

const TYPE = 'Update timeout parameters';

Expand Down Expand Up @@ -48,14 +49,14 @@ export default class TimeoutParametersHandler

const payload = {
timeoutBase: fields.timeoutBase,
timeoutIncrease: {
timeoutIncrease: getReducedFraction({
numerator: BigInt(fields.timeoutIncrease.numerator),
denominator: BigInt(fields.timeoutIncrease.denominator),
},
timeoutDecrease: {
}),
timeoutDecrease: getReducedFraction({
numerator: BigInt(fields.timeoutDecrease.numerator),
denominator: BigInt(fields.timeoutDecrease.denominator),
},
}),
};

return createUpdateMultiSignatureTransaction(
Expand Down

0 comments on commit a47b39e

Please sign in to comment.