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: bPrime flow functionality #131

Merged
merged 4 commits into from
Aug 19, 2024
Merged

feat: bPrime flow functionality #131

merged 4 commits into from
Aug 19, 2024

Conversation

berendsliedrecht
Copy link
Member

Signed-off-by: Berend Sliedrecht sliedrecht@berend.io

@berendsliedrecht berendsliedrecht marked this pull request as ready for review August 15, 2024 14:35
<Button.Outline
p="$0"
width="$buttonHeight"
onPress={() => setSelectedFlow(selectedFlow === 'c' ? 'bprime' : 'c')}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should use callback where the current value is passed to prevent weird inconsistencies

Suggested change
onPress={() => setSelectedFlow(selectedFlow === 'c' ? 'bprime' : 'c')}
onPress={() => setSelectedFlow((selectedFlow) => selectedFlow === 'c' ? 'bprime' : 'c')}


export type ReceivePidUseCaseState = 'id-card-auth' | 'acquire-access-token' | 'retrieve-credential' | 'error'

export class ReceivePidUseCaseBPrimeFlow {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess ok, but a lot of duplication between c and b' flow

import { useSafeAreaInsets } from 'react-native-safe-area-context'
import { ReceivePidUseCaseCFlow, type ReceivePidUseCaseState } from '../../use-cases/ReceivePidUseCaseCFlow'

export default function Screen() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be undone

@@ -0,0 +1,111 @@
import { type Key, KeyType, getJwkFromKey } from '@credo-ts/core'
import type { FullAppAgent } from '@package/agent'
import { createPinDerivedEphKeyPop, deriveKeypairFromPin } from '../crypto/bPrime'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we now have a src directory. Also how does this relate to receivePidBPrimeFlowUsecase ?

Signed-off-by: Berend Sliedrecht <sliedrecht@berend.io>
Signed-off-by: Berend Sliedrecht <sliedrecht@berend.io>
Signed-off-by: Berend Sliedrecht <sliedrecht@berend.io>
Signed-off-by: Berend Sliedrecht <sliedrecht@berend.io>
@berendsliedrecht berendsliedrecht merged commit e32da52 into main Aug 19, 2024
1 check passed
@berendsliedrecht berendsliedrecht deleted the b-prime branch August 19, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants