feat: add transaction batching module

feat: plugin sendCoins batching support
feat: batching processing on poller
feat: mock-wallet batching
fix: bitcoin tx batching
fix: transaction batching db table
This commit is contained in:
Sérgio Salgado 2021-05-24 02:53:36 +01:00
parent c8adaabf85
commit 73c0d09198
7 changed files with 154 additions and 6 deletions

View file

@ -2,7 +2,7 @@ var db = require('./db')
exports.up = function (next) {
var sql = [
`CREATE TYPE transaction_batch_status AS ENUM('open', 'failed', 'sent')`,
`CREATE TYPE transaction_batch_status AS ENUM('open', 'ready', 'failed', 'sent')`,
`CREATE TABLE transaction_batches (
id UUID PRIMARY KEY,
crypto_code TEXT NOT NULL,
@ -11,7 +11,7 @@ exports.up = function (next) {
closed_at TIMESTAMPTZ,
error_message TEXT
)`,
`ALTER TABLE cash_in_txs ADD COLUMN batch_id REFERENCES transaction_batches(id)`
`ALTER TABLE cash_in_txs ADD COLUMN batch_id UUID REFERENCES transaction_batches(id)`
]
db.multi(sql, next)