Skip to content

Commit

Permalink
- remove unused variables
Browse files Browse the repository at this point in the history
- fix dependencies for golden tokens fetch
  • Loading branch information
starknetdev committed Oct 7, 2024
1 parent 2166491 commit e20cea0
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 21 deletions.
8 changes: 0 additions & 8 deletions ui/src/app/components/start/CreateAdventurer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,21 @@ export interface CreateAdventurerProps {
isActive: boolean;
onEscape: () => void;
spawn: (...args: any[]) => any;
lordsBalance?: bigint;
goldenTokens: number[];
blobertsData: any;
gameContract: Contract;
getBalances: () => Promise<void>;
mintLords: (lordsAmount: number) => Promise<void>;
costToPlay: bigint;
}

export const CreateAdventurer = ({
isActive,
onEscape,
spawn,
lordsBalance,
goldenTokens,
blobertsData,
gameContract,
getBalances,
mintLords,
costToPlay,
}: CreateAdventurerProps) => {
const [formData, setFormData] = useState<FormData>({
Expand Down Expand Up @@ -119,12 +115,10 @@ export const CreateAdventurer = ({
formData={formData}
spawn={spawn}
handleBack={handleBack}
lordsBalance={lordsBalance}
goldenTokens={goldenTokens}
blobertsData={blobertsData}
gameContract={gameContract}
getBalances={getBalances}
mintLords={mintLords}
costToPlay={costToPlay}
/>
</div>
Expand All @@ -145,12 +139,10 @@ export const CreateAdventurer = ({
formData={formData}
spawn={spawn}
handleBack={handleBack}
lordsBalance={lordsBalance}
goldenTokens={goldenTokens}
blobertsData={blobertsData}
gameContract={gameContract}
getBalances={getBalances}
mintLords={mintLords}
costToPlay={costToPlay}
/>
</div>
Expand Down
4 changes: 0 additions & 4 deletions ui/src/app/components/start/Spawn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,21 @@ export interface SpawnProps {
costToPlay?: number
) => Promise<void>;
handleBack: () => void;
lordsBalance?: bigint;
goldenTokens: number[];
blobertsData: any;
gameContract: Contract;
getBalances: () => Promise<void>;
mintLords: (lordsAmount: number) => Promise<void>;
costToPlay: bigint;
}

export const Spawn = ({
formData,
spawn,
handleBack,
lordsBalance,
goldenTokens,
blobertsData,
gameContract,
getBalances,
mintLords,
costToPlay,
}: SpawnProps) => {
const [paymentInitiated, setPaymentInitiated] = useState(false);
Expand Down
6 changes: 0 additions & 6 deletions ui/src/app/containers/AdventurerScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,10 @@ interface AdventurerScreenProps {
costToPlay?: number
) => Promise<void>;
handleSwitchAdventurer: (adventurerId: number) => Promise<void>;
lordsBalance?: bigint;
gameContract: Contract;
goldenTokens: number[];
blobertsData: any;
getBalances: () => Promise<void>;
mintLords: (lordsAmount: number) => Promise<void>;
costToPlay: bigint;
transferAdventurer: (
account: AccountInterface,
Expand All @@ -46,12 +44,10 @@ interface AdventurerScreenProps {
export default function AdventurerScreen({
spawn,
handleSwitchAdventurer,
lordsBalance,
gameContract,
goldenTokens,
blobertsData,
getBalances,
mintLords,
costToPlay,
transferAdventurer,
}: AdventurerScreenProps) {
Expand Down Expand Up @@ -137,12 +133,10 @@ export default function AdventurerScreen({
isActive={activeMenu == 1}
onEscape={() => setActiveMenu(0)}
spawn={spawn}
lordsBalance={lordsBalance}
goldenTokens={goldenTokens}
blobertsData={blobertsData}
gameContract={gameContract}
getBalances={getBalances}
mintLords={mintLords}
costToPlay={costToPlay}
/>
</div>
Expand Down
4 changes: 1 addition & 3 deletions ui/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ function Home() {

useEffect(() => {
handleFetchGoldenTokens();
}, [network]);
}, [address, network]);

const blobertTokenVariables = useMemo(() => {
return {
Expand Down Expand Up @@ -878,12 +878,10 @@ function Home() {
<AdventurerScreen
spawn={spawn}
handleSwitchAdventurer={handleSwitchAdventurer}
lordsBalance={lordsBalance}
gameContract={gameContract!}
goldenTokens={goldenTokens}
blobertsData={blobertsData}
getBalances={getBalances}
mintLords={mintLords}
costToPlay={costToPlay}
transferAdventurer={transferAdventurer}
/>
Expand Down

0 comments on commit e20cea0

Please sign in to comment.