Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
9 changes: 5 additions & 4 deletions .github/workflows/heka-wallet-build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
checkout-token: '${{ secrets.GITHUB_TOKEN }}'
checkout-fetch-depth: '0'
setup-java: 'true'
java-version: '15'
java-version: '17'
java-distribution: 'zulu'
java-cache: 'gradle'
setup-node: 'true'
Expand All @@ -51,23 +51,24 @@ jobs:

- name: Get app version
id: version
working-directory: ./app
working-directory: ./heka-wallet/app
run: echo "version=$(nbgv get-version -v NpmPackageVersion)" >> $GITHUB_OUTPUT

- name: Bundle Heka Wallet debug
run: yarn bundle-app:android:debug
env:
VERSION: ${{ steps.version.outputs.version }}

- name: Prepare artifacts
id: prepare_artifacts
run: |
mkdir "output"

cp "app/android/app/build/outputs/apk/debug/app-debug.apk" "output/heka-wallet.apk"

- name: Upload artifacts
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: Build artifacts
path: output/
path: heka-wallet/output/


21 changes: 19 additions & 2 deletions heka-identity-service-web-ui/scripts/prepare-demo-user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ async function main() {
const loginResult = await loginResponse.json();

if (!loginResponse.ok) {
console.log(`login failed: ${loginResult.error}`);
return;
}
const { access, refresh } = loginResult;
Expand All @@ -72,16 +73,29 @@ async function main() {
fields: ['name', 'surname', 'age'],
registrations: [
{
network: 'hedera',
network: 'key',
credentialFormat: 'vc+sd-jwt',
protocol: 'OpenId4VC',
},
],
};

const mdlSchema = {
name: 'mDL',
bgColor: '#1a3a5c',
fields: ['given_name', 'family_name', 'birth_date', 'age_over_18', 'document_number', 'expiry_date'],
registrations: [
{
network: 'key',
credentialFormat: 'mso_mdoc',
protocol: 'OpenId4VC',
},
],
};

params.append('userLogo', new Blob([fs.readFileSync(imagePath)]), 'user.png');
params.append('schemaLogo', schemaLogoBlob, 'schema.jpg');
params.append('schemas', JSON.stringify([schema]));
params.append('schemas', JSON.stringify([schema, mdlSchema]));

// 3. Create DID
const prepareResponse = await fetch(agencyEndpoint + '/prepare-wallet', {
Expand All @@ -99,6 +113,9 @@ async function main() {
envConfig['REACT_APP_DEMO_USER_DID'] = did;
envConfig['REACT_APP_DEMO_USER_ACCESS_TOKEN'] = access;
envConfig['REACT_APP_DEMO_USER_REFRESH_TOKEN'] = refresh;
console.log(`Demo user DID: ${did}`);
console.log(access);
console.log(refresh);

writeEnvFile(envFilePath, envConfig);
}
Expand Down
1 change: 1 addition & 0 deletions heka-identity-service-web-ui/src/app/routes/RoutePaths.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export enum ROUTES {
SIGN_IN = '/sign-in',
SIGN_UP = '/sign-up',
DEMO = '/demo',
AGE_DEMO = '/age-demo',
ISSUE_CREDENTIAL = '/issue-credential/*',
VERIFY_CREDENTIAL = '/verify-credential/*',
VERIFICATION_REQUEST = '/verify-credential/verification-request',
Expand Down
9 changes: 9 additions & 0 deletions heka-identity-service-web-ui/src/app/routes/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import ROUTES from '@/app/routes/RoutePaths';
import AuthenticatedLayout from '@/components/Layout/AuthenticatedLayout';
import UnauthenticatedLayout from '@/components/Layout/UnauthenticatedLayout';
import { getUserIsSignedIn } from '@/entities/User/model/selectors/userSelector';
import AgeVerificationDemo from '@/pages/AgeVerificationDemo/AgeVerificationDemo';
import Demo from '@/pages/Demo/Demo';
import Home from '@/pages/Home/Home';
import CredentialOffer from '@/pages/IssueCredential/CredentialOffer/CredentialOffer';
Expand Down Expand Up @@ -37,6 +38,10 @@ const AuthenticatedRoutes = () => (
path={ROUTES.DEMO}
element={<Demo />}
/>
<Route
path={ROUTES.AGE_DEMO}
element={<AgeVerificationDemo />}
/>
<Route
path={ROUTES.ISSUE_CREDENTIAL}
element={<IssueCredential />}
Expand Down Expand Up @@ -81,6 +86,10 @@ const UnauthenticatedRoutes = () => (
path={ROUTES.DEMO}
element={<Demo />}
/>
<Route
path={ROUTES.AGE_DEMO}
element={<AgeVerificationDemo />}
/>
<Route
path="*"
element={<Navigate to={ROUTES.MAIN} />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const desktopMenuItems: Array<DesktopMenuItem> = [
{
icon: <WalletIcon {...desktopIconProps} />,
title: i18next.t('Demo.titles.main'),
route: ROUTES.DEMO,
active: [ROUTES.DEMO],
route: ROUTES.MAIN,
active: [ROUTES.MAIN, ROUTES.DEMO, ROUTES.AGE_DEMO],
},
{
icon: <IssueIcon {...desktopIconProps} />,
Expand Down Expand Up @@ -83,7 +83,7 @@ export const DesktopNavigationMenu = () => {

const onNavigate = useCallback(
(route: string) => {
if (!isSignedIn && route !== ROUTES.DEMO) {
if (!isSignedIn && route !== ROUTES.MAIN) {
navigate(ROUTES.SIGN_IN);
return;
}
Expand Down Expand Up @@ -148,8 +148,8 @@ const mobileMenuItems: Array<DesktopMenuItem> = [
{
icon: <WalletIcon {...mobileIconProps} />,
title: i18next.t('Demo.titles.main'),
route: ROUTES.DEMO,
active: [ROUTES.DEMO],
route: ROUTES.MAIN,
active: [ROUTES.MAIN, ROUTES.DEMO, ROUTES.AGE_DEMO],
},
{
icon: <IssueIcon {...mobileIconProps} />,
Expand Down Expand Up @@ -189,7 +189,7 @@ export const MobileNavigationMenu = () => {

const onNavigate = useCallback(
(route: string) => {
if (!isSignedIn && route !== ROUTES.DEMO) {
if (!isSignedIn && route !== ROUTES.MAIN) {
navigate(ROUTES.SIGN_IN);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,17 @@
interface FillCredentialDataProps {
title: string;
context: IssueCredentialContext;
onPrev: () => void;
onPrev?: () => void;
onNext: (values: Record<string, string>) => void;
onSkip?: () => void;
}

export const FillCredentialData = ({
title,
context,
onPrev,
onNext,
onSkip
}: FillCredentialDataProps) => {
const { t } = useTranslation();
const dispatch: AppDispatch = useDispatch();
Expand Down Expand Up @@ -73,7 +75,7 @@
);
navigate(ROUTES.ISSUE_CREDENTIAL_TEMPLATES);
},
[navigate, dispatch, context],

Check warning on line 78 in heka-identity-service-web-ui/src/components/Steps/FillCredentialData/FillCredentialData.tsx

View workflow job for this annotation

GitHub Actions / Build and check

React Hook useCallback has a missing dependency: 'getValues'. Either include it or remove the dependency array
);

const onUpdateTemplate = useCallback(async () => {
Expand Down Expand Up @@ -159,13 +161,15 @@
</form>

<Row className={layoutCls.stepNavigation}>
<Button
buttonType="outlined"
leftIcon="arrow-back"
onPress={onPrev}
>
{t('Common.buttons.back')}
</Button>
{onPrev && (
<Button
buttonType="outlined"
leftIcon="arrow-back"
onPress={onPrev}
>
{t('Common.buttons.back')}
</Button>
)}

{context.wizardType === 'template' && !context.templateId && (
<Button
Expand Down Expand Up @@ -202,6 +206,16 @@
</Button>
)}

{(context.wizardType === 'demo') && (
<Button
buttonType="outlined"
onPress={onSkip}
>
{t('Common.buttons.skip')}
</Button>
)}


{(context.wizardType === 'issue' || context.wizardType === 'demo') && (
<Button
type="submit"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,11 @@ export const PresentationReceived = <T extends object>({
{revealedAttribute.name}
</Column>
<Column className={cls.attributeValue}>
{revealedAttribute.value}
{String(revealedAttribute.value) === 'true'
? 'Yes'
: String(revealedAttribute.value) === 'false'
? 'No'
: String(revealedAttribute.value)}
</Column>
</Row>
))}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import { WizardContext } from '@/app/types/WizardContext';
import { StepDetails } from '@/components/Steps/Step.types';
import { Schema, ProtocolType } from '@/entities/Schema';
import { CredentialFormat } from '@/entities/Schema/model/types/schema';
import i18next from '@/translations';

export interface DemoContext extends WizardContext {
protocolType: ProtocolType;
credentialType: CredentialFormat;
did: string;
network?: string;
schema?: Schema;
attributes?: Array<string>;
}

export enum DemoSteps {
IssueNewCredential = 'IssueNewCredential',
CredentialOffer = 'CredentialOffer',
RequestFieldsVerification = 'RequestFieldsVerification',
PresentationRequest = 'PresentationRequest',
}

export const totalPreparationSteps = 1;

const FillCredentialStep = {
title: i18next.t('Flow.titles.fillCredential'),
name: DemoSteps.IssueNewCredential,
next: {
title: i18next.t('Flow.buttons.issue'),
name: DemoSteps.CredentialOffer,
},
};

const CredentialOfferStep = {
title: i18next.t('Flow.titles.credentialOffer'),
name: DemoSteps.CredentialOffer,
next: {
title: i18next.t('Flow.titles.verify'),
name: DemoSteps.RequestFieldsVerification,
},
};

const RequestFieldsVerificationStep = {
title: i18next.t('Flow.titles.requestFieldsVerification'),
name: DemoSteps.RequestFieldsVerification,
next: {
title: i18next.t('Flow.buttons.request'),
name: DemoSteps.PresentationRequest,
},
};

const VerificationRequestStep = {
title: i18next.t('Flow.titles.verificationRequest'),
name: DemoSteps.PresentationRequest,
next: {
title: i18next.t('Flow.buttons.startAgain'),
name: DemoSteps.IssueNewCredential,
},
};

export const steps: Array<StepDetails<DemoContext>> = [
FillCredentialStep,
CredentialOfferStep,
RequestFieldsVerificationStep,
VerificationRequestStep,
];
Loading
Loading