mirror of
https://github.com/RoboSats/robosats.git
synced 2025-07-18 00:33:15 +00:00
Catch errors in chat
This commit is contained in:
@ -8,7 +8,6 @@ import {
|
||||
FederationContext,
|
||||
type UseFederationStoreType,
|
||||
} from '../../../contexts/FederationContext';
|
||||
import { AppContext, UseAppStoreType } from '../../../contexts/AppContext';
|
||||
|
||||
interface Props {
|
||||
order: Order;
|
||||
@ -43,7 +42,6 @@ const EncryptedChat: React.FC<Props> = ({
|
||||
status,
|
||||
}: Props): React.JSX.Element => {
|
||||
const [turtleMode, setTurtleMode] = useState<boolean>(false);
|
||||
const { settings } = useContext<UseAppStoreType>(AppContext);
|
||||
const { garage } = useContext<UseGarageStoreType>(GarageContext);
|
||||
const { federation } = useContext<UseFederationStoreType>(FederationContext);
|
||||
|
||||
@ -76,16 +74,20 @@ const EncryptedChat: React.FC<Props> = ({
|
||||
|
||||
if (!slot?.nostrSecKey || !publicKey) return;
|
||||
|
||||
const recipient = {
|
||||
publicKey,
|
||||
relayUrl: coordinator.getRelayUrl(settings.network),
|
||||
};
|
||||
try {
|
||||
const recipient = {
|
||||
publicKey,
|
||||
relayUrl: coordinator.getRelayUrl(coordinator.url),
|
||||
};
|
||||
|
||||
const wrappedEvent = nip17.wrapEvent(slot?.nostrSecKey, recipient, content);
|
||||
const wrappedEvent = nip17.wrapEvent(slot?.nostrSecKey, recipient, content);
|
||||
|
||||
wrappedEvent.tags.push(['expiration', (wrappedEvent.created_at + 2419200).toString()]);
|
||||
wrappedEvent.tags.push(['expiration', (wrappedEvent.created_at + 2419200).toString()]);
|
||||
|
||||
federation.roboPool.sendEvent(wrappedEvent);
|
||||
federation.roboPool.sendEvent(wrappedEvent);
|
||||
} catch (error) {
|
||||
console.error('Nostr nip17 error:', error);
|
||||
}
|
||||
};
|
||||
|
||||
return turtleMode ? (
|
||||
|
@ -1,9 +1,17 @@
|
||||
robosats:
|
||||
android:
|
||||
identifier: com.robosats
|
||||
name: Robosats
|
||||
description: A simple and private bitcoin exchange
|
||||
repository: https://github.com/RoboSats/robosats
|
||||
license: AGPL-3.0
|
||||
artifacts:
|
||||
- robosats-v%v.alpha-universal.apk
|
||||
name: Robosats
|
||||
summary: A simple and private bitcoin exchange
|
||||
repository: https://github.com/RoboSats/robosats
|
||||
images:
|
||||
- ../../fastlane/metadata/en-US/images/phoneScreenshots/01.jpg
|
||||
- ../../fastlane/metadata/en-US/images/phoneScreenshots/02.jpg
|
||||
- ../../fastlane/metadata/en-US/images/phoneScreenshots/03.jpg
|
||||
- ../../fastlane/metadata/en-US/images/phoneScreenshots/04.jpg
|
||||
- ../../fastlane/metadata/en-US/images/phoneScreenshots/05.jpg
|
||||
- ../../fastlane/metadata/en-US/images/phoneScreenshots/06.jpg
|
||||
icon: ../../fastlane/metadata/en-US/images/icon.png
|
||||
tags: privacy lightning bitcoin p2p tor exchange foss
|
||||
license: AGPL-3.0
|
||||
remote_metadata:
|
||||
- github
|
||||
assets: # for github
|
||||
- robosats-v\d+\.\d+\.\d+.\w+-universal.apk
|
||||
|
Reference in New Issue
Block a user