Skip to content

Commit

Permalink
update mint store
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Brakke committed May 4, 2023
1 parent 044692b commit 7099563
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/stores/mints.js
Original file line number Diff line number Diff line change
@@ -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";

Expand Down Expand Up @@ -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;
Expand All @@ -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;

Expand Down

0 comments on commit 7099563

Please sign in to comment.