Conversation
…deduce selected credentials
Replace deprecated expo-file-system readAsStringAsync usage with new File(asset.localUri).base64() in DC API registration image handling.
Add an internal ScrollView to TS12 base slide so long content does not overflow, keep footer actions pinned, improve payment header wrapping, and add __DEV__ table test rows (short/one-line/multiline).
For horizontal table rows, keep dense key/value when it fits, switch to stacked layout when rendered content wraps, keep right-side value box intrinsic-width and right-aligned, and justify text in fallback mode.
|
|
||
| useEffect(() => { | ||
| const handleAppStateChange = (nextAppState: AppStateStatus) => { | ||
| if (nextAppState === 'active') { |
There was a problem hiding this comment.
This was required as the DC API VCI flow did not update the store in the main activity on all androids, this ensures that does not happen
| } catch { | ||
| return await readAssetAsBase64(logger, asset) | ||
| } |
There was a problem hiding this comment.
This catch is kinda useless right as the outer catch does the same?
There was a problem hiding this comment.
i haven't had time to review all the trash code myself, i will spend time to clean up all these features in the near future
| try { | ||
| const base64 = await new File(asset.localUri).base64() | ||
| if (!base64) return undefined | ||
| const mime = getImageMimeFromUri(asset.localUri) |
There was a problem hiding this comment.
Why do we load from uri instead of the file itself?
Not all images have extension
| import { isParadymWallet } from '@easypid/hooks/useFeatureFlag' | ||
| import { commonMessages } from '@package/translations' | ||
| import { sanitizeString } from '@package/utils' | ||
| import { ImageFormat, Skia } from '@shopify/react-native-skia' |
There was a problem hiding this comment.
I think we can remove the dependency as well then?
| onLayout={(event) => { | ||
| if (!scrollViewHeight) setScrollViewHeight(event.nativeEvent.layout.height) | ||
| }} | ||
| btw="$0.5" | ||
| borderColor={isScrolledByOffset ? '$grey-200' : '$background'} | ||
| > | ||
| <ScrollView | ||
| onScroll={handleScroll} | ||
| scrollEventThrottle={scrollEventThrottle} | ||
| contentContainerStyle={{ gap: '$4' }} | ||
| px="$4" | ||
| mx="$-4" | ||
| pt="$4" | ||
| maxHeight={scrollViewHeight} |
There was a problem hiding this comment.
Why do we need the onLayout and scrollViewHeight. Usually dynamic height for the component is better (so not setting max height but relying on flex)
| variant === 'horizontal' && typeof horizontalAttribute === 'string' && typeof horizontalValue === 'string' | ||
|
|
||
| useEffect(() => { | ||
| if (variant === 'horizontal') { |
There was a problem hiding this comment.
Why do we need all this complexity? In main we have added a way to collapse long attribute rows, can we use that instead? Can we simplify this a bit (e.g. just normal and compact layout options)
| step: `ts12-payment-${index}`, | ||
| progress, | ||
| screen: ( | ||
| <Ts12PaymentSlide |
There was a problem hiding this comment.
We don't use this slide anymore then?
I think in general we should restructure the flow to just show everything on a single page, and you can click to see more detail for each (qes, payments, credentials).
That's a bigger refactor, and we should make in main first.
There was a problem hiding this comment.
this is temporary and depends on the Matcher, the matcher should be able to display the payment, and if it does this screen shouldn't be shown
1. DC API flow and selection handling
2. Credential/agent correctness
3. TS12 UX improvements
4. Minor polish