Skip to content

Commit 227fea9

Browse files
Merge pull request #146 from thirdweb-dev/vt-chore-decode-api-updates
chore: rename query param abiDecodingEnabled => decode
2 parents b267cf9 + 37d0ff4 commit 227fea9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

api/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ type QueryParams struct {
4343
Aggregates []string `schema:"aggregate"`
4444

4545
// @Description Flag to enable abi decoding of tx data
46-
AbiDecodingEnabled bool `schema:"abi_decoding_enabled"`
46+
Decode bool `schema:"decode"`
4747
}
4848

4949
// Meta represents metadata for a query response

internal/handlers/logs_handlers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ func handleLogsRequest(c *gin.Context, contractAddress, signature string, eventA
209209
}
210210
queryResult.Data = decodedLogs
211211
} else {
212-
if config.Cfg.API.AbiDecodingEnabled && queryParams.AbiDecodingEnabled {
212+
if config.Cfg.API.AbiDecodingEnabled && queryParams.Decode {
213213
decodedLogs := common.DecodeLogs(chainId.String(), logsResult.Data)
214214
queryResult.Data = decodedLogs
215215
} else {

internal/handlers/transactions_handlers.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ func handleTransactionsRequest(c *gin.Context, contractAddress, signature string
220220
}
221221
queryResult.Data = decodedTransactions
222222
} else {
223-
if config.Cfg.API.AbiDecodingEnabled && queryParams.AbiDecodingEnabled {
223+
if config.Cfg.API.AbiDecodingEnabled && queryParams.Decode {
224224
decodedTransactions := common.DecodeTransactions(chainId.String(), transactionsResult.Data)
225225
queryResult.Data = decodedTransactions
226226
} else {

0 commit comments

Comments
 (0)