Skip to content

Commit

Permalink
refactor(core-kernel): remove AttributeService in favour of container…
Browse files Browse the repository at this point in the history
… bindings
  • Loading branch information
faustbrian authored Nov 12, 2019
1 parent 7d449ac commit 27668ac
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 231 deletions.

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions __tests__/unit/core-kernel/utils/delegate-calculator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import "jest-extended";
import { Container, Services } from "@arkecosystem/core-kernel";
import { Sandbox } from "@arkecosystem/core-test-framework";

import { Identifiers } from "@packages/core-kernel/src/ioc";
import { AttributeService } from "@packages/core-kernel/src/services/attributes";
import { Wallet } from "@packages/core-state/src/wallets";
import { Managers, Utils } from "@arkecosystem/crypto";
import { calculateApproval, calculateForgedTotal } from "@packages/core-kernel/src/utils/delegate-calculator";
Expand All @@ -14,11 +12,6 @@ let sandbox: Sandbox;
beforeAll(() => {
sandbox = new Sandbox();

sandbox.app
.bind<AttributeService>(Identifiers.AttributeService)
.to(AttributeService)
.inSingletonScope();

sandbox.app
.bind<Services.Attributes.AttributeSet>(Container.Identifiers.WalletAttributes)
.to(Services.Attributes.AttributeSet)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Application } from "../../contracts/kernel";
import { Identifiers, inject, injectable } from "../../ioc";
import { Actions, Attributes, Cache, Filesystem, Log, Queue, Schedule, Validation } from "../../services";
import { Actions, Cache, Filesystem, Log, Queue, Schedule, Validation } from "../../services";
import { Bootstrapper } from "../interfaces";

/**
Expand Down Expand Up @@ -28,8 +28,6 @@ export class RegisterBaseServiceProviders implements Bootstrapper {
public async bootstrap(): Promise<void> {
await this.app.resolve(Actions.ServiceProvider).register();

await this.app.resolve(Attributes.ServiceProvider).register();

await this.app.resolve(Log.ServiceProvider).register();

await this.app.resolve(Filesystem.ServiceProvider).register();
Expand Down
1 change: 0 additions & 1 deletion packages/core-kernel/src/ioc/identifiers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export const Identifiers: Record<string, symbol> = {
ValidationManager: Symbol.for("Manager<Validation>"),
// Services
ActionService: Symbol.for("Service<Actions>"),
AttributeService: Symbol.for("Service<Attribute>"),
BlockchainService: Symbol.for("Service<Blockchain>"),
CacheService: Symbol.for("Service<Cache>"),
ConfigService: Symbol.for("Service<Config>"),
Expand Down
108 changes: 0 additions & 108 deletions packages/core-kernel/src/services/attributes/attribute-service.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/core-kernel/src/services/attributes/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export * from "./attribute-map";
export * from "./attribute-service";
export * from "./attribute-set";
export * from "./contracts";
export * from "./service-provider";
18 changes: 0 additions & 18 deletions packages/core-kernel/src/services/attributes/service-provider.ts

This file was deleted.

0 comments on commit 27668ac

Please sign in to comment.