aboutsummaryrefslogtreecommitdiffstats
path: root/src
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 /src
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
Diffstat (limited to 'src')
-rw-r--r--src/0x.ts11
-rw-r--r--src/utils/assert.ts4
2 files changed, 8 insertions, 7 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);