| 
						
						
							
								
							
						
						
					 | 
					@ -99,12 +99,10 @@ export default class ContactGiftingView extends Vue { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  allContacts: Array<Contact> = []; | 
					 | 
					 | 
					  allContacts: Array<Contact> = []; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  apiServer = ""; | 
					 | 
					 | 
					  apiServer = ""; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  accounts: typeof AccountsSchema; | 
					 | 
					 | 
					  accounts: typeof AccountsSchema; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  numAccounts = 0; | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  projectId = localStorage.getItem("projectId") || ""; | 
					 | 
					 | 
					  projectId = localStorage.getItem("projectId") || ""; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  async beforeCreate() { | 
					 | 
					 | 
					  async beforeCreate() { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    accountsDB.open(); | 
					 | 
					 | 
					    accountsDB.open(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    this.numAccounts = await accountsDB.accounts.count(); | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  } | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  async created() { | 
					 | 
					 | 
					  async created() { | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -113,7 +111,13 @@ export default class ContactGiftingView extends Vue { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      const settings = (await db.settings.get(MASTER_SETTINGS_KEY)) as Settings; | 
					 | 
					 | 
					      const settings = (await db.settings.get(MASTER_SETTINGS_KEY)) as Settings; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      this.apiServer = settings?.apiServer || ""; | 
					 | 
					 | 
					      this.apiServer = settings?.apiServer || ""; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      this.activeDid = settings?.activeDid || ""; | 
					 | 
					 | 
					      this.activeDid = settings?.activeDid || ""; | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					      this.allContacts = await db.contacts.orderBy("name").toArray(); | 
					 | 
					 | 
					
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      // .orderBy("name") wouldn't retrieve any entries with a blank name | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      // .toCollection.sortBy("name") didn't sort in an order I understood | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      const baseContacts = await db.contacts.toArray(); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      this.allContacts = baseContacts.sort((a, b) => | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        (a.name || "").localeCompare(b.name || ""), | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      ); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      localStorage.removeItem("projectId"); | 
					 | 
					 | 
					      localStorage.removeItem("projectId"); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |