This commit is contained in:
Marcos Rodriguez Vélez 2018-12-19 21:06:06 -05:00
parent fb6fd021e1
commit f269e5533d
11 changed files with 19 additions and 17 deletions

View File

@ -83,7 +83,7 @@ export class AbstractHDWallet extends LegacyWallet {
}
getPreferredBalanceUnit() {
return this.preferredBalanceUnit;
return this.preferredBalanceUnit || BitcoinUnit.BTC;
}
setPreferredBalanceUnit(unit) {

View File

@ -36,7 +36,7 @@ export class AbstractWallet {
}
getPreferredBalanceUnit() {
return this.preferredBalanceUnit;
return this.preferredBalanceUnit || BitcoinUnit.BTC;
}
setPreferredBalanceUnit(unit) {

View File

@ -503,7 +503,7 @@ export class LightningCustodianWallet extends LegacyWallet {
}
getPreferredBalanceUnit() {
return this.preferredBalanceUnit;
return this.preferredBalanceUnit || BitcoinUnit.SATS;
}
setPreferredBalanceUnit(unit) {

View File

@ -34,7 +34,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>151</string>
<string>154</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
@ -55,7 +55,7 @@
<key>NSCalendarsUsageDescription</key>
<string>This alert should not show up as we do not require this data</string>
<key>NSCameraUsageDescription</key>
<string>In order to quickly scan the recipient&apos;s address, we need your permission to use the camera to scan their QR Code.</string>
<string>In order to quickly scan the recipient's address, we need your permission to use the camera to scan their QR Code.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>This alert should not show up as we do not require this data</string>
<key>NSMotionUsageDescription</key>

View File

@ -34,6 +34,7 @@ module.exports = {
scan: 'Scan',
create: 'Create',
label_new_segwit: 'New SegWit',
label_new_lightning: 'New Lightning',
wallet_name: 'wallet name',
wallet_type: 'type',
or: 'or',

View File

@ -34,6 +34,7 @@ module.exports = {
scan: 'Escaniar',
create: 'Crear',
label_new_segwit: 'Nuevo SegWit',
label_new_lightning: 'Nuevo Lightning',
wallet_name: 'nombre de billetera',
wallet_type: 'tipo de billetera',
or: 'o',

View File

@ -35,6 +35,7 @@ module.exports = {
scan: 'Scanear',
create: 'Criar',
label_new_segwit: 'Novo SegWit',
label_new_lightning: 'Novo Lightning',
wallet_name: 'Nome',
wallet_type: 'Tipo',
or: 'ou',

View File

@ -34,6 +34,7 @@ module.exports = {
scan: 'Scan',
create: 'Adicionar',
label_new_segwit: 'Novo SegWit',
label_new_lightning: 'Novo Lightning',
wallet_name: 'nome',
wallet_type: 'tipo',
or: 'ou',

View File

@ -34,6 +34,7 @@ module.exports = {
scan: 'Отсканировать',
create: 'Создать',
label_new_segwit: 'Новый SegWit',
label_new_lightning: 'Новый Lightning',
wallet_name: 'имя кошелька',
wallet_type: 'тип кошелька',
or: 'or',

View File

@ -141,7 +141,7 @@ export default class SendDetails extends Component {
.then(response => {
this.setState({
address: response.address,
amount: loc.formatBalanceWithoutSuffix(response.amount),
amount: response.amount,
memo: response.memo,
fee: response.fee,
bip70TransactionExpiration: response.expires,
@ -441,7 +441,7 @@ export default class SendDetails extends Component {
placeholder="0"
maxLength={10}
editable={!this.state.isLoading}
value={this.state.amount + ''}
value={loc.formatBalanceWithoutSuffix(this.state.amount || 0 + '', BitcoinUnit.BTC)}
placeholderTextColor="#0f5cc0"
style={{
color: '#0f5cc0',
@ -462,14 +462,11 @@ export default class SendDetails extends Component {
{' ' + BitcoinUnit.BTC}
</Text>
</View>
{this.state.amount > 0 && (
<View style={{ alignItems: 'center', marginBottom: 22, marginTop: 4 }}>
<Text style={{ fontSize: 18, color: '#d4d4d4', fontWeight: '600' }}>
{currency.satoshiToLocalCurrency(loc.formatBalanceWithoutSuffix(this.state.amount || 0, BitcoinUnit.SATS))}
</Text>
</View>
)}
<View style={{ alignItems: 'center', marginBottom: 22, marginTop: 4 }}>
<Text style={{ fontSize: 18, color: '#d4d4d4', fontWeight: '600' }}>
{currency.satoshiToLocalCurrency(loc.formatBalanceWithoutSuffix(this.state.amount || 0, BitcoinUnit.SATS))}
</Text>
</View>
<View
style={{
flexDirection: 'row',
@ -498,7 +495,7 @@ export default class SendDetails extends Component {
BitcoinBIP70TransactionDecode.decode(text).then(response => {
this.setState({
address: response.address,
amount: loc.formatBalanceWithoutSuffix(response.amount, BitcoinUnit.BTC),
amount: response.amount,
memo: response.memo,
fee: response.fee,
bip70TransactionExpiration: response.expires,

View File

@ -95,7 +95,7 @@ export default class WalletsAdd extends Component {
<TextInput
value={this.state.label}
placeholderTextColor="#81868e"
placeholder={loc.wallets.add.label_new_segwit}
placeholder={this.state.activeBitcoin ? loc.wallets.add.label_new_segwit : loc.wallets.add.label_new_lightning}
onChangeText={text => {
this.setLabel(text);
}}