Skip to content

Commit

Permalink
Fix durability validation
Browse files Browse the repository at this point in the history
  • Loading branch information
2-towns committed Nov 10, 2024
1 parent 04f99c1 commit 22c992b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/StorageRequestSetup/StorageRequestReview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 22c992b

Please sign in to comment.