Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore BN export #428

Merged
merged 1 commit into from
Mar 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/assets/TokenBalancesController.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { PreferencesController } from '../user/PreferencesController';
import { AssetsController } from './AssetsController';
import { Token } from './TokenRatesController';
import { AssetsContractController } from './AssetsContractController';
import TokenBalancesController from './TokenBalancesController';
import { BN as exportedBn, TokenBalancesController } from './TokenBalancesController';

const MAINNET_PROVIDER = new HttpProvider('https://mainnet.infura.io');

Expand All @@ -28,6 +28,10 @@ describe('TokenBalancesController', () => {
sandbox.restore();
});

it('should re-export BN', () => {
expect(exportedBn).toEqual(BN);
});

it('should set default state', () => {
expect(tokenBalances.state).toEqual({ contractBalances: {} });
});
Expand Down
3 changes: 3 additions & 0 deletions src/assets/TokenBalancesController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import AssetsController from './AssetsController';
import { Token } from './TokenRatesController';
import { AssetsContractController } from './AssetsContractController';

// TODO: Remove this export in the next major release
export { BN };

/**
* @type TokenBalancesConfig
*
Expand Down