mirror of
https://github.com/Permissionless-Software-Foundation/bch-dex.git
synced 2026-09-21 16:52:00 -07:00
fix(debug): Adding debugging conosole.logs to bch-dex
This commit is contained in:
@@ -468,6 +468,7 @@ class WalletAdapter {
|
|||||||
async completeTx (hex, hdIndex) {
|
async completeTx (hex, hdIndex) {
|
||||||
try {
|
try {
|
||||||
// console.log('hex: ', hex)
|
// console.log('hex: ', hex)
|
||||||
|
console.log('completeTx() hdIndex: ', hdIndex)
|
||||||
|
|
||||||
const bchjs = this.bchWallet.bchjs
|
const bchjs = this.bchWallet.bchjs
|
||||||
|
|
||||||
@@ -492,6 +493,8 @@ class WalletAdapter {
|
|||||||
// 'mainnet'
|
// 'mainnet'
|
||||||
// )
|
// )
|
||||||
|
|
||||||
|
console.log('completeTx() this.walletInfo: ', this.walletInfo)
|
||||||
|
|
||||||
// Get the keypair for the address used in the Order
|
// Get the keypair for the address used in the Order
|
||||||
const keyPair = await this.getKeyPair(hdIndex)
|
const keyPair = await this.getKeyPair(hdIndex)
|
||||||
console.log(`maker keyPair: ${JSON.stringify(keyPair, null, 2)}`)
|
console.log(`maker keyPair: ${JSON.stringify(keyPair, null, 2)}`)
|
||||||
|
|||||||
@@ -514,7 +514,7 @@ class OfferUseCases {
|
|||||||
|
|
||||||
// This function is called by the P2WDB webhook REST API handler. When a
|
// This function is called by the P2WDB webhook REST API handler. When a
|
||||||
// Counter Offer is passed to bch-dex by the P2WDB, the data is then passed
|
// Counter Offer is passed to bch-dex by the P2WDB, the data is then passed
|
||||||
// to this function. It does due dilligence on the Counter Offer, then signs
|
// to this function. It does due diligence on the Counter Offer, then signs
|
||||||
// and broadcasts the transaction to accept the Counter Offer.
|
// and broadcasts the transaction to accept the Counter Offer.
|
||||||
async acceptCounterOffer (offerData) {
|
async acceptCounterOffer (offerData) {
|
||||||
try {
|
try {
|
||||||
@@ -535,7 +535,7 @@ class OfferUseCases {
|
|||||||
let orderData = {}
|
let orderData = {}
|
||||||
try {
|
try {
|
||||||
orderData = await this.orderUseCase.findOrderByUtxo(offerData)
|
orderData = await this.orderUseCase.findOrderByUtxo(offerData)
|
||||||
// console.log(`orderData: ${JSON.stringify(orderData, null, 2)}`)
|
console.log(`orderData: ${JSON.stringify(orderData, null, 2)}`)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log('Order matching this Counter Offer is not managed by this instance of bch-dex. Skipping.')
|
console.log('Order matching this Counter Offer is not managed by this instance of bch-dex. Skipping.')
|
||||||
|
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ class OrderLib {
|
|||||||
await userWallet.initialize()
|
await userWallet.initialize()
|
||||||
|
|
||||||
// Specify the address to send payment.
|
// Specify the address to send payment.
|
||||||
|
console.log('userWallet.walletInfo: ', userWallet.walletInfo)
|
||||||
entryObj.makerAddr = userWallet.walletInfo.cashAddress
|
entryObj.makerAddr = userWallet.walletInfo.cashAddress
|
||||||
console.log('entryObj.makerAddr: ', entryObj.makerAddr)
|
console.log('entryObj.makerAddr: ', entryObj.makerAddr)
|
||||||
// console.log('entryObj.makerAddr: ', entryObj.makerAddr)
|
// console.log('entryObj.makerAddr: ', entryObj.makerAddr)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import mongoose from 'mongoose'
|
import mongoose from 'mongoose'
|
||||||
import config from '../../config/index.js'
|
import config from '../../config/index.js'
|
||||||
import User from '../../src/models/users.js'
|
import User from '../../src/adapters/localdb/models/users.js'
|
||||||
|
|
||||||
async function getUsers () {
|
async function getUsers () {
|
||||||
// Connect to the Mongo Database.
|
// Connect to the Mongo Database.
|
||||||
|
|||||||
Reference in New Issue
Block a user