FuelLabs / fuel-indexer

🗃 The Fuel indexer is a standalone service that can be used to index various components of the Fuel blockchain.
https://docs.fuel.network/docs/indexer/
140 stars 66 forks source link

bugfix: fix bytes encoding in entity::find #1482

Closed lostman closed 10 months ago

lostman commented 10 months ago

Description

Fixes #1480.

The issue was an incorrect conversion of (various) bytes scalars to sqlparser::Value as SingleQuotedByteStringLiteral.

All bytes scalars are stored as lower-hex encoded strings. Thus, changing the conversion to sql::Value::SingleQuotedString(hex::encode(self)) fixes the issue.

Testing steps

The same testing steps as outlined in #1480.

This PR also adds a couple of test cases.

Changelog