@@ -383,7 +387,7 @@ const SharedAgentForm = ({
{mappedData && selectedLedger && mappedData[selectedLedger] &&
Object.keys(mappedData[selectedLedger])?.map(
(ledger) => (
-
+
),
)}
@@ -912,11 +916,11 @@ const WalletSpinup = (props: {
const submitSharedWallet = async (
values: ValuesShared,
- privateKey: string,
+ privatekey: string,
domain: string,
endPoint: string,
) => {
- const polygonPrivateKey = privateKey.slice(2);
+ const polygonPrivateKey = privatekey.slice(2);
setLoading(true);
const payload = {
keyType: values.keyType || 'ed25519',
diff --git a/src/components/organization/walletCommonComponents/LegderLessMethods.tsx b/src/components/organization/walletCommonComponents/LegderLessMethods.tsx
index 56b5cc895..92178be62 100644
--- a/src/components/organization/walletCommonComponents/LegderLessMethods.tsx
+++ b/src/components/organization/walletCommonComponents/LegderLessMethods.tsx
@@ -15,56 +15,54 @@ interface IProps {
const LedgerLessMethodsComponent = ({ formikHandlers, setSelectedDid, selectedDid, mappedData, selectedLedger, selectedNetwork }: IProps) => {
return (
-
-
+
+
-
+
- {formikHandlers?.errors?.network &&
- formikHandlers?.touched?.network && (
-
- {formikHandlers?.errors?.network}
-
- )}
-
- )
+ {formikHandlers?.errors?.network &&
+ formikHandlers?.touched?.network && (
+
+ {formikHandlers?.errors?.network}
+
+ )}
+
+ );
}
export default LedgerLessMethodsComponent;
\ No newline at end of file
diff --git a/src/components/organization/walletCommonComponents/SetDomainValueInput.tsx b/src/components/organization/walletCommonComponents/SetDomainValueInput.tsx
index c99d60e10..e99d02c69 100644
--- a/src/components/organization/walletCommonComponents/SetDomainValueInput.tsx
+++ b/src/components/organization/walletCommonComponents/SetDomainValueInput.tsx
@@ -1,29 +1,44 @@
-import React from "react"
import {Label } from 'flowbite-react';
-import { Field} from 'formik';
-
+import { Field } from 'formik';
interface IProps {
setDomainValue:(val:string)=>void
domainValue:string
-}
+ formikHandlers: {
+ handleChange: (e: React.ChangeEvent
) => void;
+ handleBlur: (e: React.FocusEvent) => void;
+ };
+ }
-const SetDomainValueInput = ({ setDomainValue, domainValue }: IProps) => (
- <>
-
- setDomainValue(e.target.value)}
- placeholder="Please enter domain"
- />
- >
-)
+ const SetDomainValueInput = ({
+ setDomainValue,
+ domainValue,
+ formikHandlers,
+ }: IProps) => (
+ <>
+
+ {
+ setDomainValue(e.target.value);
+ formikHandlers.handleChange(e);
+ }}
+ onBlur={formikHandlers.handleBlur}
+ placeholder="Please enter domain"
+ />
+
+ {formikHandlers.errors?.domain &&
+ formikHandlers.touched?.domain &&
+ formikHandlers.errors.domain}
+
+ >
+ );
export default SetDomainValueInput;
\ No newline at end of file
diff --git a/src/components/organization/walletCommonComponents/SetPrivateKeyValue.tsx b/src/components/organization/walletCommonComponents/SetPrivateKeyValue.tsx
index 5da06d06b..ba987dca8 100644
--- a/src/components/organization/walletCommonComponents/SetPrivateKeyValue.tsx
+++ b/src/components/organization/walletCommonComponents/SetPrivateKeyValue.tsx
@@ -1,29 +1,43 @@
-import React from "react"
import {Label } from 'flowbite-react';
import { Field} from 'formik';
-
-
interface IProps {
setPrivateKeyValue:(val:string)=>void
privateKeyValue:string
+ formikHandlers: {
+ handleChange: (e: React.ChangeEvent) => void;
+ handleBlur: (e: React.FocusEvent) => void;
+ };
}
-const SetPrivateKeyValue = ({setPrivateKeyValue, privateKeyValue}:IProps) =>(
- <>
-
- setPrivateKeyValue(e.target.value)}
- placeholder="Enter private key"
- />
->
-)
-export default SetPrivateKeyValue;
\ No newline at end of file
+const SetPrivateKeyValueInput = ({
+ setPrivateKeyValue,
+ privateKeyValue,
+ formikHandlers,
+}: IProps) => (
+ <>
+
+ {
+ setPrivateKeyValue(e.target.value);
+ formikHandlers.handleChange(e);
+ }}
+ onBlur={formikHandlers.handleBlur}
+ placeholder="Enter private key"
+ />
+
+ {formikHandlers.errors?.privatekey &&
+ formikHandlers.touched?.privatekey &&
+ formikHandlers.errors.privatekey}
+
+ >
+);
+export default SetPrivateKeyValueInput;
\ No newline at end of file
diff --git a/src/config/ecosystem.ts b/src/config/ecosystem.ts
index 44603de7d..f3e5e93a9 100644
--- a/src/config/ecosystem.ts
+++ b/src/config/ecosystem.ts
@@ -38,14 +38,19 @@ const getOrgId = async () => {
return id;
};
-const getUserProfile = async () => {
- const userProfile = await getFromLocalStorage(storageKeys.USER_PROFILE);
- const userDetails = userProfile && (await JSON.parse(userProfile));
- return userDetails;
+export const getUserProfile = async () => {
+ try {
+ const userProfile = await getFromLocalStorage(storageKeys.USER_PROFILE);
+ const userDetails = userProfile && (await JSON.parse(userProfile));
+ return userDetails;
+ } catch (err) {
+
+ }
};
const checkEcosystem = async (): Promise => {
await getEcosystemId();
+
const userData = await getUserProfile();
const role = await getEcosystemRole();
@@ -72,12 +77,11 @@ const getEcosystemId = async (): Promise => {
try {
if (orgId) {
const { data } = (await getEcosystems(orgId)) as AxiosResponse;
-
if (
data?.statusCode === apiStatusCodes.API_STATUS_SUCCESS &&
- data?.data?.ecosystemDetails?.length > 0
+ data?.data?.ecosystemList?.length > 0
) {
- const response = data?.data.ecosystemDetails[0];
+ const response = data?.data.ecosystemList[0];
const id = response?.id;
const role =
response?.ecosystemOrgs &&