mirror of
https://github.com/penxio/penx.git
synced 2026-04-19 03:03:06 -04:00
18 lines
294 B
TypeScript
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)
|
|
}
|
|
}
|