mirror of
https://github.com/RoboSats/robosats.git
synced 2025-07-18 08:43:14 +00:00
Catch errors in chat
This commit is contained in:
@ -8,7 +8,6 @@ import {
|
|||||||
FederationContext,
|
FederationContext,
|
||||||
type UseFederationStoreType,
|
type UseFederationStoreType,
|
||||||
} from '../../../contexts/FederationContext';
|
} from '../../../contexts/FederationContext';
|
||||||
import { AppContext, UseAppStoreType } from '../../../contexts/AppContext';
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
order: Order;
|
order: Order;
|
||||||
@ -43,7 +42,6 @@ const EncryptedChat: React.FC<Props> = ({
|
|||||||
status,
|
status,
|
||||||
}: Props): React.JSX.Element => {
|
}: Props): React.JSX.Element => {
|
||||||
const [turtleMode, setTurtleMode] = useState<boolean>(false);
|
const [turtleMode, setTurtleMode] = useState<boolean>(false);
|
||||||
const { settings } = useContext<UseAppStoreType>(AppContext);
|
|
||||||
const { garage } = useContext<UseGarageStoreType>(GarageContext);
|
const { garage } = useContext<UseGarageStoreType>(GarageContext);
|
||||||
const { federation } = useContext<UseFederationStoreType>(FederationContext);
|
const { federation } = useContext<UseFederationStoreType>(FederationContext);
|
||||||
|
|
||||||
@ -76,16 +74,20 @@ const EncryptedChat: React.FC<Props> = ({
|
|||||||
|
|
||||||
if (!slot?.nostrSecKey || !publicKey) return;
|
if (!slot?.nostrSecKey || !publicKey) return;
|
||||||
|
|
||||||
const recipient = {
|
try {
|
||||||
publicKey,
|
const recipient = {
|
||||||
relayUrl: coordinator.getRelayUrl(settings.network),
|
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 ? (
|
return turtleMode ? (
|
||||||
|
@ -1,9 +1,17 @@
|
|||||||
robosats:
|
name: Robosats
|
||||||
android:
|
summary: A simple and private bitcoin exchange
|
||||||
identifier: com.robosats
|
repository: https://github.com/RoboSats/robosats
|
||||||
name: Robosats
|
images:
|
||||||
description: A simple and private bitcoin exchange
|
- ../../fastlane/metadata/en-US/images/phoneScreenshots/01.jpg
|
||||||
repository: https://github.com/RoboSats/robosats
|
- ../../fastlane/metadata/en-US/images/phoneScreenshots/02.jpg
|
||||||
license: AGPL-3.0
|
- ../../fastlane/metadata/en-US/images/phoneScreenshots/03.jpg
|
||||||
artifacts:
|
- ../../fastlane/metadata/en-US/images/phoneScreenshots/04.jpg
|
||||||
- robosats-v%v.alpha-universal.apk
|
- ../../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