iqlusioninc / liquidity-staking-module

Other
87 stars 29 forks source link

fix: ICA account delegation wasn't accounted. Added a test case. #117

Closed xlab closed 1 year ago

xlab commented 1 year ago

Resolves #118

Without changes to the code, the test TestICADelegateUndelegate should fail:

=== RUN   TestICADelegateUndelegate
    msg_server_test.go:972:
            Error Trace:    ~/dev/liquidity-staking-module-master/x/staking/keeper/msg_server_test.go:972
            Error:          Received unexpected error:
                            validator liquid shares underflow
            Test:           TestICADelegateUndelegate
            Messages:       no error expected when sequentially undelegating
sampocs commented 1 year ago

Added the test here if you wanna borrow it!

xlab commented 1 year ago

@sampocs I borrowed it directly in this PR, so I guess it can be merged :)