@opexa/portal-components 0.0.343 → 0.0.344

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.
@@ -10,7 +10,7 @@ import { XIcon } from '../../icons/XIcon.js';
10
10
  import { Dialog } from '../../ui/Dialog/index.js';
11
11
  import { Portal } from '../../ui/Portal/index.js';
12
12
  import { getQueryClient } from '../../utils/getQueryClient.js';
13
- import { getMemberVerificationQueryKey } from '../../utils/queryKeys.js';
13
+ import { getAccountQueryKey, getMemberVerificationQueryKey, } from '../../utils/queryKeys.js';
14
14
  import { KYCReminder } from './KYCReminder.js';
15
15
  export function KYCSumsub(props) {
16
16
  const [open, setOpen] = useGlobalStore(useShallow((ctx) => [ctx.kyc.open, ctx.kyc.setOpen]));
@@ -109,6 +109,7 @@ export function KYCSumsub(props) {
109
109
  type,
110
110
  payload,
111
111
  });
112
+ const queryClient = getQueryClient();
112
113
  if (type === 'idCheck.onApplicantStatusChanged' &&
113
114
  isObject(payload) &&
114
115
  'reviewStatus' in payload &&
@@ -117,7 +118,7 @@ export function KYCSumsub(props) {
117
118
  isObject(payload.reviewResult) &&
118
119
  'reviewAnswer' in payload.reviewResult &&
119
120
  payload.reviewResult.reviewAnswer === 'GREEN') {
120
- getQueryClient().setQueryData(getMemberVerificationQueryKey(), (prev) => ({
121
+ queryClient.setQueryData(getMemberVerificationQueryKey(), (prev) => ({
121
122
  id: '',
122
123
  address: '',
123
124
  nationality: '',
@@ -130,6 +131,14 @@ export function KYCSumsub(props) {
130
131
  ...(prev ?? {}),
131
132
  status: 'APPROVED',
132
133
  }));
134
+ queryClient.setQueryData(getAccountQueryKey(), (prev) => {
135
+ if (!prev)
136
+ return prev;
137
+ return {
138
+ ...prev,
139
+ verified: true,
140
+ };
141
+ });
133
142
  }
134
143
  }, onError: (error) => {
135
144
  console.warn(error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.0.343",
3
+ "version": "0.0.344",
4
4
  "exports": {
5
5
  "./ui/*": {
6
6
  "types": "./dist/ui/*/index.d.ts",