Skip to content

Commit

Permalink
chore: add rewards balance query on chan open ack (#729)
Browse files Browse the repository at this point in the history
* add rewards balance query on chan open ack

* add changelog
  • Loading branch information
puneet2019 authored Jan 19, 2024
1 parent 7b1acdc commit c2de3df
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,14 @@ Ref: https://keepachangelog.com/en/1.0.0/

### Features

- [729](https://github.com/persistenceOne/pstake-native/pull/729) Add rewards account query (hence autocompound) OnChanOpenAck.
- [727](https://github.com/persistenceOne/pstake-native/pull/727) Send LSM redeem messages in chunks.
- [721](https://github.com/persistenceOne/pstake-native/pull/721) Add Query host chain user unbondings.

### Bug Fixes
- [728](https://github.com/persistenceOne/pstake-native/pull/728) Fix prevent users from liquid-staking funds by removing the Deposit entry.
- [727](https://github.com/persistenceOne/pstake-native/pull/727) Send LSM redeem messages in chunks.

- [728](https://github.com/persistenceOne/pstake-native/pull/728) Fix prevent users from liquid-staking funds by
removing the Deposit entry.
- [726](https://github.com/persistenceOne/pstake-native/pull/726) Fix minimal unbondings.
- [725](https://github.com/persistenceOne/pstake-native/pull/725) Fix Incorrect bookkeeping of validator’s delegated
amount upon redelegation
Expand Down
10 changes: 10 additions & 0 deletions x/liquidstakeibc/keeper/ibc.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@ func (k *Keeper) OnChanOpenAck(
)
}
}
// send an ICQ query to get the rewards account balance
if hc.RewardsAccount != nil && hc.RewardsAccount.ChannelState == types.ICAAccount_ICA_CHANNEL_CREATED {
if err := k.QueryRewardsHostChainAccountBalance(ctx, hc); err != nil {
return fmt.Errorf(
"error querying host chain %s for rewards account balances: %v",
hc.ChainId,
err,
)
}
}

k.Logger(ctx).Info(
"Created new ICA.",
Expand Down

0 comments on commit c2de3df

Please sign in to comment.