Skip to content

Commit

Permalink
Merge branch 'main' into oneclick-connect
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhochu committed Feb 22, 2024
2 parents 5a52eed + 7c08bc6 commit 23d81ee
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
8 changes: 8 additions & 0 deletions components/Assets/index.tsx

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion redux/selectors/getAccountRewards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const getGains = (
Object.keys(portfolio[source])
.map((id) => {
const asset = assets.data[id];
const netTvlMultiplier = asset.config.net_tvl_multiplier / 10000;
const netTvlMultiplier = (asset?.config.net_tvl_multiplier || 0) / 10000;

const { balance } = portfolio[source][id];
const apr = Number(portfolio[source][id].apr);
Expand Down
2 changes: 1 addition & 1 deletion redux/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const listToMap = (list) =>
.reduce((a, b) => ({ ...a, ...b }), {});

export const toUsd = (balance: string, asset: Asset) =>
asset.price?.usd
asset?.price?.usd
? Number(shrinkToken(balance, asset.metadata.decimals + asset.config.extra_decimals)) *
asset.price.usd
: 0;
Expand Down
3 changes: 2 additions & 1 deletion screens/Staking/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ const Staking = () => {
<CustomButton
onClick={() => setModal({ name: "staking" })}
className="w-full"
disabled={!total}
// disabled={!total}
disabled
>
Stake
</CustomButton>
Expand Down
8 changes: 7 additions & 1 deletion utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import BN from "bn.js";
import Decimal from "decimal.js";

import { defaultNetwork, LOGIC_CONTRACT_NAME } from "./config";
import { nearMetadata, wooMetadata } from "../components/Assets";
import { nearMetadata, wooMetadata, sfraxMetadata, fraxMetadata } from "../components/Assets";

import {
ChangeMethodsLogic,
Expand Down Expand Up @@ -226,5 +226,11 @@ export function standardizeAsset(asset) {
if (asset.symbol === "WOO") {
asset.icon = wooMetadata.icon;
}
if (asset.symbol === "sFRAX") {
asset.icon = sfraxMetadata.icon;
}
if (asset.symbol === "FRAX") {
asset.icon = fraxMetadata.icon;
}
return asset;
}

0 comments on commit 23d81ee

Please sign in to comment.