|  |  | @ -73,7 +73,6 @@ | 
			
		
	
		
			
				
					|  |  |  | import { Component, Vue } from "vue-facing-decorator"; | 
			
		
	
		
			
				
					|  |  |  | import GiftedDialog from "@/components/GiftedDialog.vue"; | 
			
		
	
		
			
				
					|  |  |  | import { db, accountsDB } from "@/db"; | 
			
		
	
		
			
				
					|  |  |  | import { AccountsSchema } from "@/db/tables/accounts"; | 
			
		
	
		
			
				
					|  |  |  | import { MASTER_SETTINGS_KEY } from "@/db/tables/settings"; | 
			
		
	
		
			
				
					|  |  |  | import { accessToken } from "@/libs/crypto"; | 
			
		
	
		
			
				
					|  |  |  | import { createAndSubmitGive, didInfo } from "@/libs/endorserServer"; | 
			
		
	
	
		
			
				
					|  |  | @ -87,7 +86,6 @@ import QuickNav from "@/components/QuickNav"; | 
			
		
	
		
			
				
					|  |  |  | }) | 
			
		
	
		
			
				
					|  |  |  | export default class HomeView extends Vue { | 
			
		
	
		
			
				
					|  |  |  |   activeDid = ""; | 
			
		
	
		
			
				
					|  |  |  |   allAccounts: Array<Account> = []; | 
			
		
	
		
			
				
					|  |  |  |   allContacts: Array<Contact> = []; | 
			
		
	
		
			
				
					|  |  |  |   apiServer = ""; | 
			
		
	
		
			
				
					|  |  |  |   feedAllLoaded = false; | 
			
		
	
	
		
			
				
					|  |  | @ -97,13 +95,11 @@ export default class HomeView extends Vue { | 
			
		
	
		
			
				
					|  |  |  |   isHiddenSpinner = true; | 
			
		
	
		
			
				
					|  |  |  |   alertTitle = ""; | 
			
		
	
		
			
				
					|  |  |  |   alertMessage = ""; | 
			
		
	
		
			
				
					|  |  |  |   accounts: AccountsSchema; | 
			
		
	
		
			
				
					|  |  |  |   numAccounts = 0; | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |   async beforeCreate() { | 
			
		
	
		
			
				
					|  |  |  |     accountsDB.open(); | 
			
		
	
		
			
				
					|  |  |  |     this.accounts = accountsDB.accounts; | 
			
		
	
		
			
				
					|  |  |  |     this.numAccounts = await this.accounts.count(); | 
			
		
	
		
			
				
					|  |  |  |     await accountsDB.open(); | 
			
		
	
		
			
				
					|  |  |  |     this.numAccounts = await accountsDB.accounts.count(); | 
			
		
	
		
			
				
					|  |  |  |   } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |   public async getIdentity(activeDid) { | 
			
		
	
	
		
			
				
					|  |  | @ -226,11 +222,13 @@ export default class HomeView extends Vue { | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |   } | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |   giveDescription(giveRecord) { | 
			
		
	
		
			
				
					|  |  |  |   async giveDescription(giveRecord) { | 
			
		
	
		
			
				
					|  |  |  |     let claim = giveRecord.fullClaim; | 
			
		
	
		
			
				
					|  |  |  |     if (claim.claim) { | 
			
		
	
		
			
				
					|  |  |  |       claim = claim.claim; | 
			
		
	
		
			
				
					|  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |     await accountsDB.open(); | 
			
		
	
		
			
				
					|  |  |  |     const allAccounts = await accountsDB.accounts.toArray(); | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     // agent.did is for legacy data, before March 2023 | 
			
		
	
		
			
				
					|  |  |  |     const giverDid = | 
			
		
	
	
		
			
				
					|  |  | @ -238,7 +236,7 @@ export default class HomeView extends Vue { | 
			
		
	
		
			
				
					|  |  |  |     const giverInfo = didInfo( | 
			
		
	
		
			
				
					|  |  |  |       giverDid, | 
			
		
	
		
			
				
					|  |  |  |       this.activeDid, | 
			
		
	
		
			
				
					|  |  |  |       this.allAccounts, | 
			
		
	
		
			
				
					|  |  |  |       allAccounts, | 
			
		
	
		
			
				
					|  |  |  |       this.allContacts, | 
			
		
	
		
			
				
					|  |  |  |     ); | 
			
		
	
		
			
				
					|  |  |  |     const gaveAmount = claim.object?.amountOfThisGood | 
			
		
	
	
		
			
				
					|  |  | @ -251,7 +249,7 @@ export default class HomeView extends Vue { | 
			
		
	
		
			
				
					|  |  |  |         didInfo( | 
			
		
	
		
			
				
					|  |  |  |           gaveRecipientId, | 
			
		
	
		
			
				
					|  |  |  |           this.activeDid, | 
			
		
	
		
			
				
					|  |  |  |           this.allAccounts, | 
			
		
	
		
			
				
					|  |  |  |           allAccounts, | 
			
		
	
		
			
				
					|  |  |  |           this.allContacts, | 
			
		
	
		
			
				
					|  |  |  |         ) | 
			
		
	
		
			
				
					|  |  |  |       : ""; | 
			
		
	
	
		
			
				
					|  |  | 
 |