Skip to content

Commit

Permalink
added null check
Browse files Browse the repository at this point in the history
Signed-off-by: Vasil Vasilev <vasil.yanev15@gmail.com>
  • Loading branch information
randered committed Feb 22, 2023
1 parent e64e4c5 commit 7552edd
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@ protected abstract void trackSigImpactIfNeeded(
* after those changes are applied atomically, the returned fee must be given to the funding
* account!
*
* @param change a triggering change with unique alias
* @param change a triggering change with unique alias
* @param accountsLedger the accounts ledger to use for the provisional creation
* @param changes list of all changes need to construct tokenAliasMap
* @param changes list of all changes need to construct tokenAliasMap
* @return the fee charged for the auto-creation if ok, a failure reason otherwise
*/
public Pair<ResponseCodeEnum, Long> create(
Expand Down Expand Up @@ -220,7 +220,9 @@ public Pair<ResponseCodeEnum, Long> create(
if (key.hasECDSASecp256K1()) {
final JKey jKey = asFcKeyUnchecked(key);
final var evmAddress = tryAddressRecovery(jKey, EthSigsUtils::recoverAddressFromPubKey);
childRecord.setEvmAddress(evmAddress);
if (evmAddress != null) {
childRecord.setEvmAddress(evmAddress);
}
}
}

Expand Down

0 comments on commit 7552edd

Please sign in to comment.