From fed5fb3dac3e83d62fab57dcbfa67bf4b2276e37 Mon Sep 17 00:00:00 2001 From: Martin Boehm Date: Mon, 27 Feb 2023 19:50:05 +0100 Subject: [PATCH] Store new contract info including the type of contract --- api/worker.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/worker.go b/api/worker.go index 3024a5e3..c07d9f8a 100644 --- a/api/worker.go +++ b/api/worker.go @@ -609,6 +609,9 @@ func (w *Worker) getContractDescriptorInfo(cd bchain.AddressDescriptor, typeFrom validContract = false } else { + if typeFromContext != bchain.UnknownTokenType && contractInfo.Type == bchain.UnknownTokenType { + contractInfo.Type = typeFromContext + } if err = w.db.StoreContractInfo(contractInfo); err != nil { glog.Errorf("StoreContractInfo error %v, contract %v", err, cd) }