Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
updateTokenInfo = () => {
this.setState({ errorMessage: '' });
hathorLib.walletApi.getGeneralTokenInfo(this.props.token.uid, (response) => {
if (response.success) {
this.setState({
totalSupply: response.total,
});
} else {
this.setState({ errorMessage: response.message });
}
});
}
updateTokenInfo = () => {
this.setState({ errorMessage: '' });
hathorLib.walletApi.getGeneralTokenInfo(this.props.token.uid, (response) => {
if (response.success) {
this.setState({
totalSupply: response.total,
});
} else {
this.setState({ errorMessage: response.message });
}
});
}
updateTokenInfo = () => {
this.setState({ errorMessage: '' });
hathorLib.walletApi.getGeneralTokenInfo(this.props.token.uid, (response) => {
if (response.success) {
this.setState({
totalSupply: response.total,
canMint: response.mint.length > 0,
canMelt: response.melt.length > 0,
transactionsCount: response.transactions_count,
});
} else {
this.setState({ errorMessage: response.message });
}
});
}