Home as dapp

This commit is contained in:
Jaco Greeff
2017-04-21 13:14:07 +02:00
parent 23469a99e8
commit 2459501f4e
34 changed files with 175 additions and 74 deletions

View File

@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import builtinsJson from '~/views/Dapps/builtin.json';
import builtinsJson from '~/config/dappsBuiltin.json';
const REGISTER_URLS = {
console: 'https://raw.githubusercontent.com/paritytech/console/3ea0dbfefded359ccdbea37bc4cf350c0aa16948/console.jpeg',

View File

@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import builtins from '~/views/Dapps/builtin.json';
import builtins from '~/config/dappsBuiltin.json';
const id = 'console';
const app = builtins.find((app) => app.url === id);

View File

@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import builtins from '~/views/Dapps/builtin.json';
import builtins from '~/config/dappsBuiltin.json';
const id = 'dappreg';
const app = builtins.find((app) => app.url === id);

View File

@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import builtins from '~/views/Dapps/builtin.json';
import builtins from '~/config/dappsBuiltin.json';
const id = 'githubhint';
const app = builtins.find((app) => app.url === id);

View File

@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import builtins from '~/views/Dapps/builtin.json';
import builtins from '~/config/dappsBuiltin.json';
const id = 'localtx';
const app = builtins.find((app) => app.url === id);

View File

@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import builtins from '~/views/Dapps/builtin.json';
import builtins from '~/config/dappsBuiltin.json';
const id = 'registry';
const app = builtins.find((app) => app.url === id);

View File

@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import builtins from '~/views/Dapps/builtin.json';
import builtins from '~/config/dappsBuiltin.json';
const id = 'signaturereg';
const app = builtins.find((app) => app.url === id);

View File

@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import builtins from '~/views/Dapps/builtin.json';
import builtins from '~/config/dappsBuiltin.json';
const id = 'tokendeploy';
const app = builtins.find((app) => app.url === id);

View File

@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import builtins from '~/views/Dapps/builtin.json';
import builtins from '~/config/dappsBuiltin.json';
const id = 'tokenreg';
const app = builtins.find((app) => app.url === id);

View File

@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import builtins from '~/views/Dapps/builtin.json';
import builtins from '~/config/dappsBuiltin.json';
const id = 'web';
const app = builtins.find((app) => app.url === id);

View File

@@ -20,7 +20,7 @@ import { flatten } from 'lodash';
import * as abis from '~/contracts/abi';
import Contracts from '~/contracts';
import builtinJson from '~/views/Dapps/builtin.json';
import builtinJson from '~/config/dappsBuiltin.json';
import Dapp from './dappStore.js';
import { deleteDapp, registerDapp, updateDapp } from './utils';
@@ -489,7 +489,7 @@ export default class DappsStore {
}
_loadRegistry () {
return Contracts.create(api).registry
return Contracts.get(api).registry
.fetchContract()
.then((contract) => {
this._registry = contract.instance;

View File

@@ -44,7 +44,7 @@ export const fetchIsTestnet = () => (dispatch) =>
export const setContract = (contract) => ({ type: 'set contract', contract });
export const fetchContract = () => (dispatch) => {
return Contracts.create(api).registry
return Contracts.get(api).registry
.fetchContract()
.then((contract) => {
dispatch(setContract(contract));