This commit is contained in:
parent
6d9221da27
commit
6b11344b16
|
@ -50,6 +50,7 @@ export async function getAccounts(): Promise<{ id: Account['id'], token: Account
|
||||||
|
|
||||||
export async function addAccount(id: Account['id'], token: Account['token']) {
|
export async function addAccount(id: Account['id'], token: Account['token']) {
|
||||||
const accounts = await getAccounts();
|
const accounts = await getAccounts();
|
||||||
|
console.log(accounts);
|
||||||
if (!accounts.some(x => x.id === id)) {
|
if (!accounts.some(x => x.id === id)) {
|
||||||
return set('accounts', accounts.concat([{ id, token }]));
|
return set('accounts', accounts.concat([{ id, token }]));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue