diff --git a/secretk/src/commonMain/kotlin/io/eqoty/secretk/client/SigningCosmWasmClient.kt b/secretk/src/commonMain/kotlin/io/eqoty/secretk/client/SigningCosmWasmClient.kt index 576aa76..40b6c28 100644 --- a/secretk/src/commonMain/kotlin/io/eqoty/secretk/client/SigningCosmWasmClient.kt +++ b/secretk/src/commonMain/kotlin/io/eqoty/secretk/client/SigningCosmWasmClient.kt @@ -288,11 +288,11 @@ private constructor( private suspend fun Msg<*>.populateCodeHash() { if (this is MsgExecuteContract) { - if (codeHash == null) { + if (codeHash.isNullOrBlank()) { codeHash = restClient.getCodeHashByContractAddr(contractAddress) } } else if (this is MsgInstantiateContract) { - if (codeHash == null) { + if (codeHash.isNullOrBlank()) { codeHash = restClient.getCodeInfoByCodeId(codeId.toString()).codeHash } }