fix: rename withdraw to unlend (#557)

This commit is contained in:
Linkie Link 2023-10-18 09:32:48 +02:00 committed by GitHub
parent bb48cc2138
commit 7917d24134
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -33,12 +33,12 @@ export default function LendingActionButtons(props: Props) {
const accountId = useAccountId()
const hasNoDeposit = !!(!assetDepositAmount && address && accountId)
const handleWithdraw = useCallback(() => {
const handleUnlend = useCallback(() => {
if (isAutoLendEnabledForCurrentAccount) {
showAlertDialog({
title: 'Disable Automatically Lend Assets',
description:
"Your auto-lend feature is currently enabled. To recover your funds, please confirm if you'd like to disable this feature in order to continue.",
"Your auto-lend feature is currently enabled. To unlend your funds, please confirm if you'd like to disable this feature in order to continue.",
positiveButton: {
onClick: () => document.getElementById(ACCOUNT_MENU_BUTTON_ID)?.click(),
text: 'Continue to Account Settings',
@ -62,10 +62,10 @@ export default function LendingActionButtons(props: Props) {
leftIcon={<ArrowDownLine />}
iconClassName={iconClassnames}
color='secondary'
onClick={handleWithdraw}
onClick={handleUnlend}
className={buttonClassnames}
>
Withdraw
Unlend
</Button>
)}

View File

@ -32,7 +32,7 @@ function LendAndReclaimModal({ currentAccount, config }: Props) {
const { asset } = data
const isLendAction = action === 'lend'
const actionText = isLendAction ? 'Lend' : 'Withdraw'
const actionText = isLendAction ? 'Lend' : 'Unlend'
const coinBalances = currentAccount[isLendAction ? 'deposits' : 'lends'] ?? []
const handleAmountChange = useCallback(

View File

@ -87,7 +87,7 @@ export default function createBroadcastSlice(
case 'withdraw':
toast.content.push({
coins: changes.deposits?.map((deposit) => deposit.toCoin()) ?? [],
text: target === 'wallet' ? 'Withdrew to Wallet' : 'Reclaimed from lends',
text: target === 'wallet' ? 'Withdrew to Wallet' : 'Unlent',
})
break