[Store > PGP] Force openpgp Node check to false

pull/55/head
Oj18 3 years ago
parent 44c60c89f8
commit cfa94d0a89

@ -2,7 +2,9 @@ let openpgp = undefined;
// Dynamically load library as bundle size dramatically (3x) increases if we just import / use with NPM
const loadLibrary = async () => {
const js = await (await fetch(`https://api.goosemod.com/pgp.js`, { cache: 'force-cache' })).text();
let js = await (await fetch(`https://api.goosemod.com/pgp.js`, { cache: 'force-cache' })).text();
js = js.replace('detectNode:function(){', 'detectNode:function(){return false;');
openpgp = (eval(js + ';openpgp'));
};
@ -35,4 +37,4 @@ export const verifySignature = async (_publicKey, _signature, _original) => {
goosemod.logger.debug('pgp', 'failed to verify', e.message);
return false;
}
};
};

Loading…
Cancel
Save