mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-25 00:58:45 +05:00
Added decimal context config
This commit is contained in:
committed by
Dan Christian Bogos
parent
236f3ac2f0
commit
46f0ddb860
@@ -153,7 +153,7 @@ func DecimalDecoder(ec bsoncodec.DecodeContext, vw bsonrw.ValueReader, val refle
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
dBig := new(decimal.Big)
|
||||
dBig := decimal.WithContext(utils.DecimalContext)
|
||||
if err := dBig.UnmarshalText(data); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -1188,7 +1188,7 @@ func testOnStorITAccount(t *testing.T) {
|
||||
},
|
||||
Type: utils.MetaVoice,
|
||||
Units: &utils.Decimal{
|
||||
Big: new(decimal.Big).SetUint64(10),
|
||||
Big: decimal.WithContext(utils.DecimalContext).SetUint64(10),
|
||||
},
|
||||
Opts: map[string]interface{}{
|
||||
"key1": "val1",
|
||||
|
||||
Reference in New Issue
Block a user