Skip to content

Commit

Permalink
populateCodeHash bugfix for blank codeHash
Browse files Browse the repository at this point in the history
  • Loading branch information
luca992 committed Sep 30, 2022
1 parent ad0e51b commit bb73509
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit bb73509

Please sign in to comment.