Skip to content

Commit

Permalink
feat: remove connection notification in proof/offer over existing con…
Browse files Browse the repository at this point in the history
…nection (#1035)

Signed-off-by: wadeking98 <[email protected]>
  • Loading branch information
wadeking98 authored Nov 24, 2023
1 parent 1015519 commit 2d6bb1b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 359 deletions.
6 changes: 5 additions & 1 deletion packages/legacy/core/App/screens/CredentialOffer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import { DispatchAction } from '../contexts/reducers/store'
import { useStore } from '../contexts/store'
import { useTheme } from '../contexts/theme'
import { useTour } from '../contexts/tour/tour-context'
import { useOutOfBandByConnectionId } from '../hooks/connections'
import { BifoldError } from '../types/error'
import { TabStacks, NotificationStackParams, Screens } from '../types/navigators'
import { ModalUsage } from '../types/remove'
Expand Down Expand Up @@ -62,6 +63,7 @@ const CredentialOffer: React.FC<CredentialOfferProps> = ({ navigation, route })
const [store, dispatch] = useStore()
const { start } = useTour()
const screenIsFocused = useIsFocused()
const goalCode = useOutOfBandByConnectionId(credential?.connectionId ?? '')?.outOfBandInvitation.goalCode

const styles = StyleSheet.create({
headerTextContainer: {
Expand Down Expand Up @@ -220,7 +222,9 @@ const CredentialOffer: React.FC<CredentialOfferProps> = ({ navigation, route })
}}
>
{loading ? <RecordLoading /> : null}
<ConnectionAlert connectionID={credentialConnectionLabel} />
{credentialConnectionLabel && goalCode === 'aries.vc.issue' ? (
<ConnectionAlert connectionID={credentialConnectionLabel} />
) : null}
<View style={styles.footerButton}>
<Button
title={t('Global.Accept')}
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy/core/App/screens/ProofRequest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ const ProofRequest: React.FC<ProofRequestProps> = ({ navigation, route }) => {
const proofPageFooter = () => {
return (
<View style={[styles.pageFooter, styles.pageMargin]}>
{!loading && proofConnectionLabel && goalCode !== 'aries.vc.verify.once' ? (
{!loading && proofConnectionLabel && goalCode === 'aries.vc.verify' ? (
<ConnectionAlert connectionID={proofConnectionLabel} />
) : null}
<View style={styles.footerButton}>
Expand Down
Loading

0 comments on commit 2d6bb1b

Please sign in to comment.