mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-19 11:20:45 +00:00
Update uiapi.go
This commit is contained in:
parent
777265620d
commit
f87323b07e
1 changed files with 3 additions and 2 deletions
|
|
@ -73,8 +73,9 @@ type rawWallet struct {
|
||||||
// Example call
|
// Example call
|
||||||
// {"jsonrpc":"2.0","method":"clef_listWallets","params":[], "id":5}
|
// {"jsonrpc":"2.0","method":"clef_listWallets","params":[], "id":5}
|
||||||
func (api *UIServerAPI) ListWallets() []rawWallet {
|
func (api *UIServerAPI) ListWallets() []rawWallet {
|
||||||
wallets := make([]rawWallet, 0) // return [] instead of nil if empty
|
allWallets := api.am.Wallets()
|
||||||
for _, wallet := range api.am.Wallets() {
|
wallets := make([]rawWallet, 0, len(allWallets)) // return [] instead of nil if empty
|
||||||
|
for _, wallet := range allWallets {
|
||||||
status, failure := wallet.Status()
|
status, failure := wallet.Status()
|
||||||
|
|
||||||
raw := rawWallet{
|
raw := rawWallet{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue