From f87323b07ebcdb3f814b1b5116009ae1bec4128b Mon Sep 17 00:00:00 2001 From: alex017 Date: Sat, 7 Feb 2026 18:39:21 +0100 Subject: [PATCH] Update uiapi.go --- signer/core/uiapi.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/signer/core/uiapi.go b/signer/core/uiapi.go index 2f511c7e19..0fbadc14ba 100644 --- a/signer/core/uiapi.go +++ b/signer/core/uiapi.go @@ -73,8 +73,9 @@ type rawWallet struct { // Example call // {"jsonrpc":"2.0","method":"clef_listWallets","params":[], "id":5} func (api *UIServerAPI) ListWallets() []rawWallet { - wallets := make([]rawWallet, 0) // return [] instead of nil if empty - for _, wallet := range api.am.Wallets() { + allWallets := api.am.Wallets() + wallets := make([]rawWallet, 0, len(allWallets)) // return [] instead of nil if empty + for _, wallet := range allWallets { status, failure := wallet.Status() raw := rawWallet{