signer: gosimple nitpicks

This commit is contained in:
Martin Holst Swende 2019-02-08 13:27:50 +01:00
parent adffc9bbf4
commit e0fdbc5295
No known key found for this signature in database
GPG key ID: 683B438C05A5DDF0
2 changed files with 2 additions and 6 deletions

View file

@ -361,9 +361,7 @@ func (api *SignerAPI) startUSBListener() {
func (api *SignerAPI) List(ctx context.Context) ([]common.Address, error) {
var accs []accounts.Account
for _, wallet := range api.am.Wallets() {
for _, acc := range wallet.Accounts() {
accs = append(accs, acc)
}
accs = append(accs, wallet.Accounts()...)
}
result, err := api.UI.ApproveListing(&ListRequest{Accounts: accs, Meta: MetadataFromContext(ctx)})
if err != nil {

View file

@ -56,9 +56,7 @@ func NewUIServerAPI(extapi *SignerAPI) *UIServerAPI {
func (s *UIServerAPI) ListAccounts(ctx context.Context) ([]accounts.Account, error) {
var accs []accounts.Account
for _, wallet := range s.am.Wallets() {
for _, acc := range wallet.Accounts() {
accs = append(accs, acc)
}
accs = append(accs, wallet.Accounts()...)
}
return accs, nil
}