Skip to content

Commit 61885d8

Browse files
committed
fix: return 32-byte block hash from eth_getFilterChanges to ensure EVM compatibility
Signed-off-by: Javier Roman <[email protected]>
1 parent 27bcc1c commit 61885d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/relay/src/lib/services/ethService/ethFilterService/FilterService.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { ConfigService } from '@hashgraph/json-rpc-config-service/dist/services';
44
import { Logger } from 'pino';
55

6-
import { generateRandomHex } from '../../../../formatters';
6+
import { generateRandomHex, toHash32 } from '../../../../formatters';
77
import { MirrorNodeClient } from '../../../clients';
88
import constants from '../../../constants';
99
import { JsonRpcError, predefined } from '../../../errors/JsonRpcError';
@@ -241,7 +241,7 @@ export class FilterService implements IFilterService {
241241
: await this.common.getLatestBlockNumber(requestDetails),
242242
);
243243

244-
result = result?.blocks?.map((r) => r.hash) || [];
244+
result = result?.blocks?.map((r) => toHash32(r.hash)) || [];
245245
} else if (this.supportedTypes.indexOf(filter.type) === -1) {
246246
throw predefined.UNSUPPORTED_METHOD;
247247
}

0 commit comments

Comments
 (0)