@opexa/portal-components 0.0.457 → 0.0.458

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.
@@ -4,10 +4,10 @@ import { validateMayaSession } from '../../services/wallet.js';
4
4
  import { getQueryClient } from '../../utils/getQueryClient.js';
5
5
  import { getIsMayaSessionValidQueryKey, getSessionQueryKey, } from '../../utils/queryKeys.js';
6
6
  import { getSession } from '../services/getSession.js';
7
- import { useOnMMA } from './useOnMMA.js';
7
+ import { useMayaAuth } from './useMayaAuth.js';
8
8
  import { useSessionQuery } from './useSessionQuery.js';
9
9
  export const useIsMayaSessionValidQuery = (config) => {
10
- const [onMMA] = useOnMMA();
10
+ const { onMaya } = useMayaAuth();
11
11
  const sessionQuery = useSessionQuery();
12
12
  const query = useQuery({
13
13
  gcTime: 1000 * 2,
@@ -18,7 +18,7 @@ export const useIsMayaSessionValidQuery = (config) => {
18
18
  ...config,
19
19
  enabled: config?.enabled === false
20
20
  ? false
21
- : !onMMA
21
+ : !onMaya
22
22
  ? false
23
23
  : sessionQuery.data?.status === 'authenticated',
24
24
  queryKey: getIsMayaSessionValidQueryKey(),
@@ -2,7 +2,7 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
2
2
  import { useEffect, useState } from 'react';
3
3
  import { useFeatureFlag } from '../../../client/hooks/useFeatureFlag.js';
4
4
  import { useIsMayaSessionValidQuery } from '../../../client/hooks/useIsMayaSessionValidQuery.js';
5
- import { useOnMMA } from '../../../client/hooks/useOnMMA.js';
5
+ import { useMayaAuth } from '../../../client/hooks/useMayaAuth.js';
6
6
  import { usePaymentSettingsQuery } from '../../../client/hooks/usePaymentSettingsQuery.js';
7
7
  import { AlertCircleIcon } from '../../../icons/AlertCircleIcon.js';
8
8
  import { SpinnerIcon } from '../../../icons/SpinnerIcon.js';
@@ -16,13 +16,13 @@ import { OnlineBankDeposit } from './OnlineBankDeposit/OnlineBankDeposit.js';
16
16
  import { PisoPayDeposit } from './PisoPayDeposit/PisoPayDeposit.js';
17
17
  import { QRPHDeposit } from './QRPHDeposit/QRPHDeposit.js';
18
18
  export function Deposit() {
19
- const [onMMA] = useOnMMA();
19
+ const { onMaya } = useMayaAuth();
20
20
  const { enabled } = useFeatureFlag();
21
21
  const paymentSettingsQuery = usePaymentSettingsQuery();
22
22
  const paymentSettings = paymentSettingsQuery.data;
23
23
  const enabledPaymentMethods = (() => {
24
24
  const l = [];
25
- if (onMMA) {
25
+ if (onMaya) {
26
26
  l.push('MAYA_APP');
27
27
  return l;
28
28
  }
@@ -4,8 +4,8 @@ import { useShallow } from 'zustand/shallow';
4
4
  import { useFeatureFlag } from '../../../client/hooks/useFeatureFlag.js';
5
5
  import { useGlobalStore } from '../../../client/hooks/useGlobalStore.js';
6
6
  import { useIsMayaSessionValidQuery } from '../../../client/hooks/useIsMayaSessionValidQuery.js';
7
+ import { useMayaAuth } from '../../../client/hooks/useMayaAuth.js';
7
8
  import { useMemberVerificationQuery } from '../../../client/hooks/useMemberVerificationQuery.js';
8
- import { useOnMMA } from '../../../client/hooks/useOnMMA.js';
9
9
  import { usePaymentSettingsQuery } from '../../../client/hooks/usePaymentSettingsQuery.js';
10
10
  import { useWalletQuery } from '../../../client/hooks/useWalletQuery.js';
11
11
  import { AlertCircleIcon } from '../../../icons/AlertCircleIcon.js';
@@ -22,7 +22,7 @@ import { MayaWithdrawal } from './MayaWithdrawal/MayaWithdrawal.js';
22
22
  import { PisoPayWithdrawal } from './PisoPayWithdrawal/PisoPayWithdrawal.js';
23
23
  import { VentajaWithdrawal } from './VentajaWithdrawal/VentajaWithdrawal.js';
24
24
  export function Withdrawal() {
25
- const [onMMA] = useOnMMA();
25
+ const { onMaya } = useMayaAuth();
26
26
  const { allowUnverifiedAccounts } = useDepositWithdrawalPropsContext();
27
27
  const { enabled } = useFeatureFlag();
28
28
  const walletQuery = useWalletQuery();
@@ -35,7 +35,7 @@ export function Withdrawal() {
35
35
  const memberVerification = memberVerificationQuery.data;
36
36
  const enabledPaymentMethods = (() => {
37
37
  const l = [];
38
- if (onMMA) {
38
+ if (onMaya) {
39
39
  l.push('MAYA_APP');
40
40
  return l;
41
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.0.457",
3
+ "version": "0.0.458",
4
4
  "exports": {
5
5
  "./ui/*": {
6
6
  "types": "./dist/ui/*/index.d.ts",