Skip to content

Commit

Permalink
Consolidate addNewTxn and updateTxn function which are now the same
Browse files Browse the repository at this point in the history
  • Loading branch information
jinchung committed Dec 1, 2024
1 parent 916b3b3 commit d8e9f8b
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/core/utils/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -514,22 +514,10 @@ export function addNewTransaction({
chainId: ChainId;
transaction: NewTransaction;
}) {
const { setNonce } = nonceStore.getState();
const { updatePendingTransaction } = pendingTransactionsStore.getState();
const { currentCurrency } = currentCurrencyStore.getState();
const newPendingTransaction = parseNewTransaction(
transaction,
currentCurrency,
);

updatePendingTransaction({
address,
pendingTransaction: newPendingTransaction,
});
setNonce({
updateTransaction({
address,
chainId,
currentNonce: transaction.nonce,
transaction,
});
}

Expand Down

0 comments on commit d8e9f8b

Please sign in to comment.