forked from jsnbuchanan/crowd-funder-for-time-pwa
A whole lot of cleaning going on
This commit is contained in:
@@ -82,7 +82,7 @@
|
||||
<script lang="ts">
|
||||
import { Component, Vue } from "vue-facing-decorator";
|
||||
import GiftedDialog from "@/components/GiftedDialog.vue";
|
||||
import { db, accountsDB } from "@/db";
|
||||
import { db, accountsDB } from "@/db/index";
|
||||
import { AccountsSchema } from "@/db/tables/accounts";
|
||||
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
|
||||
import { accessToken } from "@/libs/crypto";
|
||||
@@ -93,8 +93,8 @@ import {
|
||||
GiverOutputInfo,
|
||||
} from "@/libs/endorserServer";
|
||||
import { Contact } from "@/db/tables/contacts";
|
||||
import QuickNav from "@/components/QuickNav";
|
||||
import EntityIcon from "@/components/EntityIcon";
|
||||
import QuickNav from "@/components/QuickNav.vue";
|
||||
import EntityIcon from "@/components/EntityIcon.vue";
|
||||
import { IIdentifier } from "@veramo/core";
|
||||
import { RawAxiosRequestHeaders } from "axios";
|
||||
|
||||
@@ -154,14 +154,14 @@ export default class HomeView extends Vue {
|
||||
this.apiServer = settings?.apiServer || "";
|
||||
this.activeDid = settings?.activeDid || "";
|
||||
this.allContacts = await db.contacts.toArray();
|
||||
} catch (err) {
|
||||
} catch (err: unknown) {
|
||||
this.$notify(
|
||||
{
|
||||
group: "alert",
|
||||
type: "danger",
|
||||
title: "Error",
|
||||
text:
|
||||
err.userMessage ||
|
||||
err.message ||
|
||||
"There was an error retrieving the latest sweet, sweet action.",
|
||||
},
|
||||
-1,
|
||||
@@ -280,11 +280,11 @@ export default class HomeView extends Vue {
|
||||
// Helper functions for readability
|
||||
|
||||
isGiveCreationError(result: CreateAndSubmitGiveResult) {
|
||||
return result.response?.status !== 201 || result.response?.data?.error;
|
||||
return result.type == "error";
|
||||
}
|
||||
|
||||
getGiveCreationErrorMessage(result: CreateAndSubmitGiveResult) {
|
||||
return result.response?.data?.error?.message;
|
||||
return result.error?.userMessage;
|
||||
}
|
||||
|
||||
getGiveErrorMessage(error: any) {
|
||||
|
||||
Reference in New Issue
Block a user