Fix problem, panic on NewBaseTransaction
@@ -62,8 +62,8 @@ func (p *platform) ToRevision(value int) module.Revision {
func (p *platform) NewBaseTransaction(wc state.WorldContext) (module.Transaction, error) {
// calculate issued i-score and amount balance. No changes on world context.
- es := wc.GetExtensionState().(*iiss.ExtensionStateImpl)
- if !es.State.GetTerm().IsDecentralized() {
+ es, _ := wc.GetExtensionState().(*iiss.ExtensionStateImpl)
+ if es == nil || !es.State.GetTerm().IsDecentralized() {
return nil, nil
}
