Compare commits

...
8 Commits
8 changed files with 12 additions and 11 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ services:
#build:
# context: ./bch-dex/
# dockerfile: Dockerfile
image: christroutner/bch-dex:v2.0.0
image: christroutner/bch-dex:v2.0.6
container_name: bch-dex
environment:
CONSUMER_URL: 'https://free-bch.fullstack.cash'
+1 -1
View File
@@ -70,7 +70,7 @@ services:
#build:
# context: ./bch-dex/
# dockerfile: Dockerfile
image: christroutner/bch-dex-rpi:v2.0.0
image: christroutner/bch-dex-rpi:v2.0.6
container_name: bch-dex
environment:
#CONSUMER_URL: 'https://free-bch.fullstack.cash'
@@ -43,6 +43,6 @@ export IPFS_TCP_PORT=4001
export IPFS_WS_PORT=4003
# P2WDB specific env vars
export ORBITDB_NAME=/orbitdb/zdpuAqNiwLiJBfbRK7uihV2hAbNSXj78ufzv5VyQb8GuvRwDh/psf-bch-p2wdb-keyvalue-v3.0.0-0001
#export ORBITDB_NAME=/orbitdb/zdpuAqNiwLiJBfbRK7uihV2hAbNSXj78ufzv5VyQb8GuvRwDh/psf-bch-p2wdb-keyvalue-v3.0.0-0001
npm start
+1 -1
View File
@@ -6,7 +6,7 @@ const Offer = new mongoose.Schema({
tokenId: { type: String },
utxoTxid: { type: String },
utxoVout: { type: Number },
ticker: { type: String },
ticker: { type: String, default: '' },
tokenType: { type: Number },
// Trade data
+2 -2
View File
@@ -29,7 +29,7 @@ class OfferEntity {
utxoVout,
offerStatus,
makerAddr,
// ticker,
ticker,
tokenType
} = offerData.data
@@ -95,7 +95,7 @@ class OfferEntity {
p2wdbHash: offerData.hash,
offerStatus: offerStatus || this.offerStatus[0],
makerAddr,
// ticker,
ticker,
tokenType
}
+2 -2
View File
@@ -55,7 +55,7 @@ class OrderLib {
// const tokenData = await this.adapters.wallet.bchWallet.getTxData([entryObj.tokenId])
const tokenData = await this.retryQueue.addToQueue(this.adapters.wallet.bchWallet.getTxData, [entryObj.tokenId])
// console.log(`tokenData: ${JSON.stringify(tokenData, null, 2)}`)
entryObj.ticker = tokenData[0].tokenTicker
orderEntity.ticker = tokenData[0].tokenTicker
// Move the tokens to holding address.
const moveObj = {
@@ -123,7 +123,7 @@ class OrderLib {
// Get UTXOs.
const utxos = this.adapters.wallet.bchWallet.utxos.utxoStore
console.log(`utxos: ${JSON.stringify(utxos, null, 2)}`)
// console.log(`utxos: ${JSON.stringify(utxos, null, 2)}`)
if (orderEntity.buyOrSell.includes('sell')) {
// Sell Order
+2 -1
View File
@@ -103,7 +103,8 @@ describe('#order-use-case', () => {
buyOrSell: 'sell',
rateInBaseUnit: 1000,
minUnitsToExchange: 1250,
numTokens: 1
numTokens: 1,
ticker: 'TEST'
}
// Mock dependencies and force expected code path
+2 -2
View File
@@ -1,6 +1,6 @@
import mongoose from 'mongoose'
import config from '../../config'
import Order from '../../src/adapters/localdb/models/order'
import config from '../../config/index.js'
import Order from '../../src/adapters/localdb/models/order.js'
async function getOrder () {
// Connect to the Mongo Database.