mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-11 14:09:15 +00:00
Fix implementation of evidence so its non optional
This commit is contained in:
parent
c0882460b0
commit
8c9c759624
@ -743,8 +743,8 @@ interface RpcBlock {
|
||||
};
|
||||
// It's currently unclear why the deep nesting is requied.
|
||||
// See https://github.com/tendermint/tendermint/issues/7697.
|
||||
readonly evidence: {
|
||||
readonly evidence: readonly RpcEvidence[];
|
||||
readonly evidence?: {
|
||||
readonly evidence?: readonly RpcEvidence[];
|
||||
};
|
||||
}
|
||||
|
||||
@ -757,7 +757,7 @@ function decodeBlock(data: RpcBlock): responses.Block {
|
||||
txs: data.data.txs ? assertArray(data.data.txs).map(fromBase64) : [],
|
||||
// Lift up .evidence.evidence to just .evidence
|
||||
// See https://github.com/tendermint/tendermint/issues/7697
|
||||
evidence: data.evidence?.evidence,
|
||||
evidence: data.evidence?.evidence ?? [],
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user