mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 09:50:15 +01:00
FIX: better balance string formatting
This commit is contained in:
parent
f6c35271cc
commit
bce7dace88
@ -806,7 +806,7 @@ export class WalletsCarousel extends Component {
|
||||
color: '#fff',
|
||||
}}
|
||||
>
|
||||
{item.getBalance()} BTC
|
||||
{loc.formatBalance(item.getBalance())}
|
||||
</Text>
|
||||
<Text style={{ backgroundColor: 'transparent' }} />
|
||||
<Text
|
||||
|
@ -63,4 +63,11 @@ strings.transactionTimeToReadable = function(time) {
|
||||
}
|
||||
};
|
||||
|
||||
strings.formatBalance = function(balance) {
|
||||
if (balance < 0.1 && balance !== 0) {
|
||||
return balance * 1000 + ' mBTC';
|
||||
}
|
||||
return balance + ' BTC';
|
||||
};
|
||||
|
||||
module.exports = strings;
|
||||
|
Loading…
Reference in New Issue
Block a user