Skip to content

Commit

Permalink
fix: fix appearance of buttons in panel
Browse files Browse the repository at this point in the history
  • Loading branch information
samwel141 committed May 21, 2024
1 parent 42a7813 commit 6102d32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/pages/TrustRelationship/trustRelationshipSidePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function TrustRelationshipSidePanel({ open, onClose, rowInfo }) {
</TallTypography>
</Grid>
</Grid>
{rowInfo.state === 'requested' && (
{rowInfo.state === 'requested' && rowInfo.originating_wallet === rowInfo.target_wallet && (
<Grid sx={3} style={{ margin: '5rem 4rem' }}>
<AcceptButton
variant="contained"
Expand All @@ -145,7 +145,7 @@ function TrustRelationshipSidePanel({ open, onClose, rowInfo }) {
</DeclineButton>
</Grid>
)}
{rowInfo.state === 'trusted' && (
{(rowInfo.state === 'trusted' || rowInfo.originating_wallet !== rowInfo.target_wallet) && (
<Grid sx={3} style={{ margin: '5rem 7.2rem', backgroundColor: 'red', borderRadius: 8, padding: '10px' }}>
<DeleteButton onClick={() => handleDelete(rowInfo.id)}>
Delete
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ describe('Trust Relationship side Panel', () => {
expect(screen.getByText('Target Wallet:')).toBeInTheDocument();
expect(screen.getByText('Initiated By:')).toBeInTheDocument();
expect(screen.getByText('Request Type:')).toBeInTheDocument();
expect(screen.getByText('Accept')).toBeInTheDocument();
expect(screen.getByText('Decline')).toBeInTheDocument();
});
});

Expand Down

0 comments on commit 6102d32

Please sign in to comment.