rpc: personal_listWallets (#748)

* Problem: need to add JSON-RPC endpoint personal_listWallets

Closes #745

* wallet level that manages accounts is not supported by keyring interface, will return nil

* changelog entry

* fix lint failure by exposing RawWallet as public

* fix notes typo
This commit is contained in:
Adu
2021-11-15 11:20:59 +00:00
committed by GitHub
parent 32c905ab87
commit f42f339d05
3 changed files with 25 additions and 0 deletions
+8
View File
@@ -152,3 +152,11 @@ func TestPersonal_InitializeWallet(t *testing.T) {
_, err := CallWithError("personal_initializeWallet", []interface{}{""})
require.Equal(t, "smartcard wallet not supported yet", err.Error())
}
func TestPersonal_ListWallets(t *testing.T) {
rpcRes := Call(t, "personal_listWallets", []interface{}{})
var res []hexutil.Bytes
err := json.Unmarshal(rpcRes.Result, &res)
require.NoError(t, err)
require.Equal(t, ([]hexutil.Bytes)(nil), res)
}