Closed denisshevchenko closed 5 years ago
Examples.
Account
:
Account
wallet id: J7rQqaLLHBFPrgJXwpktaMB1B1kQBXAyc2uRSfRPzNVGiv6TdxBzkPNBUWysZZZdhFG9gRy3sQFfX5wfpLbi4XTFGFxTg
account ix: 3755322298
name: My account
amount: 20386305505538375 coin(s)
addresses:
- CawzSa5gGrus3k45aV2jtQduhCV28mCmJT9xrzXPuoXqbrLDUibbNU4qDXHXC9c8BTFGMpV5GY3C3BJqgB1ziNV984mCK2xGfaqjSFFpQfbAJCTwYkKjWqQkAELUhHsDGiWfQJ4Fi5LPvim4WmaBFebGwSVxdNo26oFG6jsX9ou2RSDa9PkbvzRHSVc
CnBcgVKQfw4qt9dHJqLRNUQKAPiWqvmPWCeqdsj93hmjtLo1AnievFsrQmiW6uHZHdEDugt4EHxsoenn7bM5DLgzPUcsarYbrkdmR8HXeUWoD2yDD3emfzg9KB9L97ziigAs8SwtDb1Vv3kgKYZyCkJUJscmHECpMm1SkBN1nUHEb3WziCBMbMaw6SZKQNp
jUzE3J7hy6tzTLbGT3ZGttAJwyoag8vEh8EyjcQp3xCPr58HyJ6hZVxsGEFjD9DpdporZxWkS27Rnr78EekB9En6UXtDLFVrakQZSS2HUXAjj6YJwAY9YxX4FLodBXUP8TtpxoarmnouPrSaeYXCvbvPakAJ47HfQ2r5iGzPpqkMNXkApJMg2ubXsbaJMat
jKy713NdMeKqwj3YJG9BArnHwDEsxW2YRtSL25CXg1ahXoMKVsZNL7F441nMdJuuaUrwrKjwgps1HkEeQQ3aG6f4uUbzbEWJdZD7fjgbPtT3KVGTtFfNYFbmcdDJqCQqNbPTLXP9JZrZkioRXpJGQ6cpp2JqiohQztg64P92szmJxgdW8GCkSifB4e4WEPm
GzJi3, is it used: True
- EqGAuA8vHnP6WYqo2yyyP3C125KDeRKePvaNYQvAnNeEbjR4e9z4omhyqowJ3KcfT4ePojYnFm1dgJjhSiG8qsbwaCdrhUy9i9CG2HjrtyHAMazyrn2QPgk, is it used: False
- MWPZVzgZ6dAAcCDmXJ9WYYS6i4RZAWR9uZQq66RkV9QLwzH2dJYevSrkWiUKDzvBpcGPmYxnrqkxwteRCywHZQGp5FzEFnBsgpRyazzHBDHWwAmF9dDuPxeqUEK, is it used: True
NewAccount
:
New account, name: New Awesome Account
AccountUpdate
:
Account update, new name: myAccount
@denisshevchenko two suggestions:
Truncate wallet id and addresses for two reasons: we are mostly not interested in the whole address for debugging, but only a few bits that allow us to identify addresses across logs. There's a "buildTruncate" available in the util I initially pushed exactly for that. We can get rid of the lot of the verbosity coming from showing the whole address and ids, and still make it fairly useful. At the scale of a wallet, there's likely no conflict across the first and last 6/8 characters, so that's enough to only display them. Plus, we keep a bit of privacy this way :)
Move the "is Used" in the front, so that, we don't have to go to the end of the address to get this information. Rule of thumb: put short info first, long stuff at the end.
@KtorZ Fixed:
Account
wallet id: J7rQqaLL...XTFGFxTg
account ix: 3139695979
name: My account
amount: 33134975781379030 coin(s)
addresses:
- is it used: False, address: CTq1H3qg...Y9okjnD9
- is it used: False, address: KjgoiXJS...odxR3cdi
- is it used: False, address: dA2W35xz...JvDgDTbA
- is it used: True, address: 2657WMsD...PcCStT2P
- is it used: True, address: 6ZpAokhB...zPxoa4dZ
- is it used: False, address: XBWXRVet...QGkSuivT
- is it used: False, address: 2LVFzKRz...zxEfRTVN
- is it used: True, address: 5oP9ib6y...ByPY1Fqn
- is it used: True, address: T2aD4gC6...983SSqBE
- is it used: False, address: 5aZzL25E...teSzjwfK
Nicer! What about pushing the readability even further an change "is it used: False" and "is it used: True" simply by: "Used" and "Not used" ?
Same for the address: ...
if feels superfluous, we know it's a list of address :)
An example of output:
Account (My Account)
parent id: J7rQqaLL...XTFGFxTg
index: 3139695979
balance: 33134975781379030 coin(s)
addresses:
- used | CTq1H3qg...Y9okjnD9
- unused | KjgoiXJS...odxR3cdi
- unused | dA2W35xz...JvDgDTbA
- used | 2657WMsD...PcCStT2P
- unused | 6ZpAokhB...zPxoa4dZ
Currently it is:
Account (My account)
wallet id: J7rQqaLL...XTFGFxTg
account index: 2903024061
amount: 30360279057204256 coin(s)
addresses:
- used | address: Ae2tdPwU...QoTdaz6a
- used | address: C1sTyDJ7...4qg6Hnzx
- unused | address: eUfQGwsU...ajTZhWM6
- unused | address: 9FawhUyn...oTeCtY2s
- used | address: 5oP9ib6y...PuFoheAg
- unused | address: YQdiVKZw...2xDMb8JT
- used | address: 5FCjkr13...FY24fyk4
- unused | address: PMgsqXWQ...QZQS6iHN
- used | address: 2GvQDkrS...DfhDCBVk
- unused | address: DTNco2h6...HU3gT6tm
- used | address: 87iPzcvC...FzqFbg7j
- unused | address: 8niigVuN...ZyPxvum9
- unused | address: Jk8t6syw...Vndamng4
- used | address: 6xgBa41r...2zUkhzxy
#315
Overview
Account
-related types.Comments