Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Fix inject.js & Signer store duplication (#7299)
Browse files Browse the repository at this point in the history
* Remove extension mappings

* Remove duplicated pending stores
  • Loading branch information
jacogr authored Dec 15, 2017
1 parent 8f6f6a0 commit 509038c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 59 deletions.
15 changes: 11 additions & 4 deletions js/src/Signer/pendingStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,18 @@ export default class PendingStore {
}

subscribePending = () => {
this._api.subscribe('signer_requestsToConfirm', (error, pending) => {
if (!error) {
this.setPending(pending);
const callback = (error, pending) => {
if (error) {
return;
}
});

this.setPending(pending);
};

this._api
.subscribe('signer_requestsToConfirm', callback)
.then(() => this._api.signer.requestsToConfirm())
.then((pending) => callback(null, pending));
}

static get (api) {
Expand Down
2 changes: 1 addition & 1 deletion js/src/Status/SignerPending/signerPending.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import Label from 'semantic-ui-react/dist/commonjs/elements/Label';
import List from 'semantic-ui-react/dist/commonjs/elements/List';
import Popup from 'semantic-ui-react/dist/commonjs/modules/Popup';

import Store from './store';
import Store from '../../Signer/pendingStore';
import ParityBarStore from '../../ParityBar/store';
import RequestItem from './RequestItem';
import styles from './signerPending.css';
Expand Down
50 changes: 0 additions & 50 deletions js/src/Status/SignerPending/store.js

This file was deleted.

4 changes: 0 additions & 4 deletions js/src/inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import Api from '@parity/api';
import qs from 'query-string';
import Web3 from 'web3';

import web3extensions from './web3.extensions';

function initProvider () {
const path = window.location.pathname.split('/');
const query = qs.parse(window.location.search);
Expand Down Expand Up @@ -67,8 +65,6 @@ function initWeb3 (ethereum) {
web3.eth.defaultAccount = accounts[0];
});

web3extensions(web3).map((extension) => web3._extend(extension));

window.web3 = web3;
}

Expand Down

0 comments on commit 509038c

Please sign in to comment.