fix: pass in otp code
This commit is contained in:
@@ -208,13 +208,14 @@ const ListInnerForm = ({
|
||||
}, [subscription])
|
||||
|
||||
const followMutation = useMutation({
|
||||
mutationFn: async (values: z.infer<typeof formSchema>) => {
|
||||
mutationFn: async (values: z.infer<typeof formSchema> & { TOTPCode?: string }) => {
|
||||
const body = {
|
||||
listId: list.id,
|
||||
view: Number.parseInt(values.view),
|
||||
category: values.category,
|
||||
isPrivate: values.isPrivate,
|
||||
title: values.title,
|
||||
TOTPCode: values.TOTPCode,
|
||||
}
|
||||
const $method = isSubscribed ? apiClient.subscriptions.$patch : apiClient.subscriptions.$post
|
||||
|
||||
|
||||
@@ -73,10 +73,12 @@ const WithdrawModalContent = ({ dismiss }: { dismiss: () => void }) => {
|
||||
address,
|
||||
amount,
|
||||
toRss3,
|
||||
TOTPCode,
|
||||
}: {
|
||||
address: string
|
||||
amount: number
|
||||
toRss3?: boolean
|
||||
TOTPCode?: string
|
||||
}) => {
|
||||
const amountBigInt = from(amount, 18)[0]
|
||||
await apiClient.wallets.transactions.withdraw.$post({
|
||||
@@ -84,6 +86,7 @@ const WithdrawModalContent = ({ dismiss }: { dismiss: () => void }) => {
|
||||
address,
|
||||
amount: amountBigInt.toString(),
|
||||
toRss3,
|
||||
TOTPCode,
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
@@ -9,7 +9,7 @@ import type { MutationBaseProps } from "./types"
|
||||
|
||||
export const useSetRSSHubMutation = ({ onError }: MutationBaseProps = {}) =>
|
||||
useMutation({
|
||||
mutationFn: (data: { id: string | null; durationInMonths?: number }) =>
|
||||
mutationFn: (data: { id: string | null; durationInMonths?: number; TOTPCode?: string }) =>
|
||||
apiClient.rsshub.use.$post({ json: data }),
|
||||
|
||||
onSuccess: (_, variables) => {
|
||||
|
||||
Reference in New Issue
Block a user