Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ const OrganizationCardList = (): React.JSX.Element => {
>
<button
className="flex min-w-0 items-center gap-3 hover:cursor-pointer"
onClick={() =>
route.push(`/organizations/dashboard/${org.id}`)
}
onClick={() => route.push(`/organizations/${org.id}`)}
>
<div className="flex-shrink-0">
{org.logoUrl ? (
Expand Down Expand Up @@ -254,9 +252,7 @@ const OrganizationCardList = (): React.JSX.Element => {
}
hasWallet
? route.push('/organizations/schemas/create')
: route.push(
`/organizations/dashboard/${org.id}`,
)
: route.push(`/organizations/${org.id}`)
}}
disabled={!isAdmin}
className="rounded-md p-1"
Expand All @@ -282,7 +278,7 @@ const OrganizationCardList = (): React.JSX.Element => {
if (hasWallet) {
route.push('/organizations/schemas')
} else {
route.push(`/organizations/dashboard/${org.id}`)
route.push(`/organizations/${org.id}`)
}
}}
className="rounded-md p-1"
Expand All @@ -305,7 +301,7 @@ const OrganizationCardList = (): React.JSX.Element => {
if (hasWallet) {
route.push('/organizations/credentials')
} else {
route.push(`/organizations/dashboard/${org.id}`)
route.push(`/organizations/${org.id}`)
}
}}
>
Expand All @@ -326,7 +322,7 @@ const OrganizationCardList = (): React.JSX.Element => {
if (hasWallet) {
route.push('/organizations/verification')
} else {
route.push(`/organizations/dashboard/${org.id}`)
route.push(`/organizations/${org.id}`)
}
}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const OrganizationList = (): React.JSX.Element => {
)
}

router.push(`/organizations/dashboard/${orgId}`)
router.push(`/organizations/${orgId}`)
}
const handleCreateOrg = (): void => {
router.push('organizations/create-organization')
Expand Down Expand Up @@ -145,7 +145,7 @@ export const OrganizationList = (): React.JSX.Element => {

<div className="mx-8 grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
{loading ? (
<div className="mb-4 col-span-full grid place-items-center min-h-[50vh] w-full">
<div className="col-span-full mb-4 grid min-h-[50vh] w-full place-items-center">
<Loader />
</div>
) : organizationsList.length > 0 ? (
Expand Down
6 changes: 3 additions & 3 deletions nextjs/src/features/profile/components/EditUserProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export default function EditUserProfile({
value={formik.values.firstName}
onChange={formik.handleChange}
onBlur={formik.handleBlur}
className="w-full rounded-md p-2"
className="w-3xl rounded-md p-2"
/>
{formik.errors.firstName && formik.touched.firstName && (
<div className="mt-1 text-sm">
Expand All @@ -243,7 +243,7 @@ export default function EditUserProfile({
value={formik.values.lastName}
onChange={formik.handleChange}
onBlur={formik.handleBlur}
className="w-full rounded-md p-2"
className="w-3xl rounded-md p-2"
/>
{formik.errors.lastName && formik.touched.lastName && (
<div className="mt-1 text-sm">
Expand All @@ -270,4 +270,4 @@ export default function EditUserProfile({
</div>
</Card>
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,9 @@ const VerificationSchemasList = (): JSX.Element => {
feature={Features.CRETAE_SCHEMA}
svgComponent={createSchemaButtonTitle.svg}
onClickEvent={() => {
route.push(`${pathRoutes.organizations.dashboard}`)
route.push(
`${pathRoutes.organizations}/${organizationId}`,
)
}}
/>
)}
Expand Down
74 changes: 33 additions & 41 deletions nextjs/src/features/wallet/DedicatedAgentLedgerConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,6 @@ interface ILedgerConfigData {
}
}

// interface IValuesShared {
// seed: string;
// keyType: string;
// method: string;
// network: string;
// role: string;
// ledger: string;
// privatekey: string;
// [key: string]: string;
// }

const RequiredAsterisk = (): React.JSX.Element => (
<span className="text-destructive text-xs">*</span>
)
Expand All @@ -93,7 +82,7 @@ const DedicatedLedgerConfig = ({
const { data } = (await getLedgerConfig()) as AxiosResponse

if (data?.statusCode === apiStatusCodes.API_STATUS_SUCCESS) {
const ledgerConfigData: ILedgerConfigData = {
const dedicatedLedgerConfigData: ILedgerConfigData = {
indy: {
[`${DidMethod.INDY}`]: {},
},
Expand All @@ -114,30 +103,33 @@ const DedicatedLedgerConfig = ({
`${DidMethod.INDY}:`,
'',
)
ledgerConfigData.indy[`${DidMethod.INDY}`][formattedKey] =
value
dedicatedLedgerConfigData.indy[`${DidMethod.INDY}`][
formattedKey
] = value
}
}
}
} else if (lowerName === Ledgers.POLYGON && details) {
for (const [key, value] of Object.entries(details)) {
if (typeof value === 'object' && value !== null) {
for (const [subKey, subValue] of Object.entries(value)) {
ledgerConfigData.polygon[`${DidMethod.POLYGON}`][subKey] =
subValue
dedicatedLedgerConfigData.polygon[`${DidMethod.POLYGON}`][
subKey
] = subValue
}
} else if (typeof value === 'string') {
ledgerConfigData.polygon[`${DidMethod.POLYGON}`][key] = value
dedicatedLedgerConfigData.polygon[`${DidMethod.POLYGON}`][key] =
value
}
}
} else if (lowerName === Ledgers.NO_LEDGER.toLowerCase() && details) {
for (const [key, value] of Object.entries(details)) {
ledgerConfigData.noLedger[key] = value as string
dedicatedLedgerConfigData.noLedger[key] = value as string
}
}
})

setMappedData(ledgerConfigData)
setMappedData(dedicatedLedgerConfigData)
}
} catch (err) {
console.error('Fetch Network ERROR::::', err)
Expand All @@ -156,6 +148,26 @@ const DedicatedLedgerConfig = ({
setSelectedDid('')
}

const isSubmitDisabled = (): boolean => {
if (!selectedLedger) {
return true
} else if (
(selectedLedger === Ledgers.POLYGON && !privateKeyValue) ||
(selectedLedger === Ledgers.INDY && (!selectedMethod || !selectedNetwork))
) {
return true
} else if (
(selectedLedger === Ledgers.NO_LEDGER && !selectedMethod) ||
(selectedLedger === Ledgers.NO_LEDGER &&
selectedMethod === DidMethod.WEB &&
!domainValue)
) {
return true
}

return false
}

const handleNetworkChange = (
network: React.SetStateAction<string>,
didMethod: React.SetStateAction<string>,
Expand Down Expand Up @@ -306,26 +318,6 @@ const DedicatedLedgerConfig = ({
)
}

const isSubmitDisabled = (): boolean => {
if (!selectedLedger) {
return true
} else if (
(selectedLedger === Ledgers.POLYGON && !privateKeyValue) ||
(selectedLedger === Ledgers.INDY && (!selectedMethod || !selectedNetwork))
) {
return true
} else if (
(selectedLedger === Ledgers.NO_LEDGER && !selectedMethod) ||
(selectedLedger === Ledgers.NO_LEDGER &&
selectedMethod === DidMethod.WEB &&
!domainValue)
) {
return true
}

return false
}

const LedgerCard = ({
ledger,
title,
Expand Down Expand Up @@ -435,7 +427,7 @@ const DedicatedLedgerConfig = ({
description="Hyperledger Indy"
icon={
<Image
src="/images/Indicio.svg"
src="/images/Indicio.png"
alt="Indy Icon"
width={112}
height={112}
Expand All @@ -448,7 +440,7 @@ const DedicatedLedgerConfig = ({
description="Polygon blockchain"
icon={
<Image
src="/images/polygon.svg"
src="/images/polygon.png"
alt="Indy Icon"
width={112}
height={112}
Expand Down
2 changes: 1 addition & 1 deletion nextjs/src/features/wallet/WalletSpinupComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ const WalletSpinup = (): React.JSX.Element => {
setWalletSpinStep(6)
setWalletSpinupStatus()
}, 1000)
router.push(`/organizations/dashboard/${orgId}`)
router.push(`/organizations/${orgId}`)
// eslint-disable-next-line no-console
console.log('invitation-url-creation-success', JSON.stringify(data))
})
Expand Down
Loading