aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/0x.js/package.json3
-rw-r--r--packages/abi-gen/package.json3
-rw-r--r--packages/assert/package.json3
-rw-r--r--packages/base-contract/package.json3
-rw-r--r--packages/chai-as-promised-typescript-typings/package.json3
-rw-r--r--packages/chai-typescript-typings/package.json5
-rw-r--r--packages/connect/package.json3
-rw-r--r--packages/deployer/package.json3
-rw-r--r--packages/dev-utils/package.json3
-rw-r--r--packages/ethers-typescript-typings/package.json3
-rw-r--r--packages/json-schemas/package.json3
-rw-r--r--packages/subproviders/package.json3
-rw-r--r--packages/tslint-config/package.json3
-rw-r--r--packages/types/package.json3
-rw-r--r--packages/utils/package.json3
-rw-r--r--packages/web3-typescript-typings/package.json3
-rw-r--r--packages/web3-wrapper/package.json3
-rw-r--r--packages/website/ts/index.tsx8
-rw-r--r--packages/website/ts/utils/utils.ts25
19 files changed, 78 insertions, 8 deletions
diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json
index c2fc9321c..4a4d6d2c8 100644
--- a/packages/0x.js/package.json
+++ b/packages/0x.js/package.json
@@ -98,5 +98,8 @@
"uuid": "^3.1.0",
"web3": "^0.20.0",
"web3-typescript-typings": "^0.10.0"
+ },
+ "publishConfig": {
+ "access": "public"
}
}
diff --git a/packages/abi-gen/package.json b/packages/abi-gen/package.json
index ed7a63761..1045b34e0 100644
--- a/packages/abi-gen/package.json
+++ b/packages/abi-gen/package.json
@@ -45,5 +45,8 @@
"tslint": "5.8.0",
"typescript": "2.7.1",
"web3-typescript-typings": "^0.10.0"
+ },
+ "publishConfig": {
+ "access": "public"
}
}
diff --git a/packages/assert/package.json b/packages/assert/package.json
index 9ecb0bcd0..49b0f3390 100644
--- a/packages/assert/package.json
+++ b/packages/assert/package.json
@@ -42,5 +42,8 @@
"@0xproject/utils": "^0.4.1",
"lodash": "^4.17.4",
"valid-url": "^1.0.9"
+ },
+ "publishConfig": {
+ "access": "public"
}
}
diff --git a/packages/base-contract/package.json b/packages/base-contract/package.json
index de9283416..6b4fc9a8e 100644
--- a/packages/base-contract/package.json
+++ b/packages/base-contract/package.json
@@ -35,5 +35,8 @@
"lodash": "^4.17.4",
"web3": "^0.20.0",
"web3-typescript-typings": "^0.10.0"
+ },
+ "publishConfig": {
+ "access": "public"
}
}
diff --git a/packages/chai-as-promised-typescript-typings/package.json b/packages/chai-as-promised-typescript-typings/package.json
index 18fdf438c..98fc63b38 100644
--- a/packages/chai-as-promised-typescript-typings/package.json
+++ b/packages/chai-as-promised-typescript-typings/package.json
@@ -19,5 +19,8 @@
"homepage": "https://github.com/0xProject/0x-monorepo/packages/chai-as-promised-typescript-typings#readme",
"dependencies": {
"chai-typescript-typings": "^0.0.4"
+ },
+ "publishConfig": {
+ "access": "public"
}
}
diff --git a/packages/chai-typescript-typings/package.json b/packages/chai-typescript-typings/package.json
index afd40df76..a07694ed0 100644
--- a/packages/chai-typescript-typings/package.json
+++ b/packages/chai-typescript-typings/package.json
@@ -12,5 +12,8 @@
"bugs": {
"url": "https://github.com/0xProject/0x-monorepo/issues"
},
- "homepage": "https://github.com/0xProject/0x-monorepo/packages/chai-typescript-typings#readme"
+ "homepage": "https://github.com/0xProject/0x-monorepo/packages/chai-typescript-typings#readme",
+ "publishConfig": {
+ "access": "public"
+ }
}
diff --git a/packages/connect/package.json b/packages/connect/package.json
index b84cd3e94..c8714a93a 100644
--- a/packages/connect/package.json
+++ b/packages/connect/package.json
@@ -66,5 +66,8 @@
"typedoc": "~0.8.0",
"typescript": "2.7.1",
"web3-typescript-typings": "^0.10.0"
+ },
+ "publishConfig": {
+ "access": "public"
}
}
diff --git a/packages/deployer/package.json b/packages/deployer/package.json
index 1f05f3960..a705f1ac0 100644
--- a/packages/deployer/package.json
+++ b/packages/deployer/package.json
@@ -50,5 +50,8 @@
"web3": "^0.20.0",
"web3-eth-abi": "^1.0.0-beta.24",
"yargs": "^10.0.3"
+ },
+ "publishConfig": {
+ "access": "public"
}
}
diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json
index 09dce6a56..fbbcb182f 100644
--- a/packages/dev-utils/package.json
+++ b/packages/dev-utils/package.json
@@ -46,5 +46,8 @@
"request-promise-native": "^1.0.5",
"web3": "^0.20.0",
"web3-provider-engine": "^13.0.1"
+ },
+ "publishConfig": {
+ "access": "public"
}
}
diff --git a/packages/ethers-typescript-typings/package.json b/packages/ethers-typescript-typings/package.json
index 588ff52b5..6d7601794 100644
--- a/packages/ethers-typescript-typings/package.json
+++ b/packages/ethers-typescript-typings/package.json
@@ -24,5 +24,8 @@
"tslint": "5.8.0",
"tslint-config-0xproject": "^0.0.2",
"typescript": "2.7.1"
+ },
+ "publishConfig": {
+ "access": "public"
}
}
diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json
index c0ad8e05a..8d82511b4 100644
--- a/packages/json-schemas/package.json
+++ b/packages/json-schemas/package.json
@@ -42,5 +42,8 @@
"shx": "^0.2.2",
"tslint": "5.8.0",
"typescript": "2.7.1"
+ },
+ "publishConfig": {
+ "access": "public"
}
}
diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json
index ecd5f0cd1..c52484f82 100644
--- a/packages/subproviders/package.json
+++ b/packages/subproviders/package.json
@@ -56,5 +56,8 @@
},
"optionalDependencies": {
"@ledgerhq/hw-transport-node-hid": "^4.3.0"
+ },
+ "publishConfig": {
+ "access": "public"
}
}
diff --git a/packages/tslint-config/package.json b/packages/tslint-config/package.json
index 4830a448e..b8398445f 100644
--- a/packages/tslint-config/package.json
+++ b/packages/tslint-config/package.json
@@ -39,5 +39,8 @@
"tslint": "5.8.0",
"tslint-eslint-rules": "^4.1.1",
"tslint-react": "^3.2.0"
+ },
+ "publishConfig": {
+ "access": "public"
}
}
diff --git a/packages/types/package.json b/packages/types/package.json
index 8364ce0c6..f4a587fc6 100644
--- a/packages/types/package.json
+++ b/packages/types/package.json
@@ -29,5 +29,8 @@
"bignumber.js": "~4.1.0",
"web3": "^0.20.0",
"web3-typescript-typings": "^0.10.0"
+ },
+ "publishConfig": {
+ "access": "public"
}
}
diff --git a/packages/utils/package.json b/packages/utils/package.json
index 224236676..0cfd50178 100644
--- a/packages/utils/package.json
+++ b/packages/utils/package.json
@@ -36,5 +36,8 @@
"lodash": "^4.17.4",
"web3": "^0.20.0",
"web3-typescript-typings": "^0.10.0"
+ },
+ "publishConfig": {
+ "access": "public"
}
}
diff --git a/packages/web3-typescript-typings/package.json b/packages/web3-typescript-typings/package.json
index 7db818759..0b04fe050 100644
--- a/packages/web3-typescript-typings/package.json
+++ b/packages/web3-typescript-typings/package.json
@@ -28,5 +28,8 @@
},
"dependencies": {
"bignumber.js": "~4.1.0"
+ },
+ "publishConfig": {
+ "access": "public"
}
}
diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json
index eb12d9be1..2b545732e 100644
--- a/packages/web3-wrapper/package.json
+++ b/packages/web3-wrapper/package.json
@@ -35,5 +35,8 @@
"lodash": "^4.17.4",
"web3": "^0.20.0",
"web3-typescript-typings": "^0.10.0"
+ },
+ "publishConfig": {
+ "access": "public"
}
}
diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx
index c0539c6d0..1eaf6274b 100644
--- a/packages/website/ts/index.tsx
+++ b/packages/website/ts/index.tsx
@@ -18,6 +18,8 @@ import { tradeHistoryStorage } from 'ts/local_storage/trade_history_storage';
import { reducer, State } from 'ts/redux/reducer';
import { WebsitePaths } from 'ts/types';
import { muiTheme } from 'ts/utils/mui_theme';
+import { utils } from 'ts/utils/utils';
+import * as Web3 from 'web3';
import 'whatwg-fetch';
injectTapEventPlugin();
@@ -46,6 +48,12 @@ const LazyConnectDocumentation = createLazyComponent('Documentation', async () =
);
ReactGA.initialize('UA-98720122-1');
+window.onload = () => {
+ const providerName = (window as any).web3
+ ? utils.web3ProviderToString((window as any).web3.currentProvider)
+ : 'NONE';
+ ReactGA.ga('set', 'dimension1', providerName);
+};
const store: ReduxStore<State> = createStore(reducer);
render(
<Router>
diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts
index 308b4bb5c..a40db805b 100644
--- a/packages/website/ts/utils/utils.ts
+++ b/packages/website/ts/utils/utils.ts
@@ -1,4 +1,4 @@
-import { ECSignature, ExchangeContractErrs, ZeroEx, ZeroExError } from '0x.js';
+import { ECSignature, ExchangeContractErrs, Web3Provider, ZeroEx, ZeroExError } from '0x.js';
import { constants as sharedConstants, EtherscanLinkSuffixes, Networks } from '@0xproject/react-shared';
import { BigNumber } from '@0xproject/utils';
import deepEqual = require('deep-equal');
@@ -262,6 +262,23 @@ export const utils = {
);
return isTestNetwork;
},
+ getCurrentBaseUrl() {
+ const port = window.location.port;
+ const hasPort = !_.isUndefined(port);
+ const baseUrl = `https://${window.location.hostname}${hasPort ? `:${port}` : ''}`;
+ return baseUrl;
+ },
+ web3ProviderToString(provider: Web3Provider): string {
+ let parsedProviderName = provider.constructor.name;
+ if (provider.constructor.name === 'MetamaskInpageProvider') {
+ parsedProviderName = 'METAMASK';
+ } else if (provider.constructor.name === 'EthereumProvider') {
+ parsedProviderName = 'MIST';
+ } else if ((provider as any).isParity) {
+ parsedProviderName = 'PARITY';
+ }
+ return parsedProviderName;
+ },
async onPageLoadAsync(): Promise<void> {
if (document.readyState === 'complete') {
return; // Already loaded
@@ -270,10 +287,4 @@ export const utils = {
window.onload = () => resolve();
});
},
- getCurrentBaseUrl() {
- const port = window.location.port;
- const hasPort = !_.isUndefined(port);
- const baseUrl = `https://${window.location.hostname}${hasPort ? `:${port}` : ''}`;
- return baseUrl;
- },
};