mirror of
https://github.com/waku-org/js-waku.git
synced 2025-02-04 08:34:57 +00:00
Add check in case user tries with incompatible wallet
This commit is contained in:
parent
1e69811d8d
commit
3b32987ecf
@ -23,9 +23,14 @@ export default function GetEncryptionPublicKey({
|
||||
method: 'eth_getEncryptionPublicKey',
|
||||
params: [address],
|
||||
})
|
||||
.then((key: string) => {
|
||||
.then((key: string | undefined) => {
|
||||
console.log('Encryption Public key:', key);
|
||||
|
||||
if (typeof key !== 'string') {
|
||||
console.error('Could not get encryption key');
|
||||
return;
|
||||
}
|
||||
|
||||
setEncPublicKey(Buffer.from(key, 'base64'));
|
||||
})
|
||||
.catch((error) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user