mirror of
https://github.com/KoalaSat/nostros.git
synced 2024-09-28 22:30:41 +00:00
Merge branch 'main' into dependabot/npm_and_yarn/typescript-4.8.4
This commit is contained in:
commit
460e35f67c
@ -32,7 +32,7 @@ yarn start
|
||||
|
||||
### Bugs
|
||||
|
||||
- [ ] User info missing on first start
|
||||
- [x] User info missing on first start
|
||||
- [ ] i18n not loading
|
||||
- [ ] Logging out and in again does not work
|
||||
- [ ] Clipboard library not working
|
||||
@ -50,7 +50,7 @@ yarn start
|
||||
- [ ] Other Rooms
|
||||
|
||||
### Profile
|
||||
|
||||
|
||||
- [ ] Verify NIP-05 https://github.com/nostr-protocol/nips/blob/master/05.md
|
||||
- [ ] Verify LNURL https://github.com/andrerfneves/lightning-address
|
||||
|
||||
@ -59,6 +59,7 @@ yarn start
|
||||
- [ ] Direct Messages https://github.com/nostr-protocol/nips/blob/master/04.md
|
||||
|
||||
### Note
|
||||
|
||||
- [ ] Autoscroll to reply
|
||||
- [ ] Mentions https://github.com/nostr-protocol/nips/blob/master/08.md
|
||||
- [ ] Reactions https://github.com/nostr-protocol/nips/blob/master/25.md
|
||||
|
@ -29,10 +29,11 @@ export const ConfigPage: React.FC = () => {
|
||||
const onPressLogout: () => void = () => {
|
||||
if (database) {
|
||||
dropTables(database).then(() => {
|
||||
setPrivateKey('');
|
||||
relayPool?.unsubscribeAll();
|
||||
EncryptedStorage.removeItem('privateKey');
|
||||
setPage('landing');
|
||||
EncryptedStorage.removeItem('privateKey').then(() => {
|
||||
setPrivateKey('');
|
||||
relayPool?.unsubscribeAll();
|
||||
setPage('landing');
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -10,10 +10,11 @@ import { Event, EventKind } from '../../lib/nostr/Events';
|
||||
import { AppContext } from '../../Contexts/AppContext';
|
||||
import { insertUserContact } from '../../Functions/DatabaseFunctions/Users';
|
||||
import EncryptedStorage from 'react-native-encrypted-storage';
|
||||
import { getPublickey } from '../../lib/nostr/Bip';
|
||||
|
||||
export const LandingPage: React.FC = () => {
|
||||
const { database, setPage } = useContext(AppContext);
|
||||
const { privateKey, publicKey, relayPool, setPrivateKey } = useContext(RelayPoolContext);
|
||||
const { privateKey, publicKey, relayPool, setPublicKey } = useContext(RelayPoolContext);
|
||||
const { t } = useTranslation('common');
|
||||
const [loading, setLoading] = useState<boolean>(false);
|
||||
const [status, setStatus] = useState<number>(0);
|
||||
@ -107,10 +108,12 @@ export const LandingPage: React.FC = () => {
|
||||
};
|
||||
|
||||
const onPress: () => void = () => {
|
||||
setLoading(true);
|
||||
setPrivateKey(inputValue);
|
||||
setStatus(1);
|
||||
EncryptedStorage.setItem('privateKey', inputValue);
|
||||
if (privateKey && privateKey !== '') {
|
||||
setLoading(true);
|
||||
setPublicKey(getPublickey(privateKey));
|
||||
setStatus(1);
|
||||
EncryptedStorage.setItem('privateKey', privateKey);
|
||||
}
|
||||
};
|
||||
|
||||
const statusName: { [status: number]: string } = {
|
||||
|
Loading…
Reference in New Issue
Block a user