input-output-hk / cardano-wallet-legacy

Official Wallet Backend & API for Cardano-SL
https://input-output-hk.github.io/cardano-wallet/
MIT License
21 stars 12 forks source link

API V1 types: Account-related types logging improving. #358

Closed denisshevchenko closed 5 years ago

denisshevchenko commented 5 years ago

#315

Overview

Comments

denisshevchenko commented 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
KtorZ commented 5 years ago

@denisshevchenko two suggestions:

denisshevchenko commented 5 years ago

@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
KtorZ commented 5 years ago

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" ?

KtorZ commented 5 years ago

Same for the address: ... if feels superfluous, we know it's a list of address :)

KtorZ commented 5 years ago

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
denisshevchenko commented 5 years ago

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