Skip to content

Commit 24fa281

Browse files
authored
refactor(core-wallet-api): always keep the Wallet API enabled (#2715)
1 parent 2ec6df4 commit 24fa281

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

packages/core-wallet-api/src/defaults.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export const defaults = {
2-
enabled: !process.env.CORE_WALLET_API_DISABLED,
32
server: {
43
host: process.env.CORE_WALLET_API_HOST || "0.0.0.0",
54
port: process.env.CORE_WALLET_API_PORT || 4040,
Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Container, Logger } from "@arkecosystem/core-interfaces";
1+
import { Container } from "@arkecosystem/core-interfaces";
22
import { defaults } from "./defaults";
33
import { startServer } from "./server";
44

@@ -7,18 +7,9 @@ export const plugin: Container.IPluginDescriptor = {
77
defaults,
88
alias: "wallet-api",
99
async register(container: Container.IContainer, options) {
10-
if (!options.enabled) {
11-
container.resolvePlugin<Logger.ILogger>("logger").info("Wallet API is disabled");
12-
return undefined;
13-
}
14-
15-
container.resolvePlugin<Logger.ILogger>("logger").info("Starting Wallet API");
1610
return startServer(options.server);
1711
},
1812
async deregister(container: Container.IContainer, options) {
19-
if (options.enabled) {
20-
container.resolvePlugin<Logger.ILogger>("logger").info("Stopping Wallet API");
21-
await container.resolvePlugin("wallet-api").stop();
22-
}
13+
await container.resolvePlugin("wallet-api").stop();
2314
},
2415
};

0 commit comments

Comments
 (0)