mirror of
https://github.com/Permissionless-Software-Foundation/bch-dex.git
synced 2026-09-21 16:52:00 -07:00
fix(offers): Added timer controller to remove duplicate offers
This commit is contained in:
@@ -2,15 +2,15 @@
|
||||
This script has not been customized for offers yet.
|
||||
*/
|
||||
|
||||
const mongoose = require('mongoose')
|
||||
import mongoose from 'mongoose'
|
||||
|
||||
// Force test environment
|
||||
// make sure environment variable is set before this file gets called.
|
||||
// see test script in package.json.
|
||||
// process.env.KOA_ENV = 'test'
|
||||
const config = require('../../config')
|
||||
import config from '../../config'
|
||||
|
||||
const User = require('../../src/models/users')
|
||||
import User from '../../src/models/users'
|
||||
|
||||
async function deleteUsers () {
|
||||
// Connect to the Mongo Database.
|
||||
|
||||
@@ -2,11 +2,10 @@
|
||||
Get all Offers in the database.
|
||||
*/
|
||||
|
||||
const mongoose = require('mongoose')
|
||||
import mongoose from 'mongoose'
|
||||
|
||||
const config = require('../../config')
|
||||
|
||||
const Offer = require('../../src/adapters/localdb/models/offer')
|
||||
import config from '../../config/index.js'
|
||||
import Offer from '../../src/adapters/localdb/models/offer.js'
|
||||
|
||||
async function getOffers () {
|
||||
// Connect to the Mongo Database.
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
const mongoose = require('mongoose')
|
||||
import mongoose from 'mongoose'
|
||||
|
||||
// Force test environment
|
||||
// make sure environment variable is set before this file gets called.
|
||||
// see test script in package.json.
|
||||
// process.env.KOA_ENV = 'test'
|
||||
const config = require('../../config')
|
||||
import config from '../../config'
|
||||
|
||||
const User = require('../../src/models/users')
|
||||
import User from '../../src/models/users'
|
||||
|
||||
async function deleteUsers () {
|
||||
// Connect to the Mongo Database.
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
const mongoose = require('mongoose')
|
||||
|
||||
const config = require('../../config')
|
||||
|
||||
const Order = require('../../src/adapters/localdb/models/order')
|
||||
import mongoose from 'mongoose'
|
||||
import config from '../../config'
|
||||
import Order from '../../src/adapters/localdb/models/order'
|
||||
|
||||
async function getOrder () {
|
||||
// Connect to the Mongo Database.
|
||||
|
||||
@@ -7,11 +7,12 @@
|
||||
*/
|
||||
|
||||
// Public npm libraries
|
||||
const BCHJS = require('@psf/bch-js')
|
||||
const BchTokenSweep = require('bch-token-sweep/index')
|
||||
import BCHJS from '@psf/bch-js'
|
||||
|
||||
import BchTokenSweep from 'bch-token-sweep/index'
|
||||
|
||||
// Local libraries
|
||||
const WalletAdapter = require('../../src/adapters/wallet')
|
||||
import WalletAdapter from '../../src/adapters/wallet'
|
||||
|
||||
// Constants
|
||||
const EMTPY_ADDR_CUTOFF = 15
|
||||
|
||||
Reference in New Issue
Block a user