Closed Janoromix closed 1 year ago
/**
@return {string} The ID of the selected account. */ function TI_GetAccounts(accountType) { const data = tinkoffClientV2._GetAccounts()
switch (accountType) { case 0: return data.accounts[0].id; case 1: return data.accounts[1].id; case 2: return data.accounts[2].id; default: return "Не выбран портфель!"; } }
Номера счетов не у всех соответствуют таким типам! Изменю потом немного.
Доработал TI_GetAccounts() и добавил TI_GetAccountID()
/**
@return {string} The ID of the selected account. */ function TI_GetAccounts(accountType) { const data = tinkoffClientV2._GetAccounts()
switch (accountType) { case 0: return data.accounts[0].id; case 1: return data.accounts[1].id; case 2: return data.accounts[2].id; default: return "Не выбран портфель!"; } }