mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-22 23:08:07 +01:00
Merge branch 'master' into settingsui
This commit is contained in:
commit
64f6f74dea
19 changed files with 372 additions and 277 deletions
12
WatchConnectivity.android.js
Normal file
12
WatchConnectivity.android.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
export default class WatchConnectivity {
|
||||
isAppInstalled = false;
|
||||
static shared = new WatchConnectivity();
|
||||
wallets;
|
||||
fetchTransactionsFunction = () => {};
|
||||
|
||||
getIsWatchAppInstalled() {}
|
||||
|
||||
async handleLightningInvoiceCreateRequest(_walletIndex, _amount, _description) {}
|
||||
|
||||
async sendWalletsToWatch() {}
|
||||
}
|
|
@ -1,42 +1,51 @@
|
|||
import * as Watch from 'react-native-watch-connectivity';
|
||||
import { InteractionManager, Platform } from 'react-native';
|
||||
import { InteractionManager } from 'react-native';
|
||||
const loc = require('./loc');
|
||||
export default class WatchConnectivity {
|
||||
isAppInstalled = false;
|
||||
BlueApp = require('./BlueApp');
|
||||
static shared = new WatchConnectivity();
|
||||
wallets;
|
||||
fetchTransactionsFunction = () => {};
|
||||
|
||||
constructor() {
|
||||
if (Platform.OS === 'ios') {
|
||||
this.getIsWatchAppInstalled();
|
||||
}
|
||||
this.getIsWatchAppInstalled();
|
||||
}
|
||||
|
||||
getIsWatchAppInstalled() {
|
||||
if (Platform.OS !== 'ios') return;
|
||||
Watch.getIsWatchAppInstalled((err, isAppInstalled) => {
|
||||
if (!err) {
|
||||
this.isAppInstalled = isAppInstalled;
|
||||
this.sendWalletsToWatch();
|
||||
}
|
||||
});
|
||||
Watch.subscribeToMessages(async (err, message, reply) => {
|
||||
if (!err) {
|
||||
if (message.request === 'createInvoice') {
|
||||
const createInvoiceRequest = await this.handleLightningInvoiceCreateRequest(
|
||||
message.walletIndex,
|
||||
message.amount,
|
||||
message.description,
|
||||
);
|
||||
reply({ invoicePaymentRequest: createInvoiceRequest });
|
||||
}
|
||||
} else {
|
||||
reply(err);
|
||||
WatchConnectivity.shared.isAppInstalled = isAppInstalled;
|
||||
Watch.subscribeToWatchState((err, watchState) => {
|
||||
if (!err) {
|
||||
if (watchState === 'Activated') {
|
||||
WatchConnectivity.shared.sendWalletsToWatch();
|
||||
}
|
||||
}
|
||||
});
|
||||
Watch.subscribeToMessages(async (err, message, reply) => {
|
||||
if (!err) {
|
||||
if (message.request === 'createInvoice') {
|
||||
const createInvoiceRequest = await this.handleLightningInvoiceCreateRequest(
|
||||
message.walletIndex,
|
||||
message.amount,
|
||||
message.description,
|
||||
);
|
||||
reply({ invoicePaymentRequest: createInvoiceRequest });
|
||||
} else if (message.message === 'sendApplicationContext') {
|
||||
await WatchConnectivity.shared.sendWalletsToWatch(WatchConnectivity.shared.wallets);
|
||||
} else if (message.message === 'fetchTransactions') {
|
||||
await WatchConnectivity.shared.fetchTransactionsFunction();
|
||||
}
|
||||
} else {
|
||||
reply(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
async handleLightningInvoiceCreateRequest(walletIndex, amount, description) {
|
||||
const wallet = this.BlueApp.getWallets()[walletIndex];
|
||||
const wallet = WatchConnectivity.shared.wallets[walletIndex];
|
||||
if (wallet.allowReceive() && amount > 0 && description.trim().length > 0) {
|
||||
try {
|
||||
const invoiceRequest = await wallet.addInvoice(amount, description);
|
||||
|
@ -47,18 +56,31 @@ export default class WatchConnectivity {
|
|||
}
|
||||
}
|
||||
|
||||
async sendWalletsToWatch() {
|
||||
if (Platform.OS !== 'ios') return;
|
||||
InteractionManager.runAfterInteractions(async () => {
|
||||
if (this.isAppInstalled) {
|
||||
const allWallets = this.BlueApp.getWallets();
|
||||
async sendWalletsToWatch(allWallets) {
|
||||
if (allWallets === undefined && WatchConnectivity.shared.wallets !== undefined) {
|
||||
allWallets = WatchConnectivity.shared.wallets;
|
||||
}
|
||||
if (allWallets && allWallets.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
return InteractionManager.runAfterInteractions(async () => {
|
||||
console.warn(WatchConnectivity.shared.isAppInstalled);
|
||||
|
||||
if (WatchConnectivity.shared.isAppInstalled) {
|
||||
let wallets = [];
|
||||
|
||||
for (const wallet of allWallets) {
|
||||
let receiveAddress = '';
|
||||
if (wallet.allowReceive()) {
|
||||
if (wallet.getAddressAsync) {
|
||||
await wallet.getAddressAsync();
|
||||
receiveAddress = wallet.getAddress();
|
||||
try {
|
||||
await wallet.getAddressAsync();
|
||||
receiveAddress = wallet.getAddress();
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
receiveAddress = wallet.getAddress();
|
||||
}
|
||||
} else {
|
||||
receiveAddress = wallet.getAddress();
|
||||
}
|
||||
|
@ -70,7 +92,7 @@ export default class WatchConnectivity {
|
|||
let memo = '';
|
||||
let amount = 0;
|
||||
|
||||
if (transaction.hasOwnProperty('confirmations') && !transaction.confirmations > 0) {
|
||||
if (transaction.hasOwnProperty('confirmations') && !(transaction.confirmations > 0)) {
|
||||
type = 'pendingConfirmation';
|
||||
} else if (transaction.type === 'user_invoice' || transaction.type === 'payment_request') {
|
||||
const currentDate = new Date();
|
||||
|
@ -92,9 +114,7 @@ export default class WatchConnectivity {
|
|||
type = 'received';
|
||||
}
|
||||
if (transaction.type === 'user_invoice' || transaction.type === 'payment_request') {
|
||||
if (isNaN(transaction.value)) {
|
||||
amount = '0';
|
||||
}
|
||||
amount = isNaN(transaction.value) ? '0' : amount;
|
||||
const currentDate = new Date();
|
||||
const now = (currentDate.getTime() / 1000) | 0;
|
||||
const invoiceExpiration = transaction.timestamp + transaction.expire_time;
|
||||
|
@ -113,8 +133,8 @@ export default class WatchConnectivity {
|
|||
} else {
|
||||
amount = loc.formatBalance(transaction.value, wallet.getPreferredBalanceUnit(), true).toString();
|
||||
}
|
||||
if (this.BlueApp.tx_metadata[transaction.hash] && this.BlueApp.tx_metadata[transaction.hash]['memo']) {
|
||||
memo = this.BlueApp.tx_metadata[transaction.hash]['memo'];
|
||||
if (WatchConnectivity.shared.tx_metadata[transaction.hash] && WatchConnectivity.shared.tx_metadata[transaction.hash]['memo']) {
|
||||
memo = WatchConnectivity.shared.tx_metadata[transaction.hash]['memo'];
|
||||
} else if (transaction.memo) {
|
||||
memo = transaction.memo;
|
||||
}
|
||||
|
@ -130,14 +150,9 @@ export default class WatchConnectivity {
|
|||
transactions: watchTransactions,
|
||||
});
|
||||
}
|
||||
|
||||
Watch.updateApplicationContext({ wallets });
|
||||
Watch.updateApplicationContext({ wallets, randomID: Math.floor(Math.random() * 11) });
|
||||
return { wallets };
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
WatchConnectivity.init = function() {
|
||||
if (WatchConnectivity.shared || Platform.OS !== 'ios') return;
|
||||
WatchConnectivity.shared = new WatchConnectivity();
|
||||
};
|
|
@ -138,7 +138,7 @@ export class AbstractHDWallet extends LegacyWallet {
|
|||
freeAddress = this._getExternalAddressByIndex(this.next_free_address_index + c); // we didnt check this one, maybe its free
|
||||
this.next_free_address_index += c + 1; // now points to the one _after_
|
||||
}
|
||||
|
||||
this._address = freeAddress;
|
||||
return freeAddress;
|
||||
}
|
||||
|
||||
|
@ -176,7 +176,7 @@ export class AbstractHDWallet extends LegacyWallet {
|
|||
freeAddress = this._getExternalAddressByIndex(this.next_free_address_index + c); // we didnt check this one, maybe its free
|
||||
this.next_free_address_index += c + 1; // now points to the one _after_
|
||||
}
|
||||
|
||||
this._address = freeAddress;
|
||||
return freeAddress;
|
||||
}
|
||||
|
||||
|
@ -187,7 +187,7 @@ export class AbstractHDWallet extends LegacyWallet {
|
|||
* @return {string}
|
||||
*/
|
||||
getAddress() {
|
||||
return '';
|
||||
return this._address;
|
||||
}
|
||||
|
||||
_getExternalWIFByIndex(index) {
|
||||
|
|
|
@ -286,8 +286,13 @@ export class AppStorage {
|
|||
this.tx_metadata = data.tx_metadata;
|
||||
}
|
||||
}
|
||||
WatchConnectivity.init();
|
||||
WatchConnectivity.shared && (await WatchConnectivity.shared.sendWalletsToWatch());
|
||||
WatchConnectivity.shared.wallets = this.wallets;
|
||||
WatchConnectivity.shared.tx_metadata = this.tx_metadata;
|
||||
WatchConnectivity.shared.fetchTransactionsFunction = async () => {
|
||||
await this.fetchWalletTransactions();
|
||||
await this.saveToDisk();
|
||||
};
|
||||
await WatchConnectivity.shared.sendWalletsToWatch(this.wallets);
|
||||
return true;
|
||||
} else {
|
||||
return false; // failed loading data or loading/decryptin data
|
||||
|
@ -307,6 +312,7 @@ export class AppStorage {
|
|||
deleteWallet(wallet) {
|
||||
let secret = wallet.getSecret();
|
||||
let tempWallets = [];
|
||||
|
||||
for (let value of this.wallets) {
|
||||
if (value.getSecret() === secret) {
|
||||
// the one we should delete
|
||||
|
@ -361,8 +367,9 @@ export class AppStorage {
|
|||
} else {
|
||||
await this.setItem(AppStorage.FLAG_ENCRYPTED, ''); // drop the flag
|
||||
}
|
||||
WatchConnectivity.init();
|
||||
WatchConnectivity.shared && WatchConnectivity.shared.sendWalletsToWatch();
|
||||
WatchConnectivity.shared.wallets = this.wallets;
|
||||
WatchConnectivity.shared.tx_metadata = this.tx_metadata;
|
||||
await WatchConnectivity.shared.sendWalletsToWatch();
|
||||
return this.setItem('data', JSON.stringify(data));
|
||||
}
|
||||
|
||||
|
|
|
@ -47,6 +47,21 @@
|
|||
<true/>
|
||||
<key>NSExceptionDomains</key>
|
||||
<dict>
|
||||
<key>electrum3.bluewallet.io</key>
|
||||
<dict>
|
||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>electrum2.bluewallet.io</key>
|
||||
<dict>
|
||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>electrum1.bluewallet.io</key>
|
||||
<dict>
|
||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||
<true/>
|
||||
</dict>
|
||||
<key>localhost</key>
|
||||
<dict>
|
||||
<key>NSExceptionAllowsInsecureHTTPLoads</key>
|
||||
|
|
|
@ -19,7 +19,6 @@ class InterfaceController: WKInterfaceController {
|
|||
override func willActivate() {
|
||||
// This method is called when watch view controller is about to be visible to user
|
||||
super.willActivate()
|
||||
WCSession.default.sendMessage(["message" : "sendApplicationContext"], replyHandler: nil, errorHandler: nil)
|
||||
|
||||
if (WatchDataSource.shared.wallets.isEmpty) {
|
||||
loadingIndicatorGroup.setHidden(true)
|
||||
|
@ -31,8 +30,6 @@ class InterfaceController: WKInterfaceController {
|
|||
}
|
||||
|
||||
@objc private func processWalletsTable() {
|
||||
loadingIndicatorGroup.setHidden(false)
|
||||
walletsTable.setHidden(true)
|
||||
walletsTable.setNumberOfRows(WatchDataSource.shared.wallets.count, withRowType: WalletInformation.identifier)
|
||||
|
||||
for index in 0..<walletsTable.numberOfRows {
|
||||
|
@ -45,7 +42,6 @@ class InterfaceController: WKInterfaceController {
|
|||
controller.balance = wallet.balance
|
||||
controller.type = WalletGradient(rawValue: wallet.type) ?? .SegwitHD
|
||||
}
|
||||
loadingIndicatorGroup.setHidden(true)
|
||||
noWalletsAvailableLabel.setHidden(!WatchDataSource.shared.wallets.isEmpty)
|
||||
walletsTable.setHidden(WatchDataSource.shared.wallets.isEmpty)
|
||||
}
|
||||
|
|
|
@ -32,10 +32,10 @@ class WatchDataSource: NSObject, WCSessionDelegate {
|
|||
}
|
||||
|
||||
func processWalletsData(walletsInfo: [String: Any]) {
|
||||
if let walletsToProcess = walletsInfo["wallets"] as? [[String: Any]] {
|
||||
if let walletsToProcess = walletsInfo["wallets"] as? [[String: Any]], !walletsToProcess.isEmpty {
|
||||
wallets.removeAll();
|
||||
for (index, entry) in walletsToProcess.enumerated() {
|
||||
guard let label = entry["label"] as? String, let balance = entry["balance"] as? String, let type = entry["type"] as? String, let preferredBalanceUnit = entry["preferredBalanceUnit"] as? String, let receiveAddress = entry["receiveAddress"] as? String, let transactions = entry["transactions"] as? [[String: Any]] else {
|
||||
guard let label = entry["label"] as? String, let balance = entry["balance"] as? String, let type = entry["type"] as? String, let preferredBalanceUnit = entry["preferredBalanceUnit"] as? String, let transactions = entry["transactions"] as? [[String: Any]] else {
|
||||
continue
|
||||
}
|
||||
var transactionsProcessed = [Transaction]()
|
||||
|
@ -44,6 +44,7 @@ class WatchDataSource: NSObject, WCSessionDelegate {
|
|||
let transaction = Transaction(time: time, memo: memo, type: type, amount: amount)
|
||||
transactionsProcessed.append(transaction)
|
||||
}
|
||||
let receiveAddress = entry["receiveAddress"] as? String ?? ""
|
||||
let wallet = Wallet(label: label, balance: balance, type: type, preferredBalanceUnit: preferredBalanceUnit, receiveAddress: receiveAddress, transactions: transactionsProcessed, identifier: index)
|
||||
wallets.append(wallet)
|
||||
}
|
||||
|
@ -73,7 +74,7 @@ class WatchDataSource: NSObject, WCSessionDelegate {
|
|||
}) { (error) in
|
||||
print(error)
|
||||
responseHandler("")
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,18 +86,17 @@ class WatchDataSource: NSObject, WCSessionDelegate {
|
|||
WatchDataSource.shared.processWalletsData(walletsInfo: applicationContext)
|
||||
}
|
||||
|
||||
func session(_ session: WCSession, didReceiveUserInfo userInfo: [String : Any] = [:]) {
|
||||
// WatchDataSource.shared.processWalletsData(walletsInfo: userInfo)
|
||||
}
|
||||
|
||||
func session(_ session: WCSession, activationDidCompleteWith activationState: WCSessionActivationState, error: Error?) {
|
||||
if activationState == .activated {
|
||||
WCSession.default.sendMessage([:], replyHandler: nil, errorHandler: nil)
|
||||
if let existingData = keychain.getData(Wallet.identifier), let walletData = try? NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(existingData) as? [Wallet] {
|
||||
guard let walletData = walletData, walletData != self.wallets else { return }
|
||||
wallets = walletData
|
||||
WatchDataSource.postDataUpdatedNotification()
|
||||
}
|
||||
WCSession.default.sendMessage(["message" : "sendApplicationContext"], replyHandler: { (replyData) in
|
||||
}) { (error) in
|
||||
print(error)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
//
|
||||
|
||||
import WatchKit
|
||||
import WatchConnectivity
|
||||
import Foundation
|
||||
import EFQRCode
|
||||
|
||||
|
@ -16,19 +17,22 @@ class ReceiveInterfaceController: WKInterfaceController {
|
|||
@IBOutlet weak var imageInterface: WKInterfaceImage!
|
||||
private var wallet: Wallet?
|
||||
private var isRenderingQRCode: Bool?
|
||||
private var receiveMethod: String = "receive"
|
||||
@IBOutlet weak var loadingIndicator: WKInterfaceGroup!
|
||||
|
||||
override func awake(withContext context: Any?) {
|
||||
super.awake(withContext: context)
|
||||
guard let identifier = context as? Int, WatchDataSource.shared.wallets.count > identifier else {
|
||||
guard let passedContext = context as? (Int, String), WatchDataSource.shared.wallets.count >= passedContext.0 else {
|
||||
pop()
|
||||
return
|
||||
}
|
||||
let identifier = passedContext.0
|
||||
let wallet = WatchDataSource.shared.wallets[identifier]
|
||||
self.wallet = wallet
|
||||
receiveMethod = passedContext.1
|
||||
NotificationCenter.default.addObserver(forName: SpecifyInterfaceController.NotificationName.createQRCode, object: nil, queue: nil) { [weak self] (notification) in
|
||||
self?.isRenderingQRCode = true
|
||||
if let wallet = self?.wallet, wallet.type == "lightningCustodianWallet", let object = notification.object as? SpecifyInterfaceController.SpecificQRCodeContent, let amount = object.amount {
|
||||
if let wallet = self?.wallet, wallet.type == "lightningCustodianWallet", self?.receiveMethod == "createInvoice", let object = notification.object as? SpecifyInterfaceController.SpecificQRCodeContent, let amount = object.amount {
|
||||
self?.imageInterface.setHidden(true)
|
||||
self?.loadingIndicator.setHidden(false)
|
||||
WatchDataSource.requestLightningInvoice(walletIdentifier: identifier, amount: amount, description: object.description, responseHandler: { (invoice) in
|
||||
|
@ -43,6 +47,7 @@ class ReceiveInterfaceController: WKInterfaceController {
|
|||
self?.imageInterface.setHidden(false)
|
||||
self?.imageInterface.setImage(nil)
|
||||
self?.imageInterface.setImage(image)
|
||||
WCSession.default.sendMessage(["message": "fetchTransactions"], replyHandler: nil, errorHandler: nil)
|
||||
} else {
|
||||
self?.pop()
|
||||
self?.presentAlert(withTitle: "Error", message: "Unable to create invoice. Please, make sure your iPhone is paired and nearby.", preferredStyle: .alert, actions: [WKAlertAction(title: "OK", style: .default, handler: { [weak self] in
|
||||
|
@ -83,7 +88,7 @@ class ReceiveInterfaceController: WKInterfaceController {
|
|||
}
|
||||
|
||||
guard !wallet.receiveAddress.isEmpty, let cgImage = EFQRCode.generate(
|
||||
content: wallet.receiveAddress) else {
|
||||
content: wallet.receiveAddress), receiveMethod != "createInvoice" else {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -93,7 +98,7 @@ class ReceiveInterfaceController: WKInterfaceController {
|
|||
|
||||
override func didAppear() {
|
||||
super.didAppear()
|
||||
if wallet?.type == "lightningCustodianWallet" {
|
||||
if wallet?.type == "lightningCustodianWallet" && receiveMethod == "createInvoice" {
|
||||
if isRenderingQRCode == nil {
|
||||
presentController(withName: SpecifyInterfaceController.identifier, context: wallet?.identifier)
|
||||
isRenderingQRCode = false
|
||||
|
|
|
@ -14,6 +14,8 @@ class SpecifyInterfaceController: WKInterfaceController {
|
|||
static let identifier = "SpecifyInterfaceController"
|
||||
@IBOutlet weak var descriptionButton: WKInterfaceButton!
|
||||
@IBOutlet weak var amountButton: WKInterfaceButton!
|
||||
@IBOutlet weak var createButton: WKInterfaceButton!
|
||||
|
||||
struct SpecificQRCodeContent {
|
||||
var amount: Double?
|
||||
var description: String?
|
||||
|
@ -36,6 +38,7 @@ class SpecifyInterfaceController: WKInterfaceController {
|
|||
}
|
||||
let wallet = WatchDataSource.shared.wallets[identifier]
|
||||
self.wallet = wallet
|
||||
self.createButton.setAlpha(0.5)
|
||||
self.specifiedQRContent.bitcoinUnit = wallet.type == "lightningCustodianWallet" ? .SATS : .BTC
|
||||
NotificationCenter.default.addObserver(forName: NumericKeypadInterfaceController.NotificationName.keypadDataChanged, object: nil, queue: nil) { [weak self] (notification) in
|
||||
guard let amountObject = notification.object as? [String], !amountObject.isEmpty else { return }
|
||||
|
@ -53,6 +56,10 @@ class SpecifyInterfaceController: WKInterfaceController {
|
|||
if let amountDouble = Double(title), let keyPadType = self?.specifiedQRContent.bitcoinUnit {
|
||||
self?.specifiedQRContent.amount = amountDouble
|
||||
self?.amountButton.setTitle("\(title) \(keyPadType)")
|
||||
|
||||
let isShouldCreateButtonBeEnabled = amountDouble > 0 && !title.isEmpty
|
||||
self?.createButton.setEnabled(isShouldCreateButtonBeEnabled)
|
||||
self?.createButton.setAlpha(isShouldCreateButtonBeEnabled ? 1.0 : 0.5)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,11 +16,13 @@ class WalletDetailsInterfaceController: WKInterfaceController {
|
|||
static let identifier = "WalletDetailsInterfaceController"
|
||||
@IBOutlet weak var walletBasicsGroup: WKInterfaceGroup!
|
||||
@IBOutlet weak var walletBalanceLabel: WKInterfaceLabel!
|
||||
@IBOutlet weak var createInvoiceButton: WKInterfaceButton!
|
||||
@IBOutlet weak var walletNameLabel: WKInterfaceLabel!
|
||||
@IBOutlet weak var receiveButton: WKInterfaceButton!
|
||||
@IBOutlet weak var noTransactionsLabel: WKInterfaceLabel!
|
||||
@IBOutlet weak var transactionsTable: WKInterfaceTable!
|
||||
|
||||
|
||||
override func awake(withContext context: Any?) {
|
||||
super.awake(withContext: context)
|
||||
guard let identifier = context as? Int else {
|
||||
|
@ -32,7 +34,7 @@ class WalletDetailsInterfaceController: WKInterfaceController {
|
|||
walletBalanceLabel.setText(wallet.balance)
|
||||
walletNameLabel.setText(wallet.label)
|
||||
walletBasicsGroup.setBackgroundImageNamed(WalletGradient(rawValue: wallet.type)?.imageString)
|
||||
|
||||
createInvoiceButton.setHidden(wallet.type != "lightningCustodianWallet")
|
||||
processWalletsTable()
|
||||
}
|
||||
|
||||
|
@ -40,12 +42,14 @@ class WalletDetailsInterfaceController: WKInterfaceController {
|
|||
super.willActivate()
|
||||
transactionsTable.setHidden(wallet?.transactions.isEmpty ?? true)
|
||||
noTransactionsLabel.setHidden(!(wallet?.transactions.isEmpty ?? false))
|
||||
receiveButton.setHidden(wallet?.receiveAddress.isEmpty ?? true)
|
||||
}
|
||||
|
||||
@IBAction func receiveMenuItemTapped() {
|
||||
presentController(withName: ReceiveInterfaceController.identifier, context: wallet)
|
||||
presentController(withName: ReceiveInterfaceController.identifier, context: (wallet, "receive"))
|
||||
}
|
||||
|
||||
|
||||
@objc private func processWalletsTable() {
|
||||
transactionsTable.setNumberOfRows(wallet?.transactions.count ?? 0, withRowType: TransactionTableRow.identifier)
|
||||
|
||||
|
@ -61,8 +65,12 @@ class WalletDetailsInterfaceController: WKInterfaceController {
|
|||
noTransactionsLabel.setHidden(!(wallet?.transactions.isEmpty ?? false))
|
||||
}
|
||||
|
||||
@IBAction func createInvoiceTapped() {
|
||||
pushController(withName: ReceiveInterfaceController.identifier, context: (wallet?.identifier, "createInvoice"))
|
||||
}
|
||||
|
||||
override func contextForSegue(withIdentifier segueIdentifier: String) -> Any? {
|
||||
return wallet?.identifier
|
||||
return (wallet?.identifier, "receive")
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder.WatchKit.Storyboard" version="3.0" toolsVersion="14490.70" targetRuntime="watchKit" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="AgC-eL-Hgc">
|
||||
<device id="watch44" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<document type="com.apple.InterfaceBuilder.WatchKit.Storyboard" version="3.0" toolsVersion="15505" targetRuntime="watchKit" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="AgC-eL-Hgc">
|
||||
<device id="watch44"/>
|
||||
<dependencies>
|
||||
<deployment identifier="watchOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBWatchKitPlugin" version="14490.21"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBWatchKitPlugin" version="15501"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--BlueWallet-->
|
||||
<scene sceneID="aou-V4-d1y">
|
||||
<objects>
|
||||
<controller title="BlueWallet" fullBounds="YES" id="AgC-eL-Hgc" customClass="InterfaceController" customModule="BlueWalletWatch" customModuleProvider="target">
|
||||
<controller title="BlueWallet" id="AgC-eL-Hgc" customClass="InterfaceController" customModule="BlueWalletWatch" customModuleProvider="target">
|
||||
<items>
|
||||
<table alignment="left" id="jUH-JS-ccp">
|
||||
<items>
|
||||
|
@ -74,7 +72,7 @@
|
|||
</group>
|
||||
</items>
|
||||
</group>
|
||||
<button width="1" alignment="left" title="Receive" id="bPO-h8-ccD">
|
||||
<button width="1" alignment="left" hidden="YES" title="Receive" id="bPO-h8-ccD">
|
||||
<color key="titleColor" red="0.18431372549019609" green="0.37254901960784315" blue="0.70196078431372544" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="backgroundColor" red="0.80000000000000004" green="0.8666666666666667" blue="0.97647058823529409" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<fontDescription key="font" type="system" weight="medium" pointSize="16"/>
|
||||
|
@ -82,6 +80,14 @@
|
|||
<segue destination="egq-Yw-qK5" kind="push" identifier="ReceiveInterfaceController" id="zEG-Xi-Smb"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button width="1" alignment="left" hidden="YES" title="Create Invoice" id="7bc-tt-Pab" userLabel="Create Invoice">
|
||||
<color key="titleColor" red="0.1843137255" green="0.37254901959999998" blue="0.70196078429999997" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="backgroundColor" red="0.80000000000000004" green="0.86666666670000003" blue="0.97647058819999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<fontDescription key="font" type="system" weight="medium" pointSize="16"/>
|
||||
<connections>
|
||||
<action selector="createInvoiceTapped" destination="XWa-4i-Abg" id="0YZ-PF-kAC"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label alignment="center" verticalAlignment="bottom" text="No Transactions" textAlignment="left" id="pi4-Bk-Jiq"/>
|
||||
<table alignment="left" id="nyQ-lX-DX0">
|
||||
<items>
|
||||
|
@ -125,6 +131,7 @@
|
|||
</table>
|
||||
</items>
|
||||
<connections>
|
||||
<outlet property="createInvoiceButton" destination="7bc-tt-Pab" id="CcN-EV-pnQ"/>
|
||||
<outlet property="noTransactionsLabel" destination="pi4-Bk-Jiq" id="zft-Hw-KuZ"/>
|
||||
<outlet property="receiveButton" destination="bPO-h8-ccD" id="xBq-42-9qP"/>
|
||||
<outlet property="transactionsTable" destination="nyQ-lX-DX0" id="N1x-px-s08"/>
|
||||
|
@ -163,9 +170,9 @@
|
|||
<!--ReceiveInterfaceController-->
|
||||
<scene sceneID="tQ7-Qr-5i4">
|
||||
<objects>
|
||||
<controller identifier="ReceiveInterfaceController" fullBounds="YES" fullScreen="YES" id="egq-Yw-qK5" customClass="ReceiveInterfaceController" customModule="BlueWalletWatch_Extension">
|
||||
<controller identifier="ReceiveInterfaceController" fullBounds="YES" id="egq-Yw-qK5" customClass="ReceiveInterfaceController" customModule="BlueWalletWatch_Extension">
|
||||
<items>
|
||||
<imageView height="1" alignment="left" id="Dnb-sM-wdN"/>
|
||||
<imageView height="0.90000000000000002" alignment="left" id="Dnb-sM-wdN"/>
|
||||
<group width="1" alignment="center" verticalAlignment="center" hidden="YES" layout="vertical" id="0If-FP-smM">
|
||||
<items>
|
||||
<imageView width="60" height="60" alignment="center" image="loadingIndicator" contentMode="scaleAspectFit" id="nQb-s6-ySB"/>
|
||||
|
@ -209,7 +216,7 @@
|
|||
<separator alignment="left" alpha="0.0" id="i7u-PI-g7Q">
|
||||
<color key="color" red="0.63137254899999995" green="0.63137254899999995" blue="0.63137254899999995" alpha="0.84999999999999998" colorSpace="calibratedRGB"/>
|
||||
</separator>
|
||||
<button width="1" alignment="left" verticalAlignment="bottom" title="Create" id="6eh-lx-UEe">
|
||||
<button width="1" alignment="left" verticalAlignment="bottom" title="Create" enabled="NO" id="6eh-lx-UEe">
|
||||
<color key="titleColor" red="0.1843137255" green="0.37254901959999998" blue="0.70196078429999997" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="backgroundColor" red="0.80000000000000004" green="0.86666666670000003" blue="0.97647058819999999" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<fontDescription key="font" type="system" weight="medium" pointSize="16"/>
|
||||
|
@ -220,6 +227,7 @@
|
|||
</items>
|
||||
<connections>
|
||||
<outlet property="amountButton" destination="0Hm-hv-Yi3" id="9DN-zh-BGB"/>
|
||||
<outlet property="createButton" destination="6eh-lx-UEe" id="1T3-m4-oVN"/>
|
||||
<outlet property="descriptionButton" destination="fcI-6Z-moQ" id="a7M-ZD-Zsi"/>
|
||||
</connections>
|
||||
</controller>
|
||||
|
@ -335,5 +343,10 @@
|
|||
<point key="canvasLocation" x="220" y="1029"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="loadingIndicator" width="108" height="108"/>
|
||||
<image name="pendingConfirmation" width="12" height="12"/>
|
||||
<image name="walletHD" width="249" height="100.5"/>
|
||||
</resources>
|
||||
<color key="tintColor" red="0.40784313725490196" green="0.73333333333333328" blue="0.88235294117647056" alpha="1" colorSpace="calibratedRGB"/>
|
||||
</document>
|
||||
|
|
|
@ -102,8 +102,6 @@ PODS:
|
|||
- React
|
||||
- react-native-slider (2.0.0-rc.1):
|
||||
- React
|
||||
- react-native-watch-connectivity (0.3.2):
|
||||
- React
|
||||
- react-native-webview (6.9.0):
|
||||
- React
|
||||
- React-RCTActionSheet (0.60.5):
|
||||
|
@ -156,6 +154,8 @@ PODS:
|
|||
- React
|
||||
- RNVectorIcons (6.6.0):
|
||||
- React
|
||||
- RNWatch (0.4.1):
|
||||
- React
|
||||
- Sentry (4.4.1):
|
||||
- Sentry/Core (= 4.4.1)
|
||||
- Sentry/Core (4.4.1)
|
||||
|
@ -190,7 +190,6 @@ DEPENDENCIES:
|
|||
- react-native-image-picker (from `../node_modules/react-native-image-picker`)
|
||||
- react-native-randombytes (from `../node_modules/react-native-randombytes`)
|
||||
- "react-native-slider (from `../node_modules/@react-native-community/slider`)"
|
||||
- react-native-watch-connectivity (from `../node_modules/react-native-watch-connectivity`)
|
||||
- react-native-webview (from `../node_modules/react-native-webview`)
|
||||
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
|
||||
- React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
|
||||
|
@ -215,6 +214,7 @@ DEPENDENCIES:
|
|||
- RNShare (from `../node_modules/react-native-share`)
|
||||
- RNSVG (from `../node_modules/react-native-svg`)
|
||||
- RNVectorIcons (from `../node_modules/react-native-vector-icons`)
|
||||
- RNWatch (from `../node_modules/react-native-watch-connectivity`)
|
||||
- TcpSockets (from `../node_modules/react-native-tcp`)
|
||||
- ToolTipMenu (from `../node_modules/react-native-tooltip`)
|
||||
- yoga (from `../node_modules/react-native/ReactCommon/yoga`)
|
||||
|
@ -274,8 +274,6 @@ EXTERNAL SOURCES:
|
|||
:path: "../node_modules/react-native-randombytes"
|
||||
react-native-slider:
|
||||
:path: "../node_modules/@react-native-community/slider"
|
||||
react-native-watch-connectivity:
|
||||
:path: "../node_modules/react-native-watch-connectivity"
|
||||
react-native-webview:
|
||||
:path: "../node_modules/react-native-webview"
|
||||
React-RCTActionSheet:
|
||||
|
@ -324,6 +322,8 @@ EXTERNAL SOURCES:
|
|||
:path: "../node_modules/react-native-svg"
|
||||
RNVectorIcons:
|
||||
:path: "../node_modules/react-native-vector-icons"
|
||||
RNWatch:
|
||||
:path: "../node_modules/react-native-watch-connectivity"
|
||||
TcpSockets:
|
||||
:path: "../node_modules/react-native-tcp"
|
||||
ToolTipMenu:
|
||||
|
@ -359,7 +359,6 @@ SPEC CHECKSUMS:
|
|||
react-native-image-picker: 3637d63fef7e32a230141ab4660d3ceb773c824f
|
||||
react-native-randombytes: 991545e6eaaf700b4ee384c291ef3d572e0b2ca8
|
||||
react-native-slider: 6d83f7b8076a84e965a43fbdcfcf9dac19cea42e
|
||||
react-native-watch-connectivity: 5333c7054ff667130fd93f504a3d6bb35e87cabd
|
||||
react-native-webview: f72ac4078e115dfa741cc588acb1cca25566457d
|
||||
React-RCTActionSheet: b0f1ea83f4bf75fb966eae9bfc47b78c8d3efd90
|
||||
React-RCTAnimation: 359ba1b5690b1e87cc173558a78e82d35919333e
|
||||
|
@ -384,6 +383,7 @@ SPEC CHECKSUMS:
|
|||
RNShare: 8b171d4b43c1d886917fdd303bf7a4b87167b05c
|
||||
RNSVG: 0eb087cfb5d7937be93c45b163b26352a647e681
|
||||
RNVectorIcons: 0bb4def82230be1333ddaeee9fcba45f0b288ed4
|
||||
RNWatch: a14e378448e187cc12f307f61d41fe8a65400e86
|
||||
Sentry: 5d312a04e369154aeac616214f4dfc3cbcc8b296
|
||||
swift_qrcodejs: 4d024fc98b0778b804ec6a5c810880fd092aec9d
|
||||
TcpSockets: 8d839b9b14f6f344d98e4642ded13ab3112b462d
|
||||
|
|
|
@ -130,7 +130,7 @@ module.exports = {
|
|||
cancel: 'Cancel',
|
||||
scan: 'Scan',
|
||||
send: 'Send',
|
||||
create: 'Create',
|
||||
create: 'Create Invoice',
|
||||
remaining_balance: 'Remaining balance',
|
||||
},
|
||||
confirm: {
|
||||
|
|
164
package-lock.json
generated
164
package-lock.json
generated
|
@ -5762,25 +5762,25 @@
|
|||
"dependencies": {
|
||||
"abbrev": {
|
||||
"version": "1.1.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
||||
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
|
||||
"optional": true
|
||||
},
|
||||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
||||
"optional": true
|
||||
},
|
||||
"aproba": {
|
||||
"version": "1.2.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
|
||||
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==",
|
||||
"optional": true
|
||||
},
|
||||
"are-we-there-yet": {
|
||||
"version": "1.1.5",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
|
||||
"integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -5790,13 +5790,13 @@
|
|||
},
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||
"optional": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -5806,37 +5806,37 @@
|
|||
},
|
||||
"chownr": {
|
||||
"version": "1.1.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz",
|
||||
"integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==",
|
||||
"optional": true
|
||||
},
|
||||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
|
||||
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
|
||||
"optional": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||
"optional": true
|
||||
},
|
||||
"console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
|
||||
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
|
||||
"optional": true
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
|
||||
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
|
||||
"optional": true
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.1.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
|
||||
"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -5845,25 +5845,25 @@
|
|||
},
|
||||
"deep-extend": {
|
||||
"version": "0.6.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
|
||||
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
|
||||
"optional": true
|
||||
},
|
||||
"delegates": {
|
||||
"version": "1.0.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
|
||||
"integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",
|
||||
"optional": true
|
||||
},
|
||||
"detect-libc": {
|
||||
"version": "1.0.3",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
|
||||
"integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",
|
||||
"optional": true
|
||||
},
|
||||
"fs-minipass": {
|
||||
"version": "1.2.5",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz",
|
||||
"integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -5872,13 +5872,13 @@
|
|||
},
|
||||
"fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
|
||||
"optional": true
|
||||
},
|
||||
"gauge": {
|
||||
"version": "2.7.4",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
|
||||
"integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -5894,7 +5894,7 @@
|
|||
},
|
||||
"glob": {
|
||||
"version": "7.1.3",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
|
||||
"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -5908,13 +5908,13 @@
|
|||
},
|
||||
"has-unicode": {
|
||||
"version": "2.0.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
|
||||
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",
|
||||
"optional": true
|
||||
},
|
||||
"iconv-lite": {
|
||||
"version": "0.4.24",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
||||
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -5923,7 +5923,7 @@
|
|||
},
|
||||
"ignore-walk": {
|
||||
"version": "3.0.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz",
|
||||
"integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -5932,7 +5932,7 @@
|
|||
},
|
||||
"inflight": {
|
||||
"version": "1.0.6",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -5942,19 +5942,19 @@
|
|||
},
|
||||
"inherits": {
|
||||
"version": "2.0.3",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
|
||||
"optional": true
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
|
||||
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
|
||||
"optional": true
|
||||
},
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "1.0.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
|
||||
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -5963,13 +5963,13 @@
|
|||
},
|
||||
"isarray": {
|
||||
"version": "1.0.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
|
||||
"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
|
||||
"optional": true
|
||||
},
|
||||
"minimatch": {
|
||||
"version": "3.0.4",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -5978,13 +5978,13 @@
|
|||
},
|
||||
"minimist": {
|
||||
"version": "0.0.8",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
|
||||
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
|
||||
"optional": true
|
||||
},
|
||||
"minipass": {
|
||||
"version": "2.3.5",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz",
|
||||
"integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -5994,7 +5994,7 @@
|
|||
},
|
||||
"minizlib": {
|
||||
"version": "1.2.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz",
|
||||
"integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -6003,7 +6003,7 @@
|
|||
},
|
||||
"mkdirp": {
|
||||
"version": "0.5.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
|
||||
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -6012,13 +6012,13 @@
|
|||
},
|
||||
"ms": {
|
||||
"version": "2.1.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
|
||||
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
|
||||
"optional": true
|
||||
},
|
||||
"needle": {
|
||||
"version": "2.3.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/needle/-/needle-2.3.0.tgz",
|
||||
"integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -6029,7 +6029,7 @@
|
|||
},
|
||||
"node-pre-gyp": {
|
||||
"version": "0.12.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz",
|
||||
"integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -6047,7 +6047,7 @@
|
|||
},
|
||||
"nopt": {
|
||||
"version": "4.0.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
|
||||
"integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -6057,13 +6057,13 @@
|
|||
},
|
||||
"npm-bundled": {
|
||||
"version": "1.0.6",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz",
|
||||
"integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==",
|
||||
"optional": true
|
||||
},
|
||||
"npm-packlist": {
|
||||
"version": "1.4.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz",
|
||||
"integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -6073,7 +6073,7 @@
|
|||
},
|
||||
"npmlog": {
|
||||
"version": "4.1.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
|
||||
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -6085,19 +6085,19 @@
|
|||
},
|
||||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
|
||||
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
|
||||
"optional": true
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
|
||||
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
|
||||
"optional": true
|
||||
},
|
||||
"once": {
|
||||
"version": "1.4.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -6106,19 +6106,19 @@
|
|||
},
|
||||
"os-homedir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
|
||||
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=",
|
||||
"optional": true
|
||||
},
|
||||
"os-tmpdir": {
|
||||
"version": "1.0.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
|
||||
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
|
||||
"optional": true
|
||||
},
|
||||
"osenv": {
|
||||
"version": "0.1.5",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
|
||||
"integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -6128,19 +6128,19 @@
|
|||
},
|
||||
"path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
||||
"optional": true
|
||||
},
|
||||
"process-nextick-args": {
|
||||
"version": "2.0.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
|
||||
"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
|
||||
"optional": true
|
||||
},
|
||||
"rc": {
|
||||
"version": "1.2.8",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
|
||||
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -6152,7 +6152,7 @@
|
|||
"dependencies": {
|
||||
"minimist": {
|
||||
"version": "1.2.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
||||
"optional": true
|
||||
}
|
||||
|
@ -6160,7 +6160,7 @@
|
|||
},
|
||||
"readable-stream": {
|
||||
"version": "2.3.6",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
|
||||
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -6175,7 +6175,7 @@
|
|||
},
|
||||
"rimraf": {
|
||||
"version": "2.6.3",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
|
||||
"integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -6184,43 +6184,43 @@
|
|||
},
|
||||
"safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
||||
"optional": true
|
||||
},
|
||||
"safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
|
||||
"optional": true
|
||||
},
|
||||
"sax": {
|
||||
"version": "1.2.4",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
|
||||
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
|
||||
"optional": true
|
||||
},
|
||||
"semver": {
|
||||
"version": "5.7.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
|
||||
"integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
|
||||
"optional": true
|
||||
},
|
||||
"set-blocking": {
|
||||
"version": "2.0.0",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
|
||||
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
|
||||
"optional": true
|
||||
},
|
||||
"signal-exit": {
|
||||
"version": "3.0.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
|
||||
"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
|
||||
"optional": true
|
||||
},
|
||||
"string-width": {
|
||||
"version": "1.0.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
|
||||
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -6231,7 +6231,7 @@
|
|||
},
|
||||
"string_decoder": {
|
||||
"version": "1.1.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
|
||||
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -6240,7 +6240,7 @@
|
|||
},
|
||||
"strip-ansi": {
|
||||
"version": "3.0.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -6249,13 +6249,13 @@
|
|||
},
|
||||
"strip-json-comments": {
|
||||
"version": "2.0.1",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
|
||||
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
|
||||
"optional": true
|
||||
},
|
||||
"tar": {
|
||||
"version": "4.4.8",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz",
|
||||
"integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -6270,13 +6270,13 @@
|
|||
},
|
||||
"util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
|
||||
"optional": true
|
||||
},
|
||||
"wide-align": {
|
||||
"version": "1.1.3",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
|
||||
"integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
|
@ -6285,13 +6285,13 @@
|
|||
},
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||
"optional": true
|
||||
},
|
||||
"yallist": {
|
||||
"version": "3.0.3",
|
||||
"resolved": false,
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz",
|
||||
"integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==",
|
||||
"optional": true
|
||||
}
|
||||
|
@ -6579,9 +6579,9 @@
|
|||
"integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE="
|
||||
},
|
||||
"handlebars": {
|
||||
"version": "4.4.2",
|
||||
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.4.2.tgz",
|
||||
"integrity": "sha512-cIv17+GhL8pHHnRJzGu2wwcthL5sb8uDKBHvZ2Dtu5s1YNt0ljbzKbamnc+gr69y7bzwQiBdr5+hOpRd5pnOdg==",
|
||||
"version": "4.5.1",
|
||||
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.1.tgz",
|
||||
"integrity": "sha512-C29UoFzHe9yM61lOsIlCE5/mQVGrnIOrOq7maQl76L7tYPCgC1og0Ajt6uWnX4ZTxBPnjw+CUvawphwCfJgUnA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"neo-async": "^2.6.0",
|
||||
|
@ -6591,9 +6591,9 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"commander": {
|
||||
"version": "2.20.1",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.1.tgz",
|
||||
"integrity": "sha512-cCuLsMhJeWQ/ZpsFTbE765kvVfoeSddc4nU3up4fV+fDBcfUXnbITJ+JzhkdjzOqhURjZgujxaioam4RM9yGUg==",
|
||||
"version": "2.20.3",
|
||||
"resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
|
||||
"integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
|
@ -6604,13 +6604,13 @@
|
|||
"dev": true
|
||||
},
|
||||
"uglify-js": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz",
|
||||
"integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==",
|
||||
"version": "3.6.8",
|
||||
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.8.tgz",
|
||||
"integrity": "sha512-XhHJ3S3ZyMwP8kY1Gkugqx3CJh2C3O0y8NPiSxtm1tyD/pktLAkFZsFGpuNfTZddKDQ/bbDBLAd2YyA1pbi8HQ==",
|
||||
"dev": true,
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"commander": "~2.20.0",
|
||||
"commander": "~2.20.3",
|
||||
"source-map": "~0.6.1"
|
||||
}
|
||||
}
|
||||
|
@ -12382,7 +12382,7 @@
|
|||
}
|
||||
},
|
||||
"react-native-secure-key-store": {
|
||||
"version": "git+https://github.com/marcosrdz/react-native-secure-key-store.git#eda78b4dd9696c8ff56569e077ccb630a2e65ac1",
|
||||
"version": "git+https://github.com/marcosrdz/react-native-secure-key-store.git#8b04878825050e80b0ac8a3571525b7791c1cc70",
|
||||
"from": "git+https://github.com/marcosrdz/react-native-secure-key-store.git"
|
||||
},
|
||||
"react-native-share": {
|
||||
|
@ -12421,7 +12421,7 @@
|
|||
}
|
||||
},
|
||||
"react-native-tcp": {
|
||||
"version": "git+https://github.com/aprock/react-native-tcp.git#c29cf0f29c14eab41182a37af54ef7b2409620b2",
|
||||
"version": "git+https://github.com/aprock/react-native-tcp.git#6a3b1bc702bf1d40287274ac32698335a8fba61a",
|
||||
"from": "git+https://github.com/aprock/react-native-tcp.git",
|
||||
"requires": {
|
||||
"base64-js": "0.0.8",
|
||||
|
@ -12535,9 +12535,9 @@
|
|||
}
|
||||
},
|
||||
"react-native-watch-connectivity": {
|
||||
"version": "0.3.2",
|
||||
"resolved": "https://registry.npmjs.org/react-native-watch-connectivity/-/react-native-watch-connectivity-0.3.2.tgz",
|
||||
"integrity": "sha512-NA8XHZ31i7wE1MvuOiZqk93EOl/YgvXW0g0TU7/O701QPMkUhzRWlLJxOa9opcgYLLZ6VlvvhdxJ7ZMntreJKQ=="
|
||||
"version": "0.4.1",
|
||||
"resolved": "https://registry.npmjs.org/react-native-watch-connectivity/-/react-native-watch-connectivity-0.4.1.tgz",
|
||||
"integrity": "sha512-fMx3hRXinxAoC64YUL+UkXuwlgYeYp3ECKMucxFgRtouzfCC3RGD+wewY7vxgOrcjkKXusIbCdbU4gS2Lojhqw=="
|
||||
},
|
||||
"react-native-webview": {
|
||||
"version": "6.9.0",
|
||||
|
@ -13076,7 +13076,7 @@
|
|||
}
|
||||
},
|
||||
"rn-nodeify": {
|
||||
"version": "github:tradle/rn-nodeify#580705c3ee0227298d0d12dba413f7aa3bb24ebb",
|
||||
"version": "github:tradle/rn-nodeify#300ca4460c3e4ffa01c45b3a122ce182dc1a0c5a",
|
||||
"from": "github:tradle/rn-nodeify",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
|
|
@ -116,7 +116,7 @@
|
|||
"react-native-tcp": "git+https://github.com/aprock/react-native-tcp.git",
|
||||
"react-native-tooltip": "git+https://github.com/marcosrdz/react-native-tooltip.git",
|
||||
"react-native-vector-icons": "6.6.0",
|
||||
"react-native-watch-connectivity": "0.3.2",
|
||||
"react-native-watch-connectivity": "0.4.1",
|
||||
"react-native-webview": "6.9.0",
|
||||
"react-navigation": "3.11.0",
|
||||
"react-navigation-hooks": "1.1.0",
|
||||
|
|
|
@ -159,7 +159,7 @@ export default class LNDCreateInvoice extends Component {
|
|||
{this.state.isLoading ? (
|
||||
<ActivityIndicator />
|
||||
) : (
|
||||
<BlueButton disabled={!this.state.amount > 0} onPress={() => this.createInvoice()} title={loc.send.details.create} />
|
||||
<BlueButton disabled={!(this.state.amount > 0)} onPress={() => this.createInvoice()} title={loc.send.details.create} />
|
||||
)}
|
||||
</View>
|
||||
);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, { Component } from 'react';
|
||||
import { View, Dimensions, ScrollView, BackHandler, InteractionManager } from 'react-native';
|
||||
import { View, Text, Dimensions, ScrollView, BackHandler, InteractionManager, TouchableOpacity } from 'react-native';
|
||||
import Share from 'react-native-share';
|
||||
import {
|
||||
BlueLoading,
|
||||
|
@ -142,7 +142,35 @@ export default class LNDViewInvoice extends Component {
|
|||
if (invoice.ispaid || invoice.type === 'paid_invoice') {
|
||||
return (
|
||||
<SafeBlueArea style={{ flex: 1 }}>
|
||||
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
|
||||
<View style={{ flex: 2, flexDirection: 'column', justifyContent: 'center' }}>
|
||||
{(invoice.type === 'paid_invoice') && invoice.value && (
|
||||
<View style={{ flexDirection: 'row', justifyContent: 'center', paddingBottom: 8 }}>
|
||||
<Text style={{ color: '#0f5cc0', fontSize: 32, fontWeight: '600' }}>
|
||||
{invoice.value}
|
||||
</Text>
|
||||
<Text style={{ color: '#0f5cc0', fontSize: 16, marginHorizontal: 4, paddingBottom: 3, fontWeight: '600', alignSelf: 'flex-end' }}>
|
||||
{loc.lndViewInvoice.sats}
|
||||
</Text>
|
||||
</View>
|
||||
)}
|
||||
{(invoice.type === 'user_invoice') && invoice.amt && (
|
||||
<View style={{ flexDirection: 'row', justifyContent: 'center', paddingBottom: 8 }}>
|
||||
<Text style={{ color: '#0f5cc0', fontSize: 32, fontWeight: '600' }}>
|
||||
{invoice.amt}
|
||||
</Text>
|
||||
<Text style={{ color: '#0f5cc0', fontSize: 16, marginHorizontal: 4, paddingBottom: 3, fontWeight: '600', alignSelf: 'flex-end' }}>
|
||||
{loc.lndViewInvoice.sats}
|
||||
</Text>
|
||||
</View>
|
||||
)}
|
||||
{!invoice.ispaid && invoice.memo && invoice.memo.length > 0 && (
|
||||
<Text style={{ color: '#9aa0aa', fontSize: 14, marginHorizontal: 4, paddingBottom: 6, fontWeight: '400', alignSelf: 'center' }}>
|
||||
{invoice.memo}
|
||||
</Text>
|
||||
)}
|
||||
</View>
|
||||
|
||||
<View style={{ flex: 3, alignItems: 'center', justifyContent: 'center' }}>
|
||||
<View
|
||||
style={{
|
||||
backgroundColor: '#ccddf9',
|
||||
|
@ -152,27 +180,28 @@ export default class LNDViewInvoice extends Component {
|
|||
alignSelf: 'center',
|
||||
justifyContent: 'center',
|
||||
marginTop: -100,
|
||||
marginBottom: 30,
|
||||
marginBottom: 16,
|
||||
}}
|
||||
>
|
||||
<Icon name="check" size={50} type="font-awesome" color="#0f5cc0" />
|
||||
</View>
|
||||
<BlueText>{loc.lndViewInvoice.has_been_paid}</BlueText>
|
||||
|
||||
</View>
|
||||
<View style={{ flex: 1, justifyContent: 'flex-end', marginBottom: 24, alignItems: 'center' }}>
|
||||
{invoice.payment_preimage && typeof invoice.payment_preimage === 'string' && (
|
||||
<View style={{ position: 'absolute', bottom: 0 }}>
|
||||
<BlueButton
|
||||
backgroundColor="#FFFFFF"
|
||||
icon={{
|
||||
name: 'info',
|
||||
type: 'entypo',
|
||||
color: BlueApp.settings.buttonTextColor,
|
||||
}}
|
||||
onPress={() => this.setState({ showPreimageQr: true })}
|
||||
title=" "
|
||||
/>
|
||||
</View>
|
||||
<TouchableOpacity
|
||||
style={{ flexDirection: 'row', alignItems: 'center' }}
|
||||
onPress={() => this.setState({ showPreimageQr: true })}
|
||||
>
|
||||
<Text style={{ color: '#9aa0aa', fontSize: 14, marginRight: 8 }}>
|
||||
{loc.send.create.details}
|
||||
</Text>
|
||||
<Icon name="angle-right" size={18} type="font-awesome" color="#9aa0aa" />
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
</View>
|
||||
|
||||
</SafeBlueArea>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ export default class SendDetails extends Component {
|
|||
|
||||
renderNavigationHeader() {
|
||||
this.props.navigation.setParams({
|
||||
withAdvancedOptionsMenuButton: this.state.fromWallet.allowBatchSend(),
|
||||
withAdvancedOptionsMenuButton: this.state.fromWallet.allowBatchSend() || this.state.fromWallet.allowSendMax(),
|
||||
advancedOptionsMenuButtonAction: () => {
|
||||
Keyboard.dismiss();
|
||||
this.setState({ isAdvancedTransactionOptionsVisible: true });
|
||||
|
@ -704,6 +704,7 @@ export default class SendDetails extends Component {
|
|||
};
|
||||
|
||||
renderAdvancedTransactionOptionsModal = () => {
|
||||
const isSendMaxUsed = this.state.addresses.some(element => element.amount === BitcoinUnit.MAX);
|
||||
return (
|
||||
<Modal
|
||||
isVisible={this.state.isAdvancedTransactionOptionsVisible}
|
||||
|
@ -715,49 +716,59 @@ export default class SendDetails extends Component {
|
|||
>
|
||||
<KeyboardAvoidingView behavior={Platform.OS === 'ios' ? 'position' : null}>
|
||||
<View style={styles.advancedTransactionOptionsModalContent}>
|
||||
<TouchableOpacity
|
||||
disabled={this.state.addresses.some(element => element.amount === BitcoinUnit.MAX)}
|
||||
onPress={() => {
|
||||
const addresses = this.state.addresses;
|
||||
addresses.push(new BitcoinTransaction());
|
||||
this.setState(
|
||||
{
|
||||
addresses,
|
||||
isAdvancedTransactionOptionsVisible: false,
|
||||
},
|
||||
() => {
|
||||
this.scrollView.scrollToEnd();
|
||||
if (this.state.addresses.length > 1) this.scrollView.flashScrollIndicators();
|
||||
},
|
||||
);
|
||||
}}
|
||||
>
|
||||
{this.state.fromWallet.allowSendMax() && (
|
||||
<BlueListItem
|
||||
disabled={this.state.addresses.some(element => element.amount === BitcoinUnit.MAX)}
|
||||
title="Add Recipient"
|
||||
disabled={!(this.state.fromWallet.getBalance() > 0) || isSendMaxUsed}
|
||||
title="Use Full Balance"
|
||||
hideChevron
|
||||
component={TouchableOpacity}
|
||||
onPress={this.onUseAllPressed}
|
||||
/>
|
||||
</TouchableOpacity>
|
||||
|
||||
<TouchableOpacity
|
||||
disabled={this.state.addresses.length < 2}
|
||||
onPress={() => {
|
||||
const addresses = this.state.addresses;
|
||||
addresses.splice(this.state.recipientsScrollIndex, 1);
|
||||
this.setState(
|
||||
{
|
||||
addresses,
|
||||
isAdvancedTransactionOptionsVisible: false,
|
||||
},
|
||||
() => {
|
||||
if (this.state.addresses.length > 1) this.scrollView.flashScrollIndicators();
|
||||
this.setState({ recipientsScrollIndex: this.scrollViewCurrentIndex });
|
||||
},
|
||||
);
|
||||
}}
|
||||
>
|
||||
<BlueListItem disabled={this.state.addresses.length < 2} title="Remove Recipient" hideChevron />
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
{this.state.fromWallet.allowBatchSend() && (
|
||||
<>
|
||||
<BlueListItem
|
||||
disabled={isSendMaxUsed}
|
||||
title="Add Recipient"
|
||||
hideChevron
|
||||
component={TouchableOpacity}
|
||||
onPress={() => {
|
||||
const addresses = this.state.addresses;
|
||||
addresses.push(new BitcoinTransaction());
|
||||
this.setState(
|
||||
{
|
||||
addresses,
|
||||
isAdvancedTransactionOptionsVisible: false,
|
||||
},
|
||||
() => {
|
||||
this.scrollView.scrollToEnd();
|
||||
if (this.state.addresses.length > 1) this.scrollView.flashScrollIndicators();
|
||||
},
|
||||
);
|
||||
}}
|
||||
/>
|
||||
<BlueListItem
|
||||
title="Remove Recipient"
|
||||
hideChevron
|
||||
disabled={this.state.addresses.length < 2}
|
||||
component={TouchableOpacity}
|
||||
onPress={() => {
|
||||
const addresses = this.state.addresses;
|
||||
addresses.splice(this.state.recipientsScrollIndex, 1);
|
||||
this.setState(
|
||||
{
|
||||
addresses,
|
||||
isAdvancedTransactionOptionsVisible: false,
|
||||
},
|
||||
() => {
|
||||
if (this.state.addresses.length > 1) this.scrollView.flashScrollIndicators();
|
||||
this.setState({ recipientsScrollIndex: this.scrollViewCurrentIndex });
|
||||
},
|
||||
);
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
</View>
|
||||
</KeyboardAvoidingView>
|
||||
</Modal>
|
||||
|
@ -878,6 +889,30 @@ export default class SendDetails extends Component {
|
|||
return rows;
|
||||
};
|
||||
|
||||
onUseAllPressed = () => {
|
||||
ReactNativeHapticFeedback.trigger('notificationWarning');
|
||||
Alert.alert(
|
||||
'Use full balance',
|
||||
`Are you sure you want to use your wallet's full balance for this transaction? ${
|
||||
this.state.addresses.length > 1 ? 'Your other recipients will be removed from this transaction.' : ''
|
||||
}`,
|
||||
[
|
||||
{
|
||||
text: loc._.ok,
|
||||
onPress: async () => {
|
||||
Keyboard.dismiss();
|
||||
const recipient = this.state.addresses[this.state.recipientsScrollIndex];
|
||||
recipient.amount = BitcoinUnit.MAX;
|
||||
this.setState({ addresses: [recipient], recipientsScrollIndex: 0, isAdvancedTransactionOptionsVisible: false });
|
||||
},
|
||||
style: 'default',
|
||||
},
|
||||
{ text: loc.send.details.cancel, onPress: () => {}, style: 'cancel' },
|
||||
],
|
||||
{ cancelable: false },
|
||||
);
|
||||
};
|
||||
|
||||
render() {
|
||||
if (this.state.isLoading || typeof this.state.fromWallet === 'undefined') {
|
||||
return (
|
||||
|
@ -961,56 +996,9 @@ export default class SendDetails extends Component {
|
|||
</View>
|
||||
<BlueDismissKeyboardInputAccessory />
|
||||
{Platform.select({
|
||||
ios: (
|
||||
<BlueUseAllFundsButton
|
||||
onUseAllPressed={() => {
|
||||
ReactNativeHapticFeedback.trigger('notificationWarning');
|
||||
Alert.alert(
|
||||
'Use full balance',
|
||||
`Are you sure you want to use your wallet's full balance for this transaction? ${
|
||||
this.state.addresses.length > 1 ? 'Your other recipients will be removed from this transaction.' : ''
|
||||
}`,
|
||||
[
|
||||
{
|
||||
text: loc._.ok,
|
||||
onPress: async () => {
|
||||
Keyboard.dismiss();
|
||||
const recipient = this.state.addresses[this.state.recipientsScrollIndex];
|
||||
recipient.amount = BitcoinUnit.MAX;
|
||||
this.setState({ addresses: [recipient], recipientsScrollIndex: 0 });
|
||||
},
|
||||
style: 'default',
|
||||
},
|
||||
{ text: loc.send.details.cancel, onPress: () => {}, style: 'cancel' },
|
||||
],
|
||||
{ cancelable: false },
|
||||
);
|
||||
}}
|
||||
wallet={this.state.fromWallet}
|
||||
/>
|
||||
),
|
||||
ios: <BlueUseAllFundsButton onUseAllPressed={this.onUseAllPressed} wallet={this.state.fromWallet} />,
|
||||
android: this.state.isAmountToolbarVisibleForAndroid && (
|
||||
<BlueUseAllFundsButton
|
||||
onUseAllPressed={() => {
|
||||
Alert.alert(
|
||||
'Use all funds',
|
||||
`Are you sure you want to use your all of your wallet's funds for this transaction?`,
|
||||
[
|
||||
{
|
||||
text: loc._.ok,
|
||||
onPress: async () => {
|
||||
Keyboard.dismiss();
|
||||
this.setState({ amount: BitcoinUnit.MAX });
|
||||
},
|
||||
style: 'default',
|
||||
},
|
||||
{ text: loc.send.details.cancel, onPress: () => {}, style: 'cancel' },
|
||||
],
|
||||
{ cancelable: false },
|
||||
);
|
||||
}}
|
||||
wallet={this.state.fromWallet}
|
||||
/>
|
||||
<BlueUseAllFundsButton onUseAllPressed={this.onUseAllPressed} wallet={this.state.fromWallet} />
|
||||
),
|
||||
})}
|
||||
|
||||
|
|
|
@ -164,13 +164,13 @@ export default class WalletTransactions extends Component {
|
|||
let start = +new Date();
|
||||
const oldTxLen = wallet.getTransactions().length;
|
||||
await wallet.fetchTransactions();
|
||||
if (oldTxLen !== wallet.getTransactions().length) smthChanged = true;
|
||||
if (wallet.fetchPendingTransactions) {
|
||||
await wallet.fetchPendingTransactions();
|
||||
}
|
||||
if (wallet.fetchUserInvoices) {
|
||||
await wallet.fetchUserInvoices();
|
||||
}
|
||||
if (oldTxLen !== wallet.getTransactions().length) smthChanged = true;
|
||||
let end = +new Date();
|
||||
console.log(wallet.getLabel(), 'fetch tx took', (end - start) / 1000, 'sec');
|
||||
} catch (err) {
|
||||
|
|
Loading…
Add table
Reference in a new issue