Skip to content

Commit 35c5de2

Browse files
committed
fixup! Update CTA to finish incomplete KYCs
Pass onComplete/onClose directly to onPress, dropping the handler wrappers. Per PR comment: #5916 (comment)
1 parent 2c0b096 commit 35c5de2

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

src/components/scenes/RampPendingScene.tsx

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import * as React from 'react'
22
import { ActivityIndicator, View } from 'react-native'
33

44
import { useBackEvent } from '../../hooks/useBackEvent'
5-
import { useHandler } from '../../hooks/useHandler'
65
import { lstrings } from '../../locales/strings'
76
import type { EdgeAppSceneProps } from '../../types/routerTypes'
87
import { makePeriodicTask } from '../../util/PeriodicTask'
@@ -107,14 +106,6 @@ export const RampPendingScene: React.FC<Props> = props => {
107106
// Handle back navigation
108107
useBackEvent(navigation, onCancel)
109108

110-
const handleClose = useHandler(() => {
111-
onClose()
112-
})
113-
114-
const handleComplete = useHandler(() => {
115-
onComplete?.()
116-
})
117-
118109
return (
119110
<SceneWrapper hasTabs>
120111
<SceneContainer headerTitle={title}>
@@ -140,18 +131,18 @@ export const RampPendingScene: React.FC<Props> = props => {
140131
<SceneButtons
141132
primary={{
142133
label: lstrings.ramp_kyc_complete_button,
143-
onPress: handleComplete
134+
onPress: onComplete
144135
}}
145136
secondary={{
146137
label: lstrings.string_cancel_cap,
147-
onPress: handleClose
138+
onPress: onClose
148139
}}
149140
/>
150141
) : (
151142
<SceneButtons
152143
primary={{
153144
label: lstrings.string_close_cap,
154-
onPress: handleClose
145+
onPress: onClose
155146
}}
156147
/>
157148
))}

0 commit comments

Comments
 (0)