Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
transmissions11 committed May 23, 2021
1 parent 12d19a6 commit 4e50a9e
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 75 deletions.
9 changes: 0 additions & 9 deletions src/components/pages/Fuse/FusePoolCreatePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,6 @@ const PoolConfiguration = () => {
>
ChainlinkPriceOracle
</option>

<option
className="black-bg-option"
value={
Fuse.PUBLIC_PRICE_ORACLE_CONTRACT_ADDRESSES.Keep3rPriceOracle
}
>
Keep3rPriceOracle
</option>
</Select>
</OptionRow>

Expand Down
128 changes: 62 additions & 66 deletions src/components/pages/PoolPortal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,45 +122,40 @@ const PoolPortalContent = () => {
],
});

const {
spacing: statsSidebarSpacing,
childSizes: statsSidebarChildSizes,
} = useSpacedLayout({
parentHeight: bodySize.asNumber(),
spacing: DASHBOARD_BOX_SPACING.asNumber(),
childSizes: [
new PixelSize(90),
new PixelSize(100),
new PixelSize(152),
new PixelSize(180),
new PercentOnDesktopPixelOnMobileSize({
percentageSize: 1,
pixelSize: 100,
}),
],
});

const {
spacing: mainSectionSpacing,
childSizes: mainSectionChildSizes,
} = useSpacedLayout({
parentHeight: bodySize.asNumber(),
spacing: DASHBOARD_BOX_SPACING.asNumber(),
childSizes: [
new PixelSize(90),
new PercentOnDesktopPixelOnMobileSize({
percentageSize: 1,
pixelSize: 600,
}),
new PixelSize(180),
],
});
const { spacing: statsSidebarSpacing, childSizes: statsSidebarChildSizes } =
useSpacedLayout({
parentHeight: bodySize.asNumber(),
spacing: DASHBOARD_BOX_SPACING.asNumber(),
childSizes: [
new PixelSize(90),
new PixelSize(100),
new PixelSize(152),
new PixelSize(180),
new PercentOnDesktopPixelOnMobileSize({
percentageSize: 1,
pixelSize: 100,
}),
],
});

const { spacing: mainSectionSpacing, childSizes: mainSectionChildSizes } =
useSpacedLayout({
parentHeight: bodySize.asNumber(),
spacing: DASHBOARD_BOX_SPACING.asNumber(),
childSizes: [
new PixelSize(90),
new PercentOnDesktopPixelOnMobileSize({
percentageSize: 1,
pixelSize: 600,
}),
new PixelSize(180),
],
});

const { poolName, poolCaption, poolType } = usePoolInfoFromContext();

const { data: poolBalance, isLoading: isPoolBalanceLoading } = usePoolBalance(
poolType
);
const { data: poolBalance, isLoading: isPoolBalanceLoading } =
usePoolBalance(poolType);

const {
isOpen: isDepositModalOpen,
Expand Down Expand Up @@ -608,36 +603,37 @@ const APYStats = () => {

const { rari } = useRari();

const { data: apys, isLoading: areAPYsLoading, isError } = useQuery(
pool + " monthly and weekly apys",
async () => {
const [monthRaw, weekRaw, rgtAPR]: [BN, BN, string] = await Promise.all([
getSDKPool({
rari,
pool,
}).apy.getApyOverTime(
Math.floor((Date.now() - millisecondsPerDay * 30) / 1000)
),
getSDKPool({
rari,
pool,
}).apy.getApyOverTime(
Math.floor((Date.now() - millisecondsPerDay * 7) / 1000)
),
fetchRGTAPR(rari),
]);

const month = parseFloat(
rari.web3.utils.fromWei(monthRaw.mul(rari.web3.utils.toBN(100)))
).toFixed(1);

const week = parseFloat(
rari.web3.utils.fromWei(weekRaw.mul(rari.web3.utils.toBN(100)))
).toFixed(1);

return { month, week, rgtAPR };
}
);
const {
data: apys,
isLoading: areAPYsLoading,
isError,
} = useQuery(pool + " monthly and weekly apys", async () => {
const [monthRaw, weekRaw, rgtAPR]: [BN, BN, string] = await Promise.all([
getSDKPool({
rari,
pool,
}).apy.getApyOverTime(
Math.floor((Date.now() - millisecondsPerDay * 30) / 1000)
),
getSDKPool({
rari,
pool,
}).apy.getApyOverTime(
Math.floor((Date.now() - millisecondsPerDay * 7) / 1000)
),
fetchRGTAPR(rari),
]);

const month = parseFloat(
rari.web3.utils.fromWei(monthRaw.mul(rari.web3.utils.toBN(100)))
).toFixed(1);

const week = parseFloat(
rari.web3.utils.fromWei(weekRaw.mul(rari.web3.utils.toBN(100)))
).toFixed(1);

return { month, week, rgtAPR };
});

return (
<Column
Expand Down

1 comment on commit 4e50a9e

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bundled size for the package is listed below:

build/static/media: 679.69 KB
build/static/js: 30.48 MB
build/static/css: 15.63 KB
build/static: 31.16 MB
build: 31.24 MB

Please sign in to comment.