SHA256
Миграция PDA на client.key
This commit is contained in:
@@ -563,11 +563,13 @@ function verifyWalletAgainstPda(wallet) {
|
||||
const type = String(wallet?.type || '').trim();
|
||||
const pub = String(wallet?.publicKeyBase58 || '').trim();
|
||||
const rootKey = String(state.walletProfile?.publicKeys?.rootKeyBase58 || '').trim();
|
||||
const deviceKey = String(state.walletProfile?.publicKeys?.deviceKeyBase58 || '').trim();
|
||||
if (type === 'dev.key') {
|
||||
const clientKey = String(
|
||||
state.walletProfile?.publicKeys?.clientKeyBase58 || '',
|
||||
).trim();
|
||||
if (type === 'client.key') {
|
||||
return {
|
||||
verified: !!deviceKey && deviceKey === pub,
|
||||
verificationText: deviceKey === pub ? 'Совпадает с deviceKey из PDA.' : 'Не совпадает с deviceKey из PDA.',
|
||||
verified: !!clientKey && clientKey === pub,
|
||||
verificationText: clientKey === pub ? 'Совпадает с clientKey из PDA.' : 'Не совпадает с clientKey из PDA.',
|
||||
};
|
||||
}
|
||||
if (type === 'root.key') {
|
||||
|
||||
Reference in New Issue
Block a user