Skip to content

Commit

Permalink
chore: added haptic feedback on recv
Browse files Browse the repository at this point in the history
  • Loading branch information
sandipndev committed Oct 27, 2023
1 parent 847d53a commit 5ea546f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/screens/receive-bitcoin-screen/use-receive-bitcoin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { generateFutureLocalTime, secondsToH, secondsToHMS } from "./payment/hel
import { toastShow } from "@app/utils/toast"
import { useI18nContext } from "@app/i18n/i18n-react"
import fetch from "cross-fetch"
import ReactNativeHapticFeedback from "react-native-haptic-feedback"

import crashlytics from "@react-native-firebase/crashlytics"
import { Alert, Share } from "react-native"
Expand Down Expand Up @@ -265,6 +266,9 @@ export const useReceiveBitcoin = () => {
lastHash === pr.info.data.paymentHash
) {
setPR((pq) => pq && pq.setState(PaymentRequestState.Paid))
ReactNativeHapticFeedback.trigger("notificationSuccess", {
ignoreAndroidSystemSettings: true,
})
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [lastHash])
Expand Down

0 comments on commit 5ea546f

Please sign in to comment.