Skip to content

Commit

Permalink
fixup! lint(fix): ui
Browse files Browse the repository at this point in the history
eslint errors
  • Loading branch information
mujahidkay committed Sep 25, 2024
1 parent 2088907 commit 3396f5e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions ui/src/components/PurseAmountInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import type { AssetKind } from '@agoric/web-components';
import { useState } from 'react';
import { CopyBagEntry, PurseValue, SetEntry } from './DisplayAmount';
import { stringifyData } from '../utils/stringify';
import { makeCopyBag } from '@endo/patterns';
import { makeCopyBag, Key } from '@endo/patterns';

type Props = {
purse: PurseJSONState<AssetKind>;
onChangeInput: (amount: {brand: globalThis.Brand, value: any} | null) => void;
onChangeInput: (amount: {brand: globalThis.Brand, value: unknown} | null) => void;
onChange: (amount: Amount | null) => void;
};

Expand Down Expand Up @@ -89,10 +89,10 @@ const SetInput = ({ purse, onChangeInput }: Props) => {
const CopyBagInput = ({ purse, onChangeInput }: Props) => {
const entries = purse.currentAmount.value.payload;
const [entriesMap, setEntriesMap] = useState(
new Map<string, [any, bigint]>(),
new Map<string, [Key, bigint]>(),
);

const updateCount = (entry: [any, bigint], count: bigint) => {
const updateCount = (entry: [Key, bigint], count: bigint) => {
const updated = new Map(entriesMap);
if (count === 0n) {
updated.delete(stringifyData(entry[0]));
Expand All @@ -111,7 +111,7 @@ const CopyBagInput = ({ purse, onChangeInput }: Props) => {
setEntriesMap(updated);
};

return entries.map((entry: [unknown, bigint]) => {
return entries.map((entry: [Key, bigint]) => {
const selectedAmount = entriesMap.get(stringifyData(entry[0]))?.[1] ?? null;

const onInput = (count: bigint) => {
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/mint/MintTickets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const makeOffer = (
[ticketKind.toLowerCase() + 'Row', ticketValue],
];
const choiceBag = makeCopyBag(choices);
const ticketAmount = AmountMath.make(brands.Ticket, choiceBag);
const ticketAmount = AmountMath.make((brands.Ticket as Brand), choiceBag);
const want = { Tickets: ticketAmount };
const give = { Price: { brand: brands.IST, value: giveValue * IST_UNIT } };

Expand Down
2 changes: 1 addition & 1 deletion ui/src/store/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { create } from 'zustand';

interface ContractState {
instances?: Record<string, unknown>;
brands?: Record<string, any>;
brands?: Record<string, unknown>;
}

export const useContractStore = create<ContractState>(() => ({}));

0 comments on commit 3396f5e

Please sign in to comment.