Ui 2 provider rename (web3Provider -> ethereum) (#6031)

* Rename web3Provider -> ethereumProvider

* ethereumProvider -> ethereum
This commit is contained in:
Jaco Greeff 2017-07-10 15:56:43 +02:00 committed by GitHub
parent 699aab0b80
commit 4dd68f1ef3
26 changed files with 52 additions and 52 deletions

View File

@ -16,8 +16,8 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const api = new Api(web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
const api = new Api(ethereumProvider);
export {
api

View File

@ -17,8 +17,8 @@
import Web3 from 'web3';
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const api = new Api(web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
const api = new Api(ethereumProvider);
let web3;

View File

@ -16,8 +16,8 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const api = new Api(web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
const api = new Api(ethereumProvider);
function trackRequest (signerRequestId, statusCallback) {
return api.pollMethod('parity_checkRequest', signerRequestId)

View File

@ -16,8 +16,8 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const api = new Api(web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
const api = new Api(ethereumProvider);
export {
api

View File

@ -16,8 +16,8 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const api = new Api(web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
const api = new Api(ethereumProvider);
export {
api

View File

@ -16,8 +16,8 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const api = new Api(web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
const api = new Api(ethereumProvider);
const { bytesToHex, sha3, toWei, fromWei } = api.util;
export {

View File

@ -16,8 +16,8 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const api = new Api(web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
const api = new Api(ethereumProvider);
export {
api

View File

@ -16,8 +16,8 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const api = new Api(web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
const api = new Api(ethereumProvider);
export {
api

View File

@ -16,8 +16,8 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const api = new Api(web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
const api = new Api(ethereumProvider);
export {
api

View File

@ -23,11 +23,11 @@ import Api from './api';
import './dev.parity.html';
const web3Provider = new Api.Provider.Http('/rpc/');
const api = new Api(web3Provider);
const ethereumProvider = new Api.Provider.Http('/rpc/');
const api = new Api(ethereumProvider);
window.parity = {
Api,
api,
web3Provider
ethereumProvider
};

View File

@ -79,7 +79,7 @@ const dappsHistory = HistoryStore.get('dapps');
function onEnterDapp ({ params: { id } }) {
const token = DappMethodsStore.get().createToken(id);
window.web3Provider = new Api.Provider.PostMessage(token, window);
window.ethereum = new Api.Provider.PostMessage(token, window);
if (!dapps[id] || !dapps[id].skipHistory) {
dappsHistory.add(id);

View File

@ -16,6 +16,6 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
export default new Api(web3Provider);
export default new Api(ethereumProvider);

View File

@ -16,6 +16,6 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
export default new Api(web3Provider);
export default new Api(ethereumProvider);

View File

@ -16,6 +16,6 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
export default new Api(web3Provider);
export default new Api(ethereumProvider);

View File

@ -16,6 +16,6 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
export default new Api(web3Provider);
export default new Api(ethereumProvider);

View File

@ -16,6 +16,6 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
export default new Api(web3Provider);
export default new Api(ethereumProvider);

View File

@ -16,6 +16,6 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
export default new Api(web3Provider);
export default new Api(ethereumProvider);

View File

@ -16,6 +16,6 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
export default new Api(web3Provider);
export default new Api(ethereumProvider);

View File

@ -16,6 +16,6 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
export default new Api(web3Provider);
export default new Api(ethereumProvider);

View File

@ -16,6 +16,6 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
export default new Api(web3Provider);
export default new Api(ethereumProvider);

View File

@ -16,6 +16,6 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
export default new Api(web3Provider);
export default new Api(ethereumProvider);

View File

@ -16,6 +16,6 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
export default new Api(web3Provider);
export default new Api(ethereumProvider);

View File

@ -16,6 +16,6 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
export default new Api(web3Provider);
export default new Api(ethereumProvider);

View File

@ -16,6 +16,6 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
export default new Api(web3Provider);
export default new Api(ethereumProvider);

View File

@ -16,6 +16,6 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
export default new Api(web3Provider);
export default new Api(ethereumProvider);

View File

@ -16,8 +16,8 @@
import Api from '@parity/api';
const web3Provider = (window.parity && window.parity.web3Provider) || (window.parent && window.parent.web3Provider);
const api = new Api(web3Provider);
const ethereumProvider = window.ethereum || window.parent.ethereum;
const api = new Api(ethereumProvider);
export {
api