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

fix(wallet-mobile): tx review collateral and staking ctas #3778

Merged
merged 1 commit into from
Jan 7, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const ManageCollateralScreen = () => {
const {openModal, closeModal} = useModal()
const strings = useStrings()
const balances = useBalances(wallet)
const {navigateToTxReview} = useWalletNavigation()
const {navigateToTxReview, resetToTxHistory} = useWalletNavigation()
const {unsignedTxChanged} = useReviewTx()
const lockedAmount = asQuantity(wallet.primaryBreakdown.lockedAsStorageCost.toString())

Expand All @@ -79,6 +79,7 @@ export const ManageCollateralScreen = () => {
const onSuccess = (signedTx: YoroiSignedTx) => {
const collateralId = `${signedTx.signedTx.id}:0`
setCollateralId(collateralId)
resetToTxHistory()
}

const createCollateralTransaction = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ import {SafeArea} from '../../../components/SafeArea'
import {Space} from '../../../components/Space/Space'
import {Spacer} from '../../../components/Spacer/Spacer'
import {FailedTxIcon} from '../../../features/ReviewTx/illustrations/FailedTxIcon'
import {useBlockGoBack} from '../../../kernel/navigation'
import {useNavigateTo} from '../Dashboard'
import {useBlockGoBack, useWalletNavigation} from '../../../kernel/navigation'

export const FailedTxScreen = () => {
useBlockGoBack()
const {styles} = useStyles()
const strings = useStrings()
const navigateTo = useNavigateTo()

const {resetToTxHistory} = useWalletNavigation()

return (
<SafeArea style={styles.root}>
Expand All @@ -34,7 +34,7 @@ export const FailedTxScreen = () => {
<Space fill />

<Actions>
<Button onPress={navigateTo.stakingCenter} title={strings.failedTxButton} style={styles.button} />
<Button onPress={resetToTxHistory} title={strings.failedTxButton} style={styles.button} />
</Actions>
</SafeArea>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,13 @@ import {SafeArea} from '../../../components/SafeArea'
import {Space} from '../../../components/Space/Space'
import {Spacer} from '../../../components/Spacer/Spacer'
import {SuccessfulTxIcon} from '../../../features/ReviewTx/illustrations/SuccessfulTxIcon'
import {useBlockGoBack} from '../../../kernel/navigation'
import {useNavigateTo} from '../Dashboard'
import {useBlockGoBack, useWalletNavigation} from '../../../kernel/navigation'

export const SubmittedTxScreen = () => {
useBlockGoBack()
const strings = useStrings()
const {styles} = useStyles()
const navigateTo = useNavigateTo()
const {resetToTxHistory} = useWalletNavigation()

return (
<SafeArea style={styles.root}>
Expand All @@ -34,7 +33,7 @@ export const SubmittedTxScreen = () => {
<Space fill />

<Actions>
<Button onPress={navigateTo.submittedTx} title={strings.submittedTxButton} style={styles.button} />
<Button onPress={resetToTxHistory} title={strings.submittedTxButton} style={styles.button} />
</Actions>
</SafeArea>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"start": {
"line": 91,
"column": 17,
"index": 2311
"index": 2296
},
"end": {
"line": 94,
"column": 3,
"index": 2408
"index": 2393
}
},
{
Expand All @@ -21,12 +21,12 @@
"start": {
"line": 95,
"column": 16,
"index": 2426
"index": 2411
},
"end": {
"line": 98,
"column": 3,
"index": 2578
"index": 2563
}
},
{
Expand All @@ -36,12 +36,12 @@
"start": {
"line": 99,
"column": 18,
"index": 2598
"index": 2583
},
"end": {
"line": 102,
"column": 3,
"index": 2688
"index": 2673
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,44 @@
"defaultMessage": "!!!Transaction signed",
"file": "src/legacy/Dashboard/ShowSubmittedTxScreen/SubmittedTxScreen.tsx",
"start": {
"line": 92,
"line": 91,
"column": 20,
"index": 2375
"index": 2361
},
"end": {
"line": 95,
"line": 94,
"column": 3,
"index": 2476
"index": 2462
}
},
{
"id": "components.delegation.submittedTx.text",
"defaultMessage": "!!!It will show up in the transaction list once it's confirmed by the network.",
"file": "src/legacy/Dashboard/ShowSubmittedTxScreen/SubmittedTxScreen.tsx",
"start": {
"line": 96,
"line": 95,
"column": 19,
"index": 2497
"index": 2483
},
"end": {
"line": 99,
"line": 98,
"column": 3,
"index": 2654
"index": 2640
}
},
{
"id": "components.delegation.submittedTx.button",
"defaultMessage": "!!!Close",
"file": "src/legacy/Dashboard/ShowSubmittedTxScreen/SubmittedTxScreen.tsx",
"start": {
"line": 100,
"line": 99,
"column": 21,
"index": 2677
"index": 2663
},
"end": {
"line": 103,
"line": 102,
"column": 3,
"index": 2766
"index": 2752
}
}
]
Loading