@opexa/portal-components 0.0.994 → 0.0.996

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.
Files changed (23) hide show
  1. package/dist/components/DepositWithdrawal/Deposit/AiOGCashDeposit/AiOGCashDeposit.js +8 -22
  2. package/dist/components/DepositWithdrawal/Deposit/AiOGrabPayDeposit/AiOGrabPayDeposit.js +8 -22
  3. package/dist/components/DepositWithdrawal/Deposit/AiOPalawanPayDeposit/AiOPalawanPayDeposit.js +8 -22
  4. package/dist/components/DepositWithdrawal/Deposit/AiOPayMayaDeposit/AiOPayMayaDeposit.js +8 -22
  5. package/dist/components/DepositWithdrawal/Deposit/AurixPayGCashDeposit/AurixPayGCashDeposit.js +9 -23
  6. package/dist/components/DepositWithdrawal/Deposit/AurixPayGrabPayDeposit/AurixPayGrabPayDeposit.js +9 -23
  7. package/dist/components/DepositWithdrawal/Deposit/AurixPayPayMayaDeposit/AurixPayPayMayaDeposit.js +9 -19
  8. package/dist/components/DepositWithdrawal/Deposit/AurixPayQRPHDeposit/useAurixPayQRPHDeposit.js +0 -8
  9. package/dist/components/DepositWithdrawal/Deposit/GCashDeposit/GCashDeposit.js +5 -15
  10. package/dist/components/DepositWithdrawal/Deposit/GCashWebpayDeposit/GCashWebpayDeposit.js +7 -17
  11. package/dist/components/DepositWithdrawal/Deposit/LibanganDeposit/LibanganDeposit.js +6 -21
  12. package/dist/components/DepositWithdrawal/Deposit/MayaAppDeposit/MayaAppDeposit.js +4 -15
  13. package/dist/components/DepositWithdrawal/Deposit/MayaDeposit/MayaDeposit.js +5 -19
  14. package/dist/components/DepositWithdrawal/Deposit/MayaWebpayDeposit/MayaWebpayDeposit.js +8 -22
  15. package/dist/components/DepositWithdrawal/Deposit/OnlineBankDeposit/useOnlineBankDeposit.js +4 -25
  16. package/dist/components/DepositWithdrawal/Deposit/PisoPayDeposit/PisoPayDeposit.js +13 -27
  17. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.js +0 -18
  18. package/dist/components/DepositWithdrawal/Withdrawal/Withdrawal.js +19 -4
  19. package/dist/components/GameLaunch/GameLaunchTrigger.js +0 -14
  20. package/dist/components/KYC/KYCDefault/IdentityVerification.js +0 -1
  21. package/dist/components/KYC/KYCDefault/PersonalInformation.js +0 -1
  22. package/dist/components/SignIn/NameAndPasswordSignIn.js +3 -1
  23. package/package.json +1 -1
@@ -13,7 +13,6 @@ import { useDepositQuery } from '../../../../client/hooks/useDepositQuery.js';
13
13
  import { useDepositsCountQuery } from '../../../../client/hooks/useDepositsCountQuery.js';
14
14
  import { useDisclosure } from '../../../../client/hooks/useDisclosure.js';
15
15
  import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
16
- import { useMemberVerificationQuery } from '../../../../client/hooks/useMemberVerificationQuery.js';
17
16
  import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
18
17
  import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
19
18
  import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
@@ -43,10 +42,7 @@ export function AiOGCashDeposit() {
43
42
  });
44
43
  const globalStore = useGlobalStore(useShallow((ctx) => ({
45
44
  depositWithdrawal: ctx.depositWithdrawal,
46
- kycVerificationStatus: ctx.kycVerificationStatus,
47
45
  })));
48
- const verificationQuery = useMemberVerificationQuery();
49
- const verificationStatus = verificationQuery.data?.status ?? 'UNVERIFIED';
50
46
  const [status, setStatus] = useState('waiting');
51
47
  const [errorMessage, setErrorMessage] = useState(null);
52
48
  const createDepositMutation = useCreateAiOGCashDepositMutation({
@@ -164,24 +160,14 @@ export function AiOGCashDeposit() {
164
160
  }
165
161
  }, [form, minimumAmount]);
166
162
  return (_jsxs("form", { onSubmit: form.handleSubmit(async (data) => {
167
- if (!depositWithdrawalProps.bypassDepositKycCheck &&
168
- (verificationStatus === 'PENDING' ||
169
- verificationStatus === 'UNVERIFIED' ||
170
- verificationStatus === 'REJECTED' ||
171
- verificationStatus === 'CREATED')) {
172
- globalStore.kycVerificationStatus.setOpen(true);
173
- return;
174
- }
175
- else {
176
- createDepositMutation.reset();
177
- createDepositMutation.mutate({
178
- amount: data.amount.toString(),
179
- promo: data.promo ?? undefined,
180
- redirectUrl: window.location.origin.includes('localhost')
181
- ? 'https://uat.powerplay.ph'
182
- : window.location.origin,
183
- });
184
- }
163
+ createDepositMutation.reset();
164
+ createDepositMutation.mutate({
165
+ amount: data.amount.toString(),
166
+ promo: data.promo ?? undefined,
167
+ redirectUrl: window.location.origin.includes('localhost')
168
+ ? 'https://uat.powerplay.ph'
169
+ : window.location.origin,
170
+ });
185
171
  }), noValidate: true, children: [_jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
186
172
  o.field.onChange(details.value);
187
173
  }, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to deposit" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
@@ -13,7 +13,6 @@ import { useDepositQuery } from '../../../../client/hooks/useDepositQuery.js';
13
13
  import { useDepositsCountQuery } from '../../../../client/hooks/useDepositsCountQuery.js';
14
14
  import { useDisclosure } from '../../../../client/hooks/useDisclosure.js';
15
15
  import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
16
- import { useMemberVerificationQuery } from '../../../../client/hooks/useMemberVerificationQuery.js';
17
16
  import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
18
17
  import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
19
18
  import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
@@ -43,10 +42,7 @@ export function AiOGrabPayDeposit() {
43
42
  });
44
43
  const globalStore = useGlobalStore(useShallow((ctx) => ({
45
44
  depositWithdrawal: ctx.depositWithdrawal,
46
- kycVerificationStatus: ctx.kycVerificationStatus,
47
45
  })));
48
- const verificationQuery = useMemberVerificationQuery();
49
- const verificationStatus = verificationQuery.data?.status ?? 'UNVERIFIED';
50
46
  const [status, setStatus] = useState('waiting');
51
47
  const createDepositMutation = useCreateAiOGrabPayDepositMutation({
52
48
  onMutate() {
@@ -157,24 +153,14 @@ export function AiOGrabPayDeposit() {
157
153
  }
158
154
  }, [form, minimumAmount]);
159
155
  return (_jsxs("form", { onSubmit: form.handleSubmit(async (data) => {
160
- if (!depositWithdrawalProps.bypassDepositKycCheck &&
161
- (verificationStatus === 'PENDING' ||
162
- verificationStatus === 'UNVERIFIED' ||
163
- verificationStatus === 'REJECTED' ||
164
- verificationStatus === 'CREATED')) {
165
- globalStore.kycVerificationStatus.setOpen(true);
166
- return;
167
- }
168
- else {
169
- createDepositMutation.reset();
170
- createDepositMutation.mutate({
171
- amount: data.amount.toString(),
172
- promo: data.promo ?? undefined,
173
- redirectUrl: window.location.origin.includes('localhost')
174
- ? 'https://uat.powerplay.ph'
175
- : window.location.origin,
176
- });
177
- }
156
+ createDepositMutation.reset();
157
+ createDepositMutation.mutate({
158
+ amount: data.amount.toString(),
159
+ promo: data.promo ?? undefined,
160
+ redirectUrl: window.location.origin.includes('localhost')
161
+ ? 'https://uat.powerplay.ph'
162
+ : window.location.origin,
163
+ });
178
164
  }), noValidate: true, children: [_jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
179
165
  o.field.onChange(details.value);
180
166
  }, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to deposit" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
@@ -13,7 +13,6 @@ import { useDepositQuery } from '../../../../client/hooks/useDepositQuery.js';
13
13
  import { useDepositsCountQuery } from '../../../../client/hooks/useDepositsCountQuery.js';
14
14
  import { useDisclosure } from '../../../../client/hooks/useDisclosure.js';
15
15
  import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
16
- import { useMemberVerificationQuery } from '../../../../client/hooks/useMemberVerificationQuery.js';
17
16
  import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
18
17
  import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
19
18
  import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
@@ -43,10 +42,7 @@ export function AiOPalawanPayDeposit() {
43
42
  });
44
43
  const globalStore = useGlobalStore(useShallow((ctx) => ({
45
44
  depositWithdrawal: ctx.depositWithdrawal,
46
- kycVerificationStatus: ctx.kycVerificationStatus,
47
45
  })));
48
- const verificationQuery = useMemberVerificationQuery();
49
- const verificationStatus = verificationQuery.data?.status ?? 'UNVERIFIED';
50
46
  const [status, setStatus] = useState('waiting');
51
47
  const createDepositMutation = useCreateAiOPalawanPayDepositMutation({
52
48
  onMutate() {
@@ -157,24 +153,14 @@ export function AiOPalawanPayDeposit() {
157
153
  }
158
154
  }, [form, minimumAmount]);
159
155
  return (_jsxs("form", { onSubmit: form.handleSubmit(async (data) => {
160
- if (!depositWithdrawalProps.bypassDepositKycCheck &&
161
- (verificationStatus === 'PENDING' ||
162
- verificationStatus === 'UNVERIFIED' ||
163
- verificationStatus === 'REJECTED' ||
164
- verificationStatus === 'CREATED')) {
165
- globalStore.kycVerificationStatus.setOpen(true);
166
- return;
167
- }
168
- else {
169
- createDepositMutation.reset();
170
- createDepositMutation.mutate({
171
- amount: data.amount.toString(),
172
- promo: data.promo ?? undefined,
173
- redirectUrl: window.location.origin.includes('localhost')
174
- ? 'https://uat.powerplay.ph'
175
- : window.location.origin,
176
- });
177
- }
156
+ createDepositMutation.reset();
157
+ createDepositMutation.mutate({
158
+ amount: data.amount.toString(),
159
+ promo: data.promo ?? undefined,
160
+ redirectUrl: window.location.origin.includes('localhost')
161
+ ? 'https://uat.powerplay.ph'
162
+ : window.location.origin,
163
+ });
178
164
  }), noValidate: true, children: [_jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
179
165
  o.field.onChange(details.value);
180
166
  }, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to deposit" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
@@ -13,7 +13,6 @@ import { useDepositQuery } from '../../../../client/hooks/useDepositQuery.js';
13
13
  import { useDepositsCountQuery } from '../../../../client/hooks/useDepositsCountQuery.js';
14
14
  import { useDisclosure } from '../../../../client/hooks/useDisclosure.js';
15
15
  import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
16
- import { useMemberVerificationQuery } from '../../../../client/hooks/useMemberVerificationQuery.js';
17
16
  import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
18
17
  import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
19
18
  import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
@@ -43,10 +42,7 @@ export function AiOPayMayaDeposit() {
43
42
  });
44
43
  const globalStore = useGlobalStore(useShallow((ctx) => ({
45
44
  depositWithdrawal: ctx.depositWithdrawal,
46
- kycVerificationStatus: ctx.kycVerificationStatus,
47
45
  })));
48
- const verificationQuery = useMemberVerificationQuery();
49
- const verificationStatus = verificationQuery.data?.status ?? 'UNVERIFIED';
50
46
  const [status, setStatus] = useState('waiting');
51
47
  const [errorMessage, setErrorMessage] = useState(null);
52
48
  const createDepositMutation = useCreateAiOPayMayaDepositMutation({
@@ -162,24 +158,14 @@ export function AiOPayMayaDeposit() {
162
158
  }
163
159
  }, [form, minimumAmount]);
164
160
  return (_jsxs("form", { onSubmit: form.handleSubmit(async (data) => {
165
- if (!depositWithdrawalProps.bypassDepositKycCheck &&
166
- (verificationStatus === 'PENDING' ||
167
- verificationStatus === 'UNVERIFIED' ||
168
- verificationStatus === 'REJECTED' ||
169
- verificationStatus === 'CREATED')) {
170
- globalStore.kycVerificationStatus.setOpen(true);
171
- return;
172
- }
173
- else {
174
- createDepositMutation.reset();
175
- createDepositMutation.mutate({
176
- amount: data.amount.toString(),
177
- promo: data.promo ?? undefined,
178
- redirectUrl: window.location.origin.includes('localhost')
179
- ? 'https://uat.powerplay.ph'
180
- : window.location.origin,
181
- });
182
- }
161
+ createDepositMutation.reset();
162
+ createDepositMutation.mutate({
163
+ amount: data.amount.toString(),
164
+ promo: data.promo ?? undefined,
165
+ redirectUrl: window.location.origin.includes('localhost')
166
+ ? 'https://uat.powerplay.ph'
167
+ : window.location.origin,
168
+ });
183
169
  }), noValidate: true, children: [_jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
184
170
  o.field.onChange(details.value);
185
171
  }, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to deposit" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
@@ -14,7 +14,6 @@ import { useDepositQuery } from '../../../../client/hooks/useDepositQuery.js';
14
14
  import { useDepositsCountQuery } from '../../../../client/hooks/useDepositsCountQuery.js';
15
15
  import { useDisclosure } from '../../../../client/hooks/useDisclosure.js';
16
16
  import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
17
- import { useMemberVerificationQuery } from '../../../../client/hooks/useMemberVerificationQuery.js';
18
17
  import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
19
18
  import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
20
19
  import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
@@ -45,10 +44,7 @@ export function AurixPayGCashDeposit() {
45
44
  });
46
45
  const globalStore = useGlobalStore(useShallow((ctx) => ({
47
46
  depositWithdrawal: ctx.depositWithdrawal,
48
- kycVerificationStatus: ctx.kycVerificationStatus,
49
47
  })));
50
- const verificationQuery = useMemberVerificationQuery();
51
- const verificationStatus = verificationQuery.data?.status ?? 'UNVERIFIED';
52
48
  const [status, setStatus] = useState('waiting');
53
49
  const [errorMessage, setErrorMessage] = useState(null);
54
50
  const createDepositMutation = useCreateAurixPayGCashDepositMutation({
@@ -181,25 +177,15 @@ export function AurixPayGCashDeposit() {
181
177
  return `${origin}${path}`;
182
178
  })();
183
179
  return (_jsxs("form", { onSubmit: form.handleSubmit(async (data) => {
184
- if (!depositWithdrawalProps.bypassDepositKycCheck &&
185
- (verificationStatus === 'PENDING' ||
186
- verificationStatus === 'UNVERIFIED' ||
187
- verificationStatus === 'REJECTED' ||
188
- verificationStatus === 'CREATED')) {
189
- globalStore.kycVerificationStatus.setOpen(true);
190
- return;
191
- }
192
- else {
193
- const id = ObjectId.generate(ObjectType.Deposit).toString();
194
- createDepositMutation.reset();
195
- createDepositMutation.mutate({
196
- id,
197
- amount: data.amount.toString(),
198
- promo: data.promo ?? undefined,
199
- redirectUrl: redirectUrl.replace(':id', id),
200
- accountNumber: data.accountNumber,
201
- });
202
- }
180
+ const id = ObjectId.generate(ObjectType.Deposit).toString();
181
+ createDepositMutation.reset();
182
+ createDepositMutation.mutate({
183
+ id,
184
+ amount: data.amount.toString(),
185
+ promo: data.promo ?? undefined,
186
+ redirectUrl: redirectUrl.replace(':id', id),
187
+ accountNumber: data.accountNumber,
188
+ });
203
189
  }), noValidate: true, children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.accountNumber, children: [_jsx(Field.Label, { children: "Account number" }), _jsx(Field.Input, { ...form.register('accountNumber', {
204
190
  onChange: (e) => {
205
191
  // Allow only digits and leading +
@@ -14,7 +14,6 @@ import { useDepositQuery } from '../../../../client/hooks/useDepositQuery.js';
14
14
  import { useDepositsCountQuery } from '../../../../client/hooks/useDepositsCountQuery.js';
15
15
  import { useDisclosure } from '../../../../client/hooks/useDisclosure.js';
16
16
  import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
17
- import { useMemberVerificationQuery } from '../../../../client/hooks/useMemberVerificationQuery.js';
18
17
  import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
19
18
  import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
20
19
  import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
@@ -45,10 +44,7 @@ export function AurixPayGrabPayDeposit() {
45
44
  });
46
45
  const globalStore = useGlobalStore(useShallow((ctx) => ({
47
46
  depositWithdrawal: ctx.depositWithdrawal,
48
- kycVerificationStatus: ctx.kycVerificationStatus,
49
47
  })));
50
- const verificationQuery = useMemberVerificationQuery();
51
- const verificationStatus = verificationQuery.data?.status ?? 'UNVERIFIED';
52
48
  const [status, setStatus] = useState('waiting');
53
49
  const [errorMessage, setErrorMessage] = useState(null);
54
50
  const createDepositMutation = useCreateAurixPayGrabPayDepositMutation({
@@ -183,25 +179,15 @@ export function AurixPayGrabPayDeposit() {
183
179
  return `${origin}${path}`;
184
180
  })();
185
181
  return (_jsxs("form", { onSubmit: form.handleSubmit(async (data) => {
186
- if (!depositWithdrawalProps.bypassDepositKycCheck &&
187
- (verificationStatus === 'PENDING' ||
188
- verificationStatus === 'UNVERIFIED' ||
189
- verificationStatus === 'REJECTED' ||
190
- verificationStatus === 'CREATED')) {
191
- globalStore.kycVerificationStatus.setOpen(true);
192
- return;
193
- }
194
- else {
195
- const id = ObjectId.generate(ObjectType.Deposit).toString();
196
- createDepositMutation.reset();
197
- createDepositMutation.mutate({
198
- id,
199
- amount: data.amount.toString(),
200
- promo: data.promo ?? undefined,
201
- redirectUrl: redirectUrl.replace(':id', id),
202
- accountNumber: data.accountNumber,
203
- });
204
- }
182
+ const id = ObjectId.generate(ObjectType.Deposit).toString();
183
+ createDepositMutation.reset();
184
+ createDepositMutation.mutate({
185
+ id,
186
+ amount: data.amount.toString(),
187
+ promo: data.promo ?? undefined,
188
+ redirectUrl: redirectUrl.replace(':id', id),
189
+ accountNumber: data.accountNumber,
190
+ });
205
191
  }), noValidate: true, children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.accountNumber, children: [_jsx(Field.Label, { children: "Account number" }), _jsx(Field.Input, { ...form.register('accountNumber', {
206
192
  onChange: (e) => {
207
193
  // Allow only digits and leading +
@@ -181,25 +181,15 @@ export function AurixPayPayMayaDeposit() {
181
181
  return `${origin}${path}`;
182
182
  })();
183
183
  return (_jsxs("form", { onSubmit: form.handleSubmit(async (data) => {
184
- if (!depositWithdrawalProps.bypassDepositKycCheck &&
185
- (verificationStatus === 'PENDING' ||
186
- verificationStatus === 'UNVERIFIED' ||
187
- verificationStatus === 'REJECTED' ||
188
- verificationStatus === 'CREATED')) {
189
- globalStore.kycVerificationStatus.setOpen(true);
190
- return;
191
- }
192
- else {
193
- const id = ObjectId.generate(ObjectType.Deposit).toString();
194
- createDepositMutation.reset();
195
- createDepositMutation.mutate({
196
- id,
197
- amount: data.amount.toString(),
198
- promo: data.promo ?? undefined,
199
- redirectUrl: redirectUrl.replace(':id', id),
200
- accountNumber: data.accountNumber,
201
- });
202
- }
184
+ const id = ObjectId.generate(ObjectType.Deposit).toString();
185
+ createDepositMutation.reset();
186
+ createDepositMutation.mutate({
187
+ id,
188
+ amount: data.amount.toString(),
189
+ promo: data.promo ?? undefined,
190
+ redirectUrl: redirectUrl.replace(':id', id),
191
+ accountNumber: data.accountNumber,
192
+ });
203
193
  }), noValidate: true, children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.accountNumber, children: [_jsx(Field.Label, { children: "Account number" }), _jsx(Field.Input, { ...form.register('accountNumber', {
204
194
  onChange: (e) => {
205
195
  // Allow only digits and leading +
@@ -71,14 +71,6 @@ export function useAurixPayQRPHDeposit() {
71
71
  return `${origin}${path}`;
72
72
  })();
73
73
  const generateQRCode = async (input) => {
74
- if (!depositWithdrawalProps.bypassDepositKycCheck &&
75
- (verificationStatus === 'PENDING' ||
76
- verificationStatus === 'UNVERIFIED' ||
77
- verificationStatus === 'REJECTED' ||
78
- verificationStatus === 'CREATED')) {
79
- globalStore.kycVerificationStatus.setOpen(true);
80
- return;
81
- }
82
74
  const id = ObjectId.generate(ObjectType.Deposit).toString();
83
75
  inputRef.current = input;
84
76
  mutation.mutate({
@@ -158,21 +158,11 @@ export function GCashDeposit() {
158
158
  }
159
159
  }, [form, minimumAmount]);
160
160
  return (_jsxs("form", { onSubmit: form.handleSubmit(async (data) => {
161
- if (!depositWithdrawalProps.bypassDepositKycCheck &&
162
- (verificationStatus === 'PENDING' ||
163
- verificationStatus === 'UNVERIFIED' ||
164
- verificationStatus === 'REJECTED' ||
165
- verificationStatus === 'CREATED')) {
166
- globalStore.kycVerificationStatus.setOpen(true);
167
- return;
168
- }
169
- else {
170
- createDepositMutation.reset();
171
- createDepositMutation.mutate({
172
- amount: data.amount.toString(),
173
- promo: data.promo ?? undefined,
174
- });
175
- }
161
+ createDepositMutation.reset();
162
+ createDepositMutation.mutate({
163
+ amount: data.amount.toString(),
164
+ promo: data.promo ?? undefined,
165
+ });
176
166
  }), noValidate: true, children: [_jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
177
167
  o.field.onChange(details.value);
178
168
  }, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to deposit" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
@@ -153,23 +153,13 @@ export function GCashWebpayDeposit() {
153
153
  }
154
154
  }, [form, minimumAmount]);
155
155
  return (_jsxs("form", { onSubmit: form.handleSubmit(async (data) => {
156
- if (!depositWithdrawalProps.bypassDepositKycCheck &&
157
- (verificationStatus === 'PENDING' ||
158
- verificationStatus === 'UNVERIFIED' ||
159
- verificationStatus === 'REJECTED' ||
160
- verificationStatus === 'CREATED')) {
161
- globalStore.kycVerificationStatus.setOpen(true);
162
- return;
163
- }
164
- else {
165
- createDepositMutation.reset();
166
- createDepositMutation.mutate({
167
- amount: data.amount.toString(),
168
- promo: data.promo ?? undefined,
169
- successRedirectionUrl: window.location.origin,
170
- cancelRedirectionUrl: window.location.origin,
171
- });
172
- }
156
+ createDepositMutation.reset();
157
+ createDepositMutation.mutate({
158
+ amount: data.amount.toString(),
159
+ promo: data.promo ?? undefined,
160
+ successRedirectionUrl: window.location.origin,
161
+ cancelRedirectionUrl: window.location.origin,
162
+ });
173
163
  }), noValidate: true, children: [_jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
174
164
  o.field.onChange(details.value);
175
165
  }, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to deposit" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
@@ -13,7 +13,6 @@ import { useDepositQuery } from '../../../../client/hooks/useDepositQuery.js';
13
13
  import { useDepositsCountQuery } from '../../../../client/hooks/useDepositsCountQuery.js';
14
14
  import { useDisclosure } from '../../../../client/hooks/useDisclosure.js';
15
15
  import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
16
- import { useMemberVerificationQuery } from '../../../../client/hooks/useMemberVerificationQuery.js';
17
16
  import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
18
17
  import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
19
18
  import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
@@ -41,10 +40,7 @@ export function LibanganDeposit() {
41
40
  });
42
41
  const globalStore = useGlobalStore(useShallow((ctx) => ({
43
42
  depositWithdrawal: ctx.depositWithdrawal,
44
- kycVerificationStatus: ctx.kycVerificationStatus,
45
43
  })));
46
- const verificationQuery = useMemberVerificationQuery();
47
- const verificationStatus = verificationQuery.data?.status ?? 'UNVERIFIED';
48
44
  const [status, setStatus] = useState('waiting');
49
45
  const createDepositMutation = useCreateLibanganDepositMutation({
50
46
  onMutate() {
@@ -153,23 +149,12 @@ export function LibanganDeposit() {
153
149
  }
154
150
  }, [form, minimumAmount]);
155
151
  return (_jsxs("form", { onSubmit: form.handleSubmit(async (data) => {
156
- //handle new kyc process
157
- if (!depositWithdrawalProps.bypassDepositKycCheck &&
158
- (verificationStatus === 'PENDING' ||
159
- verificationStatus === 'UNVERIFIED' ||
160
- verificationStatus === 'REJECTED' ||
161
- verificationStatus === 'CREATED')) {
162
- globalStore.kycVerificationStatus.setOpen(true);
163
- return;
164
- }
165
- else {
166
- createDepositMutation.reset();
167
- createDepositMutation.mutate({
168
- amount: data.amount.toString(),
169
- promo: data.promo ?? undefined,
170
- redirectUrl: depositWithdrawalProps.libanganRedirectionUrl,
171
- });
172
- }
152
+ createDepositMutation.reset();
153
+ createDepositMutation.mutate({
154
+ amount: data.amount.toString(),
155
+ promo: data.promo ?? undefined,
156
+ redirectUrl: depositWithdrawalProps.libanganRedirectionUrl,
157
+ });
173
158
  }), noValidate: true, children: [_jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
174
159
  o.field.onChange(details.value);
175
160
  }, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to deposit" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
@@ -124,21 +124,10 @@ export function MayaAppDeposit() {
124
124
  }
125
125
  }, [form, minimumAmount]);
126
126
  const handleSubmit = form.handleSubmit(async (data) => {
127
- //handle new kyc process
128
- if (!depositWithdrawalProps.bypassDepositKycCheck &&
129
- (verificationStatus === 'PENDING' ||
130
- verificationStatus === 'UNVERIFIED' ||
131
- verificationStatus === 'REJECTED' ||
132
- verificationStatus === 'CREATED')) {
133
- globalStore.kycVerificationStatus.setOpen(true);
134
- return;
135
- }
136
- else {
137
- createDepositMutation.mutate({
138
- amount: data.amount.toString(),
139
- promo: data.promo ?? undefined,
140
- });
141
- }
127
+ createDepositMutation.mutate({
128
+ amount: data.amount.toString(),
129
+ promo: data.promo ?? undefined,
130
+ });
142
131
  });
143
132
  return (_jsxs("form", { onSubmit: handleSubmit, noValidate: true, children: [_jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
144
133
  o.field.onChange(details.value);
@@ -13,7 +13,6 @@ import { useDepositQuery } from '../../../../client/hooks/useDepositQuery.js';
13
13
  import { useDepositsCountQuery } from '../../../../client/hooks/useDepositsCountQuery.js';
14
14
  import { useDisclosure } from '../../../../client/hooks/useDisclosure.js';
15
15
  import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
16
- import { useMemberVerificationQuery } from '../../../../client/hooks/useMemberVerificationQuery.js';
17
16
  import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
18
17
  import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
19
18
  import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
@@ -41,10 +40,7 @@ export function MayaDeposit() {
41
40
  });
42
41
  const globalStore = useGlobalStore(useShallow((ctx) => ({
43
42
  depositWithdrawal: ctx.depositWithdrawal,
44
- kycVerificationStatus: ctx.kycVerificationStatus,
45
43
  })));
46
- const verificationQuery = useMemberVerificationQuery();
47
- const verificationStatus = verificationQuery.data?.status ?? 'UNVERIFIED';
48
44
  const [status, setStatus] = useState('waiting');
49
45
  const [errorMessage, setErrorMessage] = useState(null);
50
46
  const createDepositMutation = useCreateMayaDepositMutation({
@@ -158,21 +154,11 @@ export function MayaDeposit() {
158
154
  }
159
155
  }, [form, minimumAmount]);
160
156
  return (_jsxs("form", { onSubmit: form.handleSubmit(async (data) => {
161
- if (!depositWithdrawalProps.bypassDepositKycCheck &&
162
- (verificationStatus === 'PENDING' ||
163
- verificationStatus === 'UNVERIFIED' ||
164
- verificationStatus === 'REJECTED' ||
165
- verificationStatus === 'CREATED')) {
166
- globalStore.kycVerificationStatus.setOpen(true);
167
- return;
168
- }
169
- else {
170
- createDepositMutation.reset();
171
- createDepositMutation.mutate({
172
- amount: data.amount.toString(),
173
- promo: data.promo ?? undefined,
174
- });
175
- }
157
+ createDepositMutation.reset();
158
+ createDepositMutation.mutate({
159
+ amount: data.amount.toString(),
160
+ promo: data.promo ?? undefined,
161
+ });
176
162
  }), noValidate: true, children: [_jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
177
163
  o.field.onChange(details.value);
178
164
  }, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to deposit" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
@@ -13,7 +13,6 @@ import { useDepositQuery } from '../../../../client/hooks/useDepositQuery.js';
13
13
  import { useDepositsCountQuery } from '../../../../client/hooks/useDepositsCountQuery.js';
14
14
  import { useDisclosure } from '../../../../client/hooks/useDisclosure.js';
15
15
  import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
16
- import { useMemberVerificationQuery } from '../../../../client/hooks/useMemberVerificationQuery.js';
17
16
  import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
18
17
  import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
19
18
  import { ChevronDownIcon } from '../../../../icons/ChevronDownIcon.js';
@@ -41,10 +40,7 @@ export function MayaWebpayDeposit() {
41
40
  });
42
41
  const globalStore = useGlobalStore(useShallow((ctx) => ({
43
42
  depositWithdrawal: ctx.depositWithdrawal,
44
- kycVerificationStatus: ctx.kycVerificationStatus,
45
43
  })));
46
- const verificationQuery = useMemberVerificationQuery();
47
- const verificationStatus = verificationQuery.data?.status ?? 'UNVERIFIED';
48
44
  const [status, setStatus] = useState('waiting');
49
45
  const createDepositMutation = useCreateMayaWebpayDepositMutation({
50
46
  onMutate() {
@@ -153,24 +149,14 @@ export function MayaWebpayDeposit() {
153
149
  }
154
150
  }, [form, minimumAmount]);
155
151
  return (_jsxs("form", { onSubmit: form.handleSubmit(async (data) => {
156
- if (!depositWithdrawalProps.bypassDepositKycCheck &&
157
- (verificationStatus === 'PENDING' ||
158
- verificationStatus === 'UNVERIFIED' ||
159
- verificationStatus === 'REJECTED' ||
160
- verificationStatus === 'CREATED')) {
161
- globalStore.kycVerificationStatus.setOpen(true);
162
- return;
163
- }
164
- else {
165
- createDepositMutation.reset();
166
- createDepositMutation.mutate({
167
- amount: data.amount.toString(),
168
- promo: data.promo ?? undefined,
169
- redirectUrl: window.location.origin.includes('localhost')
170
- ? 'https://uat.powerplay.ph'
171
- : window.location.origin,
172
- });
173
- }
152
+ createDepositMutation.reset();
153
+ createDepositMutation.mutate({
154
+ amount: data.amount.toString(),
155
+ promo: data.promo ?? undefined,
156
+ redirectUrl: window.location.origin.includes('localhost')
157
+ ? 'https://uat.powerplay.ph'
158
+ : window.location.origin,
159
+ });
174
160
  }), noValidate: true, children: [_jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
175
161
  o.field.onChange(details.value);
176
162
  }, allowMouseWheel: true, children: [_jsx(NumberInput.Label, { children: "Enter amount you want to deposit" }), _jsxs(NumberInput.Control, { children: [_jsx(NumberInput.Input, {}), _jsx(NumberInput.IncrementTrigger, { children: _jsx(ChevronUpIcon, {}) }), _jsx(NumberInput.DecrementTrigger, { children: _jsx(ChevronDownIcon, {}) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] })) }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount'), 0), onChange: (value) => {
@@ -1,18 +1,8 @@
1
1
  import { useEffect, useState } from 'react';
2
2
  import invariant from 'tiny-invariant';
3
- import { useShallow } from 'zustand/shallow';
4
3
  import { useCreateOnlineBankDepositMutation } from '../../../../client/hooks/useCreateOnlineBankDepositMutation.js';
5
4
  import { useDepositQuery } from '../../../../client/hooks/useDepositQuery.js';
6
- import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
7
- import { useMemberVerificationQuery } from '../../../../client/hooks/useMemberVerificationQuery.js';
8
- import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
9
5
  export function useOnlineBankDeposit() {
10
- const depositWithdrawalProps = useDepositWithdrawalPropsContext();
11
- const globalStore = useGlobalStore(useShallow((ctx) => ({
12
- kycVerificationStatus: ctx.kycVerificationStatus,
13
- })));
14
- const verificationQuery = useMemberVerificationQuery();
15
- const verificationStatus = verificationQuery.data?.status ?? 'UNVERIFIED';
16
6
  const [deposit, setDeposit] = useState(null);
17
7
  const [status, setStatus] = useState('waiting');
18
8
  const view = status === 'verification-failed' ||
@@ -35,21 +25,10 @@ export function useOnlineBankDeposit() {
35
25
  },
36
26
  });
37
27
  const generateVCA = (input) => {
38
- //handle new kyc process
39
- if (!depositWithdrawalProps.bypassDepositKycCheck &&
40
- (verificationStatus === 'PENDING' ||
41
- verificationStatus === 'UNVERIFIED' ||
42
- verificationStatus === 'REJECTED' ||
43
- verificationStatus === 'CREATED')) {
44
- globalStore.kycVerificationStatus.setOpen(true);
45
- return;
46
- }
47
- else {
48
- mutation.mutate({
49
- amount: input.amount,
50
- promo: input.promo ?? undefined,
51
- });
52
- }
28
+ mutation.mutate({
29
+ amount: input.amount,
30
+ promo: input.promo ?? undefined,
31
+ });
53
32
  };
54
33
  const query = useDepositQuery(deposit?.id, {
55
34
  enabled: !!deposit,
@@ -14,7 +14,6 @@ import { useDepositQuery } from '../../../../client/hooks/useDepositQuery.js';
14
14
  import { useDepositsCountQuery } from '../../../../client/hooks/useDepositsCountQuery.js';
15
15
  import { useDisclosure } from '../../../../client/hooks/useDisclosure.js';
16
16
  import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
17
- import { useMemberVerificationQuery } from '../../../../client/hooks/useMemberVerificationQuery.js';
18
17
  import { usePaymentSettingsQuery } from '../../../../client/hooks/usePaymentSettingsQuery.js';
19
18
  import { AlertCircleIcon } from '../../../../icons/AlertCircleIcon.js';
20
19
  import { RefreshCcw01Icon } from '../../../../icons/RefreshCcw01Icon.js';
@@ -42,10 +41,7 @@ export function PisoPayDeposit() {
42
41
  });
43
42
  const globalStore = useGlobalStore(useShallow((ctx) => ({
44
43
  depositWithdrawal: ctx.depositWithdrawal,
45
- kycVerificationStatus: ctx.kycVerificationStatus,
46
44
  })));
47
- const verificationQuery = useMemberVerificationQuery();
48
- const verificationStatus = verificationQuery.data?.status ?? 'UNVERIFIED';
49
45
  const [status, setStatus] = useState('waiting');
50
46
  const createDepositMutation = useCreatePisoPayDepositMutation({
51
47
  onMutate() {
@@ -163,29 +159,19 @@ export function PisoPayDeposit() {
163
159
  }
164
160
  }, [form, minimumAmount]);
165
161
  return (_jsxs("form", { onSubmit: form.handleSubmit(async (data) => {
166
- if (!depositWithdrawalProps.bypassDepositKycCheck &&
167
- (verificationStatus === 'PENDING' ||
168
- verificationStatus === 'UNVERIFIED' ||
169
- verificationStatus === 'REJECTED' ||
170
- verificationStatus === 'CREATED')) {
171
- globalStore.kycVerificationStatus.setOpen(true);
172
- return;
173
- }
174
- else {
175
- const id = ObjectId.generate(ObjectType.Deposit).toString();
176
- const domain = window.location.hostname === 'localhost'
177
- ? 'https://opexa.io'
178
- : window.location.origin;
179
- createDepositMutation.reset();
180
- createDepositMutation.mutate({
181
- id,
182
- amount: data.amount.toString(),
183
- redirectionUrl: `${domain}`,
184
- ...(data.promo && {
185
- promo: data.promo,
186
- }),
187
- });
188
- }
162
+ const id = ObjectId.generate(ObjectType.Deposit).toString();
163
+ const domain = window.location.hostname === 'localhost'
164
+ ? 'https://opexa.io'
165
+ : window.location.origin;
166
+ createDepositMutation.reset();
167
+ createDepositMutation.mutate({
168
+ id,
169
+ amount: data.amount.toString(),
170
+ redirectionUrl: `${domain}`,
171
+ ...(data.promo && {
172
+ promo: data.promo,
173
+ }),
174
+ });
189
175
  }), noValidate: true, children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, className: "mt-3xl", children: [_jsx(Field.Label, { children: "Enter the amount you want to deposit" }), _jsx(Field.Input, { type: "number", ...form.register('amount') }), _jsx(Field.ErrorText, { children: form.formState.errors.amount?.message })] }), _jsx(AmountChoices, { value: parseDecimal(form.watch('amount').trim().replace(/,/g, ''), 0), onChange: (value) => {
190
176
  form.setValue('amount', value.toString(), {
191
177
  shouldTouch: true,
@@ -1,22 +1,12 @@
1
1
  import { useEffect, useRef, useState } from 'react';
2
2
  import invariant from 'tiny-invariant';
3
- import { useShallow } from 'zustand/shallow';
4
3
  import { useCreateQRPHDepositMutation } from '../../../../client/hooks/useCreateQRPHDepositMutation.js';
5
4
  import { useDepositQuery } from '../../../../client/hooks/useDepositQuery.js';
6
- import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
7
- import { useMemberVerificationQuery } from '../../../../client/hooks/useMemberVerificationQuery.js';
8
- import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
9
5
  export function useQRPHDeposit() {
10
- const depositWithdrawalProps = useDepositWithdrawalPropsContext();
11
- const globalStore = useGlobalStore(useShallow((ctx) => ({
12
- kycVerificationStatus: ctx.kycVerificationStatus,
13
- })));
14
6
  const inputRef = useRef(null);
15
7
  const [deposit, setDeposit] = useState(null);
16
8
  const [status, setStatus] = useState('idle');
17
9
  const [errorMessage, setErrorMessage] = useState(null);
18
- const verificationQuery = useMemberVerificationQuery();
19
- const verificationStatus = verificationQuery.data?.status ?? 'UNVERIFIED';
20
10
  const mutation = useCreateQRPHDepositMutation({
21
11
  onMutate() {
22
12
  setStatus('generating-qr-code');
@@ -61,14 +51,6 @@ export function useQRPHDeposit() {
61
51
  }
62
52
  }, [query.data?.status]);
63
53
  const generateQRCode = async (input) => {
64
- if (!depositWithdrawalProps.bypassDepositKycCheck &&
65
- (verificationStatus === 'PENDING' ||
66
- verificationStatus === 'UNVERIFIED' ||
67
- verificationStatus === 'REJECTED' ||
68
- verificationStatus === 'CREATED')) {
69
- globalStore.kycVerificationStatus.setOpen(true);
70
- return;
71
- }
72
54
  inputRef.current = input;
73
55
  mutation.mutate({
74
56
  amount: input.amount,
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { lazy, Suspense, useEffect, useState } from 'react';
3
3
  import { useShallow } from 'zustand/shallow';
4
+ import { useAccountQuery } from '../../../client/hooks/useAccountQuery.js';
4
5
  import { useFeatureFlag } from '../../../client/hooks/useFeatureFlag.js';
5
6
  import { useGlobalStore } from '../../../client/hooks/useGlobalStore.js';
6
7
  import { useIsMayaSessionValidQuery } from '../../../client/hooks/useIsMayaSessionValidQuery.js';
@@ -50,10 +51,13 @@ export function Withdrawal() {
50
51
  const wallet = walletQuery.data;
51
52
  const paymentSettingsQuery = usePaymentSettingsQuery();
52
53
  const paymentSettings = paymentSettingsQuery.data;
54
+ const accountQuery = useAccountQuery();
55
+ const account = accountQuery.data;
53
56
  const isMayaSessionValidQuery = useIsMayaSessionValidQuery();
54
57
  const isMayaSessionValid = isMayaSessionValidQuery.data ?? true;
55
58
  const memberVerificationQuery = useMemberVerificationQuery();
56
59
  const memberVerification = memberVerificationQuery.data;
60
+ console.log(account?.status, 'status');
57
61
  const enabledPaymentMethods = (() => {
58
62
  const l = [];
59
63
  if (onMaya) {
@@ -132,12 +136,16 @@ export function Withdrawal() {
132
136
  if (walletQuery.isLoading ||
133
137
  paymentSettingsQuery.isLoading ||
134
138
  isMayaSessionValidQuery.isLoading ||
135
- memberVerificationQuery.isLoading) {
139
+ memberVerificationQuery.isLoading ||
140
+ accountQuery.isLoading) {
136
141
  return _jsx(SpinnerIcon, { className: "mx-auto size-6" });
137
142
  }
138
143
  if (!isMayaSessionValid) {
139
144
  return _jsx(MayaSessionSessionExpired, {});
140
145
  }
146
+ if (account?.status === 'VERIFICATION_LOCKED') {
147
+ return _jsx(AccountVerificationLockRequired, {});
148
+ }
141
149
  if (parseDecimal(wallet?.balance, 0) < 1) {
142
150
  return _jsx(InsufficientBalance, {});
143
151
  }
@@ -148,9 +156,6 @@ export function Withdrawal() {
148
156
  allowUnverifiedAccounts) {
149
157
  return _jsx(AccountVerificationRequired, {});
150
158
  }
151
- if (memberVerification.status === 'PENDING') {
152
- return _jsx(AccountVerificationPending, {});
153
- }
154
159
  if (enabledPaymentMethods.length <= 0) {
155
160
  return _jsx(NoAvailablePaymentMethods, {});
156
161
  }
@@ -179,3 +184,13 @@ function NoAvailablePaymentMethods() {
179
184
  function MayaSessionSessionExpired() {
180
185
  return (_jsxs("div", { className: "py-xl", children: [_jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-warning-secondary", children: _jsx(AlertCircleIcon, { className: "size-6 text-text-featured-icon-light-warning" }) }), _jsx("h2", { className: "mt-lg text-center font-semibold text-lg", children: "Session Expired" }), _jsx("p", { className: "mx-auto mt-xs max-w-[25rem] text-center text-sm text-text-tertiary-600", children: "Your session has timed out. To continue with deposits or withdrawals, Please try reloading the app." })] }));
181
186
  }
187
+ function AccountVerificationLockRequired() {
188
+ const globalStore = useGlobalStore(useShallow((ctx) => ({
189
+ kyc: ctx.kyc,
190
+ depositWithdrawal: ctx.depositWithdrawal,
191
+ })));
192
+ return (_jsxs("div", { className: "pt-xl", children: [_jsx("div", { className: "mx-auto flex size-12 items-center justify-center rounded-full bg-bg-warning-secondary", children: _jsx(AlertCircleIcon, { className: "size-6 text-text-featured-icon-light-warning" }) }), _jsx("h2", { className: "mt-lg text-center font-semibold text-lg", children: "Account Verification Required" }), _jsx("p", { className: "mx-auto mt-xs max-w-[25rem] text-center text-sm text-text-tertiary-600", children: "To withdraw funds, you must first verify your identity. Complete account verification to ensure your account\u2019s security." }), _jsx(Button, { className: "mt-3xl", onClick: () => {
193
+ globalStore.kyc.setOpen(true);
194
+ globalStore.depositWithdrawal.setOpen(false);
195
+ }, children: "Verify Now" })] }));
196
+ }
@@ -6,7 +6,6 @@ import { BiometricAuthError } from 'capacitor-native-biometric';
6
6
  import { useShallow } from 'zustand/shallow';
7
7
  import { useCreateGameSessionMutation } from '../../client/hooks/useCreateGameSessionMutation.js';
8
8
  import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
9
- import { useMemberVerificationQuery } from '../../client/hooks/useMemberVerificationQuery.js';
10
9
  import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
11
10
  import { getSession } from '../../client/services/getSession.js';
12
11
  import { signIn } from '../../client/services/signIn.js';
@@ -20,15 +19,12 @@ import { LOCALSTORAGE_PUSH_NOTIFICATION_TOKEN_KEY } from '../PortalProvider/Push
20
19
  export function GameLaunchTrigger(props) {
21
20
  const { game, bypassKycCheck, ...rest } = props;
22
21
  const sessionQuery = useSessionQuery();
23
- const verificationQuery = useMemberVerificationQuery();
24
22
  const createGameSessionMutation = useCreateGameSessionMutation();
25
23
  const globalStore = useGlobalStore(useShallow((ctx) => ({
26
24
  signIn: ctx.signIn,
27
25
  gameLaunch: ctx.gameLaunch,
28
- kycVerificationStatus: ctx.kycVerificationStatus,
29
26
  isNonRegulated: ctx.isNonRegulated,
30
27
  })));
31
- const verificationStatus = verificationQuery.data?.status ?? 'UNVERIFIED';
32
28
  const currentHour = new Date().getHours();
33
29
  const between3amAnd3pm = currentHour >= 15 || currentHour < 3;
34
30
  const unavailable = !between3amAnd3pm &&
@@ -143,16 +139,6 @@ export function GameLaunchTrigger(props) {
143
139
  }
144
140
  return props.onClick?.(e);
145
141
  }
146
- //handle new kyc process to play only on verified members only
147
- if (!globalStore.isNonRegulated &&
148
- !bypassKycCheck &&
149
- (verificationStatus === 'PENDING' ||
150
- verificationStatus === 'REJECTED' ||
151
- verificationStatus === 'UNVERIFIED' ||
152
- verificationStatus === 'CREATED')) {
153
- globalStore.kycVerificationStatus.setOpen(true);
154
- return;
155
- }
156
142
  globalStore.gameLaunch.setDetails({
157
143
  game: game,
158
144
  status: 'LOADING',
@@ -142,7 +142,6 @@ export function IdentityVerification() {
142
142
  });
143
143
  } }), _jsx(Field.ErrorText, { children: o.fieldState.error?.message })] })) }), _jsx(Button, { type: "submit", className: "mt-6", disabled: createPending || updatePending, children: "Continue" }), kyc.isSkippable && (_jsx(Button, { variant: "outline", colorScheme: "gray", className: "mt-lg", type: "button", onClick: () => {
144
144
  globalStore.kyc.setOpen(false);
145
- globalStore.kycReminder.setOpen(true);
146
145
  }, children: "Skip for now" })), _jsx(Button, { className: "bg-transparent text-text-brand-primary-600", onClick: async () => {
147
146
  if (Capacitor.isNativePlatform()) {
148
147
  const session = await getQueryClient().fetchQuery({
@@ -148,7 +148,6 @@ export function PersonalInformation() {
148
148
  }, disabled: !permanentAddress, children: [_jsx(Checkbox.Control, { children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.Label, { children: "Use permanent address as current address" }), _jsx(Checkbox.HiddenInput, {})] }), _jsxs(Field.Root, { className: "mt-2xl", invalid: !!form.formState.errors.sourceOfIncome, children: [_jsx(Field.Label, { children: "Source of income" }), _jsx(Field.Input, { placeholder: "Enter your source of income", ...form.register('sourceOfIncome') }), _jsx(Field.ErrorText, { children: form.formState.errors.sourceOfIncome?.message })] }), _jsxs(Field.Root, { className: "mt-2xl", invalid: !!form.formState.errors.natureOfWork, children: [_jsx(Field.Label, { children: "Nature of Work" }), _jsx(Field.Input, { placeholder: "Enter your nature of work", ...form.register('natureOfWork') }), _jsx(Field.ErrorText, { children: form.formState.errors.natureOfWork?.message })] }), _jsxs(Field.Root, { className: "mt-2xl", invalid: !!form.formState.errors.placeOfBirth, children: [_jsx(Field.Label, { children: "Place of birth" }), _jsx(Field.Input, { placeholder: "Enter your place of birth", ...form.register('placeOfBirth') }), _jsx(Field.ErrorText, { children: form.formState.errors.placeOfBirth?.message })] }), _jsxs(Field.Root, { className: "mt-2xl", invalid: !!form.formState.errors.nationality, children: [_jsx(Field.Label, { children: "Nationality" }), _jsx(Field.Input, { placeholder: "Enter your nationality", ...form.register('nationality') }), _jsx(Field.ErrorText, { children: form.formState.errors.nationality?.message })] }), _jsx(Button, { type: "submit", className: "mt-4xl", disabled: updateMemberVerificationMutation.isPending ||
149
149
  createMemberVerificationMutation.isPending, children: "Continue" }), kyc.isSkippable && (_jsx(Button, { variant: "outline", colorScheme: "gray", className: "mt-lg", type: "button", onClick: () => {
150
150
  globalStore.kyc.setOpen(false);
151
- globalStore.kycReminder.setOpen(true);
152
151
  }, disabled: updateMemberVerificationMutation.isPending ||
153
152
  createMemberVerificationMutation.isPending, children: "Skip for now" })), ' ', _jsx(Button, { className: "bg-transparent text-text-brand-primary-600", onClick: async () => {
154
153
  if (Capacitor.isNativePlatform()) {
@@ -212,7 +212,9 @@ export function NameAndPasswordSignIn() {
212
212
  onError(error) {
213
213
  toaster.error({
214
214
  title: 'Sign In Failed',
215
- description: error.message,
215
+ description: formType === 'NAME_AND_PASSWORD'
216
+ ? error.message
217
+ : 'Invalid security question',
216
218
  });
217
219
  },
218
220
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.0.994",
3
+ "version": "0.0.996",
4
4
  "exports": {
5
5
  "./ui/*": {
6
6
  "types": "./dist/ui/*/index.d.ts",