Browse Source

REF

shakedebug
Overtorment 5 years ago
parent
commit
21ec9dc647
  1. 8
      WatchConnectivity.js
  2. 8
      screen/settings/settings.js
  3. 2
      tests/integration/HDWallet.test.js

8
WatchConnectivity.js

@ -1,5 +1,5 @@
import * as watch from 'react-native-watch-connectivity';
import {InteractionManager, Platform} from 'react-native';
import { InteractionManager, Platform } from 'react-native';
const loc = require('./loc');
export default class WatchConnectivity {
isAppInstalled = false;
@ -27,7 +27,7 @@ export default class WatchConnectivity {
message.amount,
message.description,
);
reply({invoicePaymentRequest: createInvoiceRequest});
reply({ invoicePaymentRequest: createInvoiceRequest });
}
} else {
reply(err);
@ -117,7 +117,7 @@ export default class WatchConnectivity {
} else if (transaction.memo) {
memo = transaction.memo;
}
const watchTX = {type, amount, memo, time: loc.transactionTimeToReadable(transaction.received)};
const watchTX = { type, amount, memo, time: loc.transactionTimeToReadable(transaction.received) };
watchTransactions.push(watchTX);
}
wallets.push({
@ -130,7 +130,7 @@ export default class WatchConnectivity {
});
}
watch.updateApplicationContext({wallets});
watch.updateApplicationContext({ wallets });
}
});
}

8
screen/settings/settings.js

@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { ScrollView, Switch, TouchableOpacity } from 'react-native';
import { ScrollView, View, Switch, TouchableOpacity } from 'react-native';
import {
BlueText,
BlueCard,
@ -73,8 +73,10 @@ export default class Settings extends Component {
</TouchableOpacity>
{this.state.showAdvancedOptions && (
<BlueCard>
<BlueText>{loc.settings.enable_advanced_mode}</BlueText>
<Switch value={this.state.advancedModeEnabled} onValueChange={value => this.onAdvancedModeSwitch(value)} />
<View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' }}>
<BlueText>{loc.settings.enable_advanced_mode}</BlueText>
<Switch value={this.state.advancedModeEnabled} onValueChange={value => this.onAdvancedModeSwitch(value)} />
</View>
</BlueCard>
)}

2
tests/integration/HDWallet.test.js

@ -1,6 +1,6 @@
/* global it, jasmine, afterAll, beforeAll */
import { SegwitP2SHWallet, SegwitBech32Wallet, HDSegwitP2SHWallet, HDLegacyBreadwalletWallet, HDLegacyP2PKHWallet } from '../../class';
import {BitcoinUnit} from "../../models/bitcoinUnits";
import { BitcoinUnit } from '../../models/bitcoinUnits';
global.crypto = require('crypto'); // shall be used by tests under nodejs CLI, but not in RN environment
let assert = require('assert');
let bitcoin = require('bitcoinjs-lib');

Loading…
Cancel
Save