for _, tx := range b.Transactions {
for _, orig := range tx.Inputs {
- if ii, ok := orig.TypedInput.(*types.IssuanceInput); ok {
- if isValidJSON(ii.AssetDefinition) {
- assetID := ii.AssetID()
- if assetExist := walletDB.Get(asset.ExtAssetKey(&assetID)); assetExist == nil {
- storeBatch.Set(asset.ExtAssetKey(&assetID), ii.AssetDefinition)
- }
+ if cci, ok := orig.TypedInput.(*types.CrossChainInput); ok {
+ assetID := cci.AssetId
+ if assetExist := walletDB.Get(asset.ExtAssetKey(assetID)); assetExist == nil {
+ storeBatch.Set(asset.ExtAssetKey(assetID), cci.AssetDefinition)
}
}
}
statusFail, _ := txStatus.GetStatus(pos)
for _, v := range tx.Outputs {
var hash [32]byte
- sha3pool.Sum256(hash[:], v.ControlProgram)
+ sha3pool.Sum256(hash[:], v.ControlProgram())
if bytes := w.DB.Get(account.ContractKey(hash)); bytes != nil {
annotatedTxs = append(annotatedTxs, w.buildAnnotatedTransaction(tx, b, statusFail, pos))