Fix durability validation

This commit is contained in:
Arnaud 2024-11-10 10:05:44 +07:00
parent 04f99c1b67
commit 22c992b56f
No known key found for this signature in database
GPG Key ID: 69D6CE281FCAE663
1 changed files with 5 additions and 3 deletions

View File

@ -69,10 +69,12 @@ export function StorageRequestReview({
const onUpdateDurability = (data: Partial<StorageRequest>) => {
onStorageRequestChange(data);
const merge = { ...storageRequest, ...data };
const index = findDurabilityIndex({
nodes: storageRequest.nodes,
tolerance: storageRequest.tolerance,
proofProbability: storageRequest.proofProbability,
nodes: merge.nodes,
tolerance: merge.tolerance,
proofProbability: merge.proofProbability,
});
setDurability(index + 1);