aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-07-07 01:18:38 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-07-07 01:18:38 +0800
commitb1667cdd89417f834582cb265f3b631cb57d1f1e (patch)
tree8b17b1733985d70c79ef98a34df001dedbb974f5
parent87f2658fc986504a9117530ae15c517eadf57ed7 (diff)
downloaddexon-sol-tools-b1667cdd89417f834582cb265f3b631cb57d1f1e.tar
dexon-sol-tools-b1667cdd89417f834582cb265f3b631cb57d1f1e.tar.gz
dexon-sol-tools-b1667cdd89417f834582cb265f3b631cb57d1f1e.tar.bz2
dexon-sol-tools-b1667cdd89417f834582cb265f3b631cb57d1f1e.tar.lz
dexon-sol-tools-b1667cdd89417f834582cb265f3b631cb57d1f1e.tar.xz
dexon-sol-tools-b1667cdd89417f834582cb265f3b631cb57d1f1e.tar.zst
dexon-sol-tools-b1667cdd89417f834582cb265f3b631cb57d1f1e.zip
Fix comments to use web3 provider instead of web3 instance
-rw-r--r--src/0x.ts11
-rw-r--r--src/utils/assert.ts4
-rw-r--r--test/0x.js_test.ts2
-rw-r--r--test/assert_test.ts2
4 files changed, 10 insertions, 9 deletions
diff --git a/src/0x.ts b/src/0x.ts
index 7e6c38c36..bef12fe7f 100644
--- a/src/0x.ts
+++ b/src/0x.ts
@@ -164,7 +164,7 @@ export class ZeroEx {
this.etherToken = new EtherTokenWrapper(this._web3Wrapper, this.token);
}
/**
- * Sets a new provider for the web3 instance used by 0x.js. Updating the provider will stop all
+ * Sets a new web3 provider for 0x.js. Updating the provider will stop all
* subscriptions so you will need to re-subscribe to all events relevant to your app after this call.
* @param provider The Web3Provider you would like the 0x.js library to use from now on.
*/
@@ -177,7 +177,7 @@ export class ZeroEx {
(this.etherToken as any)._invalidateContractInstance();
}
/**
- * Get user Ethereum addresses available through the supplied web3 instance available for sending transactions.
+ * Get user Ethereum addresses available through the supplied web3 provider available for sending transactions.
* @return An array of available user Ethereum addresses.
*/
public async getAvailableAddressesAsync(): Promise<string[]> {
@@ -257,7 +257,8 @@ export class ZeroEx {
}
/**
* Returns the ethereum addresses of all available exchange contracts
- * on the network that the provided web3 instance is connected to
+ * supported by this library on the network that the supplied web3
+ * provider is connected to
* @return The ethereum addresses of all available exchange contracts.
*/
public async getAvailableExchangeContractAddressesAsync(): Promise<string[]> {
@@ -277,8 +278,8 @@ export class ZeroEx {
}
/**
* Returns the ethereum addresses of all available exchange contracts
- * on the network that the provided web3 instance is connected to
- * that are currently authorized on the Proxy contract
+ * supported by this library on the network that the supplied web3
+ * provider is connected to that are currently authorized by the Proxy contract
* @return The ethereum addresses of all available and authorized exchange contract.
*/
public async getProxyAuthorizedExchangeContractAddressesAsync(): Promise<string[]> {
diff --git a/src/utils/assert.ts b/src/utils/assert.ts
index b3c30c11d..00415602d 100644
--- a/src/utils/assert.ts
+++ b/src/utils/assert.ts
@@ -43,12 +43,12 @@ export const assert = {
assert.isETHAddressHex(variableName, senderAddressHex);
const isSenderAddressAvailable = await web3Wrapper.isSenderAddressAvailableAsync(senderAddressHex);
assert.assert(isSenderAddressAvailable,
- `Specified ${variableName} ${senderAddressHex} isn't available through the supplied web3 instance`,
+ `Specified ${variableName} ${senderAddressHex} isn't available through the supplied web3 provider`,
);
},
async isUserAddressAvailableAsync(web3Wrapper: Web3Wrapper): Promise<void> {
const availableAddresses = await web3Wrapper.getAvailableAddressesAsync();
- this.assert(!_.isEmpty(availableAddresses), 'No addresses were available on the provided web3 instance');
+ this.assert(!_.isEmpty(availableAddresses), 'No addresses were available on the provided web3 provider');
},
hasAtMostOneUniqueValue(value: any[], errMsg: string): void {
this.assert(_.uniq(value).length <= 1, errMsg);
diff --git a/test/0x.js_test.ts b/test/0x.js_test.ts
index cc30afd90..0d8d63985 100644
--- a/test/0x.js_test.ts
+++ b/test/0x.js_test.ts
@@ -33,7 +33,7 @@ describe('ZeroEx library', () => {
expect((zeroEx.exchange as any)._exchangeContractByAddress[exchangeContractAddress]).to.be.undefined();
expect((zeroEx.tokenRegistry as any)._tokenRegistryContractIfExists).to.be.undefined();
- // Check that all nested web3 instances return the updated provider
+ // Check that all nested web3 wrapper instances return the updated provider
const nestedWeb3WrapperProvider = (zeroEx as any)._web3Wrapper.getCurrentProvider();
expect((nestedWeb3WrapperProvider as any).zeroExTestId).to.be.a('number');
const exchangeWeb3WrapperProvider = (zeroEx.exchange as any)._web3Wrapper.getCurrentProvider();
diff --git a/test/assert_test.ts b/test/assert_test.ts
index 6a8d30716..bfca95d9c 100644
--- a/test/assert_test.ts
+++ b/test/assert_test.ts
@@ -21,7 +21,7 @@ describe('Assertion library', () => {
const varName = 'address';
return expect(assert.isSenderAddressAsync(varName, validUnrelatedAddress, (zeroEx as any)._web3Wrapper))
.to.be.rejectedWith(
- `Specified ${varName} ${validUnrelatedAddress} isn't available through the supplied web3 instance`,
+ `Specified ${varName} ${validUnrelatedAddress} isn't available through the supplied web3 provider`,
);
});
it('doesn\'t throw if address is available', async () => {