From 946978e454a93b9642a9ed261229ea749e71fd2f Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 18 Sep 2017 17:24:54 +0200 Subject: Add explanatory comment --- src/0x.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/0x.ts b/src/0x.ts index 37e25eb0f..70d0c7acf 100644 --- a/src/0x.ts +++ b/src/0x.ts @@ -315,6 +315,12 @@ export class ZeroEx { }); return txReceiptPromise; } + /* + * `TokenWrapper` needs a token transfer proxy address. `TokenTransferProxy` address is fetched from + * an `ExchnageWrapper`. `ExchangeWrapper` needs `TokenWrapper` to validate orders. Cycle. + * In order to break this - we create this function here and pass it as a parameter to the `TokenWrapper` + * and `ProxyWrapper`. + */ private async _getTokenTransferProxyAddressAsync(): Promise { const tokenTransferProxyAddress = await (this.exchange as any)._getTokenTransferProxyAddressAsync(); return tokenTransferProxyAddress; -- cgit v1.2.3