diff --git a/src/ocean/Account.ts b/src/ocean/Account.ts index 74cf779..229c1c7 100644 --- a/src/ocean/Account.ts +++ b/src/ocean/Account.ts @@ -4,14 +4,23 @@ import Keeper from "../keeper/Keeper" import Web3Provider from "../keeper/Web3Provider" import Balance from "../models/Balance" import Logger from "../utils/Logger" -import OceanBase from "./OceanBase" /** * Account information. */ -export default class Account extends OceanBase { +export default class Account { private password?: string + constructor(private id: string = "0x0") { } + + public getId() { + return this.id + } + + public setId(id) { + this.id = id + } + /** * Set account password. * @param {string} password Password for account. diff --git a/src/ocean/OceanBase.ts b/src/ocean/OceanBase.ts deleted file mode 100644 index 99f23e7..0000000 --- a/src/ocean/OceanBase.ts +++ /dev/null @@ -1,18 +0,0 @@ -export default abstract class OceanBase { - - protected id = "0x00" - - constructor(id?) { - if (id) { - this.id = id - } - } - - public getId() { - return this.id - } - - public setId(id) { - this.id = id - } -} diff --git a/test/mocks/OceanBase.Mock.ts b/test/mocks/OceanBase.Mock.ts deleted file mode 100644 index 2078784..0000000 --- a/test/mocks/OceanBase.Mock.ts +++ /dev/null @@ -1,4 +0,0 @@ -import OceanBase from "../../src/ocean/OceanBase" - -export default class OceanBaseMock extends OceanBase { -} diff --git a/test/ocean/OceanBase.test.ts b/test/ocean/OceanBase.test.ts deleted file mode 100644 index 7160833..0000000 --- a/test/ocean/OceanBase.test.ts +++ /dev/null @@ -1,30 +0,0 @@ -import {assert} from "chai" -import OceanBaseMock from "../mocks/OceanBase.Mock" - -describe("OceanBase", () => { - - describe("#getId()", () => { - - it("should get the id", async () => { - - const id = "test" - const oceanBase = new OceanBaseMock(id) - - assert(oceanBase.getId() === id) - }) - - }) - - describe("#setId()", () => { - - it("should get the id", async () => { - - const id = "test" - const oceanBase = new OceanBaseMock() - oceanBase.setId(id) - - assert(oceanBase.getId() === id) - }) - }) - -})