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

ADD: Payload category to support Actions #289

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
16 changes: 14 additions & 2 deletions openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ openapi: 3.0.0
info:
title: GroundControl push server API
description: Push notifications server for BlueWallet
version: 0.0.13
version: 0.0.14
servers:
- url: http://localhost:3001
- url: https://groundcontrol-bluewallet-stg.herokuapp.com
Expand Down Expand Up @@ -291,6 +291,10 @@ components:
level:
type: "string"
enum: ["transactions"]
category:
type: "string"
default: "TRANSACTION_CATEGORY"
description: "Only included if type is 2, 3, or 4"
sat:
type: "integer"
description: amount of satoshis
Expand All @@ -316,6 +320,10 @@ components:
level:
type: "string"
enum: ["transactions"]
category:
type: "string"
default: "TRANSACTION_CATEGORY"
description: "Only included if type is 2, 3, or 4"
sat:
type: "integer"
description: amount of satoshis
Expand All @@ -339,6 +347,10 @@ components:
level:
type: "string"
enum: ["transactions"]
category:
type: "string"
default: "TRANSACTION_CATEGORY"
description: "Only included if type is 2, 3, or 4"
txid:
type: "string"
description: txid of the transaction that got confirmed
Expand All @@ -355,4 +367,4 @@ components:
enum: [5]
text:
type: "string"
description: custom text thats displayed on push notification buble
description: custom text thats displayed on push notification bubble
5 changes: 3 additions & 2 deletions scripts/mass_send.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ const fs = require("fs");
const text = fs.readFileSync("all_tokens_unique.csv", { encoding: "utf8" });

const lines = text.split("\n");
console.log('# got', lines.length, 'tokens');
console.log("# got", lines.length, "tokens");

console.log("INSERT INTO send_queue_2 VALUES ");

let fisrt = true;
for (const line of lines.slice(0, 1000000)) {
const [token, os] = line.split("\t");
const sql = (fisrt ? '' : ', ') + `(null, '{"type":5,"token":"${token}","os":"${os}","text":"If you are using Lightning, please read our blog post. The service is sunsetting. Balances should be moved to another service"}', null)`;
const sql =
(fisrt ? "" : ", ") + `(null, '{"type":5,"token":"${token}","os":"${os}","text":"If you are using Lightning, please read our blog post. The service is sunsetting. Balances should be moved to another service"}', null)`;
console.log(sql);
fisrt = false;
}
Expand Down
Loading
Loading