walletrpc+btcwallet: no custom account with various key scopes

Currently, a user can create a custom account with various key scopes.
This is not a desired behaviour.
This commit is contained in:
Torakushi committed 2023-06-14 09:58:53 +02:00
1 parent dd5ed71669
commit 77d3f00c3b
4 files changed
+70

No files matched your search

+14
View File
@@ -235,6 +235,20 @@ func (h *HarnessRPC) ImportAccount(
return resp
}
// ImportAccountAssertErr makes the ImportAccount RPC call and asserts an error
// is returned. It then returns the error.
func (h *HarnessRPC) ImportAccountAssertErr(
req *walletrpc.ImportAccountRequest) error {
ctxt, cancel := context.WithTimeout(h.runCtx, DefaultTimeout)
defer cancel()
_, err := h.WalletKit.ImportAccount(ctxt, req)
require.Error(h, err)
return err
}
// ImportPublicKey makes a RPC call to the node's WalletKitClient and asserts.
//
//nolint:lll