diff --git a/package-lock.json b/package-lock.json index d43e367..9549705 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "groundcontrol", - "version": "2.2.0", + "version": "2.3.0", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/package.json b/package.json index a561ef8..fdc797e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "groundcontrol", - "version": "2.2.0", + "version": "2.3.0", "description": "GroundControl push server API", "devDependencies": { "@types/node": "18.7.16", diff --git a/src/controller/GroundController.ts b/src/controller/GroundController.ts index b1b6a67..9076ce9 100644 --- a/src/controller/GroundController.ts +++ b/src/controller/GroundController.ts @@ -62,6 +62,9 @@ const ADDRESS_IGNORE_LIST = [ "bc1qujepl0k5n0ga2e86yskvxa6auehpf6dlf84dx0", "bc1qg9lgqyukp2rup5x4frrz7hhw7988k5q26luakm", "3JSdUu1ivm3rqMvuCTAdAj6Dc2hdVhHiEe", + "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", + "bc1qr35hws365juz5rtlsjtvmulu97957kqvr3zpw3", + "bc1qzlcvh2k3xs2jyzvya7xmx8l2ylpt259txy7wnd", ]; let connection: DataSource; diff --git a/src/worker-blockprocessor.ts b/src/worker-blockprocessor.ts index b579a2c..2f13f0b 100644 --- a/src/worker-blockprocessor.ts +++ b/src/worker-blockprocessor.ts @@ -41,8 +41,8 @@ async function processBlock(blockNum, sendQueueRepository: Repository txids.push(tx.txid); if (tx.vout) { for (const output of tx.vout) { - if (output.scriptPubKey && output.scriptPubKey.addresses) { - for (const address of output.scriptPubKey.addresses) { + if (output.scriptPubKey && (output.scriptPubKey.addresses || output.scriptPubKey.address)) { + for (const address of output.scriptPubKey?.addresses ?? (output.scriptPubKey?.address ? [output.scriptPubKey?.address] : [])) { addresses.push(address); const payload: components["schemas"]["PushNotificationOnchainAddressGotPaid"] = { address, diff --git a/src/worker-processmempool.ts b/src/worker-processmempool.ts index 5e8bba9..3f8b095 100644 --- a/src/worker-processmempool.ts +++ b/src/worker-processmempool.ts @@ -50,8 +50,8 @@ async function processMempool() { for (const response of responses) { if (response.result && response.result.vout) { for (const output of response.result.vout) { - if (output.scriptPubKey && output.scriptPubKey.addresses) { - for (const address of output.scriptPubKey.addresses) { + if (output.scriptPubKey && (output.scriptPubKey.addresses || output.scriptPubKey.address)) { + for (const address of output.scriptPubKey?.addresses ?? (output.scriptPubKey?.address ? [output.scriptPubKey?.address] : []) ) { addresses.push(address); processedTxids[response.result.txid] = true; const payload: components["schemas"]["PushNotificationOnchainAddressGotUnconfirmedTransaction"] = {