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

chore: return nil for invalid amount of aex9 holders #1409

Merged
merged 2 commits into from
Jun 20, 2023

Conversation

jyeshe
Copy link
Member

@jyeshe jyeshe commented Jun 20, 2023

What/Why

Negative number is confusing for users: #1260 (comment)
Returns nil (for non-applicable) instead.
refs #1257

@jyeshe jyeshe self-assigned this Jun 20, 2023
@jyeshe jyeshe force-pushed the invalid_aex9_holders_amount branch from d106456 to 751f30b Compare June 20, 2023 10:33
@@ -142,7 +147,7 @@ defmodule AeMdwWeb.AexnView do
extensions: extensions,
initial_supply: initial_supply,
event_supply: event_supply,
holders: Stats.fetch_aex9_holders_count(state, contract_pk)
holders: num_holders
Copy link
Contributor

Choose a reason for hiding this comment

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

perhaps we can use nil instead, since it would be a bit confusing for it to be either a string or a number

Copy link
Member Author

Choose a reason for hiding this comment

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

The purpose is to catch user's attention as much as possible. But we can start with nil documenting it. If it continues to pop up like the balance before I change for NA.

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually another thing that would have being useful for a while, is to tag contracts as compliant or not. Opened here: #1410

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed, that would be very useful

@jyeshe jyeshe changed the title chore: return NA for invalid amount of aex9 holders chore: return nil] for invalid amount of aex9 holders Jun 20, 2023
@jyeshe jyeshe changed the title chore: return nil] for invalid amount of aex9 holders chore: return nil for invalid amount of aex9 holders Jun 20, 2023
@jyeshe jyeshe requested a review from sborrazas June 20, 2023 14:52
@jyeshe jyeshe merged commit 03ae588 into master Jun 20, 2023
@jyeshe jyeshe deleted the invalid_aex9_holders_amount branch June 20, 2023 15:05
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