Skip to content

Commit

Permalink
Fix global key manager token type view issue
Browse files Browse the repository at this point in the history
  • Loading branch information
SavinduDimal committed Mar 22, 2024
1 parent 5cca1d6 commit 038e202
Showing 1 changed file with 19 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,25 @@ function globalAPICall() {
return new API()
.getGlobalKeyManagersList()
.then((result) => {
return result.body.list;
const resultList = result.body.list;
resultList.forEach((item) => {
if (item.tokenType === 'DIRECT') {
// eslint-disable-next-line no-param-reassign
item.tokenType = <Chip variant='outlined' color='primary' size='small' label='Direct' />;
} else if (item.tokenType === 'BOTH') {
// eslint-disable-next-line no-param-reassign
item.tokenType = (
<div>
<Chip variant='outlined' color='primary' size='small' label='Direct' />
<Chip variant='outlined' color='primary' size='small' label='Exchange' />
</div>
);
} else {
// eslint-disable-next-line no-param-reassign
item.tokenType = <Chip variant='outlined' color='primary' size='small' label='Exchange' />;
}
});
return resultList;
})
.catch((error) => {
throw error;
Expand Down

0 comments on commit 038e202

Please sign in to comment.