Skip to content

Commit

Permalink
remove changes in loading operation with token pool activation
Browse files Browse the repository at this point in the history
Signed-off-by: Enrique Lacal <[email protected]>
  • Loading branch information
EnriqueL8 committed Nov 20, 2024
1 parent cfa66ce commit 276bc7b
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions internal/events/token_pool_created.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,24 +131,12 @@ func (em *eventManager) loadFromOperation(ctx context.Context, pool *tokens.Toke
return nil, nil
}

activateOp, _ := em.txHelper.FindOperationInTransaction(ctx, pool.TX.ID, core.OpTypeTokenActivatePool)
if activateOp != nil {
log.L(ctx).Debugf("There was a separate operation to active the pool for tx=%s status=%s", pool.TX.ID, core.OpTypeTokenActivatePool)
}

stagedPool, err = txcommon.RetrieveTokenPoolCreateInputs(ctx, op)
if err != nil || stagedPool.ID == nil || stagedPool.Namespace == "" || stagedPool.Name == "" {
log.L(ctx).Errorf("Error loading pool info for transaction '%s' (%s) - ignoring: %v", pool.TX.ID, err, op.Input)
return nil, nil
}

// If we have successfully activated the pool
// Then set the pool published to true
// As it won't be in the initial payload
if activateOp != nil && activateOp.Status == core.OpStatusSucceeded {
stagedPool.Published = true
}

if err = addPoolDetailsFromPlugin(stagedPool, pool); err != nil {
log.L(ctx).Errorf("Error processing pool for transaction '%s' (%s) - ignoring", pool.TX.ID, err)
return nil, nil
Expand Down

0 comments on commit 276bc7b

Please sign in to comment.