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

Commit

Permalink
add token.addressOverrides to config
Browse files Browse the repository at this point in the history
accidentally omitted some changes from the last commit
  • Loading branch information
levity committed Mar 23, 2020
1 parent 21a7049 commit 37be401
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/dai/src/eth/EthereumTokenService.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ export default class EthereumTokenService extends PrivateService {
? tokenInfoList[version - 1]
: tokenInfoList[tokenInfoList.length - 1];

if (this._addressOverrides[symbol])
tokenInfo.address = this._addressOverrides[symbol];

if (typeof tokenInfo.address === 'string') return tokenInfo;

Expand Down
2 changes: 1 addition & 1 deletion packages/dai/test/eth/EthereumTokenService.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ test('addressOverrides', async () => {

expect(service.getToken('PETH')._contract.address).toBe('0xmockpeth');
expect(service.getToken('WETH')._contract.address).toBe('0xmockweth');
});
});

0 comments on commit 37be401

Please sign in to comment.