Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: develop to qa changes #629

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
66e1a37
feat: support multiple did methods
bhavanakarwade Mar 11, 2024
c2c5f35
Merge branch 'develop' of https://github.com/credebl/studio into feat…
pranalidhanavade Mar 12, 2024
50fa053
fix: sonarcloud issues
pranalidhanavade Mar 12, 2024
a914032
fix: sonarlint issues
pranalidhanavade Mar 12, 2024
5e7eede
fix: resolved sonarlint issues
pranalidhanavade Mar 12, 2024
773ba1a
feat: support multiple did methods (#620)
bhavanakarwade Mar 12, 2024
9b0cdda
fix: resolved sonarcloud issues
pranalidhanavade Mar 12, 2024
47ed268
Merge branch 'develop' of https://github.com/credebl/studio into feat…
pranalidhanavade Mar 12, 2024
3f59ecc
Worked on the refresh token implementation
nishad-ayanworks Mar 13, 2024
860394d
Merge branch 'develop' of https://github.com/credebl/studio into auth…
nishad-ayanworks Mar 13, 2024
b73045d
removed unnecessary encryption while storing token in cookies
nishad-ayanworks Mar 14, 2024
deac1cc
cosmetic changes
nishad-ayanworks Mar 14, 2024
90b79fb
Merge pull request #624 from credebl/auth-refresh-token
nishad-ayanworks Mar 15, 2024
eb414b7
feat: did web functionality
bhavanakarwade Mar 18, 2024
ac6e30f
Handled the error validations in encrypt and decrypt of data
nishad-ayanworks Mar 18, 2024
03b517a
refactored auth.ts for encrypt and decrypt data
nishad-ayanworks Mar 18, 2024
665bfc4
Merge pull request #626 from credebl/fix-utf8-data-issue
nishad-ayanworks Mar 18, 2024
a8ebd1b
Merge pull request #623 from credebl/feat/multiple-did-methods
bhavanakarwade Mar 19, 2024
366ca13
Merge branch 'develop' of https://github.com/credebl/studio into deve…
bhavanakarwade Mar 19, 2024
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
Prev Previous commit
Next Next commit
fix: resolved sonarcloud issues
Signed-off-by: pranalidhanavade <pranali.dhanavade@ayanworks.com>
  • Loading branch information
pranalidhanavade committed Mar 12, 2024
commit 9b0cdda9f1197b5338056c575a310c2ef11a55b0
104 changes: 6 additions & 98 deletions src/components/organization/WalletSpinup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import GenerateBtnPolygon from './walletCommonComponents/GenerateBtnPolygon';
import SetPrivateKeyValue from './walletCommonComponents/SetPrivateKeyValue';
import SetDomainValueInput from './walletCommonComponents/SetDomainValueInput';
import TokenWarningMessage from './walletCommonComponents/TokenWarningMessage';
import LedgerLessMethodsComponents from './walletCommonComponents/LegderLessMethods'


interface Values {
Expand All @@ -41,7 +42,7 @@ interface Values {
network: string;
}

interface ValuesShared {
export interface ValuesShared {
keyType: string;
seed: string;
method: string;
Expand Down Expand Up @@ -436,55 +437,8 @@ const SharedAgentForm = ({
)}
{formikHandlers.values.method !== DidMethod.WEB &&
formikHandlers.values.method !== DidMethod.KEY && (
<div className="my-3 relative">
<label
htmlFor="network"
className="text-sm font-medium text-gray-900 dark:text-gray-300"
>
Network
<span className="text-red-500 text-xs">*</span>
</label>

<select
onChange={(e) => {
formikHandlers.handleChange(e);
setSelectedDid(e.target.value);
}}
value={selectedDid}
id="network"
name="network"
className="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 h-11"
>
<option value="">Select Network</option>
{formikHandlers.values.method === DidMethod.POLYGON &&
mappedData &&
Object.keys(mappedData[selectedLedger])?.map(
(network) => (
<option key={network} value={network}>
{network}
</option>
),
)}
{formikHandlers.values.method !== DidMethod.POLYGON &&
mappedData &&
selectedLedger &&
selectedNetwork &&
Object.keys(
mappedData[selectedLedger][selectedNetwork],
)?.map((network) => (
<option key={network} value={network}>
{network}
</option>
))}
</select>

{formikHandlers?.errors?.network &&
formikHandlers?.touched?.network && (
<span className="absolute botton-0 text-red-500 text-xs">
{formikHandlers?.errors?.network}
</span>
)}
</div>

< LedgerLessMethodsComponents formikHandlers={formikHandlers} setSelectedDid={(val: string) => setSelectedDid(val)} selectedDid={selectedDid} mappedData={mappedData} selectedLedger={selectedLedger} selectedNetwork={selectedNetwork} />
)}

<div className="my-3 relative">
Expand Down Expand Up @@ -733,54 +687,8 @@ const SharedAgentForm = ({
)}
{formikHandlers.values.method !== DidMethod.WEB &&
formikHandlers.values.method !== DidMethod.KEY && (
<div className="my-3 relative">
<label
htmlFor="network"
className="text-sm font-medium text-gray-900 dark:text-gray-300"
>
Network
</label>

<select
onChange={(e) => {
formikHandlers.handleChange(e);
setSelectedDid(e.target.value);
}}
value={selectedDid}
id="network"
name="network"
className="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 h-11"
>
<option value="">Select Network</option>
{formikHandlers.values.method === DidMethod.POLYGON &&
mappedData &&
Object.keys(mappedData[selectedLedger])?.map(
(network) => (
<option key={network} value={network}>
{network}
</option>
),
)}
{formikHandlers.values.method !== DidMethod.POLYGON &&
mappedData &&
selectedLedger &&
selectedNetwork &&
Object.keys(
mappedData[selectedLedger][selectedNetwork],
)?.map((network) => (
<option key={network} value={network}>
{network}
</option>
))}
</select>

{formikHandlers?.errors?.network &&
formikHandlers?.touched?.network && (
<span className="absolute botton-0 text-red-500 text-xs">
{formikHandlers?.errors?.network}
</span>
)}
</div>

< LedgerLessMethodsComponents formikHandlers={formikHandlers} setSelectedDid={(val: string) => setSelectedDid(val)} selectedDid={selectedDid} mappedData={mappedData} selectedLedger={selectedLedger} selectedNetwork={selectedNetwork} />
)}

<div className="my-3 relative">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react"
import { Button, Checkbox, Label } from 'flowbite-react';
import { Button, Label } from 'flowbite-react';

interface IProps {
generatePolygonKeyValuePair:()=>void
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
import React from "react";
import { DidMethod } from '../.././../common/enums';
import type { FormikProps } from "formik";
import type { ValuesShared } from '../WalletSpinup'

interface IProps {
formikHandlers: FormikProps<ValuesShared>;
setSelectedDid: (val: string) => void;
selectedDid: string;
mappedData: null | object;
selectedLedger: string;
selectedNetwork: string;
}

const LedgerLessMethodsComponent = ({ formikHandlers, setSelectedDid, selectedDid, mappedData, selectedLedger, selectedNetwork }: IProps) => {

return (
<div className="my-3 relative">
<label
htmlFor="network"
className="text-sm font-medium text-gray-900 dark:text-gray-300"
>
Network
<span className="text-red-500 text-xs">*</span>
</label>

<select
onChange={(e) => {
formikHandlers.handleChange(e);
setSelectedDid(e.target.value);
}}
value={selectedDid}
id="network"
name="network"
className="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500 h-11"
>
<option value="">Select Network</option>
{formikHandlers.values.method === DidMethod.POLYGON &&
mappedData &&
Object.keys(mappedData[selectedLedger])?.map(
(network) => (
<option key={network} value={network}>
{network}
</option>
),
)}
{formikHandlers.values.method !== DidMethod.POLYGON &&
mappedData &&
selectedLedger &&
selectedNetwork &&
Object.keys(
mappedData[selectedLedger][selectedNetwork],
)?.map((network) => (
<option key={network} value={network}>
{network}
</option>
))}
</select>

{formikHandlers?.errors?.network &&
formikHandlers?.touched?.network && (
<span className="absolute botton-0 text-red-500 text-xs">
{formikHandlers?.errors?.network}
</span>
)}
</div>
)

}
export default LedgerLessMethodsComponent;