Files
penx/domains/EthBalance.ts
2024-08-05 10:06:02 +08:00

18 lines
294 B
TypeScript

import { precision } from '@/lib/math'
export class EthBalance {
constructor(private _value: bigint) {}
get value() {
return this._value
}
get valueDecimal() {
return precision.toDecimal(this.value)
}
get valueFormatted() {
return this.valueDecimal.toFixed(4)
}
}