diff --git a/src/stores/mints.js b/src/stores/mints.js index 223d1cee..0e883e8f 100644 --- a/src/stores/mints.js +++ b/src/stores/mints.js @@ -1,7 +1,6 @@ import { defineStore } from "pinia"; import { useLocalStorage } from "@vueuse/core"; import { useWorkersStore } from "./workers"; -import { axios } from "boot/axios"; import { notifyApiError, notifyError, notifySuccess } from "src/js/notify"; import { CashuMint } from "@cashu/cashu-ts"; @@ -120,9 +119,7 @@ export const useMintsStore = defineStore("mints", { // later, it calles fetchMintKeysets which overwrites this.keysets try { console.log("### GET", `${this.activeMintUrl}/keys`); - const { data } = await axios.get(`${this.activeMintUrl}/keys`, { - timeout: 6000, - }); + const data = await this.activeMint.getKeys(); const keys = data; this.assertMintError(keys); this.keys = keys; @@ -147,9 +144,7 @@ export const useMintsStore = defineStore("mints", { fetchMintKeysets: async function () { // attention: this function overwrites this.keysets try { - const { data } = await axios.get(`${this.activeMintUrl}/keysets`, { - timeout: 6000, - }); + const data = await this.activeMint.getKeySets(); this.assertMintError(data); this.keysets = data.keysets;