Skip to content

Commit

Permalink
fix: temporary fix to support displaying NFT extents which are arrays…
Browse files Browse the repository at this point in the history
… of objects (#1094)
  • Loading branch information
katelynsills authored May 11, 2020
1 parent d981d27 commit 07e554b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
4 changes: 2 additions & 2 deletions packages/wallet-frontend/src/components/Inbox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export default function Inbox() {
<Typography key={`give${role}`} variant="body1">
{i === 0 ? 'Give' : <>and&nbsp;give</>}&nbsp;
<Box component="span" fontWeight={800}>
{extent}
{JSON.stringify(extent)}
&nbsp;
{pet(issuerPetname)}
</Box>
Expand All @@ -192,7 +192,7 @@ export default function Inbox() {
<>and&nbsp;receieve</>
}&nbsp;
<Box component="span" fontWeight={800}>
{extent}
{JSON.stringify(extent)}
&nbsp;
{pet(issuerPetname)}
</Box>
Expand Down
31 changes: 20 additions & 11 deletions packages/wallet-frontend/src/components/Purses.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,26 @@ export default function Purses() {
<Typography variant="h6">Purses</Typography>
{Array.isArray(purses) && purses.length > 0 ? (
<List>
{purses.map(({ pursePetname, brandRegKey, issuerPetname, extent }) => (
<ListItem key={pursePetname} value={pursePetname} divider>
<ListItemIcon className={classes.icon}>
<PurseIcon />
</ListItemIcon>
<ListItemText
primary={pursePetname}
secondary={<><b>{extent} {issuerPetname}</b> {brandRegKey ? <i>({brandRegKey})</i> : ''}</>}
/>
</ListItem>
))}
{purses.map(
({ pursePetname, brandRegKey, issuerPetname, extent }) => (
<ListItem key={pursePetname} value={pursePetname} divider>
<ListItemIcon className={classes.icon}>
<PurseIcon />
</ListItemIcon>
<ListItemText
primary={pursePetname}
secondary={
<>
<b>
{JSON.stringify(extent)} {issuerPetname}
</b>{' '}
{brandRegKey ? <i>({brandRegKey})</i> : ''}
</>
}
/>
</ListItem>
),
)}
</List>
) : (
<Typography color="inherit">No purses.</Typography>
Expand Down

0 comments on commit 07e554b

Please sign in to comment.