Rename toDecimal to hexToDecimal

This commit is contained in:
Leonid Logvinov
2017-11-21 13:16:55 -06:00
parent 173a707a2e
commit 8d6ba6ee7a

View File

@@ -184,13 +184,13 @@ export class Web3Wrapper {
private formatLog(rawLog: RawLogEntry): Web3.LogEntry {
const formattedLog = {
...rawLog,
logIndex: this.toDecimal(rawLog.logIndex),
blockNumber: this.toDecimal(rawLog.blockNumber),
transactionIndex: this.toDecimal(rawLog.transactionIndex),
logIndex: this.hexToDecimal(rawLog.logIndex),
blockNumber: this.hexToDecimal(rawLog.blockNumber),
transactionIndex: this.hexToDecimal(rawLog.transactionIndex),
};
return formattedLog;
}
private toDecimal(hex: string|null): number|null {
private hexToDecimal(hex: string|null): number|null {
if (_.isNull(hex)) {
return null;
}