Skip to content

Commit

Permalink
fixed seq and digest out of sync (MystenLabs#1925)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jibz1 authored May 12, 2022
1 parent a6a42e1 commit 1bf632f
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,16 @@ async function getRecentTransactions(txNum: number): Promise<TxnData[]> {
.then((res: GetTxnDigestsResponse) => res);

const digests = transactions.map((tx) => tx[1]);

const txLatest = await rpc
.getTransactionWithEffectsBatch(digests)
.then((txEffs: TransactionEffectsResponse[]) => {
return txEffs.map((txEff, i) => {
const [seq, digest] = transactions[i];
const [seq, digest] = transactions.filter(
(transactionId) =>
transactionId[1] ===
txEff.effects.transaction_digest
)[0];
const res: CertifiedTransaction = txEff.certificate;
const singleTransaction = getSingleTransactionKind(
res.data
Expand Down

0 comments on commit 1bf632f

Please sign in to comment.