Skip to content

Commit

Permalink
Merge pull request #30 from MHaris-Ferrum/develop
Browse files Browse the repository at this point in the history
transaction api updated for address queruy
  • Loading branch information
AbdulAhadArain authored Aug 26, 2024
2 parents d55f7b5 + e7b3b9a commit 7e1debb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ app.use(express.urlencoded({ extended: true }));
app.use(cors());
app.options('*', cors());

app.use(crons);
// app.use(crons);
app.use('/v1/api', router);

// send back a 404 error for any unknown api request
Expand Down
4 changes: 2 additions & 2 deletions src/services/transaction.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const getTxs = async (
): Promise<any> => {
const query: any = {};
if (address) {
query.$or = [{ sourceMsgSender: address }, { remoteContract: address }];
query.$or = [{ from: address }, { to: address }];
}
const docsPromise = QuantumPortalTransactionModel.find(query)
.sort({ timestamp: -1 })
Expand Down Expand Up @@ -161,8 +161,8 @@ export const fetchRemoteTransactionWithMinedAndFinalizedTx = async (
const provider = new ethers.providers.JsonRpcProvider(process.env.RPC_URL);
// console.log('Fetching provider ', provider);
let tx = await provider.getTransaction(txHash);
console.log('Found transaction,', tx);
if (tx === null) {
console.log('Found transaction,', tx, tx === null);
return new Error('Transaction not found');
}
const block = await provider.getBlock(tx?.blockNumber);
Expand Down

0 comments on commit 7e1debb

Please sign in to comment.