Skip to content

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 a47ad4a commit e75cc5c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions apps/whale-api/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 apps/whale-api/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 apps/whale-api/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 e75cc5c

Please sign in to comment.