type assert fix
This commit is contained in:
parent
1a652a1cbb
commit
6a0223641f
|
@ -66,7 +66,7 @@ func (info StructFieldInfo) unpack() (int, reflect.Type, Options) {
|
|||
return info.Index, info.Type, info.Options
|
||||
}
|
||||
|
||||
// e.g. If o is struct{Foo}{}, return is the Foo interface type.
|
||||
// e.g. If o is struct{Foo}{}, return is the Foo reflection type.
|
||||
func GetTypeFromStructDeclaration(o interface{}) reflect.Type {
|
||||
rt := reflect.TypeOf(o)
|
||||
if rt.NumField() != 1 {
|
||||
|
|
|
@ -206,7 +206,7 @@ func NewUnbondTx(addr []byte, height uint) *UnbondTx {
|
|||
}
|
||||
|
||||
func (tx *UnbondTx) Sign(chainID string, privAccount *account.PrivAccount) {
|
||||
tx.Signature = privAccount.Sign(chainID, tx)
|
||||
tx.Signature = privAccount.Sign(chainID, tx).(account.SignatureEd25519)
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -220,5 +220,5 @@ func NewRebondTx(addr []byte, height uint) *RebondTx {
|
|||
}
|
||||
|
||||
func (tx *RebondTx) Sign(chainID string, privAccount *account.PrivAccount) {
|
||||
tx.Signature = privAccount.Sign(chainID, tx)
|
||||
tx.Signature = privAccount.Sign(chainID, tx).(account.SignatureEd25519)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue