Compare commits

...
2 Commits
Author SHA1 Message Date
Chris Troutner 7ae557d143 Merge pull request #89 from Permissionless-Software-Foundation/ct-unstable
fix(debug): Adding debugging conosole.logs to bch-dex
2025-05-09 13:17:04 -07:00
Chris Troutner 5f4b0c8da3 fix(debug): Adding debugging conosole.logs to bch-dex 2025-05-09 13:15:39 -07:00
4 changed files with 7 additions and 3 deletions
+3
View File
@@ -468,6 +468,7 @@ class WalletAdapter {
async completeTx (hex, hdIndex) {
try {
// console.log('hex: ', hex)
console.log('completeTx() hdIndex: ', hdIndex)
const bchjs = this.bchWallet.bchjs
@@ -492,6 +493,8 @@ class WalletAdapter {
// 'mainnet'
// )
console.log('completeTx() this.walletInfo: ', this.walletInfo)
// Get the keypair for the address used in the Order
const keyPair = await this.getKeyPair(hdIndex)
console.log(`maker keyPair: ${JSON.stringify(keyPair, null, 2)}`)
+2 -2
View File
@@ -514,7 +514,7 @@ class OfferUseCases {
// 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
// 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.
async acceptCounterOffer (offerData) {
try {
@@ -535,7 +535,7 @@ class OfferUseCases {
let orderData = {}
try {
orderData = await this.orderUseCase.findOrderByUtxo(offerData)
// console.log(`orderData: ${JSON.stringify(orderData, null, 2)}`)
console.log(`orderData: ${JSON.stringify(orderData, null, 2)}`)
} catch (err) {
console.log('Order matching this Counter Offer is not managed by this instance of bch-dex. Skipping.')
+1
View File
@@ -67,6 +67,7 @@ class OrderLib {
await userWallet.initialize()
// Specify the address to send payment.
console.log('userWallet.walletInfo: ', userWallet.walletInfo)
entryObj.makerAddr = userWallet.walletInfo.cashAddress
console.log('entryObj.makerAddr: ', entryObj.makerAddr)
// console.log('entryObj.makerAddr: ', entryObj.makerAddr)
+1 -1
View File
@@ -1,6 +1,6 @@
import mongoose from 'mongoose'
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 () {
// Connect to the Mongo Database.