mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-01-19 05:45:15 +01:00
FIX: Remove leading zero when doing local currency
This commit is contained in:
parent
bd64b3fe48
commit
f3a31a256f
@ -153,6 +153,9 @@ class AmountInput extends Component {
|
||||
}
|
||||
text = rez;
|
||||
}
|
||||
if (text.startsWith('0') && !(text.includes('.') || text.includes(','))) {
|
||||
text = text.replace(/^(0+)/g, '');
|
||||
}
|
||||
text = text.replace(/[^\d.,-]/g, ''); // remove all but numbers, dots & commas
|
||||
text = text.replace(/(\..*)\./g, '$1');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user