Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
refactor(mean-finance): remove typecasting
Browse files Browse the repository at this point in the history
  • Loading branch information
FiboApe committed Jun 28, 2022
1 parent b9573a4 commit 29390ea
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ export class OptimismMeanFinanceBalanceFetcher implements BalanceFetcher {
}
if (to) {
to.network = network;
const claimableTo = claimable(to) as WithMetaType<BaseToken>;
tokens.push(drillBalance(claimableTo, toWithdraw));
tokens.push(drillBalance(claimable(to), toWithdraw));
images = [
...images,
...getImagesFromToken(to),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ export class OptimismMeanFinanceDcaPositionContractPositionFetcher implements Po
}
if (to) {
to.network = network;
const claimableTo = claimable(to) as WithMetaType<BaseToken>;
tokens.push(drillBalance(claimableTo, toWithdraw));
tokens.push(drillBalance(claimable(to), toWithdraw));
images = [
...images,
...getImagesFromToken(to),
Expand Down
3 changes: 1 addition & 2 deletions src/apps/mean-finance/optimism/mean-finance.tvl-fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ export class OptimismMeanFinanceTvlFetcher implements TvlFetcher {
}
if (to) {
to.network = network;
const claimableTo = claimable(to) as WithMetaType<BaseToken>;
tokens.push(drillBalance(claimableTo, toWithdraw));
tokens.push(drillBalance(claimable(to), toWithdraw));
}

const balanceUSD = sumBy(tokens, t => t.balanceUSD);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ export class PolygonMeanFinanceBalanceFetcher implements BalanceFetcher {
}
if (to) {
to.network = network;
const claimableTo = claimable(to) as WithMetaType<BaseToken>;
tokens.push(drillBalance(claimableTo, toWithdraw));
tokens.push(drillBalance(claimable(to), toWithdraw));
images = [
...images,
...getImagesFromToken(to),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ export class PolygonMeanFinanceDcaPositionContractPositionFetcher implements Pos
}
if (to) {
to.network = network;
const claimableTo = claimable(to) as WithMetaType<BaseToken>;
tokens.push(drillBalance(claimableTo, toWithdraw));
tokens.push(drillBalance(claimable(to), toWithdraw));
images = [
...images,
...getImagesFromToken(to),
Expand Down
3 changes: 1 addition & 2 deletions src/apps/mean-finance/polygon/mean-finance.tvl-fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ export class PolygonMeanFinanceTvlFetcher implements TvlFetcher {
}
if (to) {
to.network = network;
const claimableTo = claimable(to) as WithMetaType<BaseToken>;
tokens.push(drillBalance(claimableTo, toWithdraw));
tokens.push(drillBalance(claimable(to), toWithdraw));
}

const balanceUSD = sumBy(tokens, t => t.balanceUSD);
Expand Down

0 comments on commit 29390ea

Please sign in to comment.