Skip to content

Commit

Permalink
Merge pull request #27 from burrowHQ/add-prot-fee
Browse files Browse the repository at this point in the history
Add prot fee
  • Loading branch information
aidai524 authored Nov 21, 2023
2 parents 3cb3f67 + 0fadab8 commit 24ae962
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
9 changes: 0 additions & 9 deletions components/Header/WalletButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,15 +301,6 @@ function AccountDetail({ onClose }: { onClose?: () => void }) {
<NearIcon style={{ width: "1.5rem", height: "1.5rem", fill: "white" }} />
Near Wallet
</div>
<div
onClick={() => {
window.open(config.walletUrl);
}}
className="flex items-center cursor-pointer text-gray-300 xsm:pr-1"
>
<span className="text-xs underline mr-1">Wallet</span>
<ArrowRightTopIcon />
</div>
</div>
<div className="flex items-center justify-between w-full gap-2 my-3.5">
<div
Expand Down
1 change: 1 addition & 0 deletions interfaces/asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export interface IAssetDetailed {
farms: IAssetFarmView[];
// price mixin
price?: IPrice;
prot_fee: string;
}

export interface AssetFarm {
Expand Down
2 changes: 2 additions & 0 deletions redux/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const transformAsset = (
const brrrTokenId = app.config.booster_token_id;
const totalSupplyD = new Decimal(asset.supplied.balance)
.plus(new Decimal(asset.reserved))
.plus(asset.prot_fee)
.toFixed();
const totalBorrowedD = new Decimal(asset.borrowed.balance).toFixed();
const totalSupply = Number(
Expand All @@ -71,6 +72,7 @@ export const transformAsset = (
// TODO: refactor: remove temp vars using ramda
const temp1 = new Decimal(asset.supplied.balance)
.plus(new Decimal(asset.reserved))
.plus(asset.prot_fee)
.minus(new Decimal(asset.borrowed.balance));
const temp2 = temp1.minus(temp1.mul(0.001)).toFixed(0);
const availableLiquidity = Number(
Expand Down

0 comments on commit 24ae962

Please sign in to comment.