-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add Vitest testing to the CI pipeline #13
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
5650a12
to
2368520
Compare
DUNE_API_KEY=test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to have some value here because otherwise the hooks return early when the api key is not set. We are mocking all requests so the actual API key is not needed
77509a9
to
fc891e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small comment around isAddress
src/svm/useSvmTokenBalances.ts
Outdated
@@ -4,6 +4,7 @@ import { TokenBalancesParams, BalanceData, FetchError } from "./types"; | |||
import { fetchSvmBalances } from "./duneApi"; | |||
import { useDeepMemo } from "../useDeepMemo"; | |||
import { useGetApiKey } from "../provider"; | |||
import { isAddress } from "viem"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
src/svm/useSvmTransactions.ts
Outdated
@@ -30,7 +31,7 @@ export const useSvmTransactions = ( | |||
|
|||
// Function to fetch data for a specific page | |||
const fetchDataAsync = async (offset: string | null) => { | |||
if (!walletAddress) return; | |||
if (!apiKey || !walletAddress || !isAddress(walletAddress)) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will this work for svm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, this kinda got lost during the big copy paste:( I removed it
fc891e1
to
f19602c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same note here - we prob need to update readme but looks great
Updated in #16 |
Also updates the test files which were failing due to recent rename to EVM files.
Adds SVM tests as well