Skip to content

Commit

Permalink
pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
KonradStaniec committed Dec 12, 2024
1 parent 77a70b2 commit 055827e
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions x/btcstaking/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,22 +179,21 @@ func (ms msgServer) getTimeInfoAndParams(
}

return timeInfo, paramsByHeight, version, nil
} else {
// staking tx is not included on BTC, retrieve params for the current tip height
// and return info about the tip
btcTip := ms.btclcKeeper.GetTipInfo(ctx)

paramsByHeight, version, err := ms.GetParamsForBtcHeight(ctx, uint64(btcTip.Height))
if err != nil {
return nil, nil, 0, err
}
}
// staking tx is not included on BTC, retrieve params for the current tip height
// and return info about the tip
btcTip := ms.btclcKeeper.GetTipInfo(ctx)

return &DelegationTimeRangeInfo{
StartHeight: 0,
EndHeight: 0,
TipHeight: btcTip.Height,
}, paramsByHeight, version, nil
paramsByHeight, version, err := ms.GetParamsForBtcHeight(ctx, uint64(btcTip.Height))
if err != nil {
return nil, nil, 0, err
}

return &DelegationTimeRangeInfo{
StartHeight: 0,
EndHeight: 0,
TipHeight: btcTip.Height,
}, paramsByHeight, version, nil
}

// CreateBTCDelegation creates a BTC delegation
Expand Down

0 comments on commit 055827e

Please sign in to comment.