forked from cerc-io/laconicd-deprecated
parent
93020f8786
commit
be8fd869ff
@ -35,6 +35,12 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
|||||||
|
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* (rpc) [tharsis#769](https://github.com/tharsis/ethermint/pull/769) Fix default Ethereum signer for JSON-RPC.
|
||||||
|
|
||||||
## [v0.8.0] - 2021-11-17
|
## [v0.8.0] - 2021-11-17
|
||||||
|
|
||||||
### State Machine Breaking
|
### State Machine Breaking
|
||||||
|
@ -56,7 +56,7 @@ func NewPublicAPI(
|
|||||||
backend backend.Backend,
|
backend backend.Backend,
|
||||||
nonceLock *rpctypes.AddrLocker,
|
nonceLock *rpctypes.AddrLocker,
|
||||||
) *PublicAPI {
|
) *PublicAPI {
|
||||||
epoch, err := ethermint.ParseChainID(clientCtx.ChainID)
|
eip155ChainID, err := ethermint.ParseChainID(clientCtx.ChainID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
@ -80,13 +80,18 @@ func NewPublicAPI(
|
|||||||
|
|
||||||
// The signer used by the API should always be the 'latest' known one because we expect
|
// The signer used by the API should always be the 'latest' known one because we expect
|
||||||
// signers to be backwards-compatible with old transactions.
|
// signers to be backwards-compatible with old transactions.
|
||||||
signer := ethtypes.LatestSigner(backend.ChainConfig())
|
cfg := backend.ChainConfig()
|
||||||
|
if cfg == nil {
|
||||||
|
cfg = evmtypes.DefaultChainConfig().EthereumConfig(eip155ChainID)
|
||||||
|
}
|
||||||
|
|
||||||
|
signer := ethtypes.LatestSigner(cfg)
|
||||||
|
|
||||||
api := &PublicAPI{
|
api := &PublicAPI{
|
||||||
ctx: context.Background(),
|
ctx: context.Background(),
|
||||||
clientCtx: clientCtx,
|
clientCtx: clientCtx,
|
||||||
queryClient: rpctypes.NewQueryClient(clientCtx),
|
queryClient: rpctypes.NewQueryClient(clientCtx),
|
||||||
chainIDEpoch: epoch,
|
chainIDEpoch: eip155ChainID,
|
||||||
logger: logger.With("client", "json-rpc"),
|
logger: logger.With("client", "json-rpc"),
|
||||||
backend: backend,
|
backend: backend,
|
||||||
nonceLock: nonceLock,
|
nonceLock: nonceLock,
|
||||||
|
Loading…
Reference in New Issue
Block a user