Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
keithsue committed Jun 22, 2024
1 parent 300e875 commit 9002e01
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion testutil/keeper/btc_light_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func BtcLightClientKeeper(t testing.TB) (*keeper.Keeper, sdk.Context) {
app := app.InitSideTestApp(false)

storeKey := sdk.NewKVStoreKey(types.StoreKey)
memStoreKey := storetypes.NewMemoryStoreKey(types.ModuleName)
memStoreKey := storetypes.NewMemoryStoreKey(types.MemStoreKey)

db := tmdb.NewMemDB()
stateStore := store.NewCommitMultiStore(db)
Expand Down
3 changes: 3 additions & 0 deletions x/btcbridge/types/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ const (

// RouterKey defines the module's message routing key
RouterKey = ModuleName

// MemStoreKey defines the in-memory store key
MemStoreKey = "mem_btcbridge"
)

func KeyPrefix(p string) []byte {
Expand Down
2 changes: 1 addition & 1 deletion x/gmm/keeper/pool_apr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestAPRCalculation(t *testing.T) {

// Calculate the APR for the pool
apr := keeper.GetAPR(ctx, pool.PoolId)
expectedAPR := sdk.NewCoin("usdt", sdkmath.NewInt(6600000))
expectedAPR := sdk.NewCoin("usdt", sdkmath.NewInt(6500000))
// Assert APR calculation
require.Equal(t, expectedAPR.Amount.LTE(apr[0].Amount), true, "Calculated APR does not match expected APR")
}

0 comments on commit 9002e01

Please sign in to comment.