Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenshively committed Sep 26, 2024
2 parents c67160a + e7655bb commit 82219bf
Show file tree
Hide file tree
Showing 27 changed files with 32 additions and 36 deletions.
14 changes: 5 additions & 9 deletions earn/src/components/markets/borrow/BorrowingWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,14 @@ export default function BorrowingWidget(props: BorrowingWidgetProps) {

let borrowModal: JSX.Element | null = null;

if (selectedBorrows != null && selectedCollateral != null) {
const borrowEntry = selectedBorrows ? filteredBorrowEntries.find((x) => x.token.equals(selectedBorrows)) : null;

if (selectedBorrows != null && selectedCollateral != null && borrowEntry?.matchingPairs.length) {
if (collateralIsUniswapPosition(selectedCollateral)) {
borrowModal = (
<BorrowModalUniswap
isOpen={selectedBorrows != null && selectedCollateral != null}
selectedLendingPair={
// TODO: improve this
filteredBorrowEntries.find((x) => x.token.equals(selectedBorrows))!.matchingPairs[0]
}
selectedLendingPair={borrowEntry.matchingPairs[0]}
selectedCollateral={selectedCollateral}
selectedBorrow={selectedBorrows}
setIsOpen={() => {
Expand All @@ -256,10 +255,7 @@ export default function BorrowingWidget(props: BorrowingWidgetProps) {
borrowModal = (
<BorrowModal
isOpen={selectedBorrows != null && selectedCollateral != null}
selectedLendingPair={
// TODO: improve this
filteredBorrowEntries.find((x) => x.token.equals(selectedBorrows))!.matchingPairs[0]
}
selectedLendingPair={borrowEntry.matchingPairs[0]}
selectedCollateral={selectedCollateral}
selectedBorrow={selectedBorrows}
userBalance={tokenBalances.get(selectedCollateral.address)?.gn ?? GN.zero(selectedCollateral.decimals)}
Expand Down
2 changes: 1 addition & 1 deletion earn/src/components/markets/supply/SupplyTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ export default function SupplyTable(props: SupplyTableProps) {
onClick={() => {
const hasBadDebt =
row.suppliedBalance > row.withdrawableBalance &&
ALOE_II_BAD_DEBT_LENDERS[activeChain.id].includes(row.kitty.address.toLowerCase());
ALOE_II_BAD_DEBT_LENDERS[activeChain.id]?.includes(row.kitty.address.toLowerCase());
setSelectedRow({ row, action: hasBadDebt ? 'recover' : 'withdraw' });
}}
disabled={row.suppliedBalance === 0}
Expand Down
2 changes: 1 addition & 1 deletion shared/src/assets/svg/tokens/apecoin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion shared/src/assets/svg/tokens/badger.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion shared/src/assets/svg/tokens/bald.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion shared/src/assets/svg/tokens/based.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion shared/src/assets/svg/tokens/cbeth.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion shared/src/assets/svg/tokens/convex.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion shared/src/assets/svg/tokens/dai.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion shared/src/assets/svg/tokens/degen.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion shared/src/assets/svg/tokens/frax.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion shared/src/assets/svg/tokens/gmx.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion shared/src/assets/svg/tokens/lido.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion shared/src/assets/svg/tokens/looks.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion shared/src/assets/svg/tokens/lyra.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion shared/src/assets/svg/tokens/maker.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion shared/src/assets/svg/tokens/matic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion shared/src/assets/svg/tokens/perp.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion shared/src/assets/svg/tokens/pooltogether.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion shared/src/assets/svg/tokens/rai.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion shared/src/assets/svg/tokens/rpl.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion shared/src/assets/svg/tokens/snx.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion shared/src/assets/svg/tokens/uni.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions shared/src/assets/svg/tokens/usdbc.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion shared/src/assets/svg/tokens/velo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 82219bf

Please sign in to comment.