mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-03 12:06:21 +01:00
Styling fixes for LND wallets
This commit is contained in:
parent
b617bc844b
commit
265f975cd1
5 changed files with 19 additions and 8 deletions
|
@ -34,7 +34,7 @@
|
|||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>160</string>
|
||||
<string>161</string>
|
||||
<key>ITSAppUsesNonExemptEncryption</key>
|
||||
<false/>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
|
|
14
loc/index.js
14
loc/index.js
|
@ -92,7 +92,9 @@ strings.formatBalance = (balance, fromUnit, toUnit) => {
|
|||
.to(BitcoinUnit.SATS)
|
||||
.format();
|
||||
} else if (toUnit === BitcoinUnit.LOCAL_CURRENCY) {
|
||||
const satoshis = BTCUnits(balance, BitcoinUnit.BTC).to(BitcoinUnit.SATS).value();
|
||||
const satoshis = BTCUnits(balance, BitcoinUnit.BTC)
|
||||
.to(BitcoinUnit.SATS)
|
||||
.value();
|
||||
return currency.satoshiToLocalCurrency(satoshis);
|
||||
}
|
||||
};
|
||||
|
@ -113,9 +115,13 @@ strings.formatBalanceWithoutSuffix = (balance, fromUnit, toUnit) => {
|
|||
.to(BitcoinUnit.BTC)
|
||||
.toString();
|
||||
} else if (toUnit === BitcoinUnit.SATS) {
|
||||
return String(BTCUnits(balance, fromUnit)
|
||||
.to(BitcoinUnit.SATS)
|
||||
.format()).replace(' satoshis','');
|
||||
return String(
|
||||
BTCUnits(balance, fromUnit)
|
||||
.to(BitcoinUnit.SATS)
|
||||
.format(),
|
||||
)
|
||||
.replace(' satoshis', '')
|
||||
.replace(' satoshi', '');
|
||||
} else if (toUnit === BitcoinUnit.LOCAL_CURRENCY) {
|
||||
return currency.satoshiToLocalCurrency(BTCUnits(balance, fromUnit).to(BitcoinUnit.SATS));
|
||||
}
|
||||
|
|
|
@ -163,7 +163,7 @@ export default class ScanLndInvoice extends React.Component {
|
|||
>
|
||||
<TextInput
|
||||
onChangeText={text => {
|
||||
if (text.toLowerCase().startsWith('lnb')) {
|
||||
if (text.toLowerCase().startsWith('lnb') || text.toLowerCase().startsWith('lntb')) {
|
||||
this.processInvoice(text);
|
||||
} else {
|
||||
this.setState({ decoded: undefined, expiresIn: undefined });
|
||||
|
|
|
@ -349,7 +349,9 @@ export default class WalletsList extends Component {
|
|||
rightTitleStyle={{
|
||||
fontWeight: '600',
|
||||
fontSize: 16,
|
||||
color: rowData.item.value / 100000000 < 0 ? BlueApp.settings.foregroundColor : '#37c0a1',
|
||||
color: rowData.item.value / 100000000 < 0 || rowData.item.type === 'paid_invoice'
|
||||
? BlueApp.settings.foregroundColor
|
||||
: '#37c0a1',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -459,7 +459,10 @@ export default class WalletTransactions extends Component {
|
|||
rightTitleStyle={{
|
||||
fontWeight: '600',
|
||||
fontSize: 16,
|
||||
color: rowData.item.value / 100000000 < 0 ? BlueApp.settings.foregroundColor : '#37c0a1',
|
||||
color:
|
||||
rowData.item.value / 100000000 < 0 || rowData.item.type === 'paid_invoice'
|
||||
? BlueApp.settings.foregroundColor
|
||||
: '#37c0a1',
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
|
Loading…
Add table
Reference in a new issue