Skip to content

Commit

Permalink
Merge pull request #4948 from EdgeApp/jon/fix/login-reporting
Browse files Browse the repository at this point in the history
Jon/fix/login-reporting
  • Loading branch information
Jon-edge authored Apr 2, 2024
2 parents 6479d3b + f41445b commit 77d9049
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- fixed: Properly show the Thorchain Savers unstake amount including earned amt
- fixed: Disable RBF for Thorchain Savers transactions
- fixed: Xcode 15 builds. Remove Flipper as it is deprecated anyway
- fixed: Light account reporting

## 4.3.0 (2024-03-25)

Expand Down
15 changes: 11 additions & 4 deletions src/components/scenes/UpgradeUsernameScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { UpgradeUsernameScreen } from 'edge-login-ui-rn'
import * as React from 'react'

import { useSelector } from '../../types/reactRedux'
import { useHandler } from '../../hooks/useHandler'
import { useDispatch, useSelector } from '../../types/reactRedux'
import { EdgeSceneProps } from '../../types/routerTypes'
import { logActivity } from '../../util/logger'
import { logEvent } from '../../util/tracking'
Expand All @@ -13,14 +14,20 @@ export const UpgradeUsernameScene = (props: Props) => {
const { navigation } = props
const account = useSelector(state => state.core.account)
const context = useSelector(state => state.core.context)
const dispatch = useDispatch()

const handleComplete = () => {
const handleComplete = useHandler(() => {
if (account.username != null) logActivity(`Light account backed up as: ${account.username}`)
navigation.goBack()
}
})

const handleLogEvent = useHandler((event, values) => {
dispatch(logEvent(event, values))
})

return (
<SceneWrapper hasHeader={false}>
<UpgradeUsernameScreen account={account} context={context} onComplete={handleComplete} onLogEvent={logEvent} />
<UpgradeUsernameScreen account={account} context={context} onComplete={handleComplete} onLogEvent={handleLogEvent} />
</SceneWrapper>
)
}

0 comments on commit 77d9049

Please sign in to comment.