From 6e0d298267cca29c1993079cebd0d478b5662d32 Mon Sep 17 00:00:00 2001 From: Alex Coseru Date: Tue, 26 May 2020 11:57:00 +0300 Subject: [PATCH] Delete OceanTokens.ts --- src/ocean/OceanTokens.ts | 45 ---------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 src/ocean/OceanTokens.ts diff --git a/src/ocean/OceanTokens.ts b/src/ocean/OceanTokens.ts deleted file mode 100644 index b5bb4326..00000000 --- a/src/ocean/OceanTokens.ts +++ /dev/null @@ -1,45 +0,0 @@ -import Account from './Account' -import { Instantiable, InstantiableConfig } from '../Instantiable.abstract' - -/** - * Tokens submodule of Ocean Protocol. - */ -export class OceanTokens extends Instantiable { - /** - * Returns the instance of OceanTokens. - * @return {Promise} - */ - public static async getInstance(config: InstantiableConfig): Promise { - const instance = new OceanTokens() - instance.setInstanceConfig(config) - - return instance - } - - /** - * Transfer a number of tokens to the mentioned account. - * @param {string} to Address that receives the tokens. - * @param {number} amount Tokens to transfer. - * @param {Account} from Sender account address. - * @return {Promise} Success, - */ - public async transfer(to: string, amount: number, from: Account): Promise { - this.ocean.keeper.token.transfer(to, amount, from.getId()) - return true - } - - /** - * Request tokens for an account. - * @param {Account} account Account instance. - * @param {number} amount Token amount. - * @return {Promise} Success. - */ - public async request(account: Account, amount: number): Promise { - try { - await account.requestTokens(amount) - return true - } catch (e) { - return false - } - } -}