We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6846616 commit 8bda1abCopy full SHA for 8bda1ab
1 file changed
chains/util.go
@@ -24,7 +24,7 @@ func CalculateStartingBlock(startBlock *big.Int, blockConfirmations *big.Int) (*
24
// When src < dst: exponent is negative, so effectively multiplies.
25
func ScaleTokenAmount(amount *big.Int, srcDecimals, dstDecimals int64) *big.Int {
26
if srcDecimals == dstDecimals {
27
- return amount
+ return new(big.Int).Set(amount)
28
}
29
if srcDecimals > dstDecimals {
30
scale := new(big.Int).Exp(big.NewInt(10), big.NewInt(srcDecimals-dstDecimals), nil)
0 commit comments