HEADER v3, primary аккаунты и подтверждения

This commit is contained in:
AidarKC
2026-11-27 12:29:24 +03:00
parent f9e7c4ef94
commit ae430e84c7
89 changed files with 1201 additions and 1596 deletions
@@ -53,7 +53,7 @@ async function simulateCompletion({ headerFails = false } = {}) {
const calls = [];
const state = {
entrySettings: { shineServer: 'wss://test.invalid' },
registrationDraft: { login: 'AlexSmith@shine', password: 'secret' },
registrationDraft: { login: 'AlexSmith@shine', password: 'secret', accountType: 1, previousAccounts: ['old@free'] },
loginDraft: {},
registrationPayment: {},
authReturnHash: '',
@@ -64,7 +64,10 @@ async function simulateCompletion({ headerFails = false } = {}) {
async createSessionForExistingUser() {
return { login: 'AlexSmith@shine', storagePwd: 'stored', sessionId: 'test-session', sessionMaterial: {} };
},
async persistSelectedKeys() {},
async persistSelectedKeys(login, pwd, bundle, options) {
assert.equal(options.headerIdentity.accountType, 1);
assert.deepEqual(Array.from(options.headerIdentity.previousAccounts), ['old@free']);
},
async persistSessionMaterial() {},
async resumeSession() {
return { login: 'AlexSmith@shine', storagePwd: 'stored', sessionId: 'test-session' };