Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HOTFIX: Fixing types after wagmi update #4833

Merged
merged 5 commits into from
Oct 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,13 @@ const SelectTokenInnerModal: FC<ISelectTokenModalProps> = ({
}
} else {
setCustomToken(undefined);
const sQuery: string = searchQuery;
const filtered = tokens.filter(
token =>
token.symbol
.toLowerCase()
.includes(searchQuery.toLowerCase()) ||
token.name
.toLowerCase()
.includes(searchQuery.toLowerCase()),
.includes(sQuery.toLowerCase()) ||
token.name.toLowerCase().includes(sQuery.toLowerCase()),
);
setFilteredTokens(filtered);
}
Expand Down
4 changes: 2 additions & 2 deletions src/hooks/useCreateEvmDonation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { client } from '@/apollo/apolloClient';
import { CREATE_DRAFT_DONATION } from '@/apollo/gql/gqlDonations';

export const useCreateEvmDonation = () => {
const [txHash, setTxHash] = useState<`0x${string}` | undefined>();
const [txHash, setTxHash] = useState<`0x${string}` | Address | undefined>();
const [donationSaved, setDonationSaved] = useState<boolean>(false);
const [donationMinted, setDonationMinted] = useState<boolean>(false);
const [donationId, setDonationId] = useState<number>(0);
Expand All @@ -30,7 +30,7 @@ export const useCreateEvmDonation = () => {
const isSafeEnv = useIsSafeEnvironment();

const { status } = useWaitForTransactionReceipt({
hash: txHash,
hash: txHash as `0x${string}`,
onReplaced(data) {
console.log('Transaction Updated', data);
setTxHash(data.transaction.hash);
Expand Down
4 changes: 3 additions & 1 deletion src/hooks/usePassport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,9 @@ export const usePassport = () => {
});

try {
const userAddressScore = await scoreUserAddress(address);
const userAddressScore = await scoreUserAddress(
address as `0x${string}`,
);
await updateState(userAddressScore);
dispatch(setUserMBDScore(userAddressScore?.activeQFMBDScore));
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const retryFetchEVMTransaction = async (
) => {
for (let i = 0; i < retries; i++) {
const transaction = await getTransaction(wagmiConfig, {
hash: txHash,
hash: txHash as `0x${string}`,
}).catch(error => {
console.error(
'Attempt',
Expand Down
Loading