Skip to content

Commit

Permalink
chore: revert change
Browse files Browse the repository at this point in the history
  • Loading branch information
icfor committed Mar 26, 2024
1 parent 343f1ac commit 8017422
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/screens/staking/lib/staking_sdk/core/cosmos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const leapNetworks = new Set(

export const cosmosWallets = new Set([
WalletId.Keplr,
// WalletId.Leap // @TODO: Enable Leap wallet when ready
// WalletId.Leap, // @TODO: Enable Leap wallet when ready
]);

export const cosmosStakingNetworks = new Set([
Expand Down
18 changes: 10 additions & 8 deletions src/screens/staking/lib/staking_sdk/staking_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type {
ClaimableRewardsResponse,
StakingInfoResponse,
} from "./staking_client_types";
import { normaliseCoin } from "./utils/coins";

const baseUrl =
process.env.NEXT_PUBLIC_STAKING_API || "https://staking-api.forbole.com";
Expand All @@ -31,15 +32,16 @@ const rewardsDivisor = new BigNumber(10).pow(18);

const parseStakingRewards = async (res: ClaimableRewardsResponse) =>
Array.isArray(res)
? res.map((coin) => {
const num = new BigNumber(coin.amount);
? res
.map((coin) => {
const num = new BigNumber(coin.amount);

return {
...coin,
amount: num.dividedBy(rewardsDivisor).toString(),
denom: coin.denom,
};
})
return {
amount: num.dividedBy(rewardsDivisor).toString(),
denom: coin.denom,
};
})
.map(normaliseCoin)
: res;

type StakeResponse = {
Expand Down

0 comments on commit 8017422

Please sign in to comment.