chore(@embark/proxy): small naming fixes

This commit is contained in:
Jonathan Rainville 2019-08-27 13:09:44 -04:00
parent 32280915d9
commit 1bd32bbbbb
6 changed files with 4 additions and 20 deletions

View File

@ -31,10 +31,6 @@ export default class AccountsManager {
this.parseAndFundAccounts();
this.events.setCommandHandler("accounts:get", (cb: any) => {
cb(null, this.accounts);
});
this.embark.registerActionForEvent("blockchain:proxy:request", this.checkBlockchainRequest.bind(this));
this.embark.registerActionForEvent("blockchain:proxy:response", this.checkBlockchainResponse.bind(this));

View File

@ -37,7 +37,7 @@ export default class ProxyManager {
this.logger.warn(__("Configured wallet accounts will be ignored and cannot be used in the DApp, and transactions will not be logged."));
}
this.events.setCommandHandler("proxy:endpoint", async (cb) => {
this.events.setCommandHandler("proxy:endpoint:get", async (cb) => {
await this.onReady();
if (!this.embark.config.blockchainConfig.proxy) {
return cb(null, this.embark.config.blockchainConfig.endpoint);
@ -81,14 +81,4 @@ export default class ProxyManager {
);
return;
}
public shutdownProxy() {
if (!this.embark.config.blockchainConfig.proxy) {
return;
}
if (this.proxy) {
this.proxy.close();
}
}
}

View File

@ -14,8 +14,6 @@ export class Proxy {
this.receipts = {};
this.transactions = {};
this.timeouts = {};
// TODO create local events instance for the ready events that are just used locally once `events.js` is extracted in a package
this.events = options.events;
this.plugins = options.plugins;
this.logger = options.logger;
}

View File

@ -67,7 +67,7 @@ class EmbarkWeb3 {
async.map(this.config.contractsConfig.dappConnection, (conn, mapCb) => {
if (conn === '$EMBARK') {
// Connect to Embark's endpoint (proxy)
return this.events.request("proxy:endpoint", mapCb);
return this.events.request("proxy:endpoint:get", mapCb);
}
mapCb(null, conn);
}, (err, results) => {

View File

@ -15,7 +15,7 @@ class BlockchainClient {
// TODO: unclear currently if this belongs here so it's a bit hardcoded for now
this.events.setCommandHandler("blockchain:client:provider", (clientName, cb) => {
this.events.request("proxy:endpoint", (err, endpoint) => {
this.events.request("proxy:endpoint:get", (err, endpoint) => {
if (err) {
return cb(err);
}

View File

@ -39,7 +39,7 @@ class Blockchain {
async.map(contractsConfig.dappConnection, (conn, mapCb) => {
if (conn === '$EMBARK') {
// Connect to Embark's endpoint (proxy)
return this.events.request("proxy:endpoint", mapCb);
return this.events.request("proxy:endpoint:get", mapCb);
}
mapCb(null, conn);
}, (err, results) => {