blob: 065b41118c7521e6f655fa108f8e98aa12867a4f (
plain)
1
2
3
4
5
6
7
|
import { get } from '@client/scripts/idb-proxy';
export async function getAccountFromId(id: string) {
const accounts = await get('accounts') as { token: string; id: string; }[];
if (!accounts) console.log('Accounts are not recorded');
return accounts.find(e => e.id === id);
}
|