Skip to content

Commit

Permalink
Update types and setReceivedFunds in FundRequirement component
Browse files Browse the repository at this point in the history
  • Loading branch information
truemiller committed Mar 1, 2024
1 parent 8ce5df8 commit a7a5b55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { copyToClipboard } from '@/common-util/copyToClipboard';
import { useModals } from '@/hooks';
import { Address } from '@/types';
import { AddressNumberRecord } from '@/types';
import { Address, AddressBooleanRecord } from '@/types';
import { Button, Flex, Typography, message } from 'antd';
import {
Dispatch,
Expand All @@ -25,7 +24,7 @@ type FundRequirementProps = {
rpc: string,
contractAddress?: Address,
) => Promise<number>;
setReceivedFunds: Dispatch<SetStateAction<AddressNumberRecord>>;
setReceivedFunds: Dispatch<SetStateAction<AddressBooleanRecord>>;
};

/**
Expand Down Expand Up @@ -78,7 +77,7 @@ export const FundRequirement = ({
.then((balance: number) => {
if (balance >= requirement) {
setIsPollingBalance(false);
setReceivedFunds((prev: AddressNumberRecord) => ({
setReceivedFunds((prev: AddressBooleanRecord) => ({
...prev,
[address]: true,
}));
Expand Down
2 changes: 1 addition & 1 deletion frontend/types/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export type * from './QRModalData';
export type * from './Address';
export type * from './Maps';
export type * from './Records';

0 comments on commit a7a5b55

Please sign in to comment.