mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 06:29:28 -07:00
fix: Apply rome linter fixes
This commit is contained in:
parent
e2a344848c
commit
e98995ec0d
5 changed files with 5 additions and 6 deletions
|
@ -251,7 +251,7 @@ class Claim {
|
|||
|
||||
// Post process the data
|
||||
const def = claimDefinitions.data[claimData.serviceprovider.name]
|
||||
if (def.functions && def.functions.postprocess) {
|
||||
if (def.functions?.postprocess) {
|
||||
try {
|
||||
({ claimData, proofData } = def.functions.postprocess(claimData, proofData))
|
||||
} catch (_) {}
|
||||
|
|
|
@ -54,7 +54,7 @@ module.exports.fn = async (data, opts) => {
|
|||
throw new Error(`Telegram fetcher was not set up properly (${err.message})`)
|
||||
}
|
||||
|
||||
if (!data.chat || !data.user) {
|
||||
if (!(data.chat && data.user)) {
|
||||
reject(new Error('Both chat name and user name must be provided'))
|
||||
return
|
||||
}
|
||||
|
|
|
@ -260,7 +260,7 @@ const fetch = async (identifier) => {
|
|||
* });
|
||||
*/
|
||||
const process = async (publicKey) => {
|
||||
if (!publicKey || !(publicKey instanceof openpgp.PublicKey)) {
|
||||
if (!(publicKey && (publicKey instanceof openpgp.PublicKey))) {
|
||||
throw new Error('Invalid public key')
|
||||
}
|
||||
|
||||
|
|
|
@ -93,7 +93,6 @@ const containsProof = async (data, fingerprint, claimFormat) => {
|
|||
break
|
||||
|
||||
default:
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,8 +21,8 @@ const path = require('path')
|
|||
const openpgp = require('openpgp')
|
||||
const doipjs = require('../src')
|
||||
|
||||
const pubKeyFingerprint = `3637202523e7c1309ab79e99ef2dc5827b445f4b`
|
||||
const pubKeyEmail = `test@doip.rocks`
|
||||
const pubKeyFingerprint = "3637202523e7c1309ab79e99ef2dc5827b445f4b"
|
||||
const pubKeyEmail = "test@doip.rocks"
|
||||
|
||||
const pubKeyPlaintext = `-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
|
|
Loading…
Reference in a new issue