Skip to content

Commit

Permalink
fix(30371): refresh activity page (#30571)
Browse files Browse the repository at this point in the history
## **Description**

Fix Issue #30371 , where refreshing the activity page would throw an
error

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/30373?quickstart=1)

## **Related issues**

Fixes: #30371 #30366

## **Manual testing steps**

1. Create a bridge between two tokens from different chains
2. Go to the activity page and click on the bridge transaction details
3. refresh the page

## **Screenshots/Recordings**

### **Before**


https://github.com/user-attachments/assets/5dd7eda1-30f1-41f5-90bc-c0a4d2d74d74

### **After**


https://github.com/user-attachments/assets/d14c402e-ac0d-4c36-8535-d02bf89645df



## **Pre-merge author checklist**

- [x] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask
Extension Coding
Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [x] I've completed the PR template to the best of my ability
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.

## **Pre-merge reviewer checklist**

- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
  • Loading branch information
GustavoRSSilva authored Feb 25, 2025
1 parent f0b840a commit d249fa7
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions ui/pages/bridge/transaction-details/transaction-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ const CrossChainSwapTxDetails = () => {
getNetworkConfigurationsByChainId,
);

const { transactionGroup, isEarliestNonce } = location.state as {
transactionGroup: TransactionGroup;
isEarliestNonce: boolean;
};
const transactionGroup: TransactionGroup | null =
location.state?.transactionGroup || null;
const isEarliestNonce: boolean | null =
location.state?.isEarliestNonce || null;
const srcChainTxMeta = selectedAddressTxList.find(
(tx) => tx.id === srcTxMetaId,
);
Expand Down Expand Up @@ -457,12 +457,13 @@ const CrossChainSwapTxDetails = () => {
: undefined
}
/>

<TransactionActivityLog
transactionGroup={transactionGroup}
className="transaction-list-item-details__transaction-activity-log"
isEarliestNonce={isEarliestNonce}
/>
{transactionGroup && typeof isEarliestNonce !== 'undefined' && (
<TransactionActivityLog
transactionGroup={transactionGroup}
className="transaction-list-item-details__transaction-activity-log"
isEarliestNonce={isEarliestNonce}
/>
)}
</Box>
</Box>
</Content>
Expand Down

0 comments on commit d249fa7

Please sign in to comment.