Skip to content

Commit

Permalink
Fix Typescript errors
Browse files Browse the repository at this point in the history
  • Loading branch information
uncoolzero committed Jun 26, 2023
1 parent bcc0e93 commit 720ff61
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion projects/ui/src/components/Barn/Actions/Buy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ const BuyForm: FC<
/// Approval Checks
const shouldApprove =
values.balanceFrom === BalanceFrom.EXTERNAL ||
values.balanceFrom === BalanceFrom.TOTAL && values.tokens[0].amount?.gt(balances[tokenIn.address].internal);
values.balanceFrom === BalanceFrom.TOTAL && values.tokens[0].amount?.gt(balances[tokenIn.address]?.internal);

return (
<FormWithDrawer autoComplete="off" noValidate siblingRef={formRef}>
Expand Down
2 changes: 1 addition & 1 deletion projects/ui/src/components/Field/Actions/Sow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const SowForm: FC<
/// Approval Checks
const shouldApprove =
values.balanceFrom === BalanceFrom.EXTERNAL ||
values.balanceFrom === BalanceFrom.TOTAL && values.tokens[0].amount?.gt(balances[tokenIn.address].internal);
values.balanceFrom === BalanceFrom.TOTAL && values.tokens[0].amount?.gt(balances[tokenIn.address]?.internal);

const handleSetBalanceFrom = useCallback(
(_balanceFrom: BalanceFrom) => {
Expand Down
2 changes: 1 addition & 1 deletion projects/ui/src/components/Silo/Actions/Deposit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ const DepositForm: FC<
/// Approval Checks
const shouldApprove =
values.balanceFrom === BalanceFrom.EXTERNAL ||
values.balanceFrom === BalanceFrom.TOTAL && values.tokens[0].amount?.gt(balances[tokenIn.address].internal);
values.balanceFrom === BalanceFrom.TOTAL && values.tokens[0].amount?.gt(balances[tokenIn.address]?.internal);

return (
<FormWithDrawer noValidate autoComplete="off" siblingRef={siblingRef}>
Expand Down

0 comments on commit 720ff61

Please sign in to comment.