mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
signer: gosimple nitpicks
This commit is contained in:
parent
adffc9bbf4
commit
e0fdbc5295
2 changed files with 2 additions and 6 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue