Skip to content

Commit

Permalink
Merge pull request #163 from PotLock/payout-update
Browse files Browse the repository at this point in the history
Payout-update
  • Loading branch information
M-Rb3 committed Jul 14, 2024
2 parents 2ff7217 + 565fddf commit b79f06b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/pages/Pot/components/PayoutsModal/PayoutsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const PayoutsModal = ({
...payouts,
[projectId]: {
...payouts[projectId],
matchingAmount: calcYoctos(amount),
matchingAmount: calcYoctos(amount || "0"),
},
});
};
Expand Down Expand Up @@ -209,17 +209,17 @@ const PayoutsModal = ({
label="QF Weight"
percent={true}
onChange={(value) => {
setQfWeight(value);
setJdgWeight((100 - parseFloat(value)).toString());
setQfWeight(value || "0");
setJdgWeight((100 - parseFloat(value || "0")).toString());
}}
value={qfWeight}
/>
<Text
label="Judges Weights"
percent={true}
onChange={(value) => {
setJdgWeight(value);
setQfWeight((100 - parseFloat(value)).toString());
setJdgWeight(value || "0");
setQfWeight((100 - parseFloat(value || "0")).toString());
}}
value={jdgWeight}
/>
Expand Down Expand Up @@ -259,7 +259,7 @@ const PayoutsModal = ({
onChange={(value) =>
setAssignedWeights({
...assigendWeights,
[project_id]: parseFloat(value),
[project_id]: parseFloat(value || "0"),
})
}
percent={true}
Expand Down
1 change: 0 additions & 1 deletion src/pages/Project/NavPages/Pots/Pots.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const Pots = () => {
const POT_STATUS = ["Approved", "pending"];

const [potIds, setPotIds] = useState<any>(null); // ids[] of pots that approved project
// const [loading, setLoading] = useState(true);

useEffect(() => {
if (pots && !potIds) {
Expand Down

0 comments on commit b79f06b

Please sign in to comment.