From c072fb81bfe4b8b3b45c9321a11ce7033017101c Mon Sep 17 00:00:00 2001 From: raschel <38816784+aymericdelab@users.noreply.github.com> Date: Thu, 15 Aug 2024 16:51:27 +0200 Subject: [PATCH] fix #1255 (#1270) --- client/src/ui/components/bank/BankList.tsx | 18 +++++++++--------- .../src/ui/components/trading/MarketModal.tsx | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/client/src/ui/components/bank/BankList.tsx b/client/src/ui/components/bank/BankList.tsx index ab2233aac..c4db6a139 100644 --- a/client/src/ui/components/bank/BankList.tsx +++ b/client/src/ui/components/bank/BankList.tsx @@ -7,15 +7,16 @@ import { useMemo, useState } from "react"; import AddLiquidity from "./AddLiquidity"; import { LiquidityTable } from "./LiquidityTable"; import { ResourceSwap } from "./Swap"; +import { ID } from "@bibliothecadao/eternum"; type BankListProps = { - entity: any; + entityId: ID; }; -export const BankPanel = ({ entity }: BankListProps) => { +export const BankPanel = ({ entityId }: BankListProps) => { const { setup: { - components: { Position, Owner }, + components: { Position }, }, } = useDojo(); @@ -24,8 +25,7 @@ export const BankPanel = ({ entity }: BankListProps) => { const { playerRealms } = useEntities(); const realmEntityId = playerRealms()[0].entity_id!; - const owner = getComponentValue(Owner, getEntityIdFromKeys([entity.id])); - const position = getComponentValue(Position, getEntityIdFromKeys([entity.id])); + const position = getComponentValue(Position, getEntityIdFromKeys([BigInt(entityId)])); const tabs = useMemo( () => [ @@ -36,7 +36,7 @@ export const BankPanel = ({ entity }: BankListProps) => {
Swap
), - component: , + component: , }, { key: "all", @@ -47,7 +47,7 @@ export const BankPanel = ({ entity }: BankListProps) => { ), component: (
- +
), }, @@ -58,10 +58,10 @@ export const BankPanel = ({ entity }: BankListProps) => { const liquidityTable = useMemo(() => { return (
- +
); - }, [entity.id, realmEntityId]); + }, [entityId, realmEntityId]); return (
diff --git a/client/src/ui/components/trading/MarketModal.tsx b/client/src/ui/components/trading/MarketModal.tsx index 8ef07cb1f..71d3d6f03 100644 --- a/client/src/ui/components/trading/MarketModal.tsx +++ b/client/src/ui/components/trading/MarketModal.tsx @@ -61,7 +61,7 @@ export const MarketModal = () => {
AMM
), - component: bank && , + component: bank && , }, { key: "all",