Skip to content

Commit

Permalink
feat(withdraw lock): added singularity for days
Browse files Browse the repository at this point in the history
  • Loading branch information
milan-bc committed Nov 25, 2020
1 parent 083b41b commit 49befed
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1415,6 +1415,7 @@ type MessagesType = {
'modals.wallet.welcome.sb.skip': 'Skip'
'modals.wallet.welcome.sb.title': 'Own Crypto in a Few Minutes'
'modals.wallet.welcome.sb.verifybuy': 'Verify your identity and buy crypto.'
'modals.withdraw.tooltip_info_day': 'The remaining balance will be available to be withdrawn within 1 day.'
'modals.withdraw.tooltip_info': 'The remaining balance will be available to be withdrawn within {days} days.'
'modals.withdraw.available_for_withdrawal': 'Available to Withdraw'
'modals.withdraw.lock_description': "You have {locks} pending transactions. We’ll email you when these funds become available for withdrawal. <a href='https://support.blockchain.com/hc/en-us/articles/360048200392-Why-can-t-I-withdraw-my-crypto-' rel='noopener noreferrer' target='_blank'>Learn more.</a>"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1159,11 +1159,18 @@ export const getAlertContent = (message, data = undefined) => {
)
case C.LOCKED_WITHDRAW_ERROR:
return buildMessageTemplate(
<FormattedMessage
id='copy.error.locked_withdraw_error'
defaultMessage='Your crypto will be available to be withdrawn within {days} days.'
values={data}
/>
data === 0 || data === 1 ? (
<FormattedMessage
id='modals.withdraw.tooltip_info_day'
defaultMessage='The remaining balance will be available to be withdrawn within 1 day.'
/>
) : (
<FormattedMessage
id='copy.error.locked_withdraw_error'
defaultMessage='Your crypto will be available to be withdrawn within {days} days.'
values={data}
/>
)
)
default:
return buildMessageTemplate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,18 @@ const LockTime = (props: Props) => {
</TooltipHost>
</TooltipWrapper>
<Tooltip id='info_tooltip'>
<FormattedMessage
id='modals.withdraw.tooltip_info'
defaultMessage='The remaining balance will be available to be withdrawn within {days} days.'
values={{ days: lockTime }}
/>
{lockTime === 0 || lockTime === 1 ? (
<FormattedMessage
id='modals.withdraw.tooltip_info_day'
defaultMessage='The remaining balance will be available to be withdrawn within 1 day.'
/>
) : (
<FormattedMessage
id='modals.withdraw.tooltip_info'
defaultMessage='The remaining balance will be available to be withdrawn within {days} days.'
values={{ days: lockTime }}
/>
)}
</Tooltip>
</>
)
Expand Down

0 comments on commit 49befed

Please sign in to comment.