AccountS - debitUnits for concreteBalance, Balance SetDecimalValue and DecimalValue export methods

This commit is contained in:
DanB
2020-12-30 20:54:16 +01:00
parent 56fbc84bea
commit 77677b3019
3 changed files with 32 additions and 0 deletions

View File

@@ -87,6 +87,16 @@ func (b *Balance) Compile() (err error) {
return
}
// SetDecimalValue populates the internal decimal value
func (b *Balance) SetDecimalValue(dVal *decimal.Big) {
b.val = dVal
}
// DecimalValue returns the internal decimal value
func (b *Balance) DecimalValue() *decimal.Big {
return b.val
}
// ActionProfiles is a sortable list of ActionProfiles
type AccountProfiles []*AccountProfile

View File

@@ -31,3 +31,7 @@ func MultiplyBig(x, y *decimal.Big) *decimal.Big {
func AddBig(x, y *decimal.Big) *decimal.Big {
return new(decimal.Big).Add(x, y)
}
func SubstractBig(x, y *decimal.Big) *decimal.Big {
return new(decimal.Big).Sub(x, y)
}