Skip to content

Commit

Permalink
Fix Send All button logic, while sending ccd's (#412)
Browse files Browse the repository at this point in the history
## Purpose

The Send All button currently does not trigger the logic chain needed to
update its state.


## Changes

Added functionality to update the Send button state after the amount to
send value is changed.
  • Loading branch information
ramakser authored Sep 4, 2024
1 parent 057d1ed commit 71262f1
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,10 @@ class SendFundPresenter: SendFundPresenterProtocol {
totalAmount = (GTU(intValue: disposalAmount) - cost).displayValue()
}
self.viewModel.sendAllAmount = totalAmount

let newAmount = SendFundsAmount.ccd(token: GTU(intValue: disposalAmount) - cost)
self.viewModel.enteredAmount = .success(newAmount)

self.cost = cost
self.energy = value.energy
let feeMessage = "sendFund.feeMessage".localized + cost.displayValue()
Expand Down

0 comments on commit 71262f1

Please sign in to comment.