Skip to content

Commit

Permalink
fix: typos
Browse files Browse the repository at this point in the history
  • Loading branch information
ncoquelet committed Dec 11, 2024
1 parent a908e58 commit 74eeb73
Show file tree
Hide file tree
Showing 21 changed files with 93 additions and 85 deletions.
1 change: 1 addition & 0 deletions .github/workflows/config/typos.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[default.extend-words]
ba = "ba"
frst = "frst"

[files]
extend-exclude = ["/**/patches/**", "/**/assets/**", "/**/src/config/**", "**/*.config.ts"]
8 changes: 4 additions & 4 deletions apps/indexer/src/name-claimed.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Block, DECIMALS, hash, uint256, Pool, formatUnits } from "./deps.ts";
import { STARTING_BLOCK, NAMESERVICE_ADDRESS } from "./constants.ts";
import {Block, DECIMALS, formatUnits, hash, Pool, uint256} from "./deps.ts";
import {NAMESERVICE_ADDRESS, STARTING_BLOCK} from "./constants.ts";

const ConnectionString = Deno.env.get("POSTGRES_CONNECTION_STRING")!;
const pool = new Pool(ConnectionString, 1, true);
Expand Down Expand Up @@ -80,7 +80,7 @@ export default function DecodeUsernameClaimed({ header, events }: Block) {
// memecoin_address: token_address,
// caller: caller,
// });
const amount_paid_formated = formatUnits(paid_amount, DECIMALS).toString();
const amount_paid_formatted = formatUnits(paid_amount, DECIMALS).toString();

return {
network: "starknet-sepolia",
Expand All @@ -92,7 +92,7 @@ export default function DecodeUsernameClaimed({ header, events }: Block) {
name: username,
username: username,
expiry: expiry,
paid:amount_paid_formated,
paid:amount_paid_formatted,
quote_token:quote_token,
created_at: new Date().toISOString(),
};
Expand Down
8 changes: 4 additions & 4 deletions apps/indexer/src/nameservice.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Block, DECIMALS, hash, uint256, Pool, formatUnits } from "./deps.ts";
import { STARTING_BLOCK, NAMESERVICE_ADDRESS } from "./constants.ts";
import {Block, DECIMALS, formatUnits, hash, Pool, uint256} from "./deps.ts";
import {NAMESERVICE_ADDRESS, STARTING_BLOCK} from "./constants.ts";

const ConnectionString = Deno.env.get("POSTGRES_CONNECTION_STRING")!;
const pool = new Pool(ConnectionString, 1, true);
Expand Down Expand Up @@ -80,7 +80,7 @@ export default function DecodeUsernameClaimed({ header, events }: Block) {
// memecoin_address: token_address,
// caller: caller,
// });
const amount_paid_formated = formatUnits(paid_amount, DECIMALS).toString();
const amount_paid_formatted = formatUnits(paid_amount, DECIMALS).toString();

return {
network: "starknet-sepolia",
Expand All @@ -92,7 +92,7 @@ export default function DecodeUsernameClaimed({ header, events }: Block) {
name: username,
username: username,
expiry: expiry,
paid:amount_paid_formated,
paid:amount_paid_formatted,
quote_token:quote_token,
created_at: new Date().toISOString(),
};
Expand Down
8 changes: 4 additions & 4 deletions apps/indexer/src/nameservice/claimed.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Block, DECIMALS, hash, uint256, Pool, formatUnits } from "../deps.ts";
import { STARTING_BLOCK, NAMESERVICE_ADDRESS } from "../constants.ts";
import {Block, DECIMALS, formatUnits, hash, Pool, uint256} from "../deps.ts";
import {NAMESERVICE_ADDRESS, STARTING_BLOCK} from "../constants.ts";

const ConnectionString = Deno.env.get("POSTGRES_CONNECTION_STRING")!;
const pool = new Pool(ConnectionString, 1, true);
Expand Down Expand Up @@ -80,7 +80,7 @@ export default function DecodeUsernameClaimed({ header, events }: Block) {
// memecoin_address: token_address,
// caller: caller,
// });
const amount_paid_formated = formatUnits(paid_amount, DECIMALS).toString();
const amount_paid_formatted = formatUnits(paid_amount, DECIMALS).toString();

return {
network: "starknet-sepolia",
Expand All @@ -92,7 +92,7 @@ export default function DecodeUsernameClaimed({ header, events }: Block) {
name: username,
username: username,
expiry: expiry,
paid:amount_paid_formated,
paid:amount_paid_formatted,
quote_token:quote_token,
created_at: new Date().toISOString(),
};
Expand Down
16 changes: 4 additions & 12 deletions apps/indexer/src/nameservice/renew.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
import { NAMESERVICE_ADDRESS, STARTING_BLOCK } from "../constants.js";
import {
Block,
DECIMALS,
formatUnits,
hash,
uint256,
shortString,
Pool,
} from "../deps.js";
import {NAMESERVICE_ADDRESS, STARTING_BLOCK} from "../constants.js";
import {Block, DECIMALS, formatUnits, hash, Pool, uint256,} from "../deps.js";

const ConnectionString = Deno.env.get("POSTGRES_CONNECTION_STRING")!;
const pool = new Pool(ConnectionString, 1, true);
Expand Down Expand Up @@ -88,7 +80,7 @@ export default function DecodeUsernameClaimed({ header, events }: Block) {
// memecoin_address: token_address,
// caller: caller,
// });
const amount_paid_formated = formatUnits(paid_amount, DECIMALS).toString();
const amount_paid_formatted = formatUnits(paid_amount, DECIMALS).toString();

return {
network: "starknet-sepolia",
Expand All @@ -100,7 +92,7 @@ export default function DecodeUsernameClaimed({ header, events }: Block) {
name: username,
username: username,
expiry: expiry,
paid:amount_paid_formated,
paid:amount_paid_formatted,
created_at: new Date().toISOString(),
};
});
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/hooks/account/useInternalAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const useInternalAccount = () => {
// } else {
// const { secretKey, mnemonic, publicKey, strkPrivateKey } = result
// console.log("result", result)
// showToast({ title: "Authentication succed.", type: "success" })
// showToast({ title: "Authentication succeed.", type: "success" })

// setIsConnected(true)
// }
Expand Down
6 changes: 3 additions & 3 deletions apps/mobile/src/hooks/useCombinedTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const useCombinedTokenData = (token?: string, launch?: string) => {
} = useGetTokenLaunch(launch);

const [tokens, setTokens] = useState<LaunchDataMerged[]>([]);
const [launchs, setLaunchs] = useState<LaunchDataMerged[]>([]);
const [launches, setLaunches] = useState<LaunchDataMerged[]>([]);

const combinedData = useMemo(() => {
return [
Expand All @@ -37,12 +37,12 @@ export const useCombinedTokenData = (token?: string, launch?: string) => {

useEffect(() => {
setTokens(combinedData);
setLaunchs(launchDataCombined);
setLaunches(launchDataCombined);
}, [combinedData]);

return {
tokens,
launchs: launchDataCombined,
launches: launchDataCombined,
isLoading: isLoadingDeploy || isLoadingLaunch,
isError: isErrorDeploy || isErrorLaunch,
isFetching: launchIsFetching || tokenIsFetching,
Expand Down
16 changes: 13 additions & 3 deletions apps/mobile/src/modules/Cashu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,18 @@ import {MintQuoteResponse} from '@cashu/cashu-ts';
import {useCashu, useCashuStore} from 'afk_nostr_sdk';
import {canUseBiometricAuthentication} from 'expo-secure-store';
import React, {SetStateAction, useEffect, useRef, useState} from 'react';
import {Platform, Pressable, SafeAreaView, ScrollView, TouchableOpacity, View} from 'react-native';
import {ActivityIndicator, Modal, Text, TextInput} from 'react-native';
import {
ActivityIndicator,
Modal,
Platform,
Pressable,
SafeAreaView,
ScrollView,
Text,
TextInput,
TouchableOpacity,
View,
} from 'react-native';
import PolyfillCrypto from 'react-native-webview-crypto';

import {ChevronLeftIcon, ScanQrIcon} from '../../assets/icons';
Expand Down Expand Up @@ -377,7 +387,7 @@ function WalletInfo({
return <ActivityIndicator size="large" color="#0000ff" />;
}
return (
<View style={styles.walletcontainer}>
<View style={styles.walletContainer}>
<View style={styles.infoSection}>
<Text style={styles.sectionTitle}>Wallet Details</Text>
<View style={styles.infoRow}>
Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/src/modules/Cashu/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ export default ThemedStyleSheet((theme) => ({
marginBottom: Spacing.small,
},
pasteButton: {
backgroundColor: 'transparant',
backgroundColor: 'transparent',
borderRadius: 30,
alignItems: 'center',
borderWidth: 1,
Expand Down Expand Up @@ -361,7 +361,7 @@ export default ThemedStyleSheet((theme) => ({
},

//Wallet Info
walletcontainer: {
walletContainer: {
backgroundColor: theme.colors.surface,
borderRadius: 10,
padding: Spacing.medium,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default ThemedStyleSheet((theme) => ({
fontWeight: 'bold',
},
pasteButton: {
backgroundColor: 'transparant',
backgroundColor: 'transparent',
borderRadius: 30,
alignItems: 'center',
borderWidth: 1,
Expand Down
14 changes: 11 additions & 3 deletions apps/mobile/src/modules/CashuWallet/components/Send/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@ import {MintData} from 'afk_nostr_sdk/src/hooks/cashu/useCashu';
import * as Clipboard from 'expo-clipboard';
import {randomUUID} from 'expo-crypto';
import React, {useEffect, useState} from 'react';
import {Modal, Platform, SafeAreaView, Share, TouchableOpacity, View} from 'react-native';
import {Text, TextInput} from 'react-native';
import {
Modal,
Platform,
SafeAreaView,
Share,
Text,
TextInput,
TouchableOpacity,
View,
} from 'react-native';

import {CloseIcon, CopyIconStack, ScanQrIcon, ShareIcon} from '../../../../assets/icons';
import {Button, GenerateQRCode, Input, ScanQRCode} from '../../../../components';
Expand Down Expand Up @@ -426,7 +434,7 @@ export const Send: React.FC<SendProps> = ({onClose}) => {
<GenerateQRCode data={generatedEcash} size={200} />
<View style={styles.shareContainer}>
<Text style={styles.giftLinkText}>Gift this ecash?</Text>
<View style={styles.shareLinkBtns}>
<View style={styles.shareLinkButtons}>
<Button
onPress={shareLink}
style={styles.modalShareButton}
Expand Down
4 changes: 2 additions & 2 deletions apps/mobile/src/modules/CashuWallet/components/Send/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default ThemedStyleSheet((theme) => ({
marginHorizontal: 20,
},
pasteButton: {
backgroundColor: 'transparant',
backgroundColor: 'transparent',
borderRadius: 30,
alignItems: 'center',
borderWidth: 1,
Expand Down Expand Up @@ -140,7 +140,7 @@ export default ThemedStyleSheet((theme) => ({
fontSize: 16,
marginTop: 15,
},
shareLinkBtns: {
shareLinkButtons: {
display: 'flex',
flexDirection: 'row',
gap: 20,
Expand Down
5 changes: 2 additions & 3 deletions apps/mobile/src/modules/Lightning/LNWalletInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import '../../../applyGlobalPolyfills';

import React from 'react';
import {Pressable, TouchableOpacity, View} from 'react-native';
import {ActivityIndicator, Text, TextInput} from 'react-native';
import {ActivityIndicator, Pressable, Text, TextInput, TouchableOpacity, View} from 'react-native';

import {IconButton} from '../../components';
import {useStyles} from '../../hooks';
Expand Down Expand Up @@ -35,7 +34,7 @@ export function LNWalletInfo({
return <ActivityIndicator size="large" color="#0000ff" />;
}
return (
<View style={styles.walletcontainer}>
<View style={styles.walletContainer}>
<View style={styles.infoSection}>
<Text style={styles.sectionTitle}>Wallet Details</Text>
<View style={styles.infoRow}>
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/modules/Lightning/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export default ThemedStyleSheet((theme) => ({
},

//Wallet Info
walletcontainer: {
walletContainer: {
backgroundColor: theme.colors.surface,
borderRadius: 10,
padding: Spacing.medium,
Expand Down
6 changes: 3 additions & 3 deletions apps/mobile/src/modules/Onboard/wallet/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import {useAuth} from 'afk_nostr_sdk';
import {FC, useState} from 'react';
import React from 'react';
import React, {FC, useState} from 'react';
import {ScrollView, Text, View} from 'react-native';

import {Button} from '../../../components';
import {useToast} from '../../../hooks/modals';
import {WalletManager} from '../../../utils/storage/wallet-manager';

export const WalletOnboarding: FC = () => {
const [email, setEmail] = useState('');
const [otp, setOtp] = useState('');
Expand Down Expand Up @@ -63,7 +63,7 @@ export const WalletOnboarding: FC = () => {
} else {
const {secretKey, mnemonic, publicKey, strkPrivateKey} = result;
console.log('result', result);
showToast({title: 'Authentication succed.', type: 'success'});
showToast({title: 'Authentication succeed.', type: 'success'});

setIsConnected(true);
}
Expand Down
25 changes: 12 additions & 13 deletions apps/mobile/src/screens/Launchpad/LaunchpadComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,16 @@ import {ActivityIndicator, FlatList, RefreshControl, Text, View} from 'react-nat

import {Button} from '../../components';
import Loading from '../../components/Loading';
import {TokenLaunchCard} from '../../components/search/TokenLaunchCard';
import {TokenCard} from '../../components/search/TokenCard';
import {TokenLaunchCard} from '../../components/search/TokenLaunchCard';
import {useStyles, useTheme, useWindowDimensions} from '../../hooks';
import {useMyTokensCreated} from '../../hooks/api/indexer/useMyTokensCreated';
import {useTokens} from '../../hooks/api/indexer/useTokens';
import {useTokenCreatedModal} from '../../hooks/modals/useTokenCreateModal';
import {useCombinedTokenData} from '../../hooks/useCombinedTokens';
import {FormLaunchToken} from '../../modules/LaunchTokenPump/FormLaunchToken';
import {useLaunchpadStore} from '../../store/launchpad';
import stylesheet from './styles';
import {useGetToken} from '../../hooks/api/indexer/useToken';
import {useMyTokensCreated} from '../../hooks/api/indexer/useMyTokensCreated';
import {useTokens} from '../../hooks/api/indexer/useTokens';

interface AllKeysComponentInterface {
isButtonInstantiateEnable?: boolean;
Expand All @@ -26,7 +25,7 @@ export const LaunchpadComponent: React.FC<AllKeysComponentInterface> = ({
const {theme} = useTheme();
const styles = useStyles(stylesheet);
const account = useAccount();
const {tokens: launchsData, isLoading, isFetching} = useCombinedTokenData();
const {tokens: launchesData, isLoading, isFetching} = useCombinedTokenData();
const {data: tokens, isLoading: isLoadingTokens, isFetching: isFetchingTokens} = useTokens();
console.log('tokens data', tokens);
const {
Expand All @@ -39,14 +38,14 @@ export const LaunchpadComponent: React.FC<AllKeysComponentInterface> = ({
const {publicKey} = useAuth();
const {width} = useWindowDimensions();
const isDesktop = width >= 1024 ? true : false;
const {tokens: tokensStore, setTokens, setLaunchs, launchs} = useLaunchpadStore();
const {tokens: tokensStore, setTokens, setLaunches, launches} = useLaunchpadStore();

const [tokenOrLaunch, setTokenOrLauch] = useState<'TOKEN' | 'LAUNCH' | 'MY_DASHBOARD'>('LAUNCH');
const [tokenOrLaunch, setTokenOrLaunch] = useState<'TOKEN' | 'LAUNCH' | 'MY_DASHBOARD'>('LAUNCH');

useEffect(() => {
if (tokens?.length != tokensStore?.length) {
setTokens(tokens);
setLaunchs(tokens);
setLaunches(tokens);
}

console.log('tokens', tokens);
Expand All @@ -70,20 +69,20 @@ export const LaunchpadComponent: React.FC<AllKeysComponentInterface> = ({
<View style={styles.actionToggle}>
<Button
style={[styles.toggleButton, tokenOrLaunch == 'LAUNCH' && styles.activeToggle]}
onPress={() => setTokenOrLauch('LAUNCH')}
onPress={() => setTokenOrLaunch('LAUNCH')}
>
Launchs
Launches
</Button>
<Button
style={[styles.toggleButton, tokenOrLaunch == 'TOKEN' && styles.activeToggle]}
onPress={() => setTokenOrLauch('TOKEN')}
onPress={() => setTokenOrLaunch('TOKEN')}
>
Tokens
</Button>

<Button
style={[styles.toggleButton, tokenOrLaunch == 'MY_DASHBOARD' && styles.activeToggle]}
onPress={() => setTokenOrLauch('MY_DASHBOARD')}
onPress={() => setTokenOrLaunch('MY_DASHBOARD')}
>
My Tokens
</Button>
Expand All @@ -96,7 +95,7 @@ export const LaunchpadComponent: React.FC<AllKeysComponentInterface> = ({
{tokenOrLaunch == 'LAUNCH' && (
<FlatList
contentContainerStyle={styles.flatListContent}
data={launchsData}
data={launchesData}
// data={tokenOrLaunch == "TOKEN" ? tokens: tokens}
ItemSeparatorComponent={() => <View style={styles.separator} />}
keyExtractor={(item, i) => i.toString()}
Expand Down
Loading

0 comments on commit 74eeb73

Please sign in to comment.