Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const saveWalletDetails = async (seedPhrase, privateKey, address) => {
const canAuthenticate = await canImplyAuthentication({
authenticationType: AUTHENTICATION_TYPE.DEVICE_PASSCODE_OR_BIOMETRICS,
});
let accessControlOptions = {};
if (canAuthenticate) {
accessControlOptions = {
accessControl: ACCESS_CONTROL.USER_PRESENCE,
accessible: ACCESSIBLE.WHEN_UNLOCKED_THIS_DEVICE_ONLY,
};
}
saveSeedPhrase(seedPhrase, accessControlOptions);
savePrivateKey(privateKey, accessControlOptions);
saveAddress(address);
};