Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jon/fix/login-reporting #4948

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
)
}
Loading