Migrated project to Viem, removing Ethers completelly. Not finished tests.

This commit is contained in:
Filipe Soccol
2025-03-31 10:26:57 -03:00
parent 3227e3209c
commit e93cac6086
19 changed files with 672 additions and 469 deletions

View File

@@ -3,7 +3,7 @@ import { withdrawDeposit } from "@/blockchain/buyerMethods";
import { NetworkEnum } from "@/model/NetworkEnum";
import type { ValidDeposit } from "@/model/ValidDeposit";
import type { WalletTransaction } from "@/model/WalletTransaction";
import { useEtherStore } from "@/store/ether";
import { useViemStore } from "@/store/viem";
import { storeToRefs } from "pinia";
import { ref, watch, onMounted } from "vue";
import SpinnerComponent from "../SpinnerComponent.vue";
@@ -12,7 +12,7 @@ import { debounce } from "@/utils/debounce";
import { getTokenByAddress } from "@/blockchain/addresses";
import { useFloating, arrow, offset, flip, shift } from "@floating-ui/vue";
const etherStore = useEtherStore();
const etherStore = useViemStore();
// props
const props = defineProps<{

View File

@@ -1,15 +1,14 @@
import { describe, it, expect, vi, beforeEach } from "vitest";
import { mount } from "@vue/test-utils";
import ListingComponent from "@/components/ListingComponent/ListingComponent.vue";
import { createPinia, setActivePinia } from "pinia";
import { expect } from "vitest";
import ListingComponent from "../ListingComponent.vue";
import SpinnerComponent from "../../SpinnerComponent.vue";
import { useViemStore } from "@/store/viem";
import { MockValidDeposits } from "@/model/mock/ValidDepositMock";
import { MockWalletTransactions } from "@/model/mock/WalletTransactionMock";
import { useEtherStore } from "@/store/ether";
describe("ListingComponent.vue", () => {
beforeEach(() => {
setActivePinia(createPinia());
useEtherStore().setLoadingWalletTransactions(false);
useViemStore().setLoadingWalletTransactions(false);
});
test("Test Message when an empty array is received", () => {