mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 06:52:41 +01:00
FIX: better balance string formatting
This commit is contained in:
parent
f6c35271cc
commit
bce7dace88
2 changed files with 8 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue