diff --git a/src/actions/me.ts b/src/actions/me.ts index 5c350241d..7be77c52f 100644 --- a/src/actions/me.ts +++ b/src/actions/me.ts @@ -40,7 +40,7 @@ const getMeToken = (state: RootState) => { }; const fetchMe = () => - async (dispatch: AppDispatch, getState: () => RootState) => { + (dispatch: AppDispatch, getState: () => RootState) => { const state = getState(); const token = getMeToken(state); const accountUrl = getMeUrl(state); @@ -68,7 +68,7 @@ const persistAuthAccount = (account: APIEntity, params: Record) => }; const patchMe = (params: Record, isFormData = false) => - async (dispatch: AppDispatch, getState: () => RootState) => { + (dispatch: AppDispatch, getState: () => RootState) => { dispatch(patchMeRequest()); const headers: RawAxiosRequestHeaders = isFormData ? { diff --git a/src/features/edit-profile/index.tsx b/src/features/edit-profile/index.tsx index 5aee35041..e648c3e96 100644 --- a/src/features/edit-profile/index.tsx +++ b/src/features/edit-profile/index.tsx @@ -129,8 +129,9 @@ interface AccountCredentials { birthday?: string; /** Nostr NIP-05 identifier. */ nip05?: string; - /** Lightning address. - * https://github.com/lnurl/luds/blob/luds/16.md */ + /** + * Lightning address. + * https://github.com/lnurl/luds/blob/luds/16.md */ lud16?: string; } @@ -359,7 +360,7 @@ const EditProfile: React.FC = () => { )} - {features.accountLud16 && ( + {features.lightning && ( } > diff --git a/src/utils/features.ts b/src/utils/features.ts index 1e2c4d00e..43f78175d 100644 --- a/src/utils/features.ts +++ b/src/utils/features.ts @@ -157,12 +157,6 @@ const getInstanceFeatures = (instance: Instance) => { v.software === DITTO, ]), - /** - * Ability to set one's lightning address on their profile. - * @see PATCH /api/v1/accounts/update_credentials - */ - accountLud16: v.software === DITTO, - /** * Move followers to a different ActivityPub account. * @see POST /api/pleroma/move_account @@ -704,6 +698,12 @@ const getInstanceFeatures = (instance: Instance) => { v.software === PLEROMA && v.build === REBASED && gte(v.version, '2.5.54'), ]), + /** + * Ability to set one's lightning address on their profile. + * @see PATCH /api/v1/accounts/update_credentials + */ + lightning: v.software === DITTO, + /** * Can create, view, and manage lists. * @see {@link https://docs.joinmastodon.org/methods/lists/}