Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
vkulinich-cl committed Jun 13, 2024
1 parent c53cfa4 commit fd81579
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/api/omnipool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,13 @@ export const getOmnipoolPosition =
(api: ApiPromise, itemId: string) => async () => {
const res = await api.query.omnipool.positions(itemId)
const data = res.unwrap()

const position = {
id: itemId,
assetId: data.assetId.toString(),
amount: data.amount.toBigNumber(),
shares: data.shares.toBigNumber(),
price: data.price,
price: data.price.map((el) => el.toString()),
}

return position
Expand Down Expand Up @@ -165,7 +166,7 @@ export const getOmnipoolPositions =
return {
amount: data.amount.toBigNumber(),
shares: data.shares.toBigNumber(),
price: data.price,
price: data.price.map((e) => e.toString()),
assetId: data.assetId.toString(),
}
})
Expand Down
2 changes: 1 addition & 1 deletion src/sections/pools/farms/position/FarmingPosition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ const OmnipoolFields = ({

const initialPosValue =
getFloatingPointAmount(
lpPosition.data?.amount.toBigNumber() ?? 0,
lpPosition.data?.amount ?? 0,
meta?.decimals ?? 12,
) ?? BN_0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ import {
isXYKPosition,
TXYKPosition,
} from "./data/WalletAssetsHydraPositionsData.utils"
import { u128 } from "@polkadot/types"
import { ITuple } from "@polkadot/types-codec/types"

export const useHydraPositionsTable = (
data: (HydraPositionsTableData | TXYKPosition)[],
Expand Down Expand Up @@ -126,7 +124,7 @@ export type HydraPositionsTableData = {
value: BN
valueDisplay: BN
valueDisplayWithoutLrna: BN
price: ITuple<[u128, u128]>
price: [string, string]
amount: BN
amountDisplay: BN
amountShifted: BN
Expand Down

0 comments on commit fd81579

Please sign in to comment.