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

Fix inject.js & Signer store duplication #7299

Merged
merged 2 commits into from
Dec 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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