From 4b1ea661af2571849c307dd45440b6a9fad66855 Mon Sep 17 00:00:00 2001 From: Runchao Han Date: Thu, 27 Jun 2024 12:47:55 +1000 Subject: [PATCH] fix hascontractinfo bug --- x/babylon/keeper/wasm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/babylon/keeper/wasm.go b/x/babylon/keeper/wasm.go index bf0bec03..8e375906 100644 --- a/x/babylon/keeper/wasm.go +++ b/x/babylon/keeper/wasm.go @@ -24,7 +24,7 @@ func (k Keeper) getBTCStakingContractAddr(ctx sdk.Context) sdk.AccAddress { k.Logger(ctx).Warn("the BTC staking contract address is malformed", "contract", addrStr, "error", err) return nil } - if k.wasm.HasContractInfo(ctx, addr) { + if !k.wasm.HasContractInfo(ctx, addr) { // NOTE: it's possible that the default contract address does not correspond to // any contract. We emit a warning message rather than panic to minimise the // impact on the consumer chain's operation