add test cases with high decimals for the ParseAndScaleAmount func

This commit is contained in:
Alfred Kamanda 2025-06-26 12:20:34 +03:00
parent 280c382a3d
commit b884b82197
Signed by: Alfred-mk
GPG Key ID: 7EA3D01708908703

View File

@ -64,6 +64,20 @@ func TestParseAndScaleAmount(t *testing.T) {
want: "0",
expectError: false,
},
{
name: "high decimals",
amount: "1.85",
decimals: "18",
want: "1850000000000000000",
expectError: false,
},
{
name: "6 d.p",
amount: "2.32",
decimals: "6",
want: "2320000",
expectError: false,
},
}
for _, tt := range tests {