aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/exchange_wrapper_test.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/exchange_wrapper_test.ts b/test/exchange_wrapper_test.ts
index cf828bd8d..dc68e44bd 100644
--- a/test/exchange_wrapper_test.ts
+++ b/test/exchange_wrapper_test.ts
@@ -23,6 +23,7 @@ import {DoneCallback} from '../src/types';
import {FillScenarios} from './utils/fill_scenarios';
import {TokenUtils} from './utils/token_utils';
import {assert} from '../src/utils/assert';
+import {ProxyWrapper} from '../src/contract_wrappers/proxy_wrapper';
chaiSetup.configure();
const expect = chai.expect;
@@ -819,4 +820,15 @@ describe('ExchangeWrapper', () => {
});
});
});
+ describe('#getProxyAuthorizedContractAddressesAsync', () => {
+ it('returns the Proxy authorized exchange contract addresses', async () => {
+ const exchangeAddresses = await zeroEx.exchange.getProxyAuthorizedContractAddressesAsync();
+ for (const exchangeAddress of exchangeAddresses) {
+ assert.isETHAddressHex('exchangeAddress', exchangeAddress);
+ const proxyWrapper = (zeroEx as any)._proxyWrapper as ProxyWrapper;
+ const isAuthorized = await proxyWrapper.isAuthorizedAsync(exchangeAddress);
+ expect(isAuthorized).to.be.true();
+ }
+ });
+ });
});