Skip to content

Commit

Permalink
fix: filter signingTx by tx.from (#2284)
Browse files Browse the repository at this point in the history
  • Loading branch information
heisenberg-2077 authored May 23, 2024
1 parent 5d6345c commit eed44a2
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/background/service/transactionHistory.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { createPersistStore } from 'background/utils';
import { createPersistStore, isSameAddress } from 'background/utils';
import maxBy from 'lodash/maxBy';
import cloneDeep from 'lodash/cloneDeep';
import { Object as ObjectType } from 'ts-toolbelt';
Expand Down Expand Up @@ -881,10 +881,17 @@ class TxHistory {
);

const firstSigningTx = this._signingTxList.find((item) => {
return item.rawTx.chainId === chainId && !item.isSubmitted;
return (
item.rawTx.chainId === chainId &&
!item.isSubmitted &&
isSameAddress(item.rawTx.from, address)
);
});
const processingTx = this._signingTxList.find(
(item) => item.rawTx.chainId === chainId && item.isSubmitted
(item) =>
item.rawTx.chainId === chainId &&
item.isSubmitted &&
isSameAddress(item.rawTx.from, address)
);

if (!maxNonceTx) return null;
Expand Down

0 comments on commit eed44a2

Please sign in to comment.