diff --git a/Multisig/UI/ClaimToken/ClaimingAmountViewController/ClaimTokensViewController.swift b/Multisig/UI/ClaimToken/ClaimingAmountViewController/ClaimTokensViewController.swift index 2158ee83d..17c35b016 100644 --- a/Multisig/UI/ClaimToken/ClaimingAmountViewController/ClaimTokensViewController.swift +++ b/Multisig/UI/ClaimToken/ClaimingAmountViewController/ClaimTokensViewController.swift @@ -365,6 +365,7 @@ extension ClaimTokensViewController: UITableViewDelegate, UITableViewDataSource inputAmount = cell.value claimButton.isEnabled = (error == nil) && claimButtonEnabled } + cell.set(redeemDeadlineLabelVisible: !data.isRedeemed) return cell case .selectedDelegate: @@ -384,6 +385,8 @@ extension ClaimTokensViewController: UITableViewDelegate, UITableViewDataSource var totalValue: String var availableRange: Range + + var isRedeemed: Bool } func displayValues(from claimData: ClaimingAppController.ClaimingData) -> DisplayValues { @@ -409,6 +412,8 @@ extension ClaimTokensViewController: UITableViewDelegate, UITableViewDataSource ) } + let isRedeemed = claimData.isRedeemed + // components and total of vested amount let userVestedAmount: Sol.UInt128? = claimData.availableAmount(for: userAllocation, at: timestamp) let ecoVestedAmount: Sol.UInt128? = claimData.availableAmount(for: ecosystemAllocation, at: timestamp) @@ -486,7 +491,8 @@ extension ClaimTokensViewController: UITableViewDelegate, UITableViewDataSource unvestedAmountTooltip: unvestedAmountTooltip, unvestedStyle: lightBoxStyle, totalValue: allocationText, - availableRange: availableRange + availableRange: availableRange, + isRedeemed: isRedeemed ) } diff --git a/Multisig/UI/ClaimToken/ClaimingAmountViewController/ClaimedAmountInputCell.swift b/Multisig/UI/ClaimToken/ClaimingAmountViewController/ClaimedAmountInputCell.swift index 577302287..45f08442f 100644 --- a/Multisig/UI/ClaimToken/ClaimingAmountViewController/ClaimedAmountInputCell.swift +++ b/Multisig/UI/ClaimToken/ClaimingAmountViewController/ClaimedAmountInputCell.swift @@ -11,9 +11,11 @@ import UIKit class ClaimedAmountInputCell: UITableViewCell { @IBOutlet private weak var titleLabel: UILabel! @IBOutlet private weak var descriptionLabel: UILabel! + @IBOutlet private weak var redeemWarningLabel: UILabel! @IBOutlet private weak var amountTextField: TokenAmountField! private var maxButton: UIButton! + private let fieldDelegate = TokenAmountTextDelegate() var didEndValidating: (_ error: String?) -> Void = { _ in } { @@ -44,6 +46,8 @@ class ClaimedAmountInputCell: UITableViewCell { descriptionLabel.text = "Select all tokens or custom amount." descriptionLabel.setStyle(.secondary) + redeemWarningLabel.setStyle(.footnote2.color(UIColor(hex: "#B2BBC0"))) + amountTextField.setToken(image: UIImage(named: "ico-safe-token-logo-circle")) maxButton = UIButton(type: .custom) @@ -61,6 +65,9 @@ class ClaimedAmountInputCell: UITableViewCell { fieldDelegate.setMaxValue() } + func set(redeemDeadlineLabelVisible: Bool) { + redeemWarningLabel.isHidden = !redeemDeadlineLabelVisible + } } import Solidity diff --git a/Multisig/UI/ClaimToken/ClaimingAmountViewController/ClaimedAmountInputCell.xib b/Multisig/UI/ClaimToken/ClaimingAmountViewController/ClaimedAmountInputCell.xib index b088447c1..95cf1379c 100644 --- a/Multisig/UI/ClaimToken/ClaimingAmountViewController/ClaimedAmountInputCell.xib +++ b/Multisig/UI/ClaimToken/ClaimingAmountViewController/ClaimedAmountInputCell.xib @@ -11,35 +11,35 @@ - - + + - + - + - + - - + + @@ -48,9 +48,19 @@ + + + + @@ -64,9 +74,10 @@ + - +