const openDevice = () => {
if (user.device === null) {
console.error('wallet is not initialized');
return;
}
getEncryptionKey(user.device).then((keyPair) => {
if (keyPair !== null) {
userDispatch({ type: 'ACTIVATED_TMP_ON_DEVICE', keyPair });
setLoading(true);
setLocation(Routes.DASHBOARD);
} else {
// TODO: handle error -- user decided not to activate error or pin was wrong
}
});
};
for instance with pathId was empty we could not connect