-
Notifications
You must be signed in to change notification settings - Fork 572
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
feat(IFL-2710): Show default account in account list #5589
Conversation
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.
Wow this is so simple but so needed
@@ -36,11 +36,14 @@ export class AccountsCommand extends IronfishCommand { | |||
return [] | |||
} | |||
|
|||
const defaultAccount = await client.wallet.getDefaultAccount() |
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.
I think the extra request is OK, but we could avoid it if we add some default
indicator to the response of getAccountsStatus
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.
Yea I thought of that, but it felt a little dirty to added a default flag to all account responses and have all of the default=false
and just the one to default=true
get: (row) => row.name, | ||
get: (row) => (row.name === defaultName ? `${row.name} (default)` : row.name), |
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.
Does this affect the JSON output too?
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.
For JSON, we probably want to leave the name as is, and maybe add an extra field somewhere to point to the default account
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.
It does not. But if we want it to, we should probably add a flag like hugh suggests in the RPC
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.
ie add key
{
"name": "testnet genesis",
"id": "b0557e1c-16e1-4f2b-b491-38e87422df58",
"head": {
"hash": "0000004b952bb2d7e7b0cb494d444961a05a928b839b7ba7a8707bd052073000",
"sequence": 738608,
"inChain": true
},
"scanningEnabled": true,
"viewOnly": false,
"default": true
},
f5004d0
to
026a818
Compare
Summary
defaults to showing table header so that we can display default account column as well.
Testing Plan
Documentation
Does this change require any updates to the Iron Fish Docs (ex. the RPC API
Reference)? If yes, link a
related documentation pull request for the website.
Breaking Change
Is this a breaking change? If yes, add notes below on why this is breaking and label it with
breaking-change-rpc
orbreaking-change-sdk
.