diff --git a/commitlint.config.js b/commitlint.config.js
index a8961aa1a..2619f3682 100644
--- a/commitlint.config.js
+++ b/commitlint.config.js
@@ -22,6 +22,7 @@ module.exports = {
'security',
'send',
'settings',
+ 'slashpay',
'suggestions',
'tokens',
'transfer',
diff --git a/src/screens/Profile/Profile.tsx b/src/screens/Profile/Profile.tsx
index 748adc6f0..6e19dcc2b 100644
--- a/src/screens/Profile/Profile.tsx
+++ b/src/screens/Profile/Profile.tsx
@@ -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 ;
- }
-
switch (onboardingProfileStep) {
case 'Intro':
return ;
diff --git a/src/screens/Profile/ProfileEdit.tsx b/src/screens/Profile/ProfileEdit.tsx
index 38b42f12a..167bb7f29 100644
--- a/src/screens/Profile/ProfileEdit.tsx
+++ b/src/screens/Profile/ProfileEdit.tsx
@@ -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>({});
- 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>({});
+ 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(
() => ({
diff --git a/src/screens/Wallets/Send/ReviewAndSend.tsx b/src/screens/Wallets/Send/ReviewAndSend.tsx
index 5b0d2fac6..6f3a55bbe 100644
--- a/src/screens/Wallets/Send/ReviewAndSend.tsx
+++ b/src/screens/Wallets/Send/ReviewAndSend.tsx
@@ -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 &&
diff --git a/src/utils/lightning/logs.ts b/src/utils/lightning/logs.ts
index ac32651c9..1a8e2499b 100644
--- a/src/utils/lightning/logs.ts
+++ b/src/utils/lightning/logs.ts
@@ -71,7 +71,7 @@ const listLogs = async (path: string, limit: number): Promise => {
//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()
);
});
diff --git a/src/utils/slashtags/index.ts b/src/utils/slashtags/index.ts
index d04d95f13..d536bb5ed 100644
--- a/src/utils/slashtags/index.ts
+++ b/src/utils/slashtags/index.ts
@@ -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';
@@ -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,