From 813824868ea1e091974a672ce8a63093f643c680 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 9 Jul 2018 10:33:37 +0200 Subject: Return AssetProxyId instead of string from proxy.getProxyIdAsync() --- .../contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts | 5 +++-- .../contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'packages') diff --git a/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts index 883d7c4d6..68bdc2de7 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts @@ -3,6 +3,7 @@ import { ContractAbi } from 'ethereum-types'; import * as _ from 'lodash'; import { artifacts } from '../artifacts'; +import { AssetProxyId } from '../types'; import { assert } from '../utils/assert'; import { ContractWrapper } from './contract_wrapper'; @@ -23,9 +24,9 @@ export class ERC20ProxyWrapper extends ContractWrapper { * Get the 4 bytes ID of this asset proxy * @return Proxy id */ - public async getProxyIdAsync(): Promise { + public async getProxyIdAsync(): Promise { const ERC20ProxyContractInstance = await this._getERC20ProxyContractAsync(); - const proxyId = await ERC20ProxyContractInstance.getProxyId.callAsync(); + const proxyId = (await ERC20ProxyContractInstance.getProxyId.callAsync()) as AssetProxyId; return proxyId; } /** diff --git a/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts index 648c150df..e249f2f74 100644 --- a/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts +++ b/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts @@ -3,6 +3,7 @@ import { ContractAbi } from 'ethereum-types'; import * as _ from 'lodash'; import { artifacts } from '../artifacts'; +import { AssetProxyId } from '../types'; import { assert } from '../utils/assert'; import { ContractWrapper } from './contract_wrapper'; @@ -23,9 +24,9 @@ export class ERC721ProxyWrapper extends ContractWrapper { * Get the 4 bytes ID of this asset proxy * @return Proxy id */ - public async getProxyIdAsync(): Promise { + public async getProxyIdAsync(): Promise { const ERC721ProxyContractInstance = await this._getERC721ProxyContractAsync(); - const proxyId = await ERC721ProxyContractInstance.getProxyId.callAsync(); + const proxyId = (await ERC721ProxyContractInstance.getProxyId.callAsync()) as AssetProxyId; return proxyId; } /** -- cgit v1.2.3