Skip to content

Commit

Permalink
Simplify updateTransaction which matches addNewTransaction
Browse files Browse the repository at this point in the history
  • Loading branch information
jinchung committed Nov 27, 2024
1 parent 3b9a7c5 commit d1da797
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/state/pendingTransactions/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,9 @@ export const updateTransaction = ({
chainId: ChainId;
transaction: NewTransaction;
}) => {
const { addPendingTransaction } = pendingTransactionsStore.getState();
const { setNonce } = nonceStore.getState();
const parsedTransaction = convertNewTransactionToRainbowTransaction(transaction);
addPendingTransaction({ address, pendingTransaction: parsedTransaction });
setNonce({
addNewTransaction({
address,
chainId,
currentNonce: transaction.nonce,
transaction,
});
};

0 comments on commit d1da797

Please sign in to comment.