Skip to content
This repository has been archived by the owner on Jun 3, 2022. It is now read-only.

Commit

Permalink
Added displaySymbol to address controller (#376)
Browse files Browse the repository at this point in the history
  • Loading branch information
monstrobishi authored Sep 1, 2021
1 parent c603297 commit 8c2a646
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/whale-api-client/src/api/address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export interface AddressToken {
id: string
amount: string
symbol: string
displaySymbol: string
symbolKey: string
name: string
isDAT: boolean
Expand Down
1 change: 1 addition & 0 deletions src/module.api/address.controller.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ describe('listTokens', () => {
id: '6',
amount: '10.00000000',
symbol: 'F',
displaySymbol: 'dF',
symbolKey: 'F',
name: 'F',
isDAT: true,
Expand Down
1 change: 1 addition & 0 deletions src/module.api/address.controller.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ describe('listTokens', () => {
id: '6',
amount: '10.00000000',
symbol: 'F',
displaySymbol: 'dF',
symbolKey: 'F',
name: 'F',
isDAT: true,
Expand Down
3 changes: 2 additions & 1 deletion src/module.api/address.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ function mapAddressToken (id: string, tokenInfo: TokenInfo, value: BigNumber): A
symbolKey: tokenInfo.symbolKey,
name: tokenInfo.name,
isDAT: tokenInfo.isDAT,
isLPS: tokenInfo.isLPS
isLPS: tokenInfo.isLPS,
displaySymbol: tokenInfo.isDAT && tokenInfo.symbol !== 'DFI' && !tokenInfo.isLPS ? `d${tokenInfo.symbol}` : tokenInfo.symbol
}
}

0 comments on commit 8c2a646

Please sign in to comment.