Skip to content

Commit

Permalink
Merge pull request #43 from AbdulAhadArain/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
AbdulAhadArain authored Sep 25, 2024
2 parents c8d992f + 70835e3 commit 8a84733
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/services/transaction.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,15 @@ export const getTxs = async (
(param: any) => param.name === 'remoteChainId',
).value;

// Find matching mineRemoteBlock transactions
// Log 'to' contract address for finalize transaction
const finalizeContractAddress = finalizeTx.to;

// Find matching mineRemoteBlock transactions using find instead of findOne
const matchingMineRemoteBlockTx =
await QuantumPortalTransactionModel.findOne({
method: 'mineRemoteBlock',
$and: [
{ to: finalizeContractAddress },
{
'decodedInput.parameters': {
$elemMatch: {
Expand Down Expand Up @@ -102,8 +106,10 @@ export const getTxs = async (
? matchingRecords.length
: results.length,
};

return result;
};

export const getInternalTxs = async (
address: string,
page: number,
Expand Down Expand Up @@ -263,7 +269,7 @@ export const getAllTransactions = async (
};

export const saveTransactions = async (txs: any[]) => {
console.log({ txs });
// console.log({ txs });
return await QuantumPortalTransactionModel.insertMany(txs);
};

Expand Down

0 comments on commit 8a84733

Please sign in to comment.