From 70995635127177173ef7c0c37ed7bb624bd17919 Mon Sep 17 00:00:00 2001 From: Erik Brakke Date: Wed, 3 May 2023 19:20:30 -0600 Subject: [PATCH] update mint store --- src/stores/mints.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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;