fix: rename withdraw to unlend (#557)
This commit is contained in:
parent
bb48cc2138
commit
7917d24134
@ -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>
|
||||
)}
|
||||
|
||||
|
@ -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(
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user