Added decimal context config

This commit is contained in:
Trial97
2021-12-14 16:45:38 +02:00
committed by Dan Christian Bogos
parent 236f3ac2f0
commit 46f0ddb860
32 changed files with 396 additions and 316 deletions

View File

@@ -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
}

View File

@@ -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",