Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
riley-stride committed Jul 10, 2022
1 parent c4aa661 commit 6480a0e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
4 changes: 4 additions & 0 deletions testutil/sample/sample.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ func AccAddress() string {
addr := pk.Address()
return sdk.AccAddress(addr).String()
}

func StrideAddress() string {
return "stride1uk4ze0x4nvh4fk0xm4jdud58eqn4yxhrt52vv7"
}
2 changes: 1 addition & 1 deletion x/stakeibc/keeper/ibc_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ func (k *Keeper) HandleSend(ctx sdk.Context, msg sdk.Msg, sequence string) error
pendingClaims, found := k.GetPendingClaims(ctx, sequence)
if !found {
k.Logger(ctx).Error("failed to find pending claim")
return sdkerrors.Wrapf(types.ErrRecordNotFound, "no pending claim found for sequence (%d)", sequence)
return sdkerrors.Wrapf(types.ErrRecordNotFound, "no pending claim found for sequence (%s)", sequence)
}
userRedemptionRecordKey, err := k.GetUserRedemptionRecordKeyFromPendingClaims(ctx, pendingClaims)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions x/stakeibc/types/message_claim_undelegated_tokens_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ func TestMsgClaimUndelegatedTokens_ValidateBasic(t *testing.T) {
name: "invalid address",
msg: MsgClaimUndelegatedTokens{
Creator: "invalid_address",
MaxClaims: 1,
Sender: sample.StrideAddress(),
},
err: sdkerrors.ErrInvalidAddress,
}, {
name: "valid address",
msg: MsgClaimUndelegatedTokens{
Creator: sample.AccAddress(),
MaxClaims: 1,
Sender: sample.StrideAddress(),
},
},
}
Expand Down
9 changes: 0 additions & 9 deletions x/stakeibc/types/message_liquid_stake_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,6 @@ func TestMsgLiquidStake_ValidateBasic(t *testing.T) {
},
err: ErrRequiredFieldEmpty,
},
{
name: "host denom for unregistered host zone",
msg: MsgLiquidStake{
Creator: sample.AccAddress(),
Amount: 1,
HostDenom: "invalid_host_denom",
},
err: ErrInvalidHostZone,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down

0 comments on commit 6480a0e

Please sign in to comment.