Skip to content
This repository was archived by the owner on Feb 8, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = {
'security',
'send',
'settings',
'slashpay',
'suggestions',
'tokens',
'transfer',
Expand Down
8 changes: 0 additions & 8 deletions src/screens/Profile/Profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,8 @@ import { ProfileIntro, OfflinePayments } from './ProfileOnboarding';
import type { RootStackScreenProps } from '../../navigation/types';

const Profile = memo((props: RootStackScreenProps<'Profile'>): ReactElement => {
const { url } = useSelectedSlashtag();
const { profile } = useProfile(url);
const onboardingProfileStep = useSelector(onboardingProfileStepSelector);

// TEMP: remove after full backups are working
// skip onboarding if we have a profile already
if (profile.name) {
return <ProfileScreen {...props} />;
}

switch (onboardingProfileStep) {
case 'Intro':
return <ProfileIntro {...props} />;
Expand Down
26 changes: 12 additions & 14 deletions src/screens/Profile/ProfileEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,37 @@ import { PlusIcon } from '../../styles/icons';
import NavigationHeader from '../../components/NavigationHeader';
import Button from '../../components/Button';
import SafeAreaInsets from '../../components/SafeAreaInsets';
import { useProfile, useSelectedSlashtag } from '../../hooks/slashtags';
import ProfileCard from '../../components/ProfileCard';
import ProfileLinks from '../../components/ProfileLinks';
import Divider from '../../components/Divider';
import useKeyboard from '../../hooks/keyboard';
import { useProfile, useSelectedSlashtag } from '../../hooks/slashtags';
import {
setLinks,
setOnboardingProfileStep,
} from '../../store/actions/slashtags';
import Store from '../../store/types';
import { removeTodo } from '../../store/actions/todos';
import { BasicProfile } from '../../store/types/slashtags';
import { slashtagsLinksSelector } from '../../store/reselect/slashtags';
import { onboardingProfileStepSelector } from '../../store/reselect/slashtags';
import { arraysMatch } from '../../utils/helpers';
import { saveProfile } from '../../utils/slashtags';
import type { RootStackScreenProps } from '../../navigation/types';
import { arraysMatch } from '../../utils/helpers';
import Divider from '../../components/Divider';
import { removeTodo } from '../../store/actions/todos';
import useKeyboard from '../../hooks/keyboard';

export const ProfileEdit = ({
navigation,
}: RootStackScreenProps<'Profile' | 'ProfileEdit'>): JSX.Element => {
const { t } = useTranslation('slashtags');
const [fields, setFields] = useState<Omit<BasicProfile, 'links'>>({});
const links = useSelector((state: Store) => state.slashtags.links);
const [hasEdited, setHasEdited] = useState(false);
const { keyboardShown } = useKeyboard();
const [hasEdited, setHasEdited] = useState(false);
const [fields, setFields] = useState<Omit<BasicProfile, 'links'>>({});
const links = useSelector(slashtagsLinksSelector);
const onboardingStep = useSelector(onboardingProfileStepSelector);

const { url, slashtag } = useSelectedSlashtag();
const { profile: savedProfile } = useProfile(url);

// TODO: after full backup, onboarding step should be set to DONE
// for now, we check if there is a savedProfile as a sign of onboarding done.
const onboardedProfile =
useSelector((state: Store) => state.slashtags.onboardingProfileStep) ===
'Done' || !!savedProfile;
const onboardedProfile = onboardingStep === 'Done';

const buttonContainerStyles = useMemo(
() => ({
Expand Down
3 changes: 2 additions & 1 deletion src/screens/Wallets/Send/ReviewAndSend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -515,8 +515,9 @@ const ReviewAndSend = ({
warnings.push('dialog4');
}

// Check if the user is setting the minimum relay fee given the current fee environment.
// Check if the user is setting the minimum fee given the current fee environment.
if (
!transaction.lightningInvoice &&
transaction.satsPerByte &&
// This check is to prevent situations where all values are set to 1sat/vbyte. Where setting 1sat/vbyte is perfectly fine.
feeEstimates.minimum < feeEstimates.slow &&
Expand Down
2 changes: 1 addition & 1 deletion src/utils/lightning/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const listLogs = async (path: string, limit: number): Promise<string[]> => {
//Newest first
list.sort((a, b) => {
return (
(a.mtime ?? new Date()).getTime() - (b.mtime ?? new Date()).getTime()
(b.mtime ?? new Date()).getTime() - (a.mtime ?? new Date()).getTime()
);
});

Expand Down
4 changes: 3 additions & 1 deletion src/utils/slashtags/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
getSelectedNetwork,
getSelectedWallet,
} from '../wallet';
import { decodeLightningInvoice } from '../lightning';
import { decodeLightningInvoice, waitForLdk } from '../lightning';
import { createLightningInvoice } from '../../store/actions/lightning';
import { getSettingsStore } from '../../store/helpers';
import { TAvailableNetworks } from '../networks';
Expand Down Expand Up @@ -188,6 +188,8 @@ export const updateSlashPayConfig = debounce(
const payConfig: SlashPayConfig =
(await drive.get('/slashpay.json').then(decodeJSON).catch(noop)) || [];

await waitForLdk();

const { currentLightningNode } = getCurrentWallet({
selectedWallet,
selectedNetwork,
Expand Down