Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gusin13 committed Nov 24, 2024
1 parent 4769284 commit fc4f054
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/db/model/delegation.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type BTCDelegationDetails struct {
SubState types.DelegationSubState `bson:"sub_state,omitempty"`
ParamsVersion uint32 `bson:"params_version"`
UnbondingTime uint32 `bson:"unbonding_time"`
UnbondingTxHex string `bson:"unbonding_tx_hex"`
UnbondingTx string `bson:"unbonding_tx"`
CovenantUnbondingSignatures []CovenantSignature `bson:"covenant_unbonding_signatures"`
BTCDelegationCreatedBlock BTCDelegationCreatedBbnBlock `bson:"btc_delegation_created_bbn_block"`
}
Expand Down Expand Up @@ -102,7 +102,7 @@ func FromEventBTCDelegationCreated(
FinalityProviderBtcPksHex: event.FinalityProviderBtcPksHex,
ParamsVersion: uint32(paramsVersion),
UnbondingTime: uint32(unbondingTime),
UnbondingTxHex: event.UnbondingTx,
UnbondingTx: event.UnbondingTx,
State: types.StatePending, // initial state will always be PENDING
StartHeight: uint32(0), // it should be set when the inclusion proof is received
EndHeight: uint32(0), // it should be set when the inclusion proof is received
Expand Down
2 changes: 1 addition & 1 deletion internal/services/consumer_events.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ func (s *Service) sendUnbondingDelegationEvent(ctx context.Context, delegation *
time.Now().Unix(),
uint64(delegation.StartHeight),
uint64(delegation.EndHeight),
delegation.UnbondingTxHex,
delegation.UnbondingTx,
"",
)
if err := s.queueManager.SendUnbondingStakingEvent(ctx, &ev); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/services/delegation_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func (s *Service) registerUnbondingSpendNotification(
ctx context.Context,
delegation *model.BTCDelegationDetails,
) *types.Error {
unbondingTxBytes, parseErr := hex.DecodeString(delegation.UnbondingTxHex)
unbondingTxBytes, parseErr := hex.DecodeString(delegation.UnbondingTx)
if parseErr != nil {
return types.NewError(
http.StatusInternalServerError,
Expand Down

0 comments on commit fc4f054

Please sign in to comment.