@opexa/portal-components 0.0.889 → 0.0.891
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/hooks/useCreateAiOGCashDepositMutation.d.ts +4 -0
- package/dist/client/hooks/useCreateAiOGCashDepositMutation.js +90 -0
- package/dist/client/hooks/useCreateAiOGrabPayDepositMutation.d.ts +4 -0
- package/dist/client/hooks/useCreateAiOGrabPayDepositMutation.js +80 -0
- package/dist/client/hooks/useCreateAiOPalawanPayDepositMutation.d.ts +4 -0
- package/dist/client/hooks/useCreateAiOPalawanPayDepositMutation.js +80 -0
- package/dist/client/hooks/useCreateAiOPayMayaDepositMutation.d.ts +4 -0
- package/dist/client/hooks/useCreateAiOPayMayaDepositMutation.js +80 -0
- package/dist/client/hooks/useCreateAurixPayGCashDepositMutation.d.ts +4 -0
- package/dist/client/hooks/useCreateAurixPayGCashDepositMutation.js +82 -0
- package/dist/client/hooks/useCreateAurixPayGrabPayDepositMutation.d.ts +4 -0
- package/dist/client/hooks/useCreateAurixPayGrabPayDepositMutation.js +88 -0
- package/dist/client/hooks/useCreateAurixPayPayMayaDepositMutation.d.ts +4 -0
- package/dist/client/hooks/useCreateAurixPayPayMayaDepositMutation.js +88 -0
- package/dist/client/hooks/useCreateAurixPayQrphDepositMutation.d.ts +4 -0
- package/dist/client/hooks/useCreateAurixPayQrphDepositMutation.js +88 -0
- package/dist/components/DepositWithdrawal/Deposit/AiOGCashDeposit/AiOGCashDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/AiOGrabPayDeposit/AiOGrabPayDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/AiOPalawanPayDeposit/AiOPalawanPayDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/AiOPayMayaDeposit/AiOPayMayaDeposit.js +1 -1
- package/dist/components/DepositWithdrawal/Deposit/AurixPayGCashDeposit/AurixPayGCashDeposit.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/AurixPayGCashDeposit/AurixPayGCashDeposit.js +241 -0
- package/dist/components/DepositWithdrawal/Deposit/AurixPayGrabPayDeposit/AurixPayGrabPayDeposit.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/AurixPayGrabPayDeposit/AurixPayGrabPayDeposit.js +241 -0
- package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayGrabPayDeposit.js +241 -0
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/AurixPayQRPHDeposit.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/AurixPayQRPHDeposit.js +12 -0
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/AurixPayQRPHDepositContext.d.ts +25 -0
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/AurixPayQRPHDepositContext.js +2 -0
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/Confirmed.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/Confirmed.js +11 -0
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/Failed.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/Failed.js +13 -0
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/Form.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/Form.js +126 -0
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/GeneratingQrCode.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/GeneratingQrCode.js +10 -0
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/QrCodeGenerated.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/QrCodeGenerated.js +41 -0
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/useAurixPayQRPHDeposit.d.ts +17 -0
- package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/useAurixPayQRPHDeposit.js +117 -0
- package/dist/components/DepositWithdrawal/Deposit/Deposit.js +23 -1
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QrCodeGenerated.js +37 -1
- package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.d.ts +6 -0
- package/dist/components/DepositWithdrawal/PaymentMethods.js +20 -0
- package/dist/components/DepositWithdrawal/utils.d.ts +1 -1
- package/dist/components/DepositWithdrawal/utils.js +4 -0
- package/dist/components/ForgotPassword/ForgotPassword.lazy.d.ts +2 -2
- package/dist/components/ForgotPassword/ForgotPassword.lazy.js +14 -3
- package/dist/components/ForgotPassword/ForgotPasswordForm.d.ts +5 -1
- package/dist/components/ForgotPassword/ForgotPasswordForm.js +68 -33
- package/dist/components/SignUp/SignUpDefault/SignUpDefaultFormInternational.js +4 -1
- package/dist/components/Tournaments/TournamentsCarousel/TournamentCarouselItem.Crazywin.d.ts +1 -0
- package/dist/components/Tournaments/TournamentsCarousel/TournamentCarouselItem.Crazywin.js +53 -0
- package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarousel.d.ts +1 -0
- package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarousel.js +9 -2
- package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.HappyBingo.d.ts +1 -0
- package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.HappyBingo.js +54 -0
- package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.js +2 -2
- package/dist/components/TransactionRecords/DepositRecordsTable.js +6 -21
- package/dist/components/TransactionRecords/WithdrawalRecordsTable.js +1 -1
- package/dist/images/tourna-icon.webp +0 -0
- package/dist/schemas/forgotPasswordSchema.d.ts +8 -8
- package/dist/services/queries.d.ts +6 -2
- package/dist/services/queries.js +179 -1
- package/dist/services/wallet.d.ts +55 -0
- package/dist/services/wallet.js +44 -1
- package/dist/types/index.d.ts +4 -0
- package/dist/ui/AlertDialog/AlertDialog.d.ts +154 -154
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +14 -14
- package/dist/ui/Badge/Badge.d.ts +12 -12
- package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
- package/dist/ui/Badge/badge.recipe.d.ts +3 -3
- package/dist/ui/Carousel/Carousel.d.ts +72 -72
- package/dist/ui/Carousel/carousel.recipe.d.ts +8 -8
- package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
- package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
- package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
- package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
- package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
- package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
- package/dist/ui/Combobox/Combobox.d.ts +42 -42
- package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
- package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
- package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
- package/dist/ui/Dialog/Dialog.d.ts +33 -33
- package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
- package/dist/ui/Drawer/Drawer.d.ts +33 -33
- package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
- package/dist/ui/Field/Field.d.ts +21 -21
- package/dist/ui/Field/field.recipe.d.ts +3 -3
- package/dist/ui/Menu/Menu.d.ts +307 -307
- package/dist/ui/Menu/menu.recipe.d.ts +17 -17
- package/dist/ui/Popover/Popover.d.ts +121 -121
- package/dist/ui/Popover/popover.recipe.d.ts +11 -11
- package/dist/ui/Progress/Progress.d.ts +27 -27
- package/dist/ui/Progress/progress.recipe.d.ts +3 -3
- package/dist/ui/QrCode/QrCode.d.ts +40 -40
- package/dist/ui/QrCode/qrCode.recipe.d.ts +8 -8
- package/dist/ui/Select/Select.d.ts +45 -45
- package/dist/ui/Select/select.recipe.d.ts +3 -3
- package/dist/ui/Table/Table.d.ts +21 -21
- package/dist/ui/Table/table.anatomy.d.ts +1 -1
- package/dist/ui/Table/table.recipe.d.ts +3 -3
- package/dist/ui/Tabs/Tabs.d.ts +15 -15
- package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
- package/dist/utils/capitalize.d.ts +11 -0
- package/dist/utils/capitalize.js +48 -5
- package/dist/utils/countries/types.d.ts +1 -1
- package/dist/utils/downloadImage.d.ts +4 -0
- package/dist/utils/downloadImage.js +47 -0
- package/dist/utils/mutationKeys.d.ts +4 -0
- package/dist/utils/mutationKeys.js +16 -0
- package/package.json +1 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SetOptional } from 'type-fest';
|
|
2
|
+
import { type CreateAiOGCashDepositInput } from '../../services/wallet';
|
|
3
|
+
import type { Deposit, Mutation } from '../../types';
|
|
4
|
+
export declare const useCreateAiOGCashDepositMutation: Mutation<Deposit, SetOptional<CreateAiOGCashDepositInput, 'id'>>;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { ObjectId } from '@opexa/object-id';
|
|
2
|
+
import { useMutation } from '@tanstack/react-query';
|
|
3
|
+
import { clamp } from 'lodash-es';
|
|
4
|
+
import invariant from 'tiny-invariant';
|
|
5
|
+
import { explainError } from '../../components/DepositWithdrawal/utils.js';
|
|
6
|
+
import { OPEXAPAY_ENDPOINT } from '../../constants/index.js';
|
|
7
|
+
import { ObjectType } from '../../services/ObjectType.js';
|
|
8
|
+
import { createAiOGCashDeposit, getDeposit, } from '../../services/wallet.js';
|
|
9
|
+
import { capitalize } from '../../utils/capitalize.js';
|
|
10
|
+
import { createPoll } from '../../utils/createPoll.js';
|
|
11
|
+
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
12
|
+
import { getCreateAiOGCashDepositMutationKey } from '../../utils/mutationKeys.js';
|
|
13
|
+
import { parseDecimal } from '../../utils/parseDecimal.js';
|
|
14
|
+
import { getAvailableQuestsQueryKey, getDepositsCountQueryKey, } from '../../utils/queryKeys.js';
|
|
15
|
+
import { getSession } from '../services/getSession.js';
|
|
16
|
+
export const useCreateAiOGCashDepositMutation = (config) => {
|
|
17
|
+
const queryClient = getQueryClient();
|
|
18
|
+
const mutation = useMutation({
|
|
19
|
+
...config,
|
|
20
|
+
mutationKey: getCreateAiOGCashDepositMutationKey(),
|
|
21
|
+
mutationFn: async (input) => {
|
|
22
|
+
const id = input.id ?? ObjectId.generate(ObjectType.Deposit).toString();
|
|
23
|
+
const session = await getSession();
|
|
24
|
+
invariant(session.status === 'authenticated');
|
|
25
|
+
const successRedirectUrl = new URL('/transactions', input.redirectUrl);
|
|
26
|
+
successRedirectUrl.searchParams.set('tab', 'deposits');
|
|
27
|
+
successRedirectUrl.searchParams.set('id', id);
|
|
28
|
+
await createAiOGCashDeposit({
|
|
29
|
+
...input,
|
|
30
|
+
id,
|
|
31
|
+
redirectUrl: `${OPEXAPAY_ENDPOINT}/aio/success?redirectUrl=${encodeURIComponent(successRedirectUrl.toString())}`,
|
|
32
|
+
}, {
|
|
33
|
+
headers: {
|
|
34
|
+
Authorization: `Bearer ${session.token}`,
|
|
35
|
+
...(session.domain && {
|
|
36
|
+
Domain: session.domain,
|
|
37
|
+
}),
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
const poll = createPoll(async () => {
|
|
41
|
+
const session = await getSession();
|
|
42
|
+
invariant(session.status === 'authenticated');
|
|
43
|
+
return await getDeposit(id, {
|
|
44
|
+
headers: {
|
|
45
|
+
Authorization: `Bearer ${session.token}`,
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
}, {
|
|
49
|
+
until(res) {
|
|
50
|
+
return (!!res?.checkoutUrl || !!res?.error || res?.status === 'FAILED');
|
|
51
|
+
},
|
|
52
|
+
interval: 1000,
|
|
53
|
+
maxAttempt: 20,
|
|
54
|
+
});
|
|
55
|
+
const res = await poll();
|
|
56
|
+
if (res?.error) {
|
|
57
|
+
const error = new Error();
|
|
58
|
+
error.name = capitalize(res.error, {
|
|
59
|
+
delimiter: capitalize.delimiters.UNDERSCORE,
|
|
60
|
+
});
|
|
61
|
+
error.message = explainError(res.error);
|
|
62
|
+
throw error;
|
|
63
|
+
}
|
|
64
|
+
if (!res?.checkoutUrl) {
|
|
65
|
+
const error = new Error();
|
|
66
|
+
error.name = 'AiOGCashDepositError';
|
|
67
|
+
error.message = 'Failed to process GCash deposit';
|
|
68
|
+
throw error;
|
|
69
|
+
}
|
|
70
|
+
const depositsCount = queryClient.getQueryData(getDepositsCountQueryKey()) ?? 0;
|
|
71
|
+
if (depositsCount <= 0) {
|
|
72
|
+
queryClient.setQueryData(getAvailableQuestsQueryKey(), (prev) => {
|
|
73
|
+
return prev?.map((quest) => {
|
|
74
|
+
const progressPercentage = clamp(parseDecimal(quest.progressPercentage, 0) + 50, 100);
|
|
75
|
+
if (quest.type === 'ONBOARDING') {
|
|
76
|
+
return {
|
|
77
|
+
...quest,
|
|
78
|
+
status: progressPercentage >= 100 ? 'COMPLETED' : quest.status,
|
|
79
|
+
progressPercentage: progressPercentage.toFixed(2),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
return quest;
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
return res;
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
return mutation;
|
|
90
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SetOptional } from 'type-fest';
|
|
2
|
+
import { type CreateAiOGrabPayDepositInput } from '../../services/wallet';
|
|
3
|
+
import type { Deposit, Mutation } from '../../types';
|
|
4
|
+
export declare const useCreateAiOGrabPayDepositMutation: Mutation<Deposit, SetOptional<CreateAiOGrabPayDepositInput, 'id'>>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ObjectId } from '@opexa/object-id';
|
|
2
|
+
import { useMutation } from '@tanstack/react-query';
|
|
3
|
+
import { clamp } from 'lodash-es';
|
|
4
|
+
import invariant from 'tiny-invariant';
|
|
5
|
+
import { OPEXAPAY_ENDPOINT } from '../../constants/index.js';
|
|
6
|
+
import { ObjectType } from '../../services/ObjectType.js';
|
|
7
|
+
import { createAiOGrabPayDeposit, getDeposit, } from '../../services/wallet.js';
|
|
8
|
+
import { createPoll } from '../../utils/createPoll.js';
|
|
9
|
+
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
10
|
+
import { getCreateAiOGrabPayDepositMutationKey } from '../../utils/mutationKeys.js';
|
|
11
|
+
import { parseDecimal } from '../../utils/parseDecimal.js';
|
|
12
|
+
import { getAvailableQuestsQueryKey, getDepositsCountQueryKey, } from '../../utils/queryKeys.js';
|
|
13
|
+
import { getSession } from '../services/getSession.js';
|
|
14
|
+
export const useCreateAiOGrabPayDepositMutation = (config) => {
|
|
15
|
+
const queryClient = getQueryClient();
|
|
16
|
+
const mutation = useMutation({
|
|
17
|
+
...config,
|
|
18
|
+
mutationKey: getCreateAiOGrabPayDepositMutationKey(),
|
|
19
|
+
mutationFn: async (input) => {
|
|
20
|
+
const id = input.id ?? ObjectId.generate(ObjectType.Deposit).toString();
|
|
21
|
+
const session = await getSession();
|
|
22
|
+
invariant(session.status === 'authenticated');
|
|
23
|
+
const successRedirectUrl = new URL('/transactions', input.redirectUrl);
|
|
24
|
+
successRedirectUrl.searchParams.set('tab', 'deposits');
|
|
25
|
+
successRedirectUrl.searchParams.set('id', id);
|
|
26
|
+
await createAiOGrabPayDeposit({
|
|
27
|
+
...input,
|
|
28
|
+
id,
|
|
29
|
+
redirectUrl: `${OPEXAPAY_ENDPOINT}/aio/success?redirectUrl=${encodeURIComponent(successRedirectUrl.toString())}`,
|
|
30
|
+
}, {
|
|
31
|
+
headers: {
|
|
32
|
+
Authorization: `Bearer ${session.token}`,
|
|
33
|
+
...(session.domain && {
|
|
34
|
+
Domain: session.domain,
|
|
35
|
+
}),
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
const poll = createPoll(async () => {
|
|
39
|
+
const session = await getSession();
|
|
40
|
+
invariant(session.status === 'authenticated');
|
|
41
|
+
return await getDeposit(id, {
|
|
42
|
+
headers: {
|
|
43
|
+
Authorization: `Bearer ${session.token}`,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
}, {
|
|
47
|
+
until(res) {
|
|
48
|
+
return (!!res?.checkoutUrl || !!res?.error || res?.status === 'FAILED');
|
|
49
|
+
},
|
|
50
|
+
interval: 1000,
|
|
51
|
+
maxAttempt: 20,
|
|
52
|
+
});
|
|
53
|
+
const res = await poll();
|
|
54
|
+
if (!res?.checkoutUrl) {
|
|
55
|
+
const error = new Error();
|
|
56
|
+
error.name = 'AiOGrabPayDepositError';
|
|
57
|
+
error.message = 'Failed to process Grab Pay deposit';
|
|
58
|
+
throw error;
|
|
59
|
+
}
|
|
60
|
+
const depositsCount = queryClient.getQueryData(getDepositsCountQueryKey()) ?? 0;
|
|
61
|
+
if (depositsCount <= 0) {
|
|
62
|
+
queryClient.setQueryData(getAvailableQuestsQueryKey(), (prev) => {
|
|
63
|
+
return prev?.map((quest) => {
|
|
64
|
+
const progressPercentage = clamp(parseDecimal(quest.progressPercentage, 0) + 50, 100);
|
|
65
|
+
if (quest.type === 'ONBOARDING') {
|
|
66
|
+
return {
|
|
67
|
+
...quest,
|
|
68
|
+
status: progressPercentage >= 100 ? 'COMPLETED' : quest.status,
|
|
69
|
+
progressPercentage: progressPercentage.toFixed(2),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
return quest;
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
return res;
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
return mutation;
|
|
80
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SetOptional } from 'type-fest';
|
|
2
|
+
import { type CreateAiOPalawanPayDepositInput } from '../../services/wallet';
|
|
3
|
+
import type { Deposit, Mutation } from '../../types';
|
|
4
|
+
export declare const useCreateAiOPalawanPayDepositMutation: Mutation<Deposit, SetOptional<CreateAiOPalawanPayDepositInput, 'id'>>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ObjectId } from '@opexa/object-id';
|
|
2
|
+
import { useMutation } from '@tanstack/react-query';
|
|
3
|
+
import { clamp } from 'lodash-es';
|
|
4
|
+
import invariant from 'tiny-invariant';
|
|
5
|
+
import { OPEXAPAY_ENDPOINT } from '../../constants/index.js';
|
|
6
|
+
import { ObjectType } from '../../services/ObjectType.js';
|
|
7
|
+
import { createAiOPalawanPayDeposit, getDeposit, } from '../../services/wallet.js';
|
|
8
|
+
import { createPoll } from '../../utils/createPoll.js';
|
|
9
|
+
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
10
|
+
import { getCreateAiOPalawanPayDepositMutationKey } from '../../utils/mutationKeys.js';
|
|
11
|
+
import { parseDecimal } from '../../utils/parseDecimal.js';
|
|
12
|
+
import { getAvailableQuestsQueryKey, getDepositsCountQueryKey, } from '../../utils/queryKeys.js';
|
|
13
|
+
import { getSession } from '../services/getSession.js';
|
|
14
|
+
export const useCreateAiOPalawanPayDepositMutation = (config) => {
|
|
15
|
+
const queryClient = getQueryClient();
|
|
16
|
+
const mutation = useMutation({
|
|
17
|
+
...config,
|
|
18
|
+
mutationKey: getCreateAiOPalawanPayDepositMutationKey(),
|
|
19
|
+
mutationFn: async (input) => {
|
|
20
|
+
const id = input.id ?? ObjectId.generate(ObjectType.Deposit).toString();
|
|
21
|
+
const session = await getSession();
|
|
22
|
+
invariant(session.status === 'authenticated');
|
|
23
|
+
const successRedirectUrl = new URL('/transactions', input.redirectUrl);
|
|
24
|
+
successRedirectUrl.searchParams.set('tab', 'deposits');
|
|
25
|
+
successRedirectUrl.searchParams.set('id', id);
|
|
26
|
+
await createAiOPalawanPayDeposit({
|
|
27
|
+
...input,
|
|
28
|
+
id,
|
|
29
|
+
redirectUrl: `${OPEXAPAY_ENDPOINT}/aio/success?redirectUrl=${encodeURIComponent(successRedirectUrl.toString())}`,
|
|
30
|
+
}, {
|
|
31
|
+
headers: {
|
|
32
|
+
Authorization: `Bearer ${session.token}`,
|
|
33
|
+
...(session.domain && {
|
|
34
|
+
Domain: session.domain,
|
|
35
|
+
}),
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
const poll = createPoll(async () => {
|
|
39
|
+
const session = await getSession();
|
|
40
|
+
invariant(session.status === 'authenticated');
|
|
41
|
+
return await getDeposit(id, {
|
|
42
|
+
headers: {
|
|
43
|
+
Authorization: `Bearer ${session.token}`,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
}, {
|
|
47
|
+
until(res) {
|
|
48
|
+
return (!!res?.checkoutUrl || !!res?.error || res?.status === 'FAILED');
|
|
49
|
+
},
|
|
50
|
+
interval: 1000,
|
|
51
|
+
maxAttempt: 20,
|
|
52
|
+
});
|
|
53
|
+
const res = await poll();
|
|
54
|
+
if (!res?.checkoutUrl) {
|
|
55
|
+
const error = new Error();
|
|
56
|
+
error.name = 'AiOPalawanPayDepositError';
|
|
57
|
+
error.message = 'Failed to process Palawan Pay deposit';
|
|
58
|
+
throw error;
|
|
59
|
+
}
|
|
60
|
+
const depositsCount = queryClient.getQueryData(getDepositsCountQueryKey()) ?? 0;
|
|
61
|
+
if (depositsCount <= 0) {
|
|
62
|
+
queryClient.setQueryData(getAvailableQuestsQueryKey(), (prev) => {
|
|
63
|
+
return prev?.map((quest) => {
|
|
64
|
+
const progressPercentage = clamp(parseDecimal(quest.progressPercentage, 0) + 50, 100);
|
|
65
|
+
if (quest.type === 'ONBOARDING') {
|
|
66
|
+
return {
|
|
67
|
+
...quest,
|
|
68
|
+
status: progressPercentage >= 100 ? 'COMPLETED' : quest.status,
|
|
69
|
+
progressPercentage: progressPercentage.toFixed(2),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
return quest;
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
return res;
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
return mutation;
|
|
80
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SetOptional } from 'type-fest';
|
|
2
|
+
import { type CreateAiOPayMayaDepositInput } from '../../services/wallet';
|
|
3
|
+
import type { Deposit, Mutation } from '../../types';
|
|
4
|
+
export declare const useCreateAiOPayMayaDepositMutation: Mutation<Deposit, SetOptional<CreateAiOPayMayaDepositInput, 'id'>>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { ObjectId } from '@opexa/object-id';
|
|
2
|
+
import { useMutation } from '@tanstack/react-query';
|
|
3
|
+
import { clamp } from 'lodash-es';
|
|
4
|
+
import invariant from 'tiny-invariant';
|
|
5
|
+
import { OPEXAPAY_ENDPOINT } from '../../constants/index.js';
|
|
6
|
+
import { ObjectType } from '../../services/ObjectType.js';
|
|
7
|
+
import { createAiOPayMayaDeposit, getDeposit, } from '../../services/wallet.js';
|
|
8
|
+
import { createPoll } from '../../utils/createPoll.js';
|
|
9
|
+
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
10
|
+
import { getCreateAiOPayMayaDepositMutationKey } from '../../utils/mutationKeys.js';
|
|
11
|
+
import { parseDecimal } from '../../utils/parseDecimal.js';
|
|
12
|
+
import { getAvailableQuestsQueryKey, getDepositsCountQueryKey, } from '../../utils/queryKeys.js';
|
|
13
|
+
import { getSession } from '../services/getSession.js';
|
|
14
|
+
export const useCreateAiOPayMayaDepositMutation = (config) => {
|
|
15
|
+
const queryClient = getQueryClient();
|
|
16
|
+
const mutation = useMutation({
|
|
17
|
+
...config,
|
|
18
|
+
mutationKey: getCreateAiOPayMayaDepositMutationKey(),
|
|
19
|
+
mutationFn: async (input) => {
|
|
20
|
+
const id = input.id ?? ObjectId.generate(ObjectType.Deposit).toString();
|
|
21
|
+
const session = await getSession();
|
|
22
|
+
invariant(session.status === 'authenticated');
|
|
23
|
+
const successRedirectUrl = new URL('/transactions', input.redirectUrl);
|
|
24
|
+
successRedirectUrl.searchParams.set('tab', 'deposits');
|
|
25
|
+
successRedirectUrl.searchParams.set('id', id);
|
|
26
|
+
await createAiOPayMayaDeposit({
|
|
27
|
+
...input,
|
|
28
|
+
id,
|
|
29
|
+
redirectUrl: `${OPEXAPAY_ENDPOINT}/aio/success?redirectUrl=${encodeURIComponent(successRedirectUrl.toString())}`,
|
|
30
|
+
}, {
|
|
31
|
+
headers: {
|
|
32
|
+
Authorization: `Bearer ${session.token}`,
|
|
33
|
+
...(session.domain && {
|
|
34
|
+
Domain: session.domain,
|
|
35
|
+
}),
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
const poll = createPoll(async () => {
|
|
39
|
+
const session = await getSession();
|
|
40
|
+
invariant(session.status === 'authenticated');
|
|
41
|
+
return await getDeposit(id, {
|
|
42
|
+
headers: {
|
|
43
|
+
Authorization: `Bearer ${session.token}`,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
}, {
|
|
47
|
+
until(res) {
|
|
48
|
+
return (!!res?.checkoutUrl || !!res?.error || res?.status === 'FAILED');
|
|
49
|
+
},
|
|
50
|
+
interval: 1000,
|
|
51
|
+
maxAttempt: 20,
|
|
52
|
+
});
|
|
53
|
+
const res = await poll();
|
|
54
|
+
if (!res?.checkoutUrl) {
|
|
55
|
+
const error = new Error();
|
|
56
|
+
error.name = 'AiOPayMayaDepositError';
|
|
57
|
+
error.message = 'Failed to process Pay Maya deposit';
|
|
58
|
+
throw error;
|
|
59
|
+
}
|
|
60
|
+
const depositsCount = queryClient.getQueryData(getDepositsCountQueryKey()) ?? 0;
|
|
61
|
+
if (depositsCount <= 0) {
|
|
62
|
+
queryClient.setQueryData(getAvailableQuestsQueryKey(), (prev) => {
|
|
63
|
+
return prev?.map((quest) => {
|
|
64
|
+
const progressPercentage = clamp(parseDecimal(quest.progressPercentage, 0) + 50, 100);
|
|
65
|
+
if (quest.type === 'ONBOARDING') {
|
|
66
|
+
return {
|
|
67
|
+
...quest,
|
|
68
|
+
status: progressPercentage >= 100 ? 'COMPLETED' : quest.status,
|
|
69
|
+
progressPercentage: progressPercentage.toFixed(2),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
return quest;
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
return res;
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
return mutation;
|
|
80
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SetOptional } from 'type-fest';
|
|
2
|
+
import { type CreateAurixPayGCashDepositInput } from '../../services/wallet';
|
|
3
|
+
import type { Deposit, Mutation } from '../../types';
|
|
4
|
+
export declare const useCreateAurixPayGCashDepositMutation: Mutation<Deposit, SetOptional<CreateAurixPayGCashDepositInput, 'id'>>;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { ObjectId } from '@opexa/object-id';
|
|
2
|
+
import { useMutation } from '@tanstack/react-query';
|
|
3
|
+
import { clamp } from 'lodash-es';
|
|
4
|
+
import invariant from 'tiny-invariant';
|
|
5
|
+
import { explainError } from '../../components/DepositWithdrawal/utils.js';
|
|
6
|
+
import { ObjectType } from '../../services/ObjectType.js';
|
|
7
|
+
import { createAurixPayGCashDeposit, getDeposit, } from '../../services/wallet.js';
|
|
8
|
+
import { capitalize } from '../../utils/capitalize.js';
|
|
9
|
+
import { createPoll } from '../../utils/createPoll.js';
|
|
10
|
+
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
11
|
+
import { getCreateAurixPayGCashDepositMutationKey } from '../../utils/mutationKeys.js';
|
|
12
|
+
import { parseDecimal } from '../../utils/parseDecimal.js';
|
|
13
|
+
import { getAvailableQuestsQueryKey, getDepositsCountQueryKey, } from '../../utils/queryKeys.js';
|
|
14
|
+
import { getSession } from '../services/getSession.js';
|
|
15
|
+
export const useCreateAurixPayGCashDepositMutation = (config) => {
|
|
16
|
+
const queryClient = getQueryClient();
|
|
17
|
+
const mutation = useMutation({
|
|
18
|
+
...config,
|
|
19
|
+
mutationKey: getCreateAurixPayGCashDepositMutationKey(),
|
|
20
|
+
mutationFn: async (input) => {
|
|
21
|
+
const id = input.id ?? ObjectId.generate(ObjectType.Deposit).toString();
|
|
22
|
+
const session = await getSession();
|
|
23
|
+
invariant(session.status === 'authenticated');
|
|
24
|
+
await createAurixPayGCashDeposit({ ...input, id }, {
|
|
25
|
+
headers: {
|
|
26
|
+
Authorization: `Bearer ${session.token}`,
|
|
27
|
+
...(session.domain && {
|
|
28
|
+
Domain: session.domain,
|
|
29
|
+
}),
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
const poll = createPoll(async () => {
|
|
33
|
+
const session = await getSession();
|
|
34
|
+
invariant(session.status === 'authenticated');
|
|
35
|
+
return await getDeposit(id, {
|
|
36
|
+
headers: {
|
|
37
|
+
Authorization: `Bearer ${session.token}`,
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
}, {
|
|
41
|
+
until(res) {
|
|
42
|
+
return (!!res?.checkoutUrl || !!res?.error || res?.status === 'FAILED');
|
|
43
|
+
},
|
|
44
|
+
interval: 1000,
|
|
45
|
+
maxAttempt: 20,
|
|
46
|
+
});
|
|
47
|
+
const res = await poll();
|
|
48
|
+
if (res?.error) {
|
|
49
|
+
const error = new Error();
|
|
50
|
+
error.name = capitalize(res.error, {
|
|
51
|
+
delimiter: capitalize.delimiters.UNDERSCORE,
|
|
52
|
+
});
|
|
53
|
+
error.message = explainError(res.error);
|
|
54
|
+
throw error;
|
|
55
|
+
}
|
|
56
|
+
if (!res?.checkoutUrl) {
|
|
57
|
+
const error = new Error();
|
|
58
|
+
error.name = 'AurixPayGCashDepositError';
|
|
59
|
+
error.message = 'Failed to process GCash deposit';
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
62
|
+
const depositsCount = queryClient.getQueryData(getDepositsCountQueryKey()) ?? 0;
|
|
63
|
+
if (depositsCount <= 0) {
|
|
64
|
+
queryClient.setQueryData(getAvailableQuestsQueryKey(), (prev) => {
|
|
65
|
+
return prev?.map((quest) => {
|
|
66
|
+
const progressPercentage = clamp(parseDecimal(quest.progressPercentage, 0) + 50, 100);
|
|
67
|
+
if (quest.type === 'ONBOARDING') {
|
|
68
|
+
return {
|
|
69
|
+
...quest,
|
|
70
|
+
status: progressPercentage >= 100 ? 'COMPLETED' : quest.status,
|
|
71
|
+
progressPercentage: progressPercentage.toFixed(2),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
return quest;
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
return res;
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
return mutation;
|
|
82
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SetOptional } from 'type-fest';
|
|
2
|
+
import { type CreateAurixPayGrabPayDepositInput } from '../../services/wallet';
|
|
3
|
+
import type { Deposit, Mutation } from '../../types';
|
|
4
|
+
export declare const useCreateAurixPayGrabPayDepositMutation: Mutation<Deposit, SetOptional<CreateAurixPayGrabPayDepositInput, 'id'>>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { ObjectId } from '@opexa/object-id';
|
|
2
|
+
import { useMutation } from '@tanstack/react-query';
|
|
3
|
+
import { clamp } from 'lodash-es';
|
|
4
|
+
import invariant from 'tiny-invariant';
|
|
5
|
+
import { explainError } from '../../components/DepositWithdrawal/utils.js';
|
|
6
|
+
import { ObjectType } from '../../services/ObjectType.js';
|
|
7
|
+
import { createAurixPayGrabPayDeposit, getDeposit, } from '../../services/wallet.js';
|
|
8
|
+
import { capitalize } from '../../utils/capitalize.js';
|
|
9
|
+
import { createPoll } from '../../utils/createPoll.js';
|
|
10
|
+
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
11
|
+
import { getCreateAurixPayGrabPayDepositMutationKey } from '../../utils/mutationKeys.js';
|
|
12
|
+
import { parseDecimal } from '../../utils/parseDecimal.js';
|
|
13
|
+
import { getAvailableQuestsQueryKey, getDepositsCountQueryKey, } from '../../utils/queryKeys.js';
|
|
14
|
+
import { getSession } from '../services/getSession.js';
|
|
15
|
+
export const useCreateAurixPayGrabPayDepositMutation = (config) => {
|
|
16
|
+
const queryClient = getQueryClient();
|
|
17
|
+
const mutation = useMutation({
|
|
18
|
+
...config,
|
|
19
|
+
mutationKey: getCreateAurixPayGrabPayDepositMutationKey(),
|
|
20
|
+
mutationFn: async (input) => {
|
|
21
|
+
const id = input.id ?? ObjectId.generate(ObjectType.Deposit).toString();
|
|
22
|
+
const session = await getSession();
|
|
23
|
+
invariant(session.status === 'authenticated');
|
|
24
|
+
const successRedirectUrl = new URL('/transactions', input.redirectUrl);
|
|
25
|
+
successRedirectUrl.searchParams.set('tab', 'deposits');
|
|
26
|
+
successRedirectUrl.searchParams.set('id', id);
|
|
27
|
+
await createAurixPayGrabPayDeposit({
|
|
28
|
+
...input,
|
|
29
|
+
id,
|
|
30
|
+
}, {
|
|
31
|
+
headers: {
|
|
32
|
+
Authorization: `Bearer ${session.token}`,
|
|
33
|
+
...(session.domain && {
|
|
34
|
+
Domain: session.domain,
|
|
35
|
+
}),
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
const poll = createPoll(async () => {
|
|
39
|
+
const session = await getSession();
|
|
40
|
+
invariant(session.status === 'authenticated');
|
|
41
|
+
return await getDeposit(id, {
|
|
42
|
+
headers: {
|
|
43
|
+
Authorization: `Bearer ${session.token}`,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
}, {
|
|
47
|
+
until(res) {
|
|
48
|
+
return (!!res?.checkoutUrl || !!res?.error || res?.status === 'FAILED');
|
|
49
|
+
},
|
|
50
|
+
interval: 1000,
|
|
51
|
+
maxAttempt: 20,
|
|
52
|
+
});
|
|
53
|
+
const res = await poll();
|
|
54
|
+
if (res?.error) {
|
|
55
|
+
const error = new Error();
|
|
56
|
+
error.name = capitalize(res.error, {
|
|
57
|
+
delimiter: capitalize.delimiters.UNDERSCORE,
|
|
58
|
+
});
|
|
59
|
+
error.message = explainError(res.error);
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
62
|
+
if (!res?.checkoutUrl) {
|
|
63
|
+
const error = new Error();
|
|
64
|
+
error.name = 'AurixPayGrabPayDepositError';
|
|
65
|
+
error.message = 'Failed to process GrabPay deposit';
|
|
66
|
+
throw error;
|
|
67
|
+
}
|
|
68
|
+
const depositsCount = queryClient.getQueryData(getDepositsCountQueryKey()) ?? 0;
|
|
69
|
+
if (depositsCount <= 0) {
|
|
70
|
+
queryClient.setQueryData(getAvailableQuestsQueryKey(), (prev) => {
|
|
71
|
+
return prev?.map((quest) => {
|
|
72
|
+
const progressPercentage = clamp(parseDecimal(quest.progressPercentage, 0) + 50, 100);
|
|
73
|
+
if (quest.type === 'ONBOARDING') {
|
|
74
|
+
return {
|
|
75
|
+
...quest,
|
|
76
|
+
status: progressPercentage >= 100 ? 'COMPLETED' : quest.status,
|
|
77
|
+
progressPercentage: progressPercentage.toFixed(2),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
return quest;
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
return res;
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
return mutation;
|
|
88
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SetOptional } from 'type-fest';
|
|
2
|
+
import { type CreateAurixPayPayMayaDepositInput } from '../../services/wallet';
|
|
3
|
+
import type { Deposit, Mutation } from '../../types';
|
|
4
|
+
export declare const useCreateAurixPayPayMayaDepositMutation: Mutation<Deposit, SetOptional<CreateAurixPayPayMayaDepositInput, 'id'>>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { ObjectId } from '@opexa/object-id';
|
|
2
|
+
import { useMutation } from '@tanstack/react-query';
|
|
3
|
+
import { clamp } from 'lodash-es';
|
|
4
|
+
import invariant from 'tiny-invariant';
|
|
5
|
+
import { explainError } from '../../components/DepositWithdrawal/utils.js';
|
|
6
|
+
import { ObjectType } from '../../services/ObjectType.js';
|
|
7
|
+
import { createAurixPayPayMayaDeposit, getDeposit, } from '../../services/wallet.js';
|
|
8
|
+
import { capitalize } from '../../utils/capitalize.js';
|
|
9
|
+
import { createPoll } from '../../utils/createPoll.js';
|
|
10
|
+
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
11
|
+
import { getCreateAurixPayPayMayaDepositMutationKey } from '../../utils/mutationKeys.js';
|
|
12
|
+
import { parseDecimal } from '../../utils/parseDecimal.js';
|
|
13
|
+
import { getAvailableQuestsQueryKey, getDepositsCountQueryKey, } from '../../utils/queryKeys.js';
|
|
14
|
+
import { getSession } from '../services/getSession.js';
|
|
15
|
+
export const useCreateAurixPayPayMayaDepositMutation = (config) => {
|
|
16
|
+
const queryClient = getQueryClient();
|
|
17
|
+
const mutation = useMutation({
|
|
18
|
+
...config,
|
|
19
|
+
mutationKey: getCreateAurixPayPayMayaDepositMutationKey(),
|
|
20
|
+
mutationFn: async (input) => {
|
|
21
|
+
const id = input.id ?? ObjectId.generate(ObjectType.Deposit).toString();
|
|
22
|
+
const session = await getSession();
|
|
23
|
+
invariant(session.status === 'authenticated');
|
|
24
|
+
const successRedirectUrl = new URL('/transactions', input.redirectUrl);
|
|
25
|
+
successRedirectUrl.searchParams.set('tab', 'deposits');
|
|
26
|
+
successRedirectUrl.searchParams.set('id', id);
|
|
27
|
+
await createAurixPayPayMayaDeposit({
|
|
28
|
+
...input,
|
|
29
|
+
id,
|
|
30
|
+
}, {
|
|
31
|
+
headers: {
|
|
32
|
+
Authorization: `Bearer ${session.token}`,
|
|
33
|
+
...(session.domain && {
|
|
34
|
+
Domain: session.domain,
|
|
35
|
+
}),
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
const poll = createPoll(async () => {
|
|
39
|
+
const session = await getSession();
|
|
40
|
+
invariant(session.status === 'authenticated');
|
|
41
|
+
return await getDeposit(id, {
|
|
42
|
+
headers: {
|
|
43
|
+
Authorization: `Bearer ${session.token}`,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
}, {
|
|
47
|
+
until(res) {
|
|
48
|
+
return (!!res?.checkoutUrl || !!res?.error || res?.status === 'FAILED');
|
|
49
|
+
},
|
|
50
|
+
interval: 1000,
|
|
51
|
+
maxAttempt: 20,
|
|
52
|
+
});
|
|
53
|
+
const res = await poll();
|
|
54
|
+
if (res?.error) {
|
|
55
|
+
const error = new Error();
|
|
56
|
+
error.name = capitalize(res.error, {
|
|
57
|
+
delimiter: capitalize.delimiters.UNDERSCORE,
|
|
58
|
+
});
|
|
59
|
+
error.message = explainError(res.error);
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
62
|
+
if (!res?.checkoutUrl) {
|
|
63
|
+
const error = new Error();
|
|
64
|
+
error.name = 'AurixPayPayMayaDepositError';
|
|
65
|
+
error.message = 'Failed to process PayMaya deposit';
|
|
66
|
+
throw error;
|
|
67
|
+
}
|
|
68
|
+
const depositsCount = queryClient.getQueryData(getDepositsCountQueryKey()) ?? 0;
|
|
69
|
+
if (depositsCount <= 0) {
|
|
70
|
+
queryClient.setQueryData(getAvailableQuestsQueryKey(), (prev) => {
|
|
71
|
+
return prev?.map((quest) => {
|
|
72
|
+
const progressPercentage = clamp(parseDecimal(quest.progressPercentage, 0) + 50, 100);
|
|
73
|
+
if (quest.type === 'ONBOARDING') {
|
|
74
|
+
return {
|
|
75
|
+
...quest,
|
|
76
|
+
status: progressPercentage >= 100 ? 'COMPLETED' : quest.status,
|
|
77
|
+
progressPercentage: progressPercentage.toFixed(2),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
return quest;
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
return res;
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
return mutation;
|
|
88
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SetOptional } from 'type-fest';
|
|
2
|
+
import { type CreateAurixPayQrphDepositInput } from '../../services/wallet';
|
|
3
|
+
import type { Deposit, Mutation } from '../../types';
|
|
4
|
+
export declare const useCreateAurixPayQrphDepositMutation: Mutation<Deposit, SetOptional<CreateAurixPayQrphDepositInput, 'id'>>;
|