fix: ๐Ÿ› remove null pointer

This commit is contained in:
AP 2020-06-10 06:25:05 +02:00
parent bd7606a5ca
commit 9039868dc7

View File

@ -61,7 +61,7 @@ export const chatResolvers = {
message: customRecords.message,
});
const [{ signed_by }, error] = await toWithError(
const [verified, error] = await toWithError(
verifyMessage({
lnd,
message: messageToVerify,
@ -72,7 +72,7 @@ export const chatResolvers = {
logger.debug(`Error verifying message: ${messageToVerify}`);
}
if (signed_by === customRecords.sender && !error) {
if (!error && verified?.signed_by === customRecords.sender) {
isVerified = true;
}
}