Skip to content

Commit

Permalink
fix: remove use of prepareConsolidateOutputs in vesting because it lo…
Browse files Browse the repository at this point in the history
…cks outputs (#7784)
  • Loading branch information
begonaalvarezd authored Dec 13, 2023
1 parent 9c4866e commit 6e0907c
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions packages/desktop/views/dashboard/vesting/Vesting.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,10 @@
let modal: Modal
let timeUntilNextPayout = DEFAULT_EMPTY_VALUE_STRING
let minRequiredStorageDeposit: number | null
let hasOutputsToConsolidate = false
$: ({ baseCoin } = $selectedAccountAssets[$activeProfile?.network?.id])
$: hasTransactionInProgress =
$selectedAccount?.isTransferring || $selectedAccount.hasConsolidatingOutputsTransactionInProgress
$: $selectedAccount, areOutputsReadyForConsolidation()
$: vestingOverview = [
{
title: localize('views.vesting.overview.unlocked'),
Expand All @@ -71,20 +69,12 @@
$selectedAccountVestingUnclaimedFunds > 0 &&
!hasTransactionInProgress &&
minRequiredStorageDeposit !== null &&
$selectedAccount?.balances?.baseCoin?.available > minRequiredStorageDeposit &&
hasOutputsToConsolidate
$selectedAccount?.balances?.baseCoin?.available > minRequiredStorageDeposit
onMount(() => {
getMinRequiredStorageDeposit()
})
function areOutputsReadyForConsolidation(): void {
$selectedAccount
.prepareConsolidateOutputs({ force: false, outputThreshold: 2 })
.then(() => (hasOutputsToConsolidate = true))
.catch(() => (hasOutputsToConsolidate = false))
}
function getMinRequiredStorageDeposit() {
getRequiredStorageDepositForMinimalBasicOutput()
.then((deposit) => (minRequiredStorageDeposit = deposit))
Expand Down

0 comments on commit 6e0907c

Please sign in to comment.