1
0
mirror of https://github.com/oceanprotocol-archive/squid-js.git synced 2024-02-02 15:31:51 +01:00

Remove OceanBase.

This commit is contained in:
Pedro Gutiérrez 2019-03-19 12:27:33 +01:00 committed by Pedro Gutiérrez
parent 7394e7ddec
commit 780475b35f
4 changed files with 11 additions and 54 deletions

View File

@ -4,14 +4,23 @@ import Keeper from "../keeper/Keeper"
import Web3Provider from "../keeper/Web3Provider" import Web3Provider from "../keeper/Web3Provider"
import Balance from "../models/Balance" import Balance from "../models/Balance"
import Logger from "../utils/Logger" import Logger from "../utils/Logger"
import OceanBase from "./OceanBase"
/** /**
* Account information. * Account information.
*/ */
export default class Account extends OceanBase { export default class Account {
private password?: string private password?: string
constructor(private id: string = "0x0") { }
public getId() {
return this.id
}
public setId(id) {
this.id = id
}
/** /**
* Set account password. * Set account password.
* @param {string} password Password for account. * @param {string} password Password for account.

View File

@ -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
}
}

View File

@ -1,4 +0,0 @@
import OceanBase from "../../src/ocean/OceanBase"
export default class OceanBaseMock extends OceanBase {
}

View File

@ -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)
})
})
})