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

[REPL] Implement get_account_transfers and get_account_balances #1774

Merged
merged 4 commits into from
Mar 21, 2024

Conversation

batiati
Copy link
Contributor

@batiati batiati commented Mar 21, 2024

No description provided.

\\create_transfers, or lookup_transfers. Got: '{s}'.
\\
,
"Operation must be " ++
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"Operation must be " ++
"Operation must be one of " ++

we are dropping or, so let's add one of so that it still reads naturally. Or maybe do

|operation, index|

const separator = if (index == 0) " " else if (index == Operation.len - 1) "or " 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.

Using Oxford commas 😸

result,
);

if (get_account_transfers_results.len == 0) {
Copy link
Member

Choose a reason for hiding this comment

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

Hm, but we should get no results if the account wasn't transacted against?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

likewise in lookup_accounts and lookup_transfers! I'm going to drop the word "Failed" then.

Comment on lines +416 to +418
(if (names.len > 0) ", " else "") ++
(if (index == std.enums.values(Operation).len - 1) "or " else "") ++
@tagName(operation);
Copy link
Member

Choose a reason for hiding this comment

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

What a neat way to write this!

@batiati batiati added this pull request to the merge queue Mar 21, 2024
Merged via the queue into main with commit fb4fdeb Mar 21, 2024
27 checks passed
@batiati batiati deleted the batiati-repl branch March 21, 2024 13:55
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.

None yet

2 participants