Skip to content

Commit

Permalink
feat: added haptic feedbackto mobile verifier (#1009)
Browse files Browse the repository at this point in the history
Signed-off-by: wadeking98 <[email protected]>
Signed-off-by: Wade King <[email protected]>
  • Loading branch information
wadeking98 authored Oct 27, 2023
1 parent 0e2e102 commit 4406121
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/legacy/core/App/screens/ProofRequesting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,16 @@ import { useIsFocused } from '@react-navigation/core'
import { useFocusEffect } from '@react-navigation/native'
import React, { useCallback, useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { BackHandler, DeviceEventEmitter, useWindowDimensions, ScrollView, StyleSheet, Text, View } from 'react-native'
import {
BackHandler,
DeviceEventEmitter,
useWindowDimensions,
ScrollView,
StyleSheet,
Text,
View,
Vibration,
} from 'react-native'
import { SafeAreaView } from 'react-native-safe-area-context'

import {
Expand Down Expand Up @@ -158,6 +167,8 @@ const ProofRequesting: React.FC<ProofRequestingProps> = ({ route, navigation })
useEffect(() => {
const sendAsyncProof = async () => {
if (record && record.state === DidExchangeState.Completed) {
//send haptic feedback to verifier that connection is completed
Vibration.vibrate()
// send proof logic
const result = await sendProofRequest(agent, template, record.id, predicateValues)
if (result?.proofRecord) {
Expand Down

0 comments on commit 4406121

Please sign in to comment.