From b884b821971af46237d37d3f5f86231be7fa0484 Mon Sep 17 00:00:00 2001 From: alfred-mk Date: Thu, 26 Jun 2025 12:20:34 +0300 Subject: [PATCH] add test cases with high decimals for the ParseAndScaleAmount func --- store/tokens_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/store/tokens_test.go b/store/tokens_test.go index b8c0082..fbcca9d 100644 --- a/store/tokens_test.go +++ b/store/tokens_test.go @@ -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 {