diff --git a/JoyboyCommunity/src/app/StarknetProvider.tsx b/JoyboyCommunity/src/app/StarknetProvider.tsx index 221582b1..3f354901 100644 --- a/JoyboyCommunity/src/app/StarknetProvider.tsx +++ b/JoyboyCommunity/src/app/StarknetProvider.tsx @@ -12,7 +12,7 @@ import { } from '@starknet-wc/react'; import {Platform} from 'react-native'; -import {NETWORK_NAME, WALLET_CONNECT_ID} from '../constants/env'; +import {NETWORK_NAME} from '../constants/env'; import {RpcProviderProvider} from '../context/RpcProvider'; import {WalletQRModal} from '../modules/WalletQRModal'; import {providers} from '../services/provider'; @@ -38,14 +38,14 @@ export const StarknetReactProvider: React.FC = ({childr chains={[chain]} provider={providers} connectors={[ - argentMobileConnector({ + /* argentMobileConnector({ chain: NETWORK_NAME, wcProjectId: WALLET_CONNECT_ID, dappName: 'Joyboy', description: 'Joyboy Starknet dApp', url: 'https://joyboy.community', provider, - }), + }), */ ...(Platform.OS === 'web' ? injected : []), ]} diff --git a/JoyboyCommunity/src/components/Header/index.tsx b/JoyboyCommunity/src/components/Header/index.tsx index fe508b7c..0aaea5d5 100644 --- a/JoyboyCommunity/src/components/Header/index.tsx +++ b/JoyboyCommunity/src/components/Header/index.tsx @@ -3,7 +3,6 @@ import {SafeAreaView} from 'react-native-safe-area-context'; import {JoyboyIcon} from '../../assets/icons'; import {useStyles, useTheme} from '../../hooks'; -import {IconButton} from '../IconButton'; import {Text} from '../Text'; import stylesheet from './styles'; @@ -39,11 +38,13 @@ export const Header: React.FC = ({showLogo = true, left, right, tit )} - {right ?? ( + {right} + + {/* {right ?? ( - )} + )} */} ); diff --git a/JoyboyCommunity/src/modules/Post/index.tsx b/JoyboyCommunity/src/modules/Post/index.tsx index bd663708..dfff4ae4 100644 --- a/JoyboyCommunity/src/modules/Post/index.tsx +++ b/JoyboyCommunity/src/modules/Post/index.tsx @@ -74,7 +74,6 @@ export const Post: React.FC = ({asComment, event}) => { return {uri: imageTag[1], width: dimensions[0], height: dimensions[1]}; }, [event?.tags]); - // Animated style for the icon const animatedIconStyle = useAnimatedStyle(() => ({ transform: [{scale: scale.value}], })); @@ -90,7 +89,6 @@ export const Post: React.FC = ({asComment, event}) => { navigation.navigate('PostDetail', {postId: event?.id, post: event}); }; - /** @TODO comment in Nostr */ const toggleLike = async () => { if (!event?.id) return; @@ -226,7 +224,7 @@ export const Post: React.FC = ({asComment, event}) => { setMenuOpen(true)} /> } > - + {/* */} ( }; return ( - - - - - - - - - - {profile?.displayName ?? profile?.name ?? event?.pubkey} - + + + + + + + + + {profile?.displayName ?? profile?.name ?? event?.pubkey} + - {profile?.nip05 && ( - - @{profile?.nip05} - - )} - + {profile?.nip05 && ( + + @{profile?.nip05} + + )} - - - {event?.content} - - - - setToken(itemValue as TokenSymbol)} - > - {Object.values(TOKENS).map((tkn) => ( - - ))} - - - - + + {event?.content} + + + + + + setToken(itemValue as TokenSymbol)} + > + {Object.values(TOKENS).map((tkn) => ( + + ))} + - - - - Sending - + + - {amount.length > 0 && token.length > 0 ? ( - - {amount} {token} - - ) : ( - - ... - - )} - + + + + Sending + - - - to + {amount.length > 0 && token.length > 0 ? ( + + {amount} {token} - - {(profile?.nip05 && `@${profile.nip05}`) ?? - profile?.displayName ?? - profile?.name ?? - event?.pubkey} + ) : ( + + ... - + )} - - + + + to + + + {(profile?.nip05 && `@${profile.nip05}`) ?? + profile?.displayName ?? + profile?.name ?? + event?.pubkey} + - - - Tip friends and support creators with your favorite tokens. - - + + + + + + + + Tip friends and support creators with your favorite tokens. + ); }, diff --git a/JoyboyCommunity/src/screens/PostDetail/index.tsx b/JoyboyCommunity/src/screens/PostDetail/index.tsx index d21a320f..e21d9bf0 100644 --- a/JoyboyCommunity/src/screens/PostDetail/index.tsx +++ b/JoyboyCommunity/src/screens/PostDetail/index.tsx @@ -51,7 +51,7 @@ export const PostDetail: React.FC = ({navigation, route})
} - right={} + /* right={} */ title="Conversation" /> diff --git a/JoyboyCommunity/src/screens/Profile/Info/index.tsx b/JoyboyCommunity/src/screens/Profile/Info/index.tsx index 1390367c..e7a8ba75 100644 --- a/JoyboyCommunity/src/screens/Profile/Info/index.tsx +++ b/JoyboyCommunity/src/screens/Profile/Info/index.tsx @@ -1,5 +1,6 @@ import {useNavigation} from '@react-navigation/native'; import {useQueryClient} from '@tanstack/react-query'; +import * as Clipboard from 'expo-clipboard'; import {useState} from 'react'; import {Pressable, View} from 'react-native'; @@ -58,6 +59,11 @@ export const ProfileInfo: React.FC = ({publicKey: userPublicKe ); }; + const handleCopyPublicKey = async () => { + await Clipboard.setStringAsync(userPublicKey); + showToast({type: 'info', title: 'Public key copied to the clipboard'}); + }; + return ( = ({publicKey: userPublicKe Edit profile - setMenuOpen(false)} handle={ @@ -93,7 +99,7 @@ export const ProfileInfo: React.FC = ({publicKey: userPublicKe icon="ShareIcon" /> - + */} ) : ( <> @@ -108,7 +114,7 @@ export const ProfileInfo: React.FC = ({publicKey: userPublicKe {isConnected ? 'UnFollow' : 'Follow'} - + {/* */} = ({publicKey: userPublicKe setMenuOpen(false); }} /> - - + */} ) @@ -164,7 +170,12 @@ export const ProfileInfo: React.FC = ({publicKey: userPublicKe {userPublicKey} - + diff --git a/website/src/app/api/deposit/claim/route.ts b/website/src/app/api/deposit/claim/route.ts index d3d7d5d7..9c819d98 100644 --- a/website/src/app/api/deposit/claim/route.ts +++ b/website/src/app/api/deposit/claim/route.ts @@ -117,6 +117,8 @@ export async function POST(request: NextRequest) { return NextResponse.json({transaction_hash}, {status: HTTPStatus.OK}); } } catch (error) { + console.error(error); + return NextResponse.json( {code: ErrorCode.TRANSACTION_ERROR, error}, {status: HTTPStatus.InternalServerError}, diff --git a/website/src/app/api/deposit/estimate-claim/route.ts b/website/src/app/api/deposit/estimate-claim/route.ts index 343e5039..bf4e2724 100644 --- a/website/src/app/api/deposit/estimate-claim/route.ts +++ b/website/src/app/api/deposit/estimate-claim/route.ts @@ -124,6 +124,8 @@ export async function POST(request: NextRequest) { ); } } catch (error) { + console.error(error); + return NextResponse.json( {code: ErrorCode.ESTIMATION_ERROR, error}, {status: HTTPStatus.InternalServerError}, diff --git a/website/src/app/api/file/route.ts b/website/src/app/api/file/route.ts index 914fd6e2..35010107 100644 --- a/website/src/app/api/file/route.ts +++ b/website/src/app/api/file/route.ts @@ -28,7 +28,8 @@ export async function POST(request: NextRequest) { {status: HTTPStatus.OK}, ); } catch (error) { - console.log(error); + console.error(error); + return NextResponse.json( {code: ErrorCode.TRANSACTION_ERROR, error}, {status: HTTPStatus.InternalServerError},