SHA256
Улучшить UI регистрации и связанные сценарии
This commit is contained in:
@@ -473,7 +473,7 @@ export async function readShineUserPda({ login, solanaEndpoint }) {
|
||||
const [pda] = solana.PublicKey.findProgramAddressSync(
|
||||
cleanLogin.includes('@') ? [await userPdaSeed32(cleanLogin)] : [new TextEncoder().encode(SHINE_USERS_USER_PDA_SEED_PREFIX), new TextEncoder().encode(cleanLogin)], usersProgram);
|
||||
const info = await connection.getAccountInfo(pda, 'confirmed');
|
||||
if (!info?.data) throw new Error(`PDA пользователя @${cleanLogin} не найдена`);
|
||||
if (!info?.data) throw new Error(`PDA пользователя ${cleanLogin} не найдена`);
|
||||
return { ...parseShineUserPda(new Uint8Array(info.data)), userPda: pda.toBase58(), pdaAddress: pda.toBase58(), endpoint };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user