-
Notifications
You must be signed in to change notification settings - Fork 456
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
Conversation
\\create_transfers, or lookup_transfers. Got: '{s}'. | ||
\\ | ||
, | ||
"Operation must be " ++ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"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 ","
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
(if (names.len > 0) ", " else "") ++ | ||
(if (index == std.enums.values(Operation).len - 1) "or " else "") ++ | ||
@tagName(operation); |
There was a problem hiding this comment.
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!
No description provided.