Skip to content

Commit 983495e

Browse files
committed
refactor(cardano-services): rename query name to prevent naming collision when collateral is set to true
1 parent 98291b5 commit 983495e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/cardano-services/src/ChainHistory/DbSyncChainHistory/ChainHistoryBuilder.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export class ChainHistoryBuilder {
5151
public async queryTransactionInputsByIds(ids: string[], collateral = false): Promise<TxInput[]> {
5252
this.#logger.debug(`About to find inputs (collateral: ${collateral}) for transactions with ids:`, ids);
5353
const result: QueryResult<TxInputModel> = await this.#db.query({
54-
name: `tx_${collateral ? 'collateral' : 'inputs'}_by_tx_ids`,
54+
name: `tx_${collateral ? 'collateral_' : ''}inputs_by_tx_ids`,
5555
text: collateral ? Queries.findTxCollateralsByIds : Queries.findTxInputsByIds,
5656
values: [ids]
5757
});
@@ -71,7 +71,7 @@ export class ChainHistoryBuilder {
7171
public async queryTransactionOutputsByIds(ids: string[], collateral = false): Promise<TxOutput[]> {
7272
this.#logger.debug(`About to find outputs (collateral: ${collateral}) for transactions with ids:`, ids);
7373
const result: QueryResult<TxOutputModel> = await this.#db.query({
74-
name: `tx_${collateral ? 'collateral' : 'outputs'}_by_tx_ids`,
74+
name: `tx_${collateral ? 'collateral_' : ''}outputs_by_tx_ids`,
7575
text: collateral ? Queries.findCollateralOutputsByTxIds : Queries.findTxOutputsByIds,
7676
values: [ids]
7777
});

0 commit comments

Comments
 (0)