Skip to content

Commit

Permalink
Fix carry calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
kaloudis committed Oct 17, 2022
1 parent cfb0ace commit d65c026
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,7 @@ const Home: React.FC = () => {
? new BigNumber(0)
: amountToSend;

newCarry[o.address] = carry[o.address]
? failure
? carry[o.address].plus(amountOwed)
: amountToCarry
: failure
? amountOwed
: amountToCarry;
newCarry[o.address] = failure ? amountOwed : amountToCarry;

console.log(`newSent for ${o.name}: ${newSent[o.address]}`);
console.log(`newCarry for ${o.name}: ${newCarry[o.address]}`);
Expand Down

0 comments on commit d65c026

Please sign in to comment.