Skip to content

Commit 1c2f169

Browse files
committed
fix: typo in name of TransactionProcessor.getPendingOuputCellsByTxid
1 parent e97816b commit 1c2f169

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/routes/rgbpp/address.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ const addressRoutes: FastifyPluginCallback<Record<never, never>, Server, ZodType
175175

176176
const pendingOutputCellsGroup = await Promise.all(
177177
pendingTxids.map(async (txid) => {
178-
const cells = await fastify.transactionProcessor.getPendingOuputCellsByTxid(txid);
178+
const cells = await fastify.transactionProcessor.getPendingOutputCellsByTxid(txid);
179179
const lockArgsSet = new Set(pendingUtxosGroup[txid].map((utxo) => buildPreLockArgs(utxo.vout)));
180180
return cells.filter((cell) => lockArgsSet.has(cell.cellOutput.lock.args));
181181
}),

src/services/transaction.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ export default class TransactionProcessor
593593
* get pending output cells by txid, get ckb output cells from the uncompleted job
594594
* @param txid - the transaction id
595595
*/
596-
public async getPendingOuputCellsByTxid(txid: string) {
596+
public async getPendingOutputCellsByTxid(txid: string): Promise<Cell[]> {
597597
const job = await this.getTransactionRequest(txid);
598598
if (!job) {
599599
return [];

test/routes/rgbpp/address.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,8 @@ describe('/rgbpp/v1/address', () => {
9292
mockRgbppUtxoPairs as RgbppUtxoCellsPair[],
9393
);
9494
const transactionProcessor = fastify.container.resolve('transactionProcessor');
95-
const getPendingOuputCellsByTxidSpy = vi
96-
.spyOn(transactionProcessor, 'getPendingOuputCellsByTxid')
95+
const getPendingOutputCellsByTxidSpy = vi
96+
.spyOn(transactionProcessor, 'getPendingOutputCellsByTxid')
9797
.mockResolvedValueOnce([
9898
{
9999
cellOutput: {
@@ -155,11 +155,11 @@ describe('/rgbpp/v1/address', () => {
155155
});
156156
const data = response.json();
157157

158-
expect(getPendingOuputCellsByTxidSpy).toBeCalledTimes(2);
159-
expect(getPendingOuputCellsByTxidSpy).toHaveBeenCalledWith(
158+
expect(getPendingOutputCellsByTxidSpy).toBeCalledTimes(2);
159+
expect(getPendingOutputCellsByTxidSpy).toHaveBeenCalledWith(
160160
'aab2d8fc3f064087450057ccb6012893cf219043d8c915fe64c5322c0eeb6fd2',
161161
);
162-
expect(getPendingOuputCellsByTxidSpy).toHaveBeenCalledWith(
162+
expect(getPendingOutputCellsByTxidSpy).toHaveBeenCalledWith(
163163
'989f4e03179e17cbb6edd446f57ea6107a40ba23441056653f1cc34b7dd1e5ba',
164164
);
165165
expect(response.statusCode).toBe(200);

0 commit comments

Comments
 (0)