Skip to content

Commit

Permalink
fix: fix queryBtcTimeLockTxByBtcTxId and mark activity api unstable (#…
Browse files Browse the repository at this point in the history
…197)

* fix: fix btcTxIdFromBtcTimeLockArgs and mark activity api unstable
* chore: upgrade rgbpp-sdk to v0.4.0
  • Loading branch information
ahonn authored Jul 19, 2024
1 parent 9a4aee4 commit 2e9609b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "btc-assets-api",
"version": "2.3.1",
"version": "2.4.0",
"title": "Bitcoin/RGB++ Assets API",
"description": "",
"main": "index.js",
Expand Down Expand Up @@ -42,9 +42,9 @@
"@fastify/swagger-ui": "^3.0.0",
"@immobiliarelabs/fastify-sentry": "^8.0.1",
"@nervosnetwork/ckb-sdk-utils": "^0.109.1",
"@rgbpp-sdk/btc": "^0.0.0-snap-20240613115717",
"@rgbpp-sdk/ckb": "^0.0.0-snap-20240613115717",
"@rgbpp-sdk/service": "^0.0.0-snap-20240613115717",
"@rgbpp-sdk/btc": "^0.4.0",
"@rgbpp-sdk/ckb": "^0.4.0",
"@rgbpp-sdk/service": "^0.4.0",
"@sentry/node": "^7.102.1",
"@sentry/profiling-node": "^7.102.1",
"async-retry": "^1.3.3",
Expand Down
30 changes: 15 additions & 15 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/routes/rgbpp/address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ const addressRoutes: FastifyPluginCallback<Record<never, never>, Server, ZodType
{
schema: {
description: 'Get RGB++ activity by btc address',
tags: ['RGB++'],
tags: ['RGB++@Unstable'],
params: z.object({
btc_address: z.string(),
}),
Expand Down
3 changes: 2 additions & 1 deletion src/services/rgbpp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import asyncRetry from 'async-retry';
import { Cradle } from '../container';
import {
IndexerCell,
btcTxIdFromBtcTimeLockArgs,
buildRgbppLockArgs,
genRgbppLockScript,
getBtcTimeLockScript,
Expand Down Expand Up @@ -286,7 +287,7 @@ export default class RgbppCollector extends BaseQueueWorker<IRgbppCollectRequest
if (!isScriptEqual(output.lock, btcTimeLockScript)) {
return false;
}
const btcTxid = remove0x(btcTxId);
const btcTxid = btcTxIdFromBtcTimeLockArgs(output.lock.args);
return remove0x(btcTxid) === btcTxId;
});
if (isBtcTimeLockTx) {
Expand Down

0 comments on commit 2e9609b

Please sign in to comment.