Skip to content

Commit

Permalink
fix(freezeV2): remove duplicate judgments (#5508)
Browse files Browse the repository at this point in the history
  • Loading branch information
lxcmyf authored Sep 21, 2023
1 parent 703a866 commit 9842b3f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public boolean validate() throws ContractValidateException {

byte[] receiverAddress = delegateResourceContract.getReceiverAddress().toByteArray();

if (ArrayUtils.isEmpty(receiverAddress) || !DecodeUtil.addressValid(receiverAddress)) {
if (!DecodeUtil.addressValid(receiverAddress)) {
throw new ContractValidateException("Invalid receiverAddress");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void validate(DelegateResourceParam param, Repository repo) throws Contra

byte[] receiverAddress = param.getReceiverAddress();

if (ArrayUtils.isEmpty(receiverAddress) || !DecodeUtil.addressValid(receiverAddress)) {
if (!DecodeUtil.addressValid(receiverAddress)) {
throw new ContractValidateException("Invalid receiverAddress");
}
if (Arrays.equals(receiverAddress, ownerAddress)) {
Expand Down

0 comments on commit 9842b3f

Please sign in to comment.