@@ -27,7 +27,6 @@ import (
2727 "github.com/ethereum/go-ethereum/common/hexutil"
2828 "github.com/ethereum/go-ethereum/core/types"
2929 "github.com/ethereum/go-ethereum/event"
30- "github.com/ethereum/go-ethereum/internal/ethapi"
3130 "github.com/ethereum/go-ethereum/log"
3231 "github.com/ethereum/go-ethereum/rpc"
3332 "github.com/ethereum/go-ethereum/signer/core"
@@ -191,8 +190,13 @@ func (api *ExternalSigner) SignText(account accounts.Account, text []byte) ([]by
191190 return signature , nil
192191}
193192
193+ // signTransactionResult represents the signinig result returned by clef.
194+ type signTransactionResult struct {
195+ Raw hexutil.Bytes `json:"raw"`
196+ Tx * types.Transaction `json:"tx"`
197+ }
198+
194199func (api * ExternalSigner ) SignTx (account accounts.Account , tx * types.Transaction , chainID * big.Int ) (* types.Transaction , error ) {
195- res := ethapi.SignTransactionResult {}
196200 data := hexutil .Bytes (tx .Data ())
197201 var to * common.MixedcaseAddress
198202 if tx .To () != nil {
@@ -208,6 +212,7 @@ func (api *ExternalSigner) SignTx(account accounts.Account, tx *types.Transactio
208212 To : to ,
209213 From : common .NewMixedcaseAddress (account .Address ),
210214 }
215+ var res signTransactionResult
211216 if err := api .client .Call (& res , "account_signTransaction" , args ); err != nil {
212217 return nil , err
213218 }
0 commit comments