From 4cc5bbaf19d2388b0be0669a6249bf92f60c712c Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 6 Feb 2018 16:40:25 +0100 Subject: Change utils --- packages/contracts/util/token_registry_wrapper.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'packages/contracts/util/token_registry_wrapper.ts') diff --git a/packages/contracts/util/token_registry_wrapper.ts b/packages/contracts/util/token_registry_wrapper.ts index 033b72d10..6539a6da8 100644 --- a/packages/contracts/util/token_registry_wrapper.ts +++ b/packages/contracts/util/token_registry_wrapper.ts @@ -1,15 +1,17 @@ import * as Web3 from 'web3'; +import { TokenRegistryContract } from '../src/contract_wrappers/generated/token_registry'; + import { Token } from './types'; export class TokenRegWrapper { - private _tokenReg: Web3.ContractInstance; - constructor(tokenRegContractInstance: Web3.ContractInstance) { - this._tokenReg = tokenRegContractInstance; + private _tokenReg: TokenRegistryContract; + constructor(tokenRegContract: TokenRegistryContract) { + this._tokenReg = tokenRegContract; } public addTokenAsync(token: Token, from: string) { - const tx = this._tokenReg.addToken( - token.address, + const tx = this._tokenReg.addToken.sendTransactionAsync( + token.address as string, token.name, token.symbol, token.decimals, -- cgit