Skip to content

Commit 8bda1ab

Browse files
committed
return new pointer
1 parent 6846616 commit 8bda1ab

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

chains/util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func CalculateStartingBlock(startBlock *big.Int, blockConfirmations *big.Int) (*
2424
// When src < dst: exponent is negative, so effectively multiplies.
2525
func ScaleTokenAmount(amount *big.Int, srcDecimals, dstDecimals int64) *big.Int {
2626
if srcDecimals == dstDecimals {
27-
return amount
27+
return new(big.Int).Set(amount)
2828
}
2929
if srcDecimals > dstDecimals {
3030
scale := new(big.Int).Exp(big.NewInt(10), big.NewInt(srcDecimals-dstDecimals), nil)

0 commit comments

Comments
 (0)