diff --git a/ledger/common/certs.go b/ledger/common/certs.go index 21794866..2bf304e5 100644 --- a/ledger/common/certs.go +++ b/ledger/common/certs.go @@ -728,11 +728,11 @@ func (c *StakeVoteDelegationCertificate) Utxorpc() *utxorpc.Certificate { // Extract DRep credential if it exists (AddrKeyHash or ScriptHash) if drepProto != nil { - switch v := drepProto.GetDrep().(type) { + switch drepProto.GetDrep().(type) { case *utxorpc.DRep_AddrKeyHash: - drepBytes = v.AddrKeyHash + drepBytes = drepProto.GetAddrKeyHash() case *utxorpc.DRep_ScriptHash: - drepBytes = v.ScriptHash + drepBytes = drepProto.GetScriptHash() } } @@ -866,11 +866,11 @@ func (c *StakeVoteRegistrationDelegationCertificate) Utxorpc() *utxorpc.Certific var drepBytes []byte if drepProto != nil { - switch v := drepProto.GetDrep().(type) { + switch drepProto.GetDrep().(type) { case *utxorpc.DRep_AddrKeyHash: - drepBytes = v.AddrKeyHash + drepBytes = drepProto.GetAddrKeyHash() case *utxorpc.DRep_ScriptHash: - drepBytes = v.ScriptHash + drepBytes = drepProto.GetScriptHash() } }