import { UIntBitLength } from '@polkadot/types/codec/types' ; import { AbstractInt } from '@polkadot/types-codec' ; import { Registry , AnyNumber , Constructor } from '@polkadot/types/types' ; import { formatDecimals } from './formatDecimals' ; export class CustomBalance extends AbstractInt { public static with ( decimals , bitLength , typeName ? ) { return class extends CustomBalance { constructor ( registry , value ? ) { super ( registry , formatDecimals ( value , decimals ) , bitLength ) ; } public toRawType ( ) { return typeName || super . toRawType ( ) ; } } ; } }