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) => {