Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix enqueue utxo sync job with wrong address param #145

Merged
merged 1 commit into from
May 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/services/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,8 @@ export default class TransactionProcessor
// then the RGB++ cells cache will be updated with the latest UTXO data
if (this.cradle.env.UTXO_SYNC_DATA_CACHE_ENABLE) {
try {
await this.cradle.utxoSyncer.enqueueSyncJob(txid);
const addresses = btcTx.vout.map((vout) => vout.scriptpubkey_address).filter((address) => address);
await Promise.all(addresses.map((address) => this.cradle.utxoSyncer.enqueueSyncJob(address!)));
} catch (err) {
// ignore the error if enqueue sync job failed, to avoid the transaction failed
// already catch the error inside the utxo syncer
Expand Down
Loading