From e0fdbc5295070b477e46cb216152198ea5dcf4cc Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Fri, 8 Feb 2019 13:27:50 +0100 Subject: [PATCH] signer: gosimple nitpicks --- signer/core/api.go | 4 +--- signer/core/uiapi.go | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/signer/core/api.go b/signer/core/api.go index c8e5b86e1e..30888f8429 100644 --- a/signer/core/api.go +++ b/signer/core/api.go @@ -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 { diff --git a/signer/core/uiapi.go b/signer/core/uiapi.go index e34efb5fe3..6dc68313b5 100644 --- a/signer/core/uiapi.go +++ b/signer/core/uiapi.go @@ -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 }