Return AssetProxyId instead of string from proxy.getProxyIdAsync()
This commit is contained in:
@@ -3,6 +3,7 @@ import { ContractAbi } from 'ethereum-types';
|
|||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
|
|
||||||
import { artifacts } from '../artifacts';
|
import { artifacts } from '../artifacts';
|
||||||
|
import { AssetProxyId } from '../types';
|
||||||
import { assert } from '../utils/assert';
|
import { assert } from '../utils/assert';
|
||||||
|
|
||||||
import { ContractWrapper } from './contract_wrapper';
|
import { ContractWrapper } from './contract_wrapper';
|
||||||
@@ -23,9 +24,9 @@ export class ERC20ProxyWrapper extends ContractWrapper {
|
|||||||
* Get the 4 bytes ID of this asset proxy
|
* Get the 4 bytes ID of this asset proxy
|
||||||
* @return Proxy id
|
* @return Proxy id
|
||||||
*/
|
*/
|
||||||
public async getProxyIdAsync(): Promise<string> {
|
public async getProxyIdAsync(): Promise<AssetProxyId> {
|
||||||
const ERC20ProxyContractInstance = await this._getERC20ProxyContractAsync();
|
const ERC20ProxyContractInstance = await this._getERC20ProxyContractAsync();
|
||||||
const proxyId = await ERC20ProxyContractInstance.getProxyId.callAsync();
|
const proxyId = (await ERC20ProxyContractInstance.getProxyId.callAsync()) as AssetProxyId;
|
||||||
return proxyId;
|
return proxyId;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { ContractAbi } from 'ethereum-types';
|
|||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
|
|
||||||
import { artifacts } from '../artifacts';
|
import { artifacts } from '../artifacts';
|
||||||
|
import { AssetProxyId } from '../types';
|
||||||
import { assert } from '../utils/assert';
|
import { assert } from '../utils/assert';
|
||||||
|
|
||||||
import { ContractWrapper } from './contract_wrapper';
|
import { ContractWrapper } from './contract_wrapper';
|
||||||
@@ -23,9 +24,9 @@ export class ERC721ProxyWrapper extends ContractWrapper {
|
|||||||
* Get the 4 bytes ID of this asset proxy
|
* Get the 4 bytes ID of this asset proxy
|
||||||
* @return Proxy id
|
* @return Proxy id
|
||||||
*/
|
*/
|
||||||
public async getProxyIdAsync(): Promise<string> {
|
public async getProxyIdAsync(): Promise<AssetProxyId> {
|
||||||
const ERC721ProxyContractInstance = await this._getERC721ProxyContractAsync();
|
const ERC721ProxyContractInstance = await this._getERC721ProxyContractAsync();
|
||||||
const proxyId = await ERC721ProxyContractInstance.getProxyId.callAsync();
|
const proxyId = (await ERC721ProxyContractInstance.getProxyId.callAsync()) as AssetProxyId;
|
||||||
return proxyId;
|
return proxyId;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user