Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#161465877] hide buy/sell button in the equity portfolio if the acco… #379

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

guillaumedebavelaere
Copy link
Contributor

…unt doesn't contain order capabilities

https://www.pivotaltracker.com/story/show/161465877

@@ -97,6 +97,12 @@ class TradeItPortfolioEquityPositionsTableViewCell: UITableViewCell {
// MARK: private

private func updateTradeButtonVisibility() {
guard let _ = self.selectedPosition?.linkedBrokerAccount.orderCapabilities(forInstrument: TradeItTradeInstrumentType.equities) else {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a tradeable flag in the account response we don't have in the TradeItLinkedBrokerAccount. Should we add and use this flag instead of checking the capabilities?

@mitochondrion
Copy link
Contributor

@gdebavelaere @guillaumedebavelaere Does this change just hide the trade buttons or does it also disable swipe-to-trade?

@guillaumedebavelaere
Copy link
Contributor Author

@mitochondrion updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants