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 accountId = useAccountId()
|
||||||
const hasNoDeposit = !!(!assetDepositAmount && address && accountId)
|
const hasNoDeposit = !!(!assetDepositAmount && address && accountId)
|
||||||
|
|
||||||
const handleWithdraw = useCallback(() => {
|
const handleUnlend = useCallback(() => {
|
||||||
if (isAutoLendEnabledForCurrentAccount) {
|
if (isAutoLendEnabledForCurrentAccount) {
|
||||||
showAlertDialog({
|
showAlertDialog({
|
||||||
title: 'Disable Automatically Lend Assets',
|
title: 'Disable Automatically Lend Assets',
|
||||||
description:
|
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: {
|
positiveButton: {
|
||||||
onClick: () => document.getElementById(ACCOUNT_MENU_BUTTON_ID)?.click(),
|
onClick: () => document.getElementById(ACCOUNT_MENU_BUTTON_ID)?.click(),
|
||||||
text: 'Continue to Account Settings',
|
text: 'Continue to Account Settings',
|
||||||
@ -62,10 +62,10 @@ export default function LendingActionButtons(props: Props) {
|
|||||||
leftIcon={<ArrowDownLine />}
|
leftIcon={<ArrowDownLine />}
|
||||||
iconClassName={iconClassnames}
|
iconClassName={iconClassnames}
|
||||||
color='secondary'
|
color='secondary'
|
||||||
onClick={handleWithdraw}
|
onClick={handleUnlend}
|
||||||
className={buttonClassnames}
|
className={buttonClassnames}
|
||||||
>
|
>
|
||||||
Withdraw
|
Unlend
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ function LendAndReclaimModal({ currentAccount, config }: Props) {
|
|||||||
const { asset } = data
|
const { asset } = data
|
||||||
|
|
||||||
const isLendAction = action === 'lend'
|
const isLendAction = action === 'lend'
|
||||||
const actionText = isLendAction ? 'Lend' : 'Withdraw'
|
const actionText = isLendAction ? 'Lend' : 'Unlend'
|
||||||
const coinBalances = currentAccount[isLendAction ? 'deposits' : 'lends'] ?? []
|
const coinBalances = currentAccount[isLendAction ? 'deposits' : 'lends'] ?? []
|
||||||
|
|
||||||
const handleAmountChange = useCallback(
|
const handleAmountChange = useCallback(
|
||||||
|
@ -87,7 +87,7 @@ export default function createBroadcastSlice(
|
|||||||
case 'withdraw':
|
case 'withdraw':
|
||||||
toast.content.push({
|
toast.content.push({
|
||||||
coins: changes.deposits?.map((deposit) => deposit.toCoin()) ?? [],
|
coins: changes.deposits?.map((deposit) => deposit.toCoin()) ?? [],
|
||||||
text: target === 'wallet' ? 'Withdrew to Wallet' : 'Reclaimed from lends',
|
text: target === 'wallet' ? 'Withdrew to Wallet' : 'Unlent',
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user