Add vitest as test framework and remove jest and its dependencies
This commit is contained in:
@@ -27,8 +27,8 @@ const getProviderUrl = (): string => {
|
||||
const etherStore = useEtherStore();
|
||||
|
||||
const possibleProvidersUrls: { [key: string]: string } = {
|
||||
Ethereum: process.env.VITE_GOERLI_API_URL ? process.env.VITE_GOERLI_API_URL : "",
|
||||
Polygon: process.env.VITE_MUMBAI_API_URL ? process.env.VITE_MUMBAI_API_URL : "",
|
||||
Ethereum: import.meta.env.VITE_GOERLI_API_URL,
|
||||
Polygon: import.meta.env.VITE_MUMBAI_API_URL,
|
||||
};
|
||||
|
||||
return possibleProvidersUrls[etherStore.networkName];
|
||||
|
||||
@@ -11,11 +11,11 @@ const getNetworksLiquidity = async (): Promise<void> => {
|
||||
console.log("Loading events");
|
||||
|
||||
const goerliProvider = new ethers.providers.JsonRpcProvider(
|
||||
process.env.VITE_GOERLI_API_URL,
|
||||
import.meta.env.VITE_GOERLI_API_URL,
|
||||
5
|
||||
); // goerli provider
|
||||
const mumbaiProvider = new ethers.providers.JsonRpcProvider(
|
||||
process.env.VITE_MUMBAI_API_URL,
|
||||
import.meta.env.VITE_MUMBAI_API_URL,
|
||||
80001
|
||||
); // mumbai provider
|
||||
|
||||
@@ -54,6 +54,7 @@ const getValidDeposits = async (
|
||||
|
||||
const filterDeposits = p2pContract.filters.DepositAdded(null);
|
||||
const eventsDeposits = await p2pContract.queryFilter(filterDeposits);
|
||||
console.log(eventsDeposits);
|
||||
|
||||
if(!contract) p2pContract = getContract(); // get metamask provider contract
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import ManageBidsView from "../views/ManageBidsView.vue";
|
||||
import SellerView from "@/views/SellerView.vue";
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(process.env.BASE_URL),
|
||||
history: createWebHistory(import.meta.env.BASE_URL),
|
||||
routes: [
|
||||
{
|
||||
path: "/",
|
||||
|
||||
@@ -8,7 +8,7 @@ const defaultConfig = {
|
||||
|
||||
const api = axios.create({
|
||||
...defaultConfig,
|
||||
baseURL: process.env.VITE_API_URL,
|
||||
baseURL: import.meta.env.VITE_API_URL,
|
||||
});
|
||||
|
||||
export default api;
|
||||
|
||||
Reference in New Issue
Block a user