forked from cerc-io/laconicd-deprecated
rpc: personal_unpair (#733)
* Problem: need to add rpc endpoint personal_unpair Closes #730 * this is aimed at smartcard wallet which is not supported yet. * will return unsupported error now. * Update rpc/ethereum/namespaces/personal/api.go * add changelog entry and use errors.Is Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Tomas Tauber <2410580+tomtau@users.noreply.github.com>
This commit is contained in:
co-authored by
Federico Kunze Küllmer
Tomas Tauber
parent
d647988ad5
commit
a3f1d8d89d
@@ -2,6 +2,8 @@ package rpc
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
@@ -142,3 +144,13 @@ func TestPersonal_LockAccount(t *testing.T) {
|
||||
_, err = CallWithError("personal_sign", []interface{}{hexutil.Bytes{0x88}, addr, ""})
|
||||
require.Error(t, err)
|
||||
}
|
||||
|
||||
func TestPersonal_Unpair(t *testing.T) {
|
||||
t.Skip("skipping TestPersonal_Unpair")
|
||||
|
||||
rpcRes := Call(t, "personal_unpair", []interface{}{"", 0})
|
||||
|
||||
var res error
|
||||
err := json.Unmarshal(rpcRes.Result, &res)
|
||||
require.True(t, errors.Is(err, fmt.Errorf("smartcard wallet not supported yet")))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user