@bifold/core 2.1.9 → 2.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -637,6 +637,19 @@ const ProofRequest: React.FC<ProofRequestProps> = ({ navigation, proofId }) => {
637
637
  navigation.getParent()?.navigate(TabStacks.HomeStack, { screen: Screens.Home })
638
638
  }, [navigation])
639
639
 
640
+ const callViewJSONDetails = useCallback(() => {
641
+ navigation.navigate(Stacks.ContactStack, {
642
+ screen: Screens.JSONDetails,
643
+ params: {
644
+ jsonBlob:
645
+ '"proof":' +
646
+ JSON.stringify(proof, null, 2) +
647
+ '\n"retrievedCredentials":' +
648
+ JSON.stringify(retrievedCredentials, null, 2),
649
+ },
650
+ })
651
+ }, [navigation, proof, retrievedCredentials])
652
+
640
653
  const shareDisabledErrors = useMemo(() => {
641
654
  return {
642
655
  hasCredentialError: !hasAvailableCredentials,
@@ -802,6 +815,19 @@ const ProofRequest: React.FC<ProofRequestProps> = ({ navigation, proofId }) => {
802
815
  onPress={toggleDeclineModalVisible}
803
816
  />
804
817
  </View>
818
+ {store.preferences.developerModeEnabled && (
819
+ <>
820
+ <View style={styles.footerButton}>
821
+ <Button
822
+ title={t('Global.ViewJSON')}
823
+ accessibilityLabel={t('Global.ViewJSON')}
824
+ testID={testIdWithKey('JSONDetails')}
825
+ buttonType={ButtonType.Secondary}
826
+ onPress={callViewJSONDetails}
827
+ />
828
+ </View>
829
+ </>
830
+ )}
805
831
  </>
806
832
  )}
807
833
  </>