Skip to content

Commit 33fcf87

Browse files
committed
fix: receiverAddress runtime type validation
1 parent 83a1cad commit 33fcf87

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/validators/evm/erc4626/erc4626.validator.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import {
88
import { BaseEVMValidator, EVMTransaction } from '../base.validator';
99
import { VaultInfo, VaultConfiguration } from './types';
1010
import { WETH_ADDRESSES } from './constants';
11+
import { isNonEmptyString } from '../../../utils/validation';
12+
1113

1214
/**
1315
* Standard ERC4626 ABI - only the functions we need to validate
@@ -125,7 +127,9 @@ export class ERC4626Validator extends BaseEVMValidator {
125127
return this.blocked('Transaction has no destination address');
126128
}
127129

128-
const receiverAddress = args?.receiverAddress || undefined;
130+
const receiverAddress = isNonEmptyString(args?.receiverAddress)
131+
? args.receiverAddress
132+
: undefined;
129133

130134
// Route to appropriate validation based on transaction type
131135
switch (transactionType) {

0 commit comments

Comments
 (0)