Skip to content

Commit

Permalink
add extra thing for Allbridge
Browse files Browse the repository at this point in the history
  • Loading branch information
finnian0826 committed Oct 10, 2024
1 parent 578ac1a commit 11cd46d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 2 additions & 0 deletions locales/base/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -2706,7 +2706,9 @@
"withdraw": "Withdraw",
"withdrawBottomSheet": {
"title": "Select withdraw type",
"withdrawAndClaim": "Withdraw and Claim",
"withdrawDescription": "Withdraw a specific amount of any tokens you have deposited in the pool",
"withdrawAndClaimDescription": "Withdraw a specific amount of any tokens you have deposited in the pool and claim your rewards automatically",
"claimRewards": "Claim Rewards",
"claimRewardsDescription": "Claim your rewards. Partial amounts of the reward cannot be claimed",
"claimEarnings": "Claim Earnings",
Expand Down
16 changes: 13 additions & 3 deletions src/earn/WithdrawBottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,24 @@ import { Spacing } from 'src/styles/styles'
function PartialWithdrawAction({
forwardedRef,
pool,
hasRewards,
}: {
forwardedRef: React.RefObject<BottomSheetModalRefType>
pool: EarnPosition
hasRewards: boolean
}) {
const { t } = useTranslation()

const action = {
name: WithdrawActionName.Withdraw,
title: t('earnFlow.poolInfoScreen.withdraw'),
details: t('earnFlow.poolInfoScreen.withdrawBottomSheet.withdrawDescription'),
title:
hasRewards && pool.dataProps.withdrawalIncludesClaim
? t('earnFlow.poolInfoScreen.withdrawBottomSheet.withdrawAndClaim')
: t('earnFlow.poolInfoScreen.withdraw'),
details:
hasRewards && pool.dataProps.withdrawalIncludesClaim
? t('earnFlow.poolInfoScreen.withdrawBottomSheet.withdrawAndClaimDescription')
: t('earnFlow.poolInfoScreen.withdrawBottomSheet.withdrawDescription'),
iconComponent: QuickActionsWithdraw,
onPress: () => {
AppAnalytics.track(EarnEvents.earn_select_withdraw_type, { type: 'partialWithdraw' })
Expand Down Expand Up @@ -131,7 +139,9 @@ export default function WithdrawBottomSheet({
testId={'Earn/WithdrawBottomSheet'}
>
<View style={styles.actionsContainer}>
{canPartialWithdraw && <PartialWithdrawAction forwardedRef={forwardedRef} pool={pool} />}
{canPartialWithdraw && (
<PartialWithdrawAction forwardedRef={forwardedRef} pool={pool} hasRewards={hasRewards} />
)}
{canClaim && <ClaimAction forwardedRef={forwardedRef} pool={pool} />}
<ExitAction forwardedRef={forwardedRef} pool={pool} hasRewards={hasRewards} />
</View>
Expand Down

0 comments on commit 11cd46d

Please sign in to comment.