From 53f6f0f26db4d60fc53060dc4751182ed09a0dae Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 21 Jul 2023 20:42:28 +0200 Subject: [PATCH 01/14] feat(lightning): sync stored ldk txs with activity list --- src/store/actions/actions.ts | 1 - src/store/actions/lightning.ts | 51 +----------- src/store/reducers/lightning.ts | 26 ------ src/store/types/activity.ts | 1 + src/store/types/lightning.ts | 8 +- src/utils/lightning/index.ts | 142 +++++++++++++++++++++++++------- 6 files changed, 114 insertions(+), 115 deletions(-) diff --git a/src/store/actions/actions.ts b/src/store/actions/actions.ts index da7d5c34a..4400dfdb1 100644 --- a/src/store/actions/actions.ts +++ b/src/store/actions/actions.ts @@ -58,7 +58,6 @@ const actions = { UPDATE_LIGHTNING_NODE_VERSION: 'UPDATE_LIGHTNING_NODE_VERSION', ADD_LIGHTNING_INVOICE: 'ADD_LIGHTNING_INVOICE', REMOVE_LIGHTNING_INVOICE: 'REMOVE_LIGHTNING_INVOICE', - ADD_LIGHTNING_PAYMENT: 'ADD_LIGHTNING_PAYMENT', REMOVE_EXPIRED_LIGHTNING_INVOICES: 'REMOVE_EXPIRED_LIGHTNING_INVOICES', SAVE_LIGHTNING_PEER: 'SAVE_LIGHTNING_PEER', REMOVE_LIGHTNING_PEER: 'REMOVE_LIGHTNING_PEER', diff --git a/src/store/actions/lightning.ts b/src/store/actions/lightning.ts index ba6db7ef0..78d168798 100644 --- a/src/store/actions/lightning.ts +++ b/src/store/actions/lightning.ts @@ -260,6 +260,7 @@ export const removeExpiredLightningInvoices = async ({ /** * Removes a lightning invoice from the invoices array via its payment hash. + * //TODO remove when this is complete: https://github.com/synonymdev/react-native-ldk/issues/152 * @param {string} paymentHash * @param {TAvailableNetworks} [selectedNetwork] * @param {TWalletName} [selectedWallet] @@ -295,56 +296,6 @@ export const removeLightningInvoice = async ({ return ok('Successfully removed lightning invoice.'); }; -/** - * Adds a paid lightning invoice to the payments object for future reference. - * @param {TInvoice} invoice - * @param {TAvailableNetworks} [selectedNetwork] - * @param {TWalletName} [selectedWallet] - * @returns {Result} - */ -export const addLightningPayment = ({ - invoice, - selectedNetwork, - selectedWallet, -}: { - invoice: TInvoice; - selectedNetwork?: TAvailableNetworks; - selectedWallet?: TWalletName; -}): Result => { - if (!invoice) { - return err('No payment invoice provided.'); - } - if (!selectedNetwork) { - selectedNetwork = getSelectedNetwork(); - } - if (!selectedWallet) { - selectedWallet = getSelectedWallet(); - } - const lightningPayments = - getLightningStore().nodes[selectedWallet].payments[selectedNetwork]; - - // It's possible ldk.pay returned true for an invoice we already paid. - // Run another check here. - if (invoice.payment_hash in lightningPayments) { - return err('Lightning invoice has already been paid.'); - } - const payload = { - invoice, - selectedWallet, - selectedNetwork, - }; - dispatch({ - type: actions.ADD_LIGHTNING_PAYMENT, - payload, - }); - removeLightningInvoice({ - paymentHash: invoice.payment_hash, - selectedNetwork, - selectedWallet, - }).then(); - return ok('Successfully added lightning payment.'); -}; - /* * This resets the lightning store to defaultLightningShape */ diff --git a/src/store/reducers/lightning.ts b/src/store/reducers/lightning.ts index 9b16d4b93..8ae90f4ea 100644 --- a/src/store/reducers/lightning.ts +++ b/src/store/reducers/lightning.ts @@ -2,7 +2,6 @@ import { TInvoice } from '@synonymdev/react-native-ldk'; import actions from '../actions/actions'; import { ILightning } from '../types/lightning'; import { defaultLightningStoreShape } from '../shapes/lightning'; -import { EPaymentType } from '../types/wallet'; const lightning = ( state: ILightning = defaultLightningStoreShape, @@ -104,31 +103,6 @@ const lightning = ( }, }; - case actions.ADD_LIGHTNING_PAYMENT: - return { - ...state, - nodes: { - ...state.nodes, - [selectedWallet]: { - ...state.nodes[selectedWallet], - payments: { - ...state.nodes[selectedWallet].payments, - [selectedNetwork]: { - ...state.nodes[selectedWallet].payments[selectedNetwork], - [action.payload.invoice.payment_hash]: { - invoice: action.payload.invoice, - type: - action.payload.invoice.payee_pub_key === - state.nodes[selectedWallet].nodeId[selectedNetwork] - ? EPaymentType.sent - : EPaymentType.received, - }, - }, - }, - }, - }, - }; - case actions.REMOVE_EXPIRED_LIGHTNING_INVOICES: const t = Math.floor(Date.now() / 1000); const currentInvoices = state.nodes[selectedWallet].invoices[ diff --git a/src/store/types/activity.ts b/src/store/types/activity.ts index 574015d7e..f6a34693f 100644 --- a/src/store/types/activity.ts +++ b/src/store/types/activity.ts @@ -35,6 +35,7 @@ export type TLightningActivityItem = { txType: EPaymentType; value: number; address: string; + confirmed: boolean; message: string; timestamp: number; }; diff --git a/src/store/types/lightning.ts b/src/store/types/lightning.ts index 6a48977f3..b07fdaf55 100644 --- a/src/store/types/lightning.ts +++ b/src/store/types/lightning.ts @@ -1,4 +1,4 @@ -import { EPaymentType, IWalletItem, TWalletName } from './wallet'; +import { IWalletItem, TWalletName } from './wallet'; import { TChannel, TCreatePaymentReq, @@ -15,11 +15,6 @@ export type TCreateLightningInvoice = TCreatePaymentReq & { selectedWallet?: TWalletName; }; -export type TLightningPayment = { - invoice: TInvoice; - type: EPaymentType; -}; - export type TOpenChannelIds = string[]; export interface IDefaultLightningShape { @@ -28,7 +23,6 @@ export interface IDefaultLightningShape { openChannelIds: IWalletItem; info: IWalletItem<{}>; invoices: IWalletItem; - payments: IWalletItem<{ [key: string]: TLightningPayment }>; peers: IWalletItem; claimableBalance: IWalletItem; } diff --git a/src/utils/lightning/index.ts b/src/utils/lightning/index.ts index 723bf8501..9c1bbd029 100644 --- a/src/utils/lightning/index.ts +++ b/src/utils/lightning/index.ts @@ -41,13 +41,14 @@ import { import { TAvailableNetworks } from '../networks'; import { getBlocktankStore, + getDispatch, getFeesStore, getLightningStore, getWalletStore, } from '../../store/helpers'; import { defaultHeader } from '../../store/shapes/wallet'; import { - addLightningPayment, + removeLightningInvoice, removePeer, updateClaimableBalance, updateLightningChannels, @@ -73,6 +74,10 @@ import { TLightningNodeVersion } from '../../store/types/lightning'; import { getBlocktankInfo, isGeoBlocked } from '../blocktank'; import { updateOnchainFeeEstimates } from '../../store/actions/fees'; import { addTodo, removeTodo } from '../../store/actions/todos'; +import actions from '../../store/actions/actions'; +import { getActivityItemById } from '../activity'; + +const dispatch = getDispatch(); let LDKIsStayingSynced = false; @@ -284,6 +289,7 @@ export const restartLdk = async (): Promise> => { /** * Retrieves any pending/unpaid invoices from the invoices array via payment hash. + * TODO replace this function once this is complete https://github.com/synonymdev/react-native-ldk/issues/152 * @param {string} paymentHash * @param {TWalletName} [selectedWallet] * @param {TAvailableNetworks} [selectedNetwork] @@ -337,30 +343,44 @@ export const handleLightningPaymentSubscription = async ({ selectedNetwork, selectedWallet, }); + + let message = ''; + let address = ''; + + //If we have the invoice add those details to the activity item for instant display + //If we don't have the invoice we can still add details and show received animation if (invoice.isOk()) { - const activityItem: TLightningActivityItem = { - id: invoice.value.payment_hash, - activityType: EActivityType.lightning, - txType: EPaymentType.received, - message: invoice.value.description ?? '', - address: invoice.value.to_str, - value: payment.amount_sat, - // TODO: show fee? - // fee: 0, - // feeRate: 0, - timestamp: new Date().getTime(), - }; - addActivityItem(activityItem); - showBottomSheet('newTxPrompt', { activityItem }); - closeBottomSheet('receiveNavigation'); - addLightningPayment({ - invoice: invoice.value, - selectedWallet, + message = invoice.value.description ?? ''; + address = invoice.value.to_str; + + removeLightningInvoice({ + paymentHash: payment.payment_hash, selectedNetwork, - }); - await refreshLdk({ selectedWallet, selectedNetwork }); - updateSlashPayConfig({ sdk, selectedWallet, selectedNetwork }); + selectedWallet, + }).then(); + } else { + console.error("Couldn't find invoice for payment: ", payment.payment_hash); } + + const activityItem: TLightningActivityItem = { + id: payment.payment_hash, + activityType: EActivityType.lightning, + txType: EPaymentType.received, + message, + address, + value: payment.amount_sat, + confirmed: true, + // TODO: show fee? + // fee: 0, + // feeRate: 0, + timestamp: new Date().getTime(), + }; + addActivityItem(activityItem); + showBottomSheet('newTxPrompt', { activityItem }); + closeBottomSheet('receiveNavigation'); + + await refreshLdk({ selectedWallet, selectedNetwork }); + updateSlashPayConfig({ sdk, selectedWallet, selectedNetwork }); }; /** @@ -482,9 +502,14 @@ export const refreshLdk = async ({ if (syncRes.isErr()) { return err(syncRes.error.message); } - await addPeers({ selectedNetwork, selectedWallet }); - await updateLightningChannels({ selectedWallet, selectedNetwork }); - await updateClaimableBalance({ selectedNetwork, selectedWallet }); + + await Promise.all([ + addPeers({ selectedNetwork, selectedWallet }), + updateLightningChannels({ selectedWallet, selectedNetwork }), + updateClaimableBalance({ selectedNetwork, selectedWallet }), + syncLightningTxsWithActivityList(), + ]); + return ok(''); } catch (e) { console.log(e); @@ -1172,12 +1197,7 @@ export const payLightningInvoice = async ( if (payResponse.isErr()) { return err(payResponse.error.message); } - const addLightningPaymentResponse = addLightningPayment({ - invoice: decodedInvoice.value, - }); - if (addLightningPaymentResponse.isErr()) { - return err(addLightningPaymentResponse.error.message); - } + let value = decodedInvoice.value.amount_satoshis ?? 0; if (sats) { value = sats; @@ -1189,11 +1209,13 @@ export const payLightningInvoice = async ( message: decodedInvoice.value.description ?? '', address: invoice, value: -value, + confirmed: true, // TODO: show fee? // fee: payResponse.value.fee_paid_sat, // feeRate: 0, timestamp: new Date().getTime(), }; + //TODO rather sync with ldk for txs addActivityItem(activityItem); refreshLdk().then(); return ok(payResponse.value); @@ -1500,3 +1522,61 @@ export const getLightningBalance = ({ return { localBalance, remoteBalance }; }; + +export const syncLightningTxsWithActivityList = async (): Promise< + Result +> => { + let items: TLightningActivityItem[] = []; + + const claimedTxs = await lm.getLdkPaymentsClaimed(); + claimedTxs.forEach((tx) => { + items.push({ + id: tx.payment_hash, + activityType: EActivityType.lightning, + txType: EPaymentType.received, + message: '', + address: '', + confirmed: tx.state === 'successful', + value: tx.amount_sat, + timestamp: tx.unix_timestamp * 1000, + }); + }); + + const sentTxs = await lm.getLdkPaymentsSent(); + sentTxs.forEach((tx) => { + const sats = tx.amount_sat; + if (!sats) { + return; + } + + items.push({ + id: tx.payment_hash, + activityType: EActivityType.lightning, + txType: EPaymentType.sent, + message: '', + address: '', + confirmed: tx.state === 'successful', + value: -sats, + timestamp: tx.unix_timestamp * 1000, + }); + }); + + //TODO remove temp hack when this is complete and descriptions/bolt11 can be added from stored tx: https://github.com/synonymdev/react-native-ldk/issues/153 + items.forEach((item) => { + const res = getActivityItemById(item.id); + if (res.isOk()) { + const existingItem = res.value; + if (existingItem.activityType === EActivityType.lightning) { + item.message = existingItem.message; + item.address = existingItem.address; + } + } + }); + + dispatch({ + type: actions.UPDATE_ACTIVITY_ITEMS, + payload: items, + }); + + return ok('Stored lightning transactions synced with activity list.'); +}; From cd738de50070b8ba69e8beec0bcdcd91ca543660 Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 26 Jul 2023 14:29:12 +0200 Subject: [PATCH 02/14] chore: removed invoices from store --- ios/Podfile.lock | 4 +- package.json | 2 +- src/store/actions/actions.ts | 3 -- src/store/actions/lightning.ts | 77 --------------------------------- src/store/reducers/lightning.ts | 57 ------------------------ src/store/shapes/lightning.ts | 2 - src/store/types/lightning.ts | 1 - src/utils/lightning/index.ts | 77 ++++++++++----------------------- src/utils/startup/index.ts | 4 -- yarn.lock | 8 ++-- 10 files changed, 31 insertions(+), 204 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index d4d039e09..a96bcae69 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -350,7 +350,7 @@ PODS: - React-Core - react-native-keep-awake (1.2.0): - React-Core - - react-native-ldk (0.0.102): + - react-native-ldk (0.0.103): - React - react-native-libsodium (0.7.0): - React-Core @@ -841,7 +841,7 @@ SPEC CHECKSUMS: react-native-flipper: 5d8dcbcb905a7e8076c9a61a3709944c23cf48ee react-native-image-picker: ec9b713e248760bfa0f879f0715391de4651a7cb react-native-keep-awake: caee3ff89eaa21dfe29010f0d143566874a04441 - react-native-ldk: 68471c25f1e36ae5b2f59f3002016a815f781480 + react-native-ldk: e31bd28e7e29fb4dd99b86bceed14025f8bf53eb react-native-libsodium: 2834a805c906aef4b7609019bcc87e7d9eb86b23 react-native-mmkv: 7da5e18e55c04a9af9a7e0ab9792a1e8d33765a1 react-native-netinfo: 22c082970cbd99071a4e5aa7a612ac20d66b08f0 diff --git a/package.json b/package.json index 41b0da8fd..bdafb6f9f 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "@sayem314/react-native-keep-awake": "^1.2.0", "@shopify/react-native-skia": "0.1.182", "@synonymdev/blocktank-client": "0.0.50", - "@synonymdev/react-native-ldk": "^0.0.102", + "@synonymdev/react-native-ldk": "^0.0.103", "@synonymdev/react-native-lnurl": "0.0.4", "@synonymdev/result": "0.0.2", "@synonymdev/slashtags-auth": "^1.0.0-alpha.5", diff --git a/src/store/actions/actions.ts b/src/store/actions/actions.ts index 4400dfdb1..1639cc8fc 100644 --- a/src/store/actions/actions.ts +++ b/src/store/actions/actions.ts @@ -56,9 +56,6 @@ const actions = { UPDATE_LIGHTNING_NODE_ID: 'UPDATE_LIGHTNING_NODE_ID', UPDATE_LIGHTNING_CHANNELS: 'UPDATE_LIGHTNING_CHANNELS', UPDATE_LIGHTNING_NODE_VERSION: 'UPDATE_LIGHTNING_NODE_VERSION', - ADD_LIGHTNING_INVOICE: 'ADD_LIGHTNING_INVOICE', - REMOVE_LIGHTNING_INVOICE: 'REMOVE_LIGHTNING_INVOICE', - REMOVE_EXPIRED_LIGHTNING_INVOICES: 'REMOVE_EXPIRED_LIGHTNING_INVOICES', SAVE_LIGHTNING_PEER: 'SAVE_LIGHTNING_PEER', REMOVE_LIGHTNING_PEER: 'REMOVE_LIGHTNING_PEER', UPDATE_CLAIMABLE_BALANCE: 'UPDATE_CLAIMABLE_BALANCE', diff --git a/src/store/actions/lightning.ts b/src/store/actions/lightning.ts index 78d168798..7bb781345 100644 --- a/src/store/actions/lightning.ts +++ b/src/store/actions/lightning.ts @@ -216,86 +216,9 @@ export const createLightningInvoice = async ({ addPeers({ selectedNetwork, selectedWallet }).then(); - const payload = { - invoice: invoice.value, - selectedWallet, - selectedNetwork, - }; - dispatch({ - type: actions.ADD_LIGHTNING_INVOICE, - payload, - }); return ok(invoice.value); }; -/** - * Filters out and removes expired invoices from the invoices array - * @param {TAvailableNetworks} [selectedNetwork] - * @param {TWalletName} [selectedWallet] - * @returns {Promise>} - */ -export const removeExpiredLightningInvoices = async ({ - selectedNetwork, - selectedWallet, -}: { - selectedNetwork?: TAvailableNetworks; - selectedWallet?: TWalletName; -}): Promise> => { - if (!selectedNetwork) { - selectedNetwork = getSelectedNetwork(); - } - if (!selectedWallet) { - selectedWallet = getSelectedWallet(); - } - const payload = { - selectedWallet, - selectedNetwork, - }; - dispatch({ - type: actions.REMOVE_EXPIRED_LIGHTNING_INVOICES, - payload, - }); - return ok(''); -}; - -/** - * Removes a lightning invoice from the invoices array via its payment hash. - * //TODO remove when this is complete: https://github.com/synonymdev/react-native-ldk/issues/152 - * @param {string} paymentHash - * @param {TAvailableNetworks} [selectedNetwork] - * @param {TWalletName} [selectedWallet] - * @returns {Promise>} - */ -export const removeLightningInvoice = async ({ - paymentHash, - selectedNetwork, - selectedWallet, -}: { - paymentHash: string; - selectedNetwork?: TAvailableNetworks; - selectedWallet?: TWalletName; -}): Promise> => { - if (!paymentHash) { - return err('No payment hash provided.'); - } - if (!selectedNetwork) { - selectedNetwork = getSelectedNetwork(); - } - if (!selectedWallet) { - selectedWallet = getSelectedWallet(); - } - const payload = { - paymentHash, - selectedWallet, - selectedNetwork, - }; - dispatch({ - type: actions.REMOVE_LIGHTNING_INVOICE, - payload, - }); - return ok('Successfully removed lightning invoice.'); -}; - /* * This resets the lightning store to defaultLightningShape */ diff --git a/src/store/reducers/lightning.ts b/src/store/reducers/lightning.ts index 8ae90f4ea..77c6006ef 100644 --- a/src/store/reducers/lightning.ts +++ b/src/store/reducers/lightning.ts @@ -1,4 +1,3 @@ -import { TInvoice } from '@synonymdev/react-native-ldk'; import actions from '../actions/actions'; import { ILightning } from '../types/lightning'; import { defaultLightningStoreShape } from '../shapes/lightning'; @@ -66,62 +65,6 @@ const lightning = ( version: action.payload?.version, }; - case actions.ADD_LIGHTNING_INVOICE: - return { - ...state, - nodes: { - ...state.nodes, - [selectedWallet]: { - ...state.nodes[selectedWallet], - invoices: { - ...state.nodes[selectedWallet].invoices, - [selectedNetwork]: [ - ...state.nodes[selectedWallet].invoices[selectedNetwork], - action.payload.invoice, - ], - }, - }, - }, - }; - - case actions.REMOVE_LIGHTNING_INVOICE: - const invoices = state.nodes[selectedWallet].invoices[selectedNetwork]; - const newInvoices = invoices.filter( - (invoice) => invoice.payment_hash !== action.payload.paymentHash, - ); - return { - ...state, - nodes: { - ...state.nodes, - [selectedWallet]: { - ...state.nodes[selectedWallet], - invoices: { - ...state.nodes[selectedWallet].invoices, - [selectedNetwork]: newInvoices, - }, - }, - }, - }; - - case actions.REMOVE_EXPIRED_LIGHTNING_INVOICES: - const t = Math.floor(Date.now() / 1000); - const currentInvoices = state.nodes[selectedWallet].invoices[ - selectedNetwork - ].filter((i: TInvoice) => i.timestamp + i.expiry_time > t); - return { - ...state, - nodes: { - ...state.nodes, - [selectedWallet]: { - ...state.nodes[selectedWallet], - invoices: { - ...state.nodes[selectedWallet].invoices, - [selectedNetwork]: currentInvoices, - }, - }, - }, - }; - case actions.SAVE_LIGHTNING_PEER: let peers = state.nodes[selectedWallet]?.peers[selectedNetwork] ?? []; return { diff --git a/src/store/shapes/lightning.ts b/src/store/shapes/lightning.ts index 15f32cc95..cc4f68540 100644 --- a/src/store/shapes/lightning.ts +++ b/src/store/shapes/lightning.ts @@ -6,8 +6,6 @@ export const defaultLightningShape: IDefaultLightningShape = { info: getNetworkContent({}), channels: getNetworkContent({}), openChannelIds: getNetworkContent([]), - invoices: getNetworkContent([]), - payments: getNetworkContent({}), peers: getNetworkContent([]), claimableBalance: getNetworkContent(0), }; diff --git a/src/store/types/lightning.ts b/src/store/types/lightning.ts index b07fdaf55..c052c39c5 100644 --- a/src/store/types/lightning.ts +++ b/src/store/types/lightning.ts @@ -22,7 +22,6 @@ export interface IDefaultLightningShape { channels: IWalletItem<{ [key: string]: TChannel }>; openChannelIds: IWalletItem; info: IWalletItem<{}>; - invoices: IWalletItem; peers: IWalletItem; claimableBalance: IWalletItem; } diff --git a/src/utils/lightning/index.ts b/src/utils/lightning/index.ts index 9c1bbd029..09fb8483e 100644 --- a/src/utils/lightning/index.ts +++ b/src/utils/lightning/index.ts @@ -48,7 +48,6 @@ import { } from '../../store/helpers'; import { defaultHeader } from '../../store/shapes/wallet'; import { - removeLightningInvoice, removePeer, updateClaimableBalance, updateLightningChannels, @@ -294,33 +293,9 @@ export const restartLdk = async (): Promise> => { * @param {TWalletName} [selectedWallet] * @param {TAvailableNetworks} [selectedNetwork] */ -export const getPendingInvoice = ({ - paymentHash, - selectedWallet, - selectedNetwork, -}: { - paymentHash: string; - selectedWallet?: TWalletName; - selectedNetwork?: TAvailableNetworks; -}): Result => { - try { - if (!selectedWallet) { - selectedWallet = getSelectedWallet(); - } - if (!selectedNetwork) { - selectedNetwork = getSelectedNetwork(); - } - const invoices = - getLightningStore().nodes[selectedWallet].invoices[selectedNetwork]; - const invoice = invoices.filter((inv) => inv.payment_hash === paymentHash); - if (invoice.length > 0) { - return ok(invoice[0]); - } - return err('Unable to find any pending invoices.'); - } catch (e) { - return err(e); - } -}; +export const getPendingInvoice = ( + paymentHash: string, +): Promise => lm.getInvoiceFromPaymentHash(paymentHash); export const handleLightningPaymentSubscription = async ({ payment, @@ -337,29 +312,22 @@ export const handleLightningPaymentSubscription = async ({ if (!selectedNetwork) { selectedNetwork = getSelectedNetwork(); } - console.log('Receiving Lightning Payment...', payment); - const invoice = getPendingInvoice({ - paymentHash: payment.payment_hash, - selectedNetwork, - selectedWallet, - }); + const invoice = await getPendingInvoice(payment.payment_hash); let message = ''; let address = ''; //If we have the invoice add those details to the activity item for instant display //If we don't have the invoice we can still add details and show received animation - if (invoice.isOk()) { - message = invoice.value.description ?? ''; - address = invoice.value.to_str; - - removeLightningInvoice({ - paymentHash: payment.payment_hash, - selectedNetwork, - selectedWallet, - }).then(); + if (invoice) { + message = invoice.description ?? ''; + address = invoice.to_str; } else { - console.error("Couldn't find invoice for payment: ", payment.payment_hash); + //Unlikely to happen and not really a problem if it does + console.error( + "Couldn't find invoice for claimed payment: ", + payment.payment_hash, + ); } const activityItem: TLightningActivityItem = { @@ -1165,7 +1133,7 @@ export const closeAllChannels = async ({ */ export const createPaymentRequest = ( req: TCreatePaymentReq, -): Promise> => ldk.createPaymentRequest(req); +): Promise> => lm.createAndStorePaymentRequest(req); /** * Attempts to pay a bolt11 invoice. @@ -1529,24 +1497,27 @@ export const syncLightningTxsWithActivityList = async (): Promise< let items: TLightningActivityItem[] = []; const claimedTxs = await lm.getLdkPaymentsClaimed(); - claimedTxs.forEach((tx) => { + for (const tx of claimedTxs) { + //Required to add in bolt11 and description + const invoice = await getPendingInvoice(tx.payment_hash); + items.push({ id: tx.payment_hash, activityType: EActivityType.lightning, txType: EPaymentType.received, - message: '', - address: '', + message: invoice?.description ?? '', + address: invoice?.to_str ?? '', confirmed: tx.state === 'successful', value: tx.amount_sat, timestamp: tx.unix_timestamp * 1000, }); - }); + } const sentTxs = await lm.getLdkPaymentsSent(); - sentTxs.forEach((tx) => { + for (const tx of sentTxs) { const sats = tx.amount_sat; if (!sats) { - return; + continue; } items.push({ @@ -1559,9 +1530,9 @@ export const syncLightningTxsWithActivityList = async (): Promise< value: -sats, timestamp: tx.unix_timestamp * 1000, }); - }); + } - //TODO remove temp hack when this is complete and descriptions/bolt11 can be added from stored tx: https://github.com/synonymdev/react-native-ldk/issues/153 + //TODO remove temp hack when this is complete and descriptions/bolt11 can be added from stored tx: https://github.com/synonymdev/react-native-ldk/issues/156 items.forEach((item) => { const res = getActivityItemById(item.id); if (res.isOk()) { diff --git a/src/utils/startup/index.ts b/src/utils/startup/index.ts index 904b95a9c..96f620b62 100644 --- a/src/utils/startup/index.ts +++ b/src/utils/startup/index.ts @@ -19,7 +19,6 @@ import { connectToElectrum, subscribeToHeader } from '../wallet/electrum'; import { updateOnchainFeeEstimates } from '../../store/actions/fees'; import { keepLdkSynced, setupLdk } from '../lightning'; import { setupBlocktank, watchPendingOrders } from '../blocktank'; -import { removeExpiredLightningInvoices } from '../../store/actions/lightning'; import { updateSlashPayConfig } from '../slashtags'; import { sdk } from '../../components/SlashtagsProvider'; import { Slashtag } from '../../hooks/slashtags'; @@ -180,9 +179,6 @@ export const startWalletServices = async ({ if (lightning) { await refreshServiceList(); watchPendingOrders(); - await removeExpiredLightningInvoices({ - selectedNetwork, - }); } // Refresh slashpay config diff --git a/yarn.lock b/yarn.lock index c98f2e589..655ca0826 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2708,10 +2708,10 @@ cross-fetch "^3.1.4" node-fetch "3.1.1" -"@synonymdev/react-native-ldk@^0.0.102": - version "0.0.102" - resolved "https://registry.yarnpkg.com/@synonymdev/react-native-ldk/-/react-native-ldk-0.0.102.tgz#022f8c701b268f59a65af08501c5d8dca778f4e6" - integrity sha512-ws5qVr9V42/l3N29/bJEsTNpYKw8KeoyycTACt0py5SnMjQY6A9VgFgNUDvQMDA2Tlf5zUOm4nFQ2TjfG7JhDQ== +"@synonymdev/react-native-ldk@^0.0.103": + version "0.0.103" + resolved "https://registry.yarnpkg.com/@synonymdev/react-native-ldk/-/react-native-ldk-0.0.103.tgz#6dbb4b517c5f054956428e9262e8ff91608d7242" + integrity sha512-A88huuIRIxn0CTnEUis1wpWPW+vWBx9MmjrP/5ghqU/9InLtRpwYoqJpznNJMLRPKEuGQq40Lo7B9WfKFHADkQ== dependencies: bitcoinjs-lib "^6.0.2" From a0903741639e876967e220b9c39148697d0edf8a Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 26 Jul 2023 15:18:21 +0200 Subject: [PATCH 03/14] feat: slashpay checks if invoice is paid based on stored claimed payments --- __tests__/backups.ts | 1 + src/utils/lightning/index.ts | 4 ++++ src/utils/slashtags/index.ts | 24 ++++++++++++++++-------- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/__tests__/backups.ts b/__tests__/backups.ts index 9ba8d32d5..41c72891a 100644 --- a/__tests__/backups.ts +++ b/__tests__/backups.ts @@ -232,6 +232,7 @@ describe('Remote backups', () => { txType: EPaymentType.received, message: '', address: 'invoice', + confirmed: true, value: 1, timestamp: new Date().getTime(), }); diff --git a/src/utils/lightning/index.ts b/src/utils/lightning/index.ts index 09fb8483e..8cea87a39 100644 --- a/src/utils/lightning/index.ts +++ b/src/utils/lightning/index.ts @@ -1193,6 +1193,10 @@ export const payLightningInvoice = async ( } }; +export const getClaimedLightningPayments = async (): Promise< + TChannelManagerClaim[] +> => lm.getLdkPaymentsClaimed(); + export const decodeLightningInvoice = ({ paymentRequest, }: TPaymentReq): Promise> => { diff --git a/src/utils/slashtags/index.ts b/src/utils/slashtags/index.ts index d7da981c5..5679faa34 100644 --- a/src/utils/slashtags/index.ts +++ b/src/utils/slashtags/index.ts @@ -14,7 +14,11 @@ import { getSelectedNetwork, getSelectedWallet, } from '../wallet'; -import { decodeLightningInvoice, waitForLdk } from '../lightning'; +import { + decodeLightningInvoice, + getClaimedLightningPayments, + waitForLdk, +} from '../lightning'; import { createLightningInvoice } from '../../store/actions/lightning'; import { getSettingsStore } from '../../store/helpers'; import { TAvailableNetworks } from '../networks'; @@ -204,7 +208,7 @@ export const updateSlashPayConfig = debounce( selectedWallet, selectedNetwork, }); - const invoices = currentLightningNode.invoices[selectedNetwork]; + const claimedPayments = await getClaimedLightningPayments(); const openChannelIds = currentLightningNode.openChannelIds[selectedNetwork]; // if offline payments are disabled and payment config is empy then do nothing @@ -250,14 +254,18 @@ export const updateSlashPayConfig = debounce( const currentInvoice = payConfig.find(({ type }) => type === 'lightningInvoice')?.value ?? ''; - // if currentInvoice still in redux store, then we don't need to update it. - const currentInvoiceStillUnpaid = - currentInvoice && - Object.values(invoices || {}).some((i) => i?.to_str === currentInvoice); - const decodedInvoice = await decodeLightningInvoice({ paymentRequest: currentInvoice, }); + + // if currentInvoice still not in react-native-ldk's claimed payments list, then we don't need to update it. + const currentInvoiceStillUnpaid = + currentInvoice && + decodedInvoice.isOk() && + !claimedPayments.find( + (p) => p.payment_hash === decodedInvoice.value.payment_hash, + ); + const invoiceNeedsToBeUpdated = !currentInvoice || !currentInvoiceStillUnpaid || @@ -314,7 +322,7 @@ export const updateSlashPayConfig = debounce( 5000, ); -/** Send hypercorse to seeder */ +/** Send hypercores to seeder */ export const seedDrives = async (slashtag: Slashtag): Promise => { // TODO (slashtags) https://github.com/synonymdev/slashtags/issues/56 let drives: Hyperdrive[] = []; From 230ef2d0f861d49bd7eb8e415571717bb180c81d Mon Sep 17 00:00:00 2001 From: Jason Date: Thu, 27 Jul 2023 11:46:35 +0200 Subject: [PATCH 04/14] fix: moved lighting action method to lightning store --- src/store/actions/lightning.ts | 68 +++++++++++++++++++++++++++++++- src/utils/lightning/index.ts | 71 +++------------------------------- 2 files changed, 72 insertions(+), 67 deletions(-) diff --git a/src/store/actions/lightning.ts b/src/store/actions/lightning.ts index 7bb781345..8ab35fc48 100644 --- a/src/store/actions/lightning.ts +++ b/src/store/actions/lightning.ts @@ -9,10 +9,13 @@ import { addPeers, createPaymentRequest, getClaimableBalance, + getClaimedLightningPayments, getCustomLightningPeers, getLightningChannels, getNodeIdFromStorage, getNodeVersion, + getPendingInvoice, + getSentLightningPayments, hasOpenLightningChannels, parseUri, } from '../../utils/lightning'; @@ -21,7 +24,9 @@ import { TCreateLightningInvoice, TLightningNodeVersion, } from '../types/lightning'; -import { TWalletName } from '../types/wallet'; +import { EPaymentType, TWalletName } from '../types/wallet'; +import { EActivityType, TLightningActivityItem } from '../types/activity'; +import { getActivityItemById } from '../../utils/activity'; const dispatch = getDispatch(); @@ -347,3 +352,64 @@ export const updateClaimableBalance = async ({ }); return ok('Successfully Updated Claimable Balance.'); }; + +export const syncLightningTxsWithActivityList = async (): Promise< + Result +> => { + let items: TLightningActivityItem[] = []; + + const claimedTxs = await getClaimedLightningPayments(); + for (const tx of claimedTxs) { + //Required to add in bolt11 and description + const invoice = await getPendingInvoice(tx.payment_hash); + + items.push({ + id: tx.payment_hash, + activityType: EActivityType.lightning, + txType: EPaymentType.received, + message: invoice?.description ?? '', + address: invoice?.to_str ?? '', + confirmed: tx.state === 'successful', + value: tx.amount_sat, + timestamp: tx.unix_timestamp * 1000, + }); + } + + const sentTxs = await getSentLightningPayments(); + for (const tx of sentTxs) { + const sats = tx.amount_sat; + if (!sats) { + continue; + } + + items.push({ + id: tx.payment_hash, + activityType: EActivityType.lightning, + txType: EPaymentType.sent, + message: '', + address: '', + confirmed: tx.state === 'successful', + value: -sats, + timestamp: tx.unix_timestamp * 1000, + }); + } + + //TODO remove temp hack when this is complete and descriptions/bolt11 can be added from stored tx: https://github.com/synonymdev/react-native-ldk/issues/156 + items.forEach((item) => { + const res = getActivityItemById(item.id); + if (res.isOk()) { + const existingItem = res.value; + if (existingItem.activityType === EActivityType.lightning) { + item.message = existingItem.message; + item.address = existingItem.address; + } + } + }); + + dispatch({ + type: actions.UPDATE_ACTIVITY_ITEMS, + payload: items, + }); + + return ok('Stored lightning transactions synced with activity list.'); +}; diff --git a/src/utils/lightning/index.ts b/src/utils/lightning/index.ts index 8cea87a39..c698bffe1 100644 --- a/src/utils/lightning/index.ts +++ b/src/utils/lightning/index.ts @@ -41,7 +41,6 @@ import { import { TAvailableNetworks } from '../networks'; import { getBlocktankStore, - getDispatch, getFeesStore, getLightningStore, getWalletStore, @@ -49,6 +48,7 @@ import { import { defaultHeader } from '../../store/shapes/wallet'; import { removePeer, + syncLightningTxsWithActivityList, updateClaimableBalance, updateLightningChannels, updateLightningNodeId, @@ -73,10 +73,6 @@ import { TLightningNodeVersion } from '../../store/types/lightning'; import { getBlocktankInfo, isGeoBlocked } from '../blocktank'; import { updateOnchainFeeEstimates } from '../../store/actions/fees'; import { addTodo, removeTodo } from '../../store/actions/todos'; -import actions from '../../store/actions/actions'; -import { getActivityItemById } from '../activity'; - -const dispatch = getDispatch(); let LDKIsStayingSynced = false; @@ -1197,6 +1193,10 @@ export const getClaimedLightningPayments = async (): Promise< TChannelManagerClaim[] > => lm.getLdkPaymentsClaimed(); +export const getSentLightningPayments = async (): Promise< + TChannelManagerPaymentSent[] +> => lm.getLdkPaymentsSent(); + export const decodeLightningInvoice = ({ paymentRequest, }: TPaymentReq): Promise> => { @@ -1494,64 +1494,3 @@ export const getLightningBalance = ({ return { localBalance, remoteBalance }; }; - -export const syncLightningTxsWithActivityList = async (): Promise< - Result -> => { - let items: TLightningActivityItem[] = []; - - const claimedTxs = await lm.getLdkPaymentsClaimed(); - for (const tx of claimedTxs) { - //Required to add in bolt11 and description - const invoice = await getPendingInvoice(tx.payment_hash); - - items.push({ - id: tx.payment_hash, - activityType: EActivityType.lightning, - txType: EPaymentType.received, - message: invoice?.description ?? '', - address: invoice?.to_str ?? '', - confirmed: tx.state === 'successful', - value: tx.amount_sat, - timestamp: tx.unix_timestamp * 1000, - }); - } - - const sentTxs = await lm.getLdkPaymentsSent(); - for (const tx of sentTxs) { - const sats = tx.amount_sat; - if (!sats) { - continue; - } - - items.push({ - id: tx.payment_hash, - activityType: EActivityType.lightning, - txType: EPaymentType.sent, - message: '', - address: '', - confirmed: tx.state === 'successful', - value: -sats, - timestamp: tx.unix_timestamp * 1000, - }); - } - - //TODO remove temp hack when this is complete and descriptions/bolt11 can be added from stored tx: https://github.com/synonymdev/react-native-ldk/issues/156 - items.forEach((item) => { - const res = getActivityItemById(item.id); - if (res.isOk()) { - const existingItem = res.value; - if (existingItem.activityType === EActivityType.lightning) { - item.message = existingItem.message; - item.address = existingItem.address; - } - } - }); - - dispatch({ - type: actions.UPDATE_ACTIVITY_ITEMS, - payload: items, - }); - - return ok('Stored lightning transactions synced with activity list.'); -}; From 9559f81f50e5b88a7198dda76f62ade05222ecc7 Mon Sep 17 00:00:00 2001 From: Philipp Walter Date: Thu, 27 Jul 2023 15:58:44 +0200 Subject: [PATCH 05/14] chore: add convenience cli for regtest docker setup (#1177) --- .github/workflows/e2e-ios.yml | 2 +- .github/workflows/jest.yml | 2 +- .gitignore | 5 +- DEVELOPMENT.md | 22 +-- docker/bitcoin-cli | 165 +++++++++++++++++++ {__tests__ => docker}/btc-fee-estimates.json | 0 {__tests__ => docker}/docker-compose.yml | 3 + {__tests__ => docker}/electrs.toml | 0 e2e/lightning.e2e.js | 4 +- 9 files changed, 184 insertions(+), 19 deletions(-) create mode 100755 docker/bitcoin-cli rename {__tests__ => docker}/btc-fee-estimates.json (100%) rename {__tests__ => docker}/docker-compose.yml (97%) rename {__tests__ => docker}/electrs.toml (100%) diff --git a/.github/workflows/e2e-ios.yml b/.github/workflows/e2e-ios.yml index 8c42c6bc1..31faaa782 100644 --- a/.github/workflows/e2e-ios.yml +++ b/.github/workflows/e2e-ios.yml @@ -39,7 +39,7 @@ jobs: run: HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew && brew install applesimutils - name: Run regtest setup - run: cd __tests__ && mkdir lnd && chmod 777 lnd && docker-compose up -d + run: cd docker && mkdir lnd && chmod 777 lnd && docker-compose up -d - name: Wait for bitcoind timeout-minutes: 2 diff --git a/.github/workflows/jest.yml b/.github/workflows/jest.yml index d4698e62c..d7b23094f 100644 --- a/.github/workflows/jest.yml +++ b/.github/workflows/jest.yml @@ -14,7 +14,7 @@ jobs: fetch-depth: 1 - name: Run regtest setup - run: cd __tests__ && docker compose up -d + run: cd docker && docker compose up -d - name: Wait for bitcoind run: | diff --git a/.gitignore b/.gitignore index d31e95c29..fef3347ef 100644 --- a/.gitignore +++ b/.gitignore @@ -90,9 +90,10 @@ android/app/pepk.jar # tests coverage/ -__tests__/bitcoin_datadir/ -__tests__/lnd/ artifacts/ +# docker +docker/lnd/ + #Build android/app/release/ diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 6d7f5df98..bf2e16895 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -10,17 +10,13 @@ Make sure you have [setup your environment for React Native](https://reactnative git clone git@github.com:synonymdev/bitkit.git && cd bitkit ``` -2. Switch Node version - -Switch to the Node.js version defined in `.nvmrc`. If `nvm` (or similiar) is installed on your system you can run `nvm use`. - -3. Install dependencies +2. Install dependencies ```shell yarn install ``` -4. Setup iOS or Android dependencies +3. Setup iOS or Android dependencies ```shell yarn setup-ios @@ -32,7 +28,7 @@ or yarn setup-android ``` -5. Start the project +4. Start the project On iOS Simulator: @@ -50,18 +46,18 @@ yarn android Bitkit uses two types of testing: unit and end-to-end (E2E) tests. -### 1. Unit tests - -Before running unit tests, you need to install Docker and run bitcoind and the electrum server in regtest mode. You can do this by using the docker-compose.yml file from the **tests** directory: +Before running tests, you need to install [Docker](https://docs.docker.com/get-docker/) and run bitcoind and the electrum server in regtest mode. You can do this by using the `docker-compose.yml` file from the **docker** directory: -```sh -cd __tests__ +```shell +cd docker docker compose up ``` After that, you are ready to run the tests: -```sh +### 1. Unit tests + +```shell yarn test ``` diff --git a/docker/bitcoin-cli b/docker/bitcoin-cli new file mode 100755 index 000000000..c68fa4953 --- /dev/null +++ b/docker/bitcoin-cli @@ -0,0 +1,165 @@ +#!/usr/bin/env bash + +set -euo pipefail + +CLI_NAME="$(basename $0)" +CLI_DIR="$(dirname "$(readlink -f "$0")")" +CONTAINER="bitcoind" +RPC_USER=polaruser +RPC_PASS=polarpass +RPC_PORT=43782 + +BASE_COMMAND=(docker compose exec $CONTAINER bitcoin-cli -rpcport=$RPC_PORT -rpcuser=$RPC_USER -rpcpassword=$RPC_PASS) + +DEFAULT_AMOUNT=0.001 + +show_help() { + cat < [options] +Flags: + -h, --help Show this help message +Commands: + fund Fund the wallet + mine [--auto] Generate a number of blocks + send
Send to address or BIP21 URI + getInvoice Get a new BIP21 URI with a bech32 address +EOF +} + +if [ -z ${1+x} ]; then + command="" +else + command="$1" +fi + +# Fund the wallet +if [[ "$command" = "fund" ]]; then + "${BASE_COMMAND[@]}" -generate 101 + exit +fi + +# Mine some blocks +if [[ "$command" = "mine" ]]; then + shift + + if [ -z ${1+x} ]; then + echo "Specify the number of blocks to generate." + echo "Usage: \`$CLI_NAME $command \`" + exit 1 + fi + + POSITIONAL_ARGS=() + + auto=false + + while [[ $# -gt 0 ]]; do + case $1 in + -l | --auto) + auto=true + shift + ;; + -* | --*) + echo "Unknown option $1" + exit 1 + ;; + *) + POSITIONAL_ARGS+=("$1") + shift + ;; + esac + done + + set -- "${POSITIONAL_ARGS[@]}" + + # default to 5 seconds + interval=${2:-5} + + if $auto; then + printf "Generating a block every $interval seconds. Press [CTRL+C] to stop...\n\n" + + while true; do + "${BASE_COMMAND[@]}" -generate 1 + sleep $interval + done + else + "${BASE_COMMAND[@]}" -generate "$@" + fi + + exit +fi + +# Send to a transaction +if [[ "$command" = "send" ]]; then + shift + + if [ -z ${1+x} ]; then + read -p "Enter a BIP21 URI or address: " uri + echo + else + uri="$1" + fi + + if [ -z ${2+x} ]; then + amount=$DEFAULT_AMOUNT + else + amount="$2" + fi + + protocol=$(echo "${uri%%:*}") + + if [[ "$protocol" == "bitcoin" ]]; then + # BIP21 URI + # Remove the protocol + url_no_protocol=$(echo "${uri/$protocol/}" | cut -d":" -f2-) + + address=$(echo $url_no_protocol | grep "?" | cut -d"/" -f1 | rev | cut -d"?" -f2- | rev || echo $url_no_protocol) + uri_amount=$(echo $url_no_protocol | cut -d'?' -f 2 | cut -d'=' -f 2 | cut -d'&' -f 1) + + if echo "$uri_amount" | grep -qE '^[0-9]*\.?[0-9]+$'; then + amount=$uri_amount + fi + else + address=$uri + fi + + tx_id=$("${BASE_COMMAND[@]}" -named sendtoaddress address="$address" amount="$amount" fee_rate="25") + + echo "Sent $amount BTC to $address" + echo "Transaction ID: $tx_id" + + exit +fi + +# Get a new BIP21 URI +if [[ "$command" = "getInvoice" ]]; then + shift + + if [ -z ${1+x} ]; then + amount=$DEFAULT_AMOUNT + else + amount="$1" + fi + + address=$("${BASE_COMMAND[@]}" getnewaddress -addresstype bech32 | tr -d '\r') + uri="bitcoin:$address?amount=$amount" + + # print URI + echo $uri + + # copy to clipboard (MacOS) + echo $uri | pbcopy + echo "Copied to clipboard." + + exit +fi + +# Show usage information for this CLI +if [[ "$command" = "--help" ]] || [[ "$command" = "-h" ]]; then + show_help + exit +fi + +# If no command specified pass all args straight to bitcoin-cli +"${BASE_COMMAND[@]}" "$@" +exit diff --git a/__tests__/btc-fee-estimates.json b/docker/btc-fee-estimates.json similarity index 100% rename from __tests__/btc-fee-estimates.json rename to docker/btc-fee-estimates.json diff --git a/__tests__/docker-compose.yml b/docker/docker-compose.yml similarity index 97% rename from __tests__/docker-compose.yml rename to docker/docker-compose.yml index 29fae9a8d..4a50e18d7 100644 --- a/__tests__/docker-compose.yml +++ b/docker/docker-compose.yml @@ -1,6 +1,7 @@ version: '3' services: bitcoind: + container_name: bitcoin image: btcpayserver/bitcoin:25.0 restart: unless-stopped expose: @@ -46,6 +47,7 @@ services: ] electrs: + container_name: electrum image: getumbrel/electrs:v0.9.10 restart: unless-stopped depends_on: @@ -84,6 +86,7 @@ services: - '/www' lnd: + container_name: lnd image: polarlightning/lnd:0.16.2-beta restart: unless-stopped depends_on: diff --git a/__tests__/electrs.toml b/docker/electrs.toml similarity index 100% rename from __tests__/electrs.toml rename to docker/electrs.toml diff --git a/e2e/lightning.e2e.js b/e2e/lightning.e2e.js index 10fab4d2d..2e921bf23 100644 --- a/e2e/lightning.e2e.js +++ b/e2e/lightning.e2e.js @@ -63,8 +63,8 @@ d('Lightning', () => { // send funds to LND node and open a channel const lnd = await createLndRpc({ server: 'localhost:10009', - tls: `${__dirname}/../__tests__/lnd/tls.cert`, - macaroonPath: `${__dirname}/../__tests__/lnd/data/chain/bitcoin/regtest/admin.macaroon`, + tls: `${__dirname}/../docker/lnd/tls.cert`, + macaroonPath: `${__dirname}/../docker/lnd/data/chain/bitcoin/regtest/admin.macaroon`, }); const { address: lndAddress } = await lnd.newAddress(); await rpc.sendToAddress(lndAddress, '1'); From a3a882ec2e62b12f6c3ce5294bd3a84c07cb982a Mon Sep 17 00:00:00 2001 From: Corey Phillips Date: Thu, 27 Jul 2023 12:47:09 -0400 Subject: [PATCH 06/14] fix(lightning): Update refreshLdk --- src/utils/lightning/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/lightning/index.ts b/src/utils/lightning/index.ts index c698bffe1..f4d48edaa 100644 --- a/src/utils/lightning/index.ts +++ b/src/utils/lightning/index.ts @@ -470,9 +470,9 @@ export const refreshLdk = async ({ await Promise.all([ addPeers({ selectedNetwork, selectedWallet }), updateLightningChannels({ selectedWallet, selectedNetwork }), - updateClaimableBalance({ selectedNetwork, selectedWallet }), - syncLightningTxsWithActivityList(), ]); + await updateClaimableBalance({ selectedNetwork, selectedWallet }); + await syncLightningTxsWithActivityList(); return ok(''); } catch (e) { From 5d01f628834abdabcac5935e84722f0a6e2a1d96 Mon Sep 17 00:00:00 2001 From: Ivan Vershigora Date: Fri, 28 Jul 2023 14:28:32 +0100 Subject: [PATCH 07/14] fix: add missing await to deleteAllFiles --- src/utils/lightning/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/lightning/index.ts b/src/utils/lightning/index.ts index f4d48edaa..bfda42448 100644 --- a/src/utils/lightning/index.ts +++ b/src/utils/lightning/index.ts @@ -123,7 +123,7 @@ export const wipeLdkStorage = async ({ if (item.isFile()) { await RNFS.unlink(item.path); } else { - deleteAllFiles(item.path); + await deleteAllFiles(item.path); } } }; From 1d5877320b59187b372419799327b936ac2701f0 Mon Sep 17 00:00:00 2001 From: Philipp Walter Date: Tue, 25 Jul 2023 20:21:31 +0200 Subject: [PATCH 08/14] fix(ui): update drop shadows --- src/components/Button.tsx | 16 ++++++---------- src/components/Card.tsx | 5 ----- src/components/Dialog.tsx | 8 ++------ src/components/TabBar.tsx | 20 +++++++++++--------- src/utils/ignoreLogs.ts | 12 +----------- 5 files changed, 20 insertions(+), 41 deletions(-) diff --git a/src/components/Button.tsx b/src/components/Button.tsx index 6e5c33c4a..ba0330bab 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -109,11 +109,12 @@ const styles = StyleSheet.create({ alignItems: 'center', justifyContent: 'center', flexDirection: 'row', - shadowColor: 'rgba(0, 0, 0, 0.1)', - shadowOpacity: 0.8, - elevation: 6, - shadowRadius: 15, - shadowOffset: { width: 1, height: 13 }, + // TODO: shadows are not drawn correctly on transparent buttons + // shadowColor: 'rgba(0, 0, 0, 0.1)', + // shadowOpacity: 0.8, + // elevation: 6, + // shadowRadius: 15, + // shadowOffset: { width: 1, height: 13 }, }, buttonSmall: { height: 40, @@ -139,11 +140,6 @@ const styles = StyleSheet.create({ borderRadius: 54, paddingVertical: 12, paddingHorizontal: 16, - shadowColor: 'rgba(0, 0, 0, 0.1)', - shadowOpacity: 0.8, - elevation: 6, - shadowRadius: 15, - shadowOffset: { width: 1, height: 13 }, }, }); diff --git a/src/components/Card.tsx b/src/components/Card.tsx index 078146220..765ab770f 100644 --- a/src/components/Card.tsx +++ b/src/components/Card.tsx @@ -36,11 +36,6 @@ const styles = StyleSheet.create({ marginVertical: 10, paddingVertical: 10, paddingHorizontal: 20, - shadowColor: 'rgba(0, 0, 0, 0.1)', - shadowOpacity: 0.9, - elevation: 6, - shadowRadius: 8, - shadowOffset: { width: 0, height: 0 }, }, }); diff --git a/src/components/Dialog.tsx b/src/components/Dialog.tsx index 94bdc8f58..67fb06616 100644 --- a/src/components/Dialog.tsx +++ b/src/components/Dialog.tsx @@ -96,14 +96,10 @@ const styles = StyleSheet.create({ }, view: { backgroundColor: 'rgba(49, 49, 49, 1)', - backdropFilter: 'blur(27.1828px)', alignItems: 'center', - shadowColor: colors.black, color: colors.white, - shadowOffset: { - width: 0, - height: 2, - }, + shadowColor: colors.black, + shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.25, shadowRadius: 4, elevation: 5, diff --git a/src/components/TabBar.tsx b/src/components/TabBar.tsx index ca79e5329..6a9d8c955 100644 --- a/src/components/TabBar.tsx +++ b/src/components/TabBar.tsx @@ -81,7 +81,7 @@ const TabBar = ({ activeOpacity={0.8} testID="Send" onPress={onSendPress}> - + {t('send')} @@ -98,7 +98,7 @@ const TabBar = ({ activeOpacity={0.8} testID="Receive" onPress={onReceivePress}> - + {t('receive')} @@ -121,22 +121,24 @@ const styles = StyleSheet.create({ blurContainer: { height: 56, flex: 1, + shadowColor: 'black', + shadowOpacity: 0.8, + shadowRadius: 15, + shadowOffset: { width: 1, height: 13 }, }, - send: { + blur: { flex: 1, alignItems: 'center', justifyContent: 'center', flexDirection: 'row', - paddingRight: 30, borderRadius: 30, + elevation: 6, + }, + send: { + paddingRight: 30, }, receive: { - flex: 1, - alignItems: 'center', - justifyContent: 'center', - flexDirection: 'row', paddingLeft: 30, - borderRadius: 30, }, tabScan: { height: 80, diff --git a/src/utils/ignoreLogs.ts b/src/utils/ignoreLogs.ts index 000cb867f..55b8d93a4 100644 --- a/src/utils/ignoreLogs.ts +++ b/src/utils/ignoreLogs.ts @@ -4,17 +4,7 @@ import { __E2E__, __ENABLE_LDK_LOGS__ } from '../constants/env'; if (__DEV__) { const ignoredLogs: string[] = []; const ignoredInfo: string[] = []; - const ignoredWarnings: string[] = [ - 'Require cycle', - // TEMP: ignore warning on iOS - 'Modal with', - // https://reactnavigation.org/docs/troubleshooting/#i-get-the-warning-non-serializable-values-were-found-in-the-navigation-state - 'Non-serializable values were found in the navigation state', - // we have react-native-draggable-flatlist inside on main screen - // unfortunalty, there is not good way to hide this error yet - // https://github.com/computerjazz/react-native-draggable-flatlist/issues/422 - 'VirtualizedLists should never be nested inside plain ScrollViews', - ]; + const ignoredWarnings: string[] = ['Require cycle']; const ignoredErrors: string[] = []; // disable all logs for E2E tests running in debug mode From 8f4cfd118d15bc0dd0ad458ab69527ba89cf98b3 Mon Sep 17 00:00:00 2001 From: Philipp Walter Date: Tue, 25 Jul 2023 20:28:13 +0200 Subject: [PATCH 09/14] fix(settings): minor UI fixes --- e2e/settings.e2e.js | 8 +++---- src/assets/icons/wallet.ts | 22 ++++++++++++----- src/components/List.tsx | 15 +++--------- src/navigation/settings/SettingsNavigator.tsx | 9 +++---- src/screens/Settings/About/index.tsx | 2 +- src/screens/Settings/ElectrumConfig/index.tsx | 15 ++++++------ src/screens/Settings/General/index.tsx | 6 ++--- src/screens/Settings/Security/index.tsx | 2 +- .../Settings/{BitcoinUnit => Unit}/index.tsx | 24 ++++++++++++------- src/utils/i18n/locales/en/settings.json | 5 ++-- 10 files changed, 56 insertions(+), 52 deletions(-) rename src/screens/Settings/{BitcoinUnit => Unit}/index.tsx (70%) diff --git a/e2e/settings.e2e.js b/e2e/settings.e2e.js index bf203f3f8..d7367fd05 100644 --- a/e2e/settings.e2e.js +++ b/e2e/settings.e2e.js @@ -72,17 +72,17 @@ d('Settings', () => { // switch to Bitcoins await element(by.id('Settings')).tap(); await element(by.id('GeneralSettings')).tap(); - await element(by.id('BitcoinUnitSettings')).tap(); + await element(by.id('UnitSettings')).tap(); await element(by.id('Bitcoin')).tap(); await expect( - element(by.id('Value').withAncestor(by.id('BitcoinUnitSettings'))), + element(by.id('Value').withAncestor(by.id('UnitSettings'))), ).toHaveText('Bitcoin'); // switch back to Satoshis - await element(by.id('BitcoinUnitSettings')).tap(); + await element(by.id('UnitSettings')).tap(); await element(by.id('Satoshis')).tap(); await expect( - element(by.id('Value').withAncestor(by.id('BitcoinUnitSettings'))), + element(by.id('Value').withAncestor(by.id('UnitSettings'))), ).toHaveText('Satoshis'); markComplete('settings-2'); }); diff --git a/src/assets/icons/wallet.ts b/src/assets/icons/wallet.ts index 7198f0210..e0e84029a 100644 --- a/src/assets/icons/wallet.ts +++ b/src/assets/icons/wallet.ts @@ -6,20 +6,30 @@ export const transferIcon = ( export const unitBitcoinIcon = ( color = 'white', -): string => ` - - -`; +): string => ` + + + +`; export const unitSatoshiIcon = ( color = 'white', ): string => ` - + `; export const unitFiatIcon = (color = 'white'): string => - ``; + ` + + + + + + + + + `; export const bitcoinIcon = ( color = 'white', diff --git a/src/components/List.tsx b/src/components/List.tsx index e3b9f1e06..217e72f92 100644 --- a/src/components/List.tsx +++ b/src/components/List.tsx @@ -200,13 +200,7 @@ const _Item = memo((item: ItemData): ReactElement => { if (type === 'draggable') { const { value, onDragEnd } = item as DraggableItem; - return ( - - ); + return ; } if (type === 'button') { @@ -349,7 +343,7 @@ const styles = StyleSheet.create({ justifyContent: 'space-between', borderBottomColor: 'rgba(255, 255, 255, 0.1)', borderBottomWidth: 1, - minHeight: 56, + minHeight: 55, }, itemLarge: { minHeight: 90, @@ -376,11 +370,8 @@ const styles = StyleSheet.create({ justifyContent: 'center', alignItems: 'center', }, - draggableList: { - marginTop: 14, - }, sectionSpacing: { - marginTop: 36, + marginTop: 41, }, }); diff --git a/src/navigation/settings/SettingsNavigator.tsx b/src/navigation/settings/SettingsNavigator.tsx index 5983f4005..aba95af49 100644 --- a/src/navigation/settings/SettingsNavigator.tsx +++ b/src/navigation/settings/SettingsNavigator.tsx @@ -17,7 +17,7 @@ import AddressTypePreference from '../../screens/Settings/AddressTypePreference' import DevSettings from '../../screens/Settings/DevSettings'; import AddressViewer from '../../screens/Settings/AddressViewer'; import LightningNodeInfo from '../../screens/Settings/Lightning/LightningNodeInfo'; -import BitcoinUnitSettings from '../../screens/Settings/BitcoinUnit'; +import UnitSettings from '../../screens/Settings/Unit'; import TransactionSpeedSettings from '../../screens/Settings/TransactionSpeed'; import CustomFee from '../../screens/Settings/TransactionSpeed/CustomFee'; import AuthCheck from '../../components/AuthCheck'; @@ -68,7 +68,7 @@ export type SettingsStackParamList = { AboutSettings: undefined; EasterEgg: undefined; CurrenciesSettings: undefined; - BitcoinUnitSettings: undefined; + UnitSettings: undefined; TransactionSpeedSettings: undefined; CustomFee: undefined; ElectrumConfig: undefined; @@ -120,10 +120,7 @@ const SettingsNavigator = (): ReactElement => { - + { navigation.navigate('Wallet'); }} diff --git a/src/screens/Settings/ElectrumConfig/index.tsx b/src/screens/Settings/ElectrumConfig/index.tsx index 6d1f96517..e25268782 100644 --- a/src/screens/Settings/ElectrumConfig/index.tsx +++ b/src/screens/Settings/ElectrumConfig/index.tsx @@ -6,7 +6,7 @@ import Url from 'url-parse'; import { useTranslation } from 'react-i18next'; import { View, TextInput, ScrollView } from '../../../styles/components'; -import { Text, Text01S, Caption13Up } from '../../../styles/text'; +import { Text01S, Caption13Up } from '../../../styles/text'; import { ScanIcon } from '../../../styles/icons'; import { addElectrumPeer } from '../../../store/actions/settings'; import { TProtocol } from '../../../store/types/settings'; @@ -244,13 +244,13 @@ const ElectrumConfig = ({ {connectedPeer ? ( - + {connectedPeer.host}:{connectedPeer.port} - + ) : ( - + {t('es.disconnected')} - + )} @@ -349,8 +349,7 @@ const styles = StyleSheet.create({ row: { flexDirection: 'row', alignItems: 'flex-start', - paddingTop: 5, - paddingBottom: 8, + paddingBottom: 16, justifyContent: 'center', }, label: { @@ -361,7 +360,7 @@ const styles = StyleSheet.create({ flex: 1.5, }, textInput: { - minHeight: 50, + minHeight: 52, marginTop: 5, }, protocol: { diff --git a/src/screens/Settings/General/index.tsx b/src/screens/Settings/General/index.tsx index 1020293d4..05607a4ce 100644 --- a/src/screens/Settings/General/index.tsx +++ b/src/screens/Settings/General/index.tsx @@ -48,10 +48,10 @@ const GeneralSettings = ({ ? t('general.unit_bitcoin') : selectedUnit === EUnit.satoshi ? t('general.unit_satoshis') - : t('general.unit_fiat'), + : selectedCurrency, type: EItemType.button, - testID: 'BitcoinUnitSettings', - onPress: (): void => navigation.navigate('BitcoinUnitSettings'), + testID: 'UnitSettings', + onPress: (): void => navigation.navigate('UnitSettings'), }, { title: t('general.speed'), diff --git a/src/screens/Settings/Security/index.tsx b/src/screens/Settings/Security/index.tsx index f52a5dc8e..c49a6e1ef 100644 --- a/src/screens/Settings/Security/index.tsx +++ b/src/screens/Settings/Security/index.tsx @@ -177,7 +177,7 @@ const SecuritySettings = ({ return ( ): ReactElement => { +}: SettingsScreenProps<'UnitSettings'>): ReactElement => { + const { fiatSymbol } = useCurrency(); const { t } = useTranslation('settings'); - const selectedBitcoinUnit = useSelector(primaryUnitSelector); + const selectedUnit = useSelector(primaryUnitSelector); + const selectedCurrency = useSelector(selectedCurrencySelector); const currencyListData: IListData[] = useMemo(() => { const units = [ @@ -35,9 +41,9 @@ const BitcoinUnitSettings = ({ Icon: UnitSatoshiIcon, }, { - label: t('general.unit_fiat'), + label: selectedCurrency, unit: EUnit.fiat, - labelExample: '($1,000)', + labelExample: `(${fiatSymbol}1,000)`, Icon: UnitFiatIcon, }, ]; @@ -47,7 +53,7 @@ const BitcoinUnitSettings = ({ title: t('general.unit_display'), data: units.map((unit) => ({ title: `${unit.label} ${unit.labelExample}`, - value: unit.unit === selectedBitcoinUnit, + value: unit.unit === selectedUnit, type: EItemType.button, Icon: unit.Icon, onPress: (): void => { @@ -58,7 +64,7 @@ const BitcoinUnitSettings = ({ })), }, ]; - }, [selectedBitcoinUnit, navigation, t]); + }, [selectedUnit, selectedCurrency, fiatSymbol, navigation, t]); return ( Orange Pill was carefully crafted by Synonym Software Ltd.", "support": "Support", "report_bug": "Report a bug or contribute", @@ -33,7 +34,6 @@ "unit_display": "Display amounts in", "unit_bitcoin": "Bitcoin", "unit_satoshis": "Satoshis", - "unit_fiat": "Local Currency", "speed": "Transaction speed", "speed_title": "Transaction Speed", "speed_default": "Default Transaction Speed", @@ -52,6 +52,7 @@ "reset_confirm": "Yes, Reset" }, "security": { + "title": "Security And Privacy", "clipboard": "Read clipboard for ease of use", "warn_100": "Warn when sending over $100", "pin": "PIN Code", From 70766a3d2899d97b583d135e3a5f44ce8c6e9617 Mon Sep 17 00:00:00 2001 From: Philipp Walter Date: Tue, 25 Jul 2023 20:32:01 +0200 Subject: [PATCH 10/14] fix(wallet): fix navigation warning for non-serializable props --- src/components/Suggestions.tsx | 2 +- src/navigation/wallet/WalletNavigator.tsx | 10 +++++----- src/screens/Wallets/index.tsx | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/Suggestions.tsx b/src/components/Suggestions.tsx index 1ceefabbe..7a4153e6e 100644 --- a/src/components/Suggestions.tsx +++ b/src/components/Suggestions.tsx @@ -105,7 +105,7 @@ const Suggestions = (): ReactElement => { defaultIndex={defaultIndex} loop={false} height={170} - width={170} + width={167} panGestureHandlerProps={panGestureHandlerProps} onSnapToItem={setIndex} renderItem={({ item }): ReactElement => { diff --git a/src/navigation/wallet/WalletNavigator.tsx b/src/navigation/wallet/WalletNavigator.tsx index b142725e9..653833201 100644 --- a/src/navigation/wallet/WalletNavigator.tsx +++ b/src/navigation/wallet/WalletNavigator.tsx @@ -40,11 +40,11 @@ const WalletsStack = ({ return ( <> - + + {(props): ReactElement => ( + + )} + diff --git a/src/screens/Wallets/index.tsx b/src/screens/Wallets/index.tsx index 124e415c9..7db4e04f0 100644 --- a/src/screens/Wallets/index.tsx +++ b/src/screens/Wallets/index.tsx @@ -38,11 +38,11 @@ import { widgetsSelector } from '../../store/reselect/widgets'; // https://github.com/software-mansion/react-native-reanimated/issues/4306#issuecomment-1538184321 const AnimatedRefreshControl = Animated.createAnimatedComponent(RefreshControl); -const Wallets = ({ - navigation, - route, -}: WalletScreenProps<'Wallets'>): ReactElement => { - const { onFocus } = route.params; +type Props = WalletScreenProps<'Wallets'> & { + onFocus: (isFocused: boolean) => void; +}; + +const Wallets = ({ navigation, onFocus }: Props): ReactElement => { const [refreshing, setRefreshing] = useState(false); const colors = useColors(); const hideBalance = useSelector(hideBalanceSelector); From ae5d255307f948460663c043810a899519022e56 Mon Sep 17 00:00:00 2001 From: Philipp Walter Date: Mon, 31 Jul 2023 13:53:07 +0200 Subject: [PATCH 11/14] fix: iOS quick-action icon --- src/utils/quick-actions.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils/quick-actions.ts b/src/utils/quick-actions.ts index 8e88e090b..e8cd48a6d 100644 --- a/src/utils/quick-actions.ts +++ b/src/utils/quick-actions.ts @@ -1,11 +1,10 @@ -import { Platform } from 'react-native'; import QuickActions from 'react-native-quick-actions'; QuickActions.setShortcutItems([ { type: 'Recovery', title: 'Recovery', - icon: Platform.select({ ios: 'Recovery', android: 'recovery' })!, + icon: 'recovery', userInfo: { url: '' }, }, ]); From 73fee51208965eced22ae30ee8d509778f820e7a Mon Sep 17 00:00:00 2001 From: Philipp Walter Date: Mon, 31 Jul 2023 17:45:56 +0200 Subject: [PATCH 12/14] fix: not subscribed to addresses after disconnect --- ios/Podfile.lock | 20 ++- ios/bitkit.xcodeproj/project.pbxproj | 166 +++++++++--------- src/screens/Settings/ElectrumConfig/index.tsx | 4 +- src/utils/startup/index.ts | 5 +- src/utils/wallet/electrum.ts | 140 +++++++-------- src/utils/wallet/index.ts | 2 +- 6 files changed, 166 insertions(+), 171 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index d4d039e09..e1c440bf1 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -81,9 +81,9 @@ PODS: - lottie-react-native (5.1.5): - lottie-ios (~> 3.4.0) - React-Core - - MMKV (1.2.15): - - MMKVCore (~> 1.2.15) - - MMKVCore (1.2.15) + - MMKV (1.3.0): + - MMKVCore (~> 1.3.0) + - MMKVCore (1.3.0) - nodejs-mobile-react-native (0.8.1): - React-Core - OpenSSL-Universal (1.1.1100) @@ -481,6 +481,8 @@ PODS: - RNQrGenerator (1.3.1): - React - ZXingObjC + - RNQuickAction (0.3.13): + - React - RNRate (1.2.12): - React-Core - RNReactNativeHapticFeedback (1.14.0): @@ -526,7 +528,7 @@ PODS: - RNZipArchive/Core (6.0.9): - React-Core - SSZipArchive (~> 2.2) - - SocketRocket (0.6.0) + - SocketRocket (0.6.1) - SSZipArchive (2.4.3) - TouchID (4.4.1): - React @@ -623,6 +625,7 @@ DEPENDENCIES: - RNLocalize (from `../node_modules/react-native-localize`) - RNPermissions (from `../node_modules/react-native-permissions`) - RNQrGenerator (from `../node_modules/rn-qr-generator`) + - RNQuickAction (from `../node_modules/react-native-quick-actions`) - RNRate (from `../node_modules/react-native-rate`) - RNReactNativeHapticFeedback (from `../node_modules/react-native-haptic-feedback`) - RNReanimated (from `../node_modules/react-native-reanimated`) @@ -777,6 +780,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native-permissions" RNQrGenerator: :path: "../node_modules/rn-qr-generator" + RNQuickAction: + :path: "../node_modules/react-native-quick-actions" RNRate: :path: "../node_modules/react-native-rate" RNReactNativeHapticFeedback: @@ -817,8 +822,8 @@ SPEC CHECKSUMS: libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 lottie-ios: 8f97d3271e155c2d688875c29cd3c74908aef5f8 lottie-react-native: 3e722c63015fdb9c27638b0a77969fc412067c18 - MMKV: 7f34558bbb5a33b0eaefae2de4b6a20a2ffdad6f - MMKVCore: ddf41b9d9262f058419f9ba7598719af56c02cd3 + MMKV: 9c6c3fa4ddd849f28c7b9a5c9d23aab84f14ee35 + MMKVCore: 9bb7440b170181ac5b81f542ac258103542e693d nodejs-mobile-react-native: e35e7ed7ecfca168f168983e9557f1c5278d864b OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 @@ -873,6 +878,7 @@ SPEC CHECKSUMS: RNLocalize: d4b8af4e442d4bcca54e68fc687a2129b4d71a81 RNPermissions: c5eafcb7dc107815baf0f4c795410c653eb9635a RNQrGenerator: 90461ba3ca88c1d38ef73da50fade35d9648215d + RNQuickAction: 6d404a869dc872cde841ad3147416a670d13fa93 RNRate: ef3bcff84f39bb1d1e41c5593d3eea4aab2bd73a RNReactNativeHapticFeedback: 1e3efeca9628ff9876ee7cdd9edec1b336913f8c RNReanimated: b1220a0e5168745283ff5d53bfc7d2144b2cee1b @@ -880,7 +886,7 @@ SPEC CHECKSUMS: RNShare: d82e10f6b7677f4b0048c23709bd04098d5aee6c RNSVG: d7d7bc8229af3842c9cfc3a723c815a52cdd1105 RNZipArchive: 68a0c6db4b1c103f846f1559622050df254a3ade - SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608 + SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef TouchID: ba4c656d849cceabc2e4eef722dea5e55959ecf4 Yoga: d56980c8914db0b51692f55533409e844b66133c diff --git a/ios/bitkit.xcodeproj/project.pbxproj b/ios/bitkit.xcodeproj/project.pbxproj index 96cfffcaa..639925398 100644 --- a/ios/bitkit.xcodeproj/project.pbxproj +++ b/ios/bitkit.xcodeproj/project.pbxproj @@ -11,13 +11,13 @@ 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; + 5F503AADACF24608F5918DBC /* libPods-bitkit-bitkitTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B53683A434E450032E4871B1 /* libPods-bitkit-bitkitTests.a */; }; 777F5BE129EDEB75005E0E4B /* InterTight-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 777F5BDD29EDEB75005E0E4B /* InterTight-Bold.ttf */; }; 777F5BE229EDEB75005E0E4B /* InterTight-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 777F5BDE29EDEB75005E0E4B /* InterTight-Regular.ttf */; }; 777F5BE329EDEB75005E0E4B /* InterTight-SemiBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 777F5BDF29EDEB75005E0E4B /* InterTight-SemiBold.ttf */; }; 777F5BE429EDEB75005E0E4B /* InterTight-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 777F5BE029EDEB75005E0E4B /* InterTight-Medium.ttf */; }; 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; - 90F7F15E68B18744FB78E27D /* libPods-bitkit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 84B2E4AFDE0008BCC9CA4D6D /* libPods-bitkit.a */; }; - E8282C8358A44805EC92935B /* libPods-bitkit-bitkitTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A32D1061726518361CAF4BB4 /* libPods-bitkit-bitkitTests.a */; }; + A6A7D18CCA855DF8DCFDCD5E /* libPods-bitkit.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 18C32352660895B32F76F551 /* libPods-bitkit.a */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -34,24 +34,24 @@ 00E356EE1AD99517003FC87E /* bitkitTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = bitkitTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 00E356F21AD99517003FC87E /* bitkitTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = bitkitTests.m; sourceTree = ""; }; - 089784857C4AE52766185915 /* Pods-bitkit-bitkitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-bitkit-bitkitTests.debug.xcconfig"; path = "Target Support Files/Pods-bitkit-bitkitTests/Pods-bitkit-bitkitTests.debug.xcconfig"; sourceTree = ""; }; 13B07F961A680F5B00A75B9A /* bitkit.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = bitkit.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = bitkit/AppDelegate.h; sourceTree = ""; }; 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = bitkit/AppDelegate.mm; sourceTree = ""; }; 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = bitkit/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = bitkit/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = bitkit/main.m; sourceTree = ""; }; - 3364F8545C1F44B46601606C /* Pods-bitkit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-bitkit.debug.xcconfig"; path = "Target Support Files/Pods-bitkit/Pods-bitkit.debug.xcconfig"; sourceTree = ""; }; + 18C32352660895B32F76F551 /* libPods-bitkit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-bitkit.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 3A2A790D063C00580DACF5E0 /* Pods-bitkit-bitkitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-bitkit-bitkitTests.release.xcconfig"; path = "Target Support Files/Pods-bitkit-bitkitTests/Pods-bitkit-bitkitTests.release.xcconfig"; sourceTree = ""; }; + 444EAABECD73CC86C582C108 /* Pods-bitkit-bitkitTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-bitkit-bitkitTests.debug.xcconfig"; path = "Target Support Files/Pods-bitkit-bitkitTests/Pods-bitkit-bitkitTests.debug.xcconfig"; sourceTree = ""; }; 777F5BDD29EDEB75005E0E4B /* InterTight-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "InterTight-Bold.ttf"; sourceTree = ""; }; 777F5BDE29EDEB75005E0E4B /* InterTight-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "InterTight-Regular.ttf"; sourceTree = ""; }; 777F5BDF29EDEB75005E0E4B /* InterTight-SemiBold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "InterTight-SemiBold.ttf"; sourceTree = ""; }; 777F5BE029EDEB75005E0E4B /* InterTight-Medium.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "InterTight-Medium.ttf"; sourceTree = ""; }; 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = bitkit/LaunchScreen.storyboard; sourceTree = ""; }; - 84B2E4AFDE0008BCC9CA4D6D /* libPods-bitkit.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-bitkit.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 95A40893F5C237EFAE459252 /* Pods-bitkit-bitkitTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-bitkit-bitkitTests.release.xcconfig"; path = "Target Support Files/Pods-bitkit-bitkitTests/Pods-bitkit-bitkitTests.release.xcconfig"; sourceTree = ""; }; - A32D1061726518361CAF4BB4 /* libPods-bitkit-bitkitTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-bitkit-bitkitTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - E26125FCD063ABF82B29B5AE /* Pods-bitkit.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-bitkit.release.xcconfig"; path = "Target Support Files/Pods-bitkit/Pods-bitkit.release.xcconfig"; sourceTree = ""; }; + B53683A434E450032E4871B1 /* libPods-bitkit-bitkitTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-bitkit-bitkitTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + D13A1262BE3ECB2581FC2EDC /* Pods-bitkit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-bitkit.debug.xcconfig"; path = "Target Support Files/Pods-bitkit/Pods-bitkit.debug.xcconfig"; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; + F615571D2777FBACDAED24E2 /* Pods-bitkit.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-bitkit.release.xcconfig"; path = "Target Support Files/Pods-bitkit/Pods-bitkit.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -59,7 +59,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - E8282C8358A44805EC92935B /* libPods-bitkit-bitkitTests.a in Frameworks */, + 5F503AADACF24608F5918DBC /* libPods-bitkit-bitkitTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -67,7 +67,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 90F7F15E68B18744FB78E27D /* libPods-bitkit.a in Frameworks */, + A6A7D18CCA855DF8DCFDCD5E /* libPods-bitkit.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -108,8 +108,8 @@ isa = PBXGroup; children = ( ED297162215061F000B7C4FE /* JavaScriptCore.framework */, - 84B2E4AFDE0008BCC9CA4D6D /* libPods-bitkit.a */, - A32D1061726518361CAF4BB4 /* libPods-bitkit-bitkitTests.a */, + 18C32352660895B32F76F551 /* libPods-bitkit.a */, + B53683A434E450032E4871B1 /* libPods-bitkit-bitkitTests.a */, ); name = Frameworks; sourceTree = ""; @@ -161,10 +161,10 @@ BBD78D7AC51CEA395F1C20DB /* Pods */ = { isa = PBXGroup; children = ( - 3364F8545C1F44B46601606C /* Pods-bitkit.debug.xcconfig */, - E26125FCD063ABF82B29B5AE /* Pods-bitkit.release.xcconfig */, - 089784857C4AE52766185915 /* Pods-bitkit-bitkitTests.debug.xcconfig */, - 95A40893F5C237EFAE459252 /* Pods-bitkit-bitkitTests.release.xcconfig */, + D13A1262BE3ECB2581FC2EDC /* Pods-bitkit.debug.xcconfig */, + F615571D2777FBACDAED24E2 /* Pods-bitkit.release.xcconfig */, + 444EAABECD73CC86C582C108 /* Pods-bitkit-bitkitTests.debug.xcconfig */, + 3A2A790D063C00580DACF5E0 /* Pods-bitkit-bitkitTests.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -176,12 +176,12 @@ isa = PBXNativeTarget; buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "bitkitTests" */; buildPhases = ( - 1C7090317D4327634733B4FF /* [CP] Check Pods Manifest.lock */, + 4F668DDA4EDFD6DF63FA3B0A /* [CP] Check Pods Manifest.lock */, 00E356EA1AD99517003FC87E /* Sources */, 00E356EB1AD99517003FC87E /* Frameworks */, 00E356EC1AD99517003FC87E /* Resources */, - 63C167CDECF13548EEA5DEA2 /* [CP] Embed Pods Frameworks */, - FF766FF47013BADBF8E1C2AF /* [CP] Copy Pods Resources */, + 64383155207573885C83E29B /* [CP] Embed Pods Frameworks */, + 0F88CC10F942A17639D1DE30 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -197,18 +197,18 @@ isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "bitkit" */; buildPhases = ( - 6ECDC3DF0897F9BA470E3968 /* [CP] Check Pods Manifest.lock */, + 7423DCEEFDC3099766E2D590 /* [CP] Check Pods Manifest.lock */, FD10A7F022414F080027D42C /* Start Packager */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - 63FECBDC1F38E1B2A392299D /* [CP] Embed Pods Frameworks */, - BCD2ABDA4B7DB91E824FA302 /* [CP] Copy Pods Resources */, - C6E4711BE698611D94FE5BB2 /* [CP-User] [NODEJS MOBILE] Copy Node.js Project files */, - 53E93539314793E7DE0B76DF /* [CP-User] [NODEJS MOBILE] Build Native Modules */, - 9A07E6ACE18013797863EF12 /* [CP-User] [NODEJS MOBILE] Sign Native Modules */, - 3C585E859DED07E4BAD5EB21 /* [CP-User] [NODEJS MOBILE] Remove Simulator Strip */, + 858A1B0A99257412E7E49F95 /* [CP] Embed Pods Frameworks */, + B1532D37C5F5312586AA8B59 /* [CP] Copy Pods Resources */, + D53FEE3A6B78AC158AEEDE16 /* [CP-User] [NODEJS MOBILE] Copy Node.js Project files */, + E62D6EB5874E6BC8745C22E1 /* [CP-User] [NODEJS MOBILE] Build Native Modules */, + 0ED46121177E47B0E2C921D5 /* [CP-User] [NODEJS MOBILE] Sign Native Modules */, + 32DD0831F26A205A155B06CA /* [CP-User] [NODEJS MOBILE] Remove Simulator Strip */, ); buildRules = ( ); @@ -295,83 +295,83 @@ shellPath = /bin/sh; shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; }; - 1C7090317D4327634733B4FF /* [CP] Check Pods Manifest.lock */ = { + 0ED46121177E47B0E2C921D5 /* [CP-User] [NODEJS MOBILE] Sign Native Modules */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-bitkit-bitkitTests-checkManifestLockResult.txt", - ); + name = "[CP-User] [NODEJS MOBILE] Sign Native Modules"; runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; + shellScript = "#!/bin/sh\nset -e\nif [ -z \"$NODEJS_MOBILE_BUILD_NATIVE_MODULES\" ]; then\n# If build native modules preference is not set, look for it in the project's\n#nodejs-assets/BUILD_NATIVE_MODULES.txt file.\nNODEJS_ASSETS_DIR=\"$( cd \"$PROJECT_DIR\" && cd ../nodejs-assets/ && pwd )\"\nPREFERENCE_FILE_PATH=\"$NODEJS_ASSETS_DIR/BUILD_NATIVE_MODULES.txt\"\n if [ -f \"$PREFERENCE_FILE_PATH\" ]; then\n NODEJS_MOBILE_BUILD_NATIVE_MODULES=\"$(cat $PREFERENCE_FILE_PATH | xargs)\"\n fi\nfi\nif [ -z \"$NODEJS_MOBILE_BUILD_NATIVE_MODULES\" ]; then\n# If build native modules preference is not set, try to find .gyp files\n#to turn it on.\n gypfiles=($(find \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -type f -name \"*.gyp\"))\n if [ ${#gypfiles[@]} -gt 0 ]; then\n NODEJS_MOBILE_BUILD_NATIVE_MODULES=1\n else\n NODEJS_MOBILE_BUILD_NATIVE_MODULES=0\n fi\nfi\nif [ \"1\" != \"$NODEJS_MOBILE_BUILD_NATIVE_MODULES\" ]; then exit 0; fi\n# Delete object files\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -name \"*.o\" -type f -delete\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -name \"*.a\" -type f -delete\n# Create Info.plist for each framework built and loader override.\nPATCH_SCRIPT_DIR=\"$( cd \"$PROJECT_DIR\" && cd ../node_modules/nodejs-mobile-react-native/scripts/ && pwd )\"\nNODEJS_PROJECT_DIR=\"$( cd \"$CODESIGNING_FOLDER_PATH\" && cd nodejs-project/ && pwd )\"\nnode \"$PATCH_SCRIPT_DIR\"/ios-create-plists-and-dlopen-override.js $NODEJS_PROJECT_DIR\n# Embed every resulting .framework in the application and delete them afterwards.\nembed_framework()\n{\n FRAMEWORK_NAME=\"$(basename \"$1\")\"\n cp -r \"$1\" \"$TARGET_BUILD_DIR/$FRAMEWORKS_FOLDER_PATH/\"\n /usr/bin/codesign --force --sign $EXPANDED_CODE_SIGN_IDENTITY --preserve-metadata=identifier,entitlements,flags --timestamp=none \"$TARGET_BUILD_DIR/$FRAMEWORKS_FOLDER_PATH/$FRAMEWORK_NAME\"\n}\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -name \"*.framework\" -type d | while read frmwrk_path; do embed_framework \"$frmwrk_path\"; done\n\n#Delete gyp temporary .deps dependency folders from the project structure.\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -path \"*/.deps/*\" -delete\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -name \".deps\" -type d -delete\n\n#Delete frameworks from their build paths\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -path \"*/*.framework/*\" -delete\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -name \"*.framework\" -type d -delete\n"; }; - 3C585E859DED07E4BAD5EB21 /* [CP-User] [NODEJS MOBILE] Remove Simulator Strip */ = { + 0F88CC10F942A17639D1DE30 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - name = "[CP-User] [NODEJS MOBILE] Remove Simulator Strip"; + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-bitkit-bitkitTests/Pods-bitkit-bitkitTests-resources-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Copy Pods Resources"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-bitkit-bitkitTests/Pods-bitkit-bitkitTests-resources-${CONFIGURATION}-output-files.xcfilelist", + ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "#!/bin/sh\nset -e\nFRAMEWORK_BINARY_PATH=\"$TARGET_BUILD_DIR/$FRAMEWORKS_FOLDER_PATH/NodeMobile.framework/NodeMobile\"\nFRAMEWORK_STRIPPED_PATH=\"$FRAMEWORK_BINARY_PATH-strip\"\nif [ \"$PLATFORM_NAME\" != \"iphonesimulator\" ]; then\n if $(lipo \"$FRAMEWORK_BINARY_PATH\" -verify_arch \"x86_64\") ; then\n lipo -output \"$FRAMEWORK_STRIPPED_PATH\" -remove \"x86_64\" \"$FRAMEWORK_BINARY_PATH\"\n rm \"$FRAMEWORK_BINARY_PATH\"\n mv \"$FRAMEWORK_STRIPPED_PATH\" \"$FRAMEWORK_BINARY_PATH\"\n echo \"Removed simulator strip from NodeMobile.framework\"\n fi\nfi\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-bitkit-bitkitTests/Pods-bitkit-bitkitTests-resources.sh\"\n"; + showEnvVarsInLog = 0; }; - 53E93539314793E7DE0B76DF /* [CP-User] [NODEJS MOBILE] Build Native Modules */ = { + 32DD0831F26A205A155B06CA /* [CP-User] [NODEJS MOBILE] Remove Simulator Strip */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - name = "[CP-User] [NODEJS MOBILE] Build Native Modules"; + name = "[CP-User] [NODEJS MOBILE] Remove Simulator Strip"; runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "#!/bin/sh\nset -e\nif [ -z \"$NODEJS_MOBILE_BUILD_NATIVE_MODULES\" ]; then\n# If build native modules preference is not set, look for it in the project's\n#nodejs-assets/BUILD_NATIVE_MODULES.txt file.\nNODEJS_ASSETS_DIR=\"$( cd \"$PROJECT_DIR\" && cd ../nodejs-assets/ && pwd )\"\nPREFERENCE_FILE_PATH=\"$NODEJS_ASSETS_DIR/BUILD_NATIVE_MODULES.txt\"\n if [ -f \"$PREFERENCE_FILE_PATH\" ]; then\n NODEJS_MOBILE_BUILD_NATIVE_MODULES=\"$(cat $PREFERENCE_FILE_PATH | xargs)\"\n fi\nfi\nif [ -z \"$NODEJS_MOBILE_BUILD_NATIVE_MODULES\" ]; then\n# If build native modules preference is not set, try to find .gyp files\n#to turn it on.\n gypfiles=($(find \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -type f -name \"*.gyp\"))\n if [ ${#gypfiles[@]} -gt 0 ]; then\n NODEJS_MOBILE_BUILD_NATIVE_MODULES=1\n else\n NODEJS_MOBILE_BUILD_NATIVE_MODULES=0\n fi\nfi\nif [ \"1\" != \"$NODEJS_MOBILE_BUILD_NATIVE_MODULES\" ]; then exit 0; fi\n# Delete object files that may already come from within the npm package.\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -name \"*.o\" -type f -delete\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -name \"*.a\" -type f -delete\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -name \"*.node\" -type f -delete\n# Delete bundle contents that may be there from previous builds.\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -path \"*/*.node/*\" -delete\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -name \"*.node\" -type d -delete\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -path \"*/*.framework/*\" -delete\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -name \"*.framework\" -type d -delete\n# Apply patches to the modules package.json\nif [ -d \"$CODESIGNING_FOLDER_PATH\"/nodejs-project/node_modules/ ]; then\n PATCH_SCRIPT_DIR=\"$( cd \"$PROJECT_DIR\" && cd ../node_modules/nodejs-mobile-react-native/scripts/ && pwd )\"\n NODEJS_PROJECT_MODULES_DIR=\"$( cd \"$CODESIGNING_FOLDER_PATH\" && cd nodejs-project/node_modules/ && pwd )\"\n node \"$PATCH_SCRIPT_DIR\"/patch-package.js $NODEJS_PROJECT_MODULES_DIR\nfi\n# Get the nodejs-mobile-gyp location\nif [ -d \"$PROJECT_DIR/../node_modules/nodejs-mobile-gyp/\" ]; then\n NODEJS_MOBILE_GYP_DIR=\"$( cd \"$PROJECT_DIR\" && cd ../node_modules/nodejs-mobile-gyp/ && pwd )\"\nelse\n NODEJS_MOBILE_GYP_DIR=\"$( cd \"$PROJECT_DIR\" && cd ../node_modules/nodejs-mobile-react-native/node_modules/nodejs-mobile-gyp/ && pwd )\"\nfi\nNODEJS_MOBILE_GYP_BIN_FILE=\"$NODEJS_MOBILE_GYP_DIR\"/bin/node-gyp.js\n# Support building neon-bindings (Rust) native modules\nif [ -f ~/.cargo/env ]; then\n source ~/.cargo/env;\nfi\n# Rebuild modules with right environment\nNODEJS_HEADERS_DIR=\"$( cd \"$PROJECT_DIR\" && cd ../node_modules/nodejs-mobile-react-native/ios/libnode/ && pwd )\"\npushd $CODESIGNING_FOLDER_PATH/nodejs-project/\nif [ \"$PLATFORM_NAME\" == \"iphoneos\" ]\nthen\n GYP_DEFINES=\"OS=ios\" CARGO_BUILD_TARGET=\"aarch64-apple-ios\" npm_config_nodedir=\"$NODEJS_HEADERS_DIR\" npm_config_node_gyp=\"$NODEJS_MOBILE_GYP_BIN_FILE\" npm_config_platform=\"ios\" npm_config_format=\"make-ios\" npm_config_node_engine=\"chakracore\" npm_config_arch=\"arm64\" npm --verbose rebuild --build-from-source\nelse\n GYP_DEFINES=\"OS=ios\" CARGO_BUILD_TARGET=\"x86_64-apple-ios\" npm_config_nodedir=\"$NODEJS_HEADERS_DIR\" npm_config_node_gyp=\"$NODEJS_MOBILE_GYP_BIN_FILE\" npm_config_platform=\"ios\" npm_config_format=\"make-ios\" npm_config_node_engine=\"chakracore\" npm_config_arch=\"x64\" npm --verbose rebuild --build-from-source\nfi\npopd\n"; + shellScript = "#!/bin/sh\nset -e\nFRAMEWORK_BINARY_PATH=\"$TARGET_BUILD_DIR/$FRAMEWORKS_FOLDER_PATH/NodeMobile.framework/NodeMobile\"\nFRAMEWORK_STRIPPED_PATH=\"$FRAMEWORK_BINARY_PATH-strip\"\nif [ \"$PLATFORM_NAME\" != \"iphonesimulator\" ]; then\n if $(lipo \"$FRAMEWORK_BINARY_PATH\" -verify_arch \"x86_64\") ; then\n lipo -output \"$FRAMEWORK_STRIPPED_PATH\" -remove \"x86_64\" \"$FRAMEWORK_BINARY_PATH\"\n rm \"$FRAMEWORK_BINARY_PATH\"\n mv \"$FRAMEWORK_STRIPPED_PATH\" \"$FRAMEWORK_BINARY_PATH\"\n echo \"Removed simulator strip from NodeMobile.framework\"\n fi\nfi\n"; }; - 63C167CDECF13548EEA5DEA2 /* [CP] Embed Pods Frameworks */ = { + 4F668DDA4EDFD6DF63FA3B0A /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-bitkit-bitkitTests/Pods-bitkit-bitkitTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Embed Pods Frameworks"; + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-bitkit-bitkitTests/Pods-bitkit-bitkitTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-bitkit-bitkitTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-bitkit-bitkitTests/Pods-bitkit-bitkitTests-frameworks.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 63FECBDC1F38E1B2A392299D /* [CP] Embed Pods Frameworks */ = { + 64383155207573885C83E29B /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-bitkit/Pods-bitkit-frameworks-${CONFIGURATION}-input-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-bitkit-bitkitTests/Pods-bitkit-bitkitTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); name = "[CP] Embed Pods Frameworks"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-bitkit/Pods-bitkit-frameworks-${CONFIGURATION}-output-files.xcfilelist", + "${PODS_ROOT}/Target Support Files/Pods-bitkit-bitkitTests/Pods-bitkit-bitkitTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-bitkit/Pods-bitkit-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-bitkit-bitkitTests/Pods-bitkit-bitkitTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 6ECDC3DF0897F9BA470E3968 /* [CP] Check Pods Manifest.lock */ = { + 7423DCEEFDC3099766E2D590 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -393,17 +393,24 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - 9A07E6ACE18013797863EF12 /* [CP-User] [NODEJS MOBILE] Sign Native Modules */ = { + 858A1B0A99257412E7E49F95 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - name = "[CP-User] [NODEJS MOBILE] Sign Native Modules"; + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-bitkit/Pods-bitkit-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-bitkit/Pods-bitkit-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "#!/bin/sh\nset -e\nif [ -z \"$NODEJS_MOBILE_BUILD_NATIVE_MODULES\" ]; then\n# If build native modules preference is not set, look for it in the project's\n#nodejs-assets/BUILD_NATIVE_MODULES.txt file.\nNODEJS_ASSETS_DIR=\"$( cd \"$PROJECT_DIR\" && cd ../nodejs-assets/ && pwd )\"\nPREFERENCE_FILE_PATH=\"$NODEJS_ASSETS_DIR/BUILD_NATIVE_MODULES.txt\"\n if [ -f \"$PREFERENCE_FILE_PATH\" ]; then\n NODEJS_MOBILE_BUILD_NATIVE_MODULES=\"$(cat $PREFERENCE_FILE_PATH | xargs)\"\n fi\nfi\nif [ -z \"$NODEJS_MOBILE_BUILD_NATIVE_MODULES\" ]; then\n# If build native modules preference is not set, try to find .gyp files\n#to turn it on.\n gypfiles=($(find \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -type f -name \"*.gyp\"))\n if [ ${#gypfiles[@]} -gt 0 ]; then\n NODEJS_MOBILE_BUILD_NATIVE_MODULES=1\n else\n NODEJS_MOBILE_BUILD_NATIVE_MODULES=0\n fi\nfi\nif [ \"1\" != \"$NODEJS_MOBILE_BUILD_NATIVE_MODULES\" ]; then exit 0; fi\n# Delete object files\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -name \"*.o\" -type f -delete\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -name \"*.a\" -type f -delete\n# Create Info.plist for each framework built and loader override.\nPATCH_SCRIPT_DIR=\"$( cd \"$PROJECT_DIR\" && cd ../node_modules/nodejs-mobile-react-native/scripts/ && pwd )\"\nNODEJS_PROJECT_DIR=\"$( cd \"$CODESIGNING_FOLDER_PATH\" && cd nodejs-project/ && pwd )\"\nnode \"$PATCH_SCRIPT_DIR\"/ios-create-plists-and-dlopen-override.js $NODEJS_PROJECT_DIR\n# Embed every resulting .framework in the application and delete them afterwards.\nembed_framework()\n{\n FRAMEWORK_NAME=\"$(basename \"$1\")\"\n cp -r \"$1\" \"$TARGET_BUILD_DIR/$FRAMEWORKS_FOLDER_PATH/\"\n /usr/bin/codesign --force --sign $EXPANDED_CODE_SIGN_IDENTITY --preserve-metadata=identifier,entitlements,flags --timestamp=none \"$TARGET_BUILD_DIR/$FRAMEWORKS_FOLDER_PATH/$FRAMEWORK_NAME\"\n}\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -name \"*.framework\" -type d | while read frmwrk_path; do embed_framework \"$frmwrk_path\"; done\n\n#Delete gyp temporary .deps dependency folders from the project structure.\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -path \"*/.deps/*\" -delete\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -name \".deps\" -type d -delete\n\n#Delete frameworks from their build paths\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -path \"*/*.framework/*\" -delete\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -name \"*.framework\" -type d -delete\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-bitkit/Pods-bitkit-frameworks.sh\"\n"; + showEnvVarsInLog = 0; }; - BCD2ABDA4B7DB91E824FA302 /* [CP] Copy Pods Resources */ = { + B1532D37C5F5312586AA8B59 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -420,7 +427,7 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-bitkit/Pods-bitkit-resources.sh\"\n"; showEnvVarsInLog = 0; }; - C6E4711BE698611D94FE5BB2 /* [CP-User] [NODEJS MOBILE] Copy Node.js Project files */ = { + D53FEE3A6B78AC158AEEDE16 /* [CP-User] [NODEJS MOBILE] Copy Node.js Project files */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -430,40 +437,33 @@ shellPath = /bin/sh; shellScript = "#!/bin/sh\nset -e\nNODEJS_ASSETS_DIR=\"$( cd \"$PROJECT_DIR\" && cd ../nodejs-assets/ && pwd )\"\nNODEJS_BUILT_IN_MODULES_DIR=\"$( cd \"$PROJECT_DIR\" && cd ../node_modules/nodejs-mobile-react-native/install/resources/nodejs-modules/ && pwd )\"\nif [ -d \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" ]\nthen\nrm -rf \"$CODESIGNING_FOLDER_PATH/nodejs-project/\"\nfi\nif [ -d \"$CODESIGNING_FOLDER_PATH/builtin_modules/\" ]\nthen\nrm -rf \"$CODESIGNING_FOLDER_PATH/builtin_modules/\"\nfi\nrsync -av --delete \"$NODEJS_ASSETS_DIR/nodejs-project\" \"$CODESIGNING_FOLDER_PATH\"\nrsync -av --delete \"$NODEJS_BUILT_IN_MODULES_DIR/builtin_modules\" \"$CODESIGNING_FOLDER_PATH\"\n"; }; - FD10A7F022414F080027D42C /* Start Packager */ = { + E62D6EB5874E6BC8745C22E1 /* [CP-User] [NODEJS MOBILE] Build Native Modules */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - name = "Start Packager"; - outputFileListPaths = ( - ); - outputPaths = ( - ); + name = "[CP-User] [NODEJS MOBILE] Build Native Modules"; runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; - showEnvVarsInLog = 0; + shellScript = "#!/bin/sh\nset -e\nif [ -z \"$NODEJS_MOBILE_BUILD_NATIVE_MODULES\" ]; then\n# If build native modules preference is not set, look for it in the project's\n#nodejs-assets/BUILD_NATIVE_MODULES.txt file.\nNODEJS_ASSETS_DIR=\"$( cd \"$PROJECT_DIR\" && cd ../nodejs-assets/ && pwd )\"\nPREFERENCE_FILE_PATH=\"$NODEJS_ASSETS_DIR/BUILD_NATIVE_MODULES.txt\"\n if [ -f \"$PREFERENCE_FILE_PATH\" ]; then\n NODEJS_MOBILE_BUILD_NATIVE_MODULES=\"$(cat $PREFERENCE_FILE_PATH | xargs)\"\n fi\nfi\nif [ -z \"$NODEJS_MOBILE_BUILD_NATIVE_MODULES\" ]; then\n# If build native modules preference is not set, try to find .gyp files\n#to turn it on.\n gypfiles=($(find \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -type f -name \"*.gyp\"))\n if [ ${#gypfiles[@]} -gt 0 ]; then\n NODEJS_MOBILE_BUILD_NATIVE_MODULES=1\n else\n NODEJS_MOBILE_BUILD_NATIVE_MODULES=0\n fi\nfi\nif [ \"1\" != \"$NODEJS_MOBILE_BUILD_NATIVE_MODULES\" ]; then exit 0; fi\n# Delete object files that may already come from within the npm package.\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -name \"*.o\" -type f -delete\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -name \"*.a\" -type f -delete\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -name \"*.node\" -type f -delete\n# Delete bundle contents that may be there from previous builds.\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -path \"*/*.node/*\" -delete\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -name \"*.node\" -type d -delete\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -path \"*/*.framework/*\" -delete\nfind \"$CODESIGNING_FOLDER_PATH/nodejs-project/\" -name \"*.framework\" -type d -delete\n# Apply patches to the modules package.json\nif [ -d \"$CODESIGNING_FOLDER_PATH\"/nodejs-project/node_modules/ ]; then\n PATCH_SCRIPT_DIR=\"$( cd \"$PROJECT_DIR\" && cd ../node_modules/nodejs-mobile-react-native/scripts/ && pwd )\"\n NODEJS_PROJECT_MODULES_DIR=\"$( cd \"$CODESIGNING_FOLDER_PATH\" && cd nodejs-project/node_modules/ && pwd )\"\n node \"$PATCH_SCRIPT_DIR\"/patch-package.js $NODEJS_PROJECT_MODULES_DIR\nfi\n# Get the nodejs-mobile-gyp location\nif [ -d \"$PROJECT_DIR/../node_modules/nodejs-mobile-gyp/\" ]; then\n NODEJS_MOBILE_GYP_DIR=\"$( cd \"$PROJECT_DIR\" && cd ../node_modules/nodejs-mobile-gyp/ && pwd )\"\nelse\n NODEJS_MOBILE_GYP_DIR=\"$( cd \"$PROJECT_DIR\" && cd ../node_modules/nodejs-mobile-react-native/node_modules/nodejs-mobile-gyp/ && pwd )\"\nfi\nNODEJS_MOBILE_GYP_BIN_FILE=\"$NODEJS_MOBILE_GYP_DIR\"/bin/node-gyp.js\n# Support building neon-bindings (Rust) native modules\nif [ -f ~/.cargo/env ]; then\n source ~/.cargo/env;\nfi\n# Rebuild modules with right environment\nNODEJS_HEADERS_DIR=\"$( cd \"$PROJECT_DIR\" && cd ../node_modules/nodejs-mobile-react-native/ios/libnode/ && pwd )\"\npushd $CODESIGNING_FOLDER_PATH/nodejs-project/\nif [ \"$PLATFORM_NAME\" == \"iphoneos\" ]\nthen\n GYP_DEFINES=\"OS=ios\" CARGO_BUILD_TARGET=\"aarch64-apple-ios\" npm_config_nodedir=\"$NODEJS_HEADERS_DIR\" npm_config_node_gyp=\"$NODEJS_MOBILE_GYP_BIN_FILE\" npm_config_platform=\"ios\" npm_config_format=\"make-ios\" npm_config_node_engine=\"chakracore\" npm_config_arch=\"arm64\" npm --verbose rebuild --build-from-source\nelse\n GYP_DEFINES=\"OS=ios\" CARGO_BUILD_TARGET=\"x86_64-apple-ios\" npm_config_nodedir=\"$NODEJS_HEADERS_DIR\" npm_config_node_gyp=\"$NODEJS_MOBILE_GYP_BIN_FILE\" npm_config_platform=\"ios\" npm_config_format=\"make-ios\" npm_config_node_engine=\"chakracore\" npm_config_arch=\"x64\" npm --verbose rebuild --build-from-source\nfi\npopd\n"; }; - FF766FF47013BADBF8E1C2AF /* [CP] Copy Pods Resources */ = { + FD10A7F022414F080027D42C /* Start Packager */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-bitkit-bitkitTests/Pods-bitkit-bitkitTests-resources-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Copy Pods Resources"; + inputPaths = ( + ); + name = "Start Packager"; outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-bitkit-bitkitTests/Pods-bitkit-bitkitTests-resources-${CONFIGURATION}-output-files.xcfilelist", + ); + outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-bitkit-bitkitTests/Pods-bitkit-bitkitTests-resources.sh\"\n"; + shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -499,7 +499,7 @@ /* Begin XCBuildConfiguration section */ 00E356F61AD99517003FC87E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 089784857C4AE52766185915 /* Pods-bitkit-bitkitTests.debug.xcconfig */; + baseConfigurationReference = 444EAABECD73CC86C582C108 /* Pods-bitkit-bitkitTests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; @@ -527,7 +527,7 @@ }; 00E356F71AD99517003FC87E /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 95A40893F5C237EFAE459252 /* Pods-bitkit-bitkitTests.release.xcconfig */; + baseConfigurationReference = 3A2A790D063C00580DACF5E0 /* Pods-bitkit-bitkitTests.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; @@ -552,7 +552,7 @@ }; 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3364F8545C1F44B46601606C /* Pods-bitkit.debug.xcconfig */; + baseConfigurationReference = D13A1262BE3ECB2581FC2EDC /* Pods-bitkit.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -583,7 +583,7 @@ }; 13B07F951A680F5B00A75B9A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E26125FCD063ABF82B29B5AE /* Pods-bitkit.release.xcconfig */; + baseConfigurationReference = F615571D2777FBACDAED24E2 /* Pods-bitkit.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; diff --git a/src/screens/Settings/ElectrumConfig/index.tsx b/src/screens/Settings/ElectrumConfig/index.tsx index e25268782..78c25d952 100644 --- a/src/screens/Settings/ElectrumConfig/index.tsx +++ b/src/screens/Settings/ElectrumConfig/index.tsx @@ -143,8 +143,10 @@ const ElectrumConfig = ({ selectedNetwork, customPeers: [connectData], }); + + addElectrumPeer({ selectedNetwork, peer: connectData }); + if (connectResponse.isOk()) { - addElectrumPeer({ selectedNetwork, peer: connectData }); updateUi({ isConnectedToElectrum: true }); showToast({ type: 'success', diff --git a/src/utils/startup/index.ts b/src/utils/startup/index.ts index 904b95a9c..2694fbd2e 100644 --- a/src/utils/startup/index.ts +++ b/src/utils/startup/index.ts @@ -118,7 +118,10 @@ export const startWalletServices = async ({ // Before we do anything we should connect to an Electrum server if (onchain || lightning) { - const electrumResponse = await connectToElectrum({ selectedNetwork }); + const electrumResponse = await connectToElectrum({ + showNotification: !restore, + selectedNetwork, + }); if (electrumResponse.isOk()) { isConnectedToElectrum = true; // Ensure the on-chain wallet & LDK syncs when a new block is detected. diff --git a/src/utils/wallet/electrum.ts b/src/utils/wallet/electrum.ts index 068cad29e..89ca69552 100644 --- a/src/utils/wallet/electrum.ts +++ b/src/utils/wallet/electrum.ts @@ -224,24 +224,23 @@ export interface ISubscribeToAddress { } /** - * Subscribes to the next available addressScriptHash. + * Subscribes to a number of address script hashes for receiving. + * @param {string[]} scriptHashes * @param {TAvailableNetworks} [selectedNetwork] * @param {TWalletName} [selectedWallet] - * @param scriptHashes - * @param onReceive * @return {Promise>} */ export const subscribeToAddresses = async ({ - selectedNetwork, - selectedWallet, scriptHashes = [], onReceive, + selectedNetwork, + selectedWallet, }: { - selectedNetwork?: TAvailableNetworks; - selectedWallet?: TWalletName; scriptHashes?: string[]; onReceive?: () => void; -}): Promise> => { + selectedNetwork?: TAvailableNetworks; + selectedWallet?: TWalletName; +} = {}): Promise> => { if (!selectedNetwork) { selectedNetwork = getSelectedNetwork(); } @@ -257,48 +256,51 @@ export const subscribeToAddresses = async ({ // Gather the receiving address scripthash for each address type if no scripthashes were provided. if (!scriptHashes.length) { for (const addressType of addressTypeKeys) { + const addresses = currentWallet.addresses[selectedNetwork][addressType]; + const addressCount = Object.keys(addresses).length; + // Check if addresses of this type have been generated. If not, skip. - const addressCount = Object.keys( - currentWallet.addresses[selectedNetwork][addressType], - )?.length; if (addressCount > 0) { - const addresses = currentWallet.addresses[selectedNetwork][addressType]; let addressIndex = currentWallet.addressIndex[selectedNetwork][addressType]?.index; addressIndex = addressIndex > 0 ? addressIndex : 0; - const addressesToSubscribeTo = Object.values(addresses).filter( - (a) => Math.abs(a.index - addressIndex) <= GAP_LIMIT, + + // Only subscribe up to the gap limit. + const addressesInRange = Object.values(addresses).filter( + (address) => Math.abs(address.index - addressIndex) <= GAP_LIMIT, ); - let i = 0; - for (const { scriptHash } of addressesToSubscribeTo) { - // Only subscribe up to the gap limit. - if (i > GAP_LIMIT) { - break; - } - scriptHashes.push(scriptHash); - i++; - } + const addressesToSubscribe = addressesInRange.slice(-GAP_LIMIT); + const addressScriptHashes = addressesToSubscribe.map( + ({ scriptHash }) => scriptHash, + ); + + scriptHashes.push(...addressScriptHashes); } } } - // Subscribe to all provided scriphashes. - await Promise.all( - scriptHashes.map(async (addressScriptHash) => { - const subscribeAddressResponse: ISubscribeToAddress = - await electrum.subscribeAddress({ - scriptHash: addressScriptHash, - network: selectedNetwork, - onReceive: (): void => { - refreshWallet(); - onReceive?.(); - }, - }); - if (subscribeAddressResponse.error) { - return err('Unable to subscribe to receiving addresses.'); - } - }), - ); + // Subscribe to all provided script hashes. + const promises = scriptHashes.map(async (scriptHash) => { + const response: ISubscribeToAddress = await electrum.subscribeAddress({ + scriptHash, + network: selectedNetwork, + onReceive: (): void => { + refreshWallet(); + onReceive?.(); + }, + }); + if (response.error) { + throw Error('Unable to subscribe to receiving addresses.'); + } + }); + + try { + await Promise.all(promises); + } catch (e) { + console.log(e); + return err(e); + } + return ok('Successfully subscribed to addresses.'); }; @@ -330,7 +332,7 @@ export const subscribeToHeader = async ({ } const subscribeResponse: ISubscribeToHeader = await electrum.subscribeHeader({ network: selectedNetwork, - onReceive: async (data) => { + onReceive: (data) => { const hex = data[0].hex; const hash = getBlockHashFromHex({ blockHex: hex, selectedNetwork }); updateHeader({ @@ -722,30 +724,24 @@ const tempElectrumServers: IWalletItem = /** * Connects to the provided electrum peer. Otherwise, it will attempt to connect to a set of default peers. * @param {TAvailableNetworks} [selectedNetwork] - * @param {number} [retryAttempts] * @param {ICustomElectrumPeer[]} [customPeers] * @param {{ net: undefined, tls: undefined }} [options] * @return {Promise>} */ export const connectToElectrum = async ({ - selectedNetwork, - retryAttempts = 2, customPeers, - options = { net: undefined, tls: undefined }, + showNotification = true, + selectedNetwork, }: { - selectedNetwork?: TAvailableNetworks; - retryAttempts?: number; customPeers?: TCustomElectrumPeerOptionalProtocol[]; - options?: { net?: any; tls?: any }; + showNotification?: boolean; + selectedNetwork?: TAvailableNetworks; } = {}): Promise> => { if (!selectedNetwork) { selectedNetwork = getSelectedNetwork(); } - const net = options.net ?? global?.net; - // const _tls = options.tls ?? tls; - const _tls = options.tls ?? global?.tls; - //Attempt to disconnect from any old/lingering connections + // Attempt to disconnect from any old/lingering connections await electrum.stop({ network: selectedNetwork }); // Fetch any stored custom peers. @@ -756,34 +752,22 @@ export const connectToElectrum = async ({ customPeers = tempElectrumServers[selectedNetwork]; } - let startResponse = { error: true, data: '' }; - for (let i = 0; i < retryAttempts; i++) { - startResponse = await electrum.start({ - network: selectedNetwork, - customPeers, - net, - tls: _tls, - }); - if (!startResponse.error) { - break; - } - } + const { error, data } = await electrum.start({ + network: selectedNetwork, + customPeers, + net: global.net, + tls: global.tls, + }); - if (startResponse.error) { - //Attempt one more time - const { error, data } = await electrum.start({ - network: selectedNetwork, - customPeers, - net, - tls: _tls, - }); - if (error) { - const msg = data || 'An unknown error occurred.'; - return err(msg); - } - return ok(data); + if (error) { + const msg = data || 'An unknown error occurred.'; + return err(msg); } - return ok(startResponse.data); + + // Check for any new transactions that we might have missed while disconnected. + refreshWallet({ showNotification }).then(); + + return ok(data); }; /** diff --git a/src/utils/wallet/index.ts b/src/utils/wallet/index.ts index 37ff05b7a..87c3e1e08 100644 --- a/src/utils/wallet/index.ts +++ b/src/utils/wallet/index.ts @@ -117,7 +117,7 @@ export const refreshWallet = async ({ await new Promise((resolve) => { InteractionManager.runAfterInteractions(() => resolve(null)); }); - const isConnectedToElectrum = getUiStore().isConnectedToElectrum; + const { isConnectedToElectrum } = getUiStore(); if (!selectedWallet) { selectedWallet = getSelectedWallet(); } From eaca459bc9168142bce35ee7c4a590aecd628ad7 Mon Sep 17 00:00:00 2001 From: Ivan Vershigora Date: Tue, 1 Aug 2023 12:41:30 +0100 Subject: [PATCH 13/14] feat: sync locales with Transifex --- src/utils/i18n/locales/cs/lightning.json | 21 +++++- src/utils/i18n/locales/cs/onboarding.json | 18 ++++- src/utils/i18n/locales/cs/other.json | 78 +++++++++++++++++++- src/utils/i18n/locales/cs/security.json | 7 +- src/utils/i18n/locales/cs/settings.json | 20 +++-- src/utils/i18n/locales/cs/slashtags.json | 69 ++++++++++++++++- src/utils/i18n/locales/cs/wallet.json | 13 ++-- src/utils/i18n/locales/de/lightning.json | 2 +- src/utils/i18n/locales/de/onboarding.json | 21 +++++- src/utils/i18n/locales/de/other.json | 4 +- src/utils/i18n/locales/de/security.json | 1 - src/utils/i18n/locales/de/settings.json | 7 +- src/utils/i18n/locales/de/wallet.json | 8 +- src/utils/i18n/locales/el/common.json | 28 ++++++- src/utils/i18n/locales/el/fee.json | 36 ++++++++- src/utils/i18n/locales/el/lightning.json | 3 +- src/utils/i18n/locales/el/onboarding.json | 4 +- src/utils/i18n/locales/el/settings.json | 13 ++++ src/utils/i18n/locales/es/lightning.json | 2 +- src/utils/i18n/locales/es/onboarding.json | 1 - src/utils/i18n/locales/es/security.json | 1 - src/utils/i18n/locales/es/settings.json | 9 +-- src/utils/i18n/locales/es/wallet.json | 3 +- src/utils/i18n/locales/it/lightning.json | 2 +- src/utils/i18n/locales/it/onboarding.json | 1 - src/utils/i18n/locales/it/security.json | 1 - src/utils/i18n/locales/it/settings.json | 9 +-- src/utils/i18n/locales/it/wallet.json | 3 +- src/utils/i18n/locales/nl/lightning.json | 2 +- src/utils/i18n/locales/nl/onboarding.json | 1 - src/utils/i18n/locales/nl/security.json | 1 - src/utils/i18n/locales/nl/settings.json | 9 +-- src/utils/i18n/locales/nl/wallet.json | 3 +- src/utils/i18n/locales/pl/wallet.json | 3 +- src/utils/i18n/locales/pt_BR/lightning.json | 2 +- src/utils/i18n/locales/pt_BR/onboarding.json | 1 - src/utils/i18n/locales/pt_BR/settings.json | 9 +-- src/utils/i18n/locales/pt_BR/wallet.json | 3 +- src/utils/i18n/locales/ru/onboarding.json | 1 - src/utils/i18n/locales/ru/security.json | 1 - src/utils/i18n/locales/ru/settings.json | 8 +- src/utils/i18n/locales/ru/wallet.json | 3 +- 42 files changed, 342 insertions(+), 90 deletions(-) diff --git a/src/utils/i18n/locales/cs/lightning.json b/src/utils/i18n/locales/cs/lightning.json index f6af92f16..c4de188e2 100644 --- a/src/utils/i18n/locales/cs/lightning.json +++ b/src/utils/i18n/locales/cs/lightning.json @@ -30,7 +30,7 @@ "enter_custom_amount": "Zadejte vlastní částku", "custom_confirm_header": "Prosím\npotvrďte.", "custom_confirm_cost": "Spojení s vámi a nastavení zůstatku útrat stojí {amount}. Vaše připojení Lightning zůstane otevřené po dobu alespoň {weeks} týdnů (týdne).", - "duration_header": "Trvání připojení.", + "duration_header": "Délka připojení.", "duration_text": "Vyberte minimální počet týdnů, po které má vaše připojení zůstat otevřené.", "setting_up_header": "Nastavování", "setting_up_text": "Počkejte prosím a ponechte Bitkit otevřený, dokud se vaše Lightning připojení nastavuje. Tento proces trvá asi minutu.", @@ -61,7 +61,7 @@ "availability_title": "Dostupnost prostředků", "availability_header": "Dostupnost vašich prostředků.", "availability_text": "Převod prostředků do úspor obvykle trvá\n±1 hodinu, ale vyřízení může za určitých podmínek sítě trvat až 14 dní.", - "node_info": "Informace o Lightning uzlu", + "node_info": "Lightning uzel", "node_id_copied": "ID uzlu LDK bylo úspěšně zkopírováno do schránky.", "node_id": "ID uzlu LDK", "node_disconnected": "Odpojeno", @@ -98,6 +98,7 @@ "other": "Další", "opened_on": "Otevřeno", "closed_on": "Uzavřeno", + "channel_node_id": "ID uzlu", "copied_couterparty": "ID uzlu protistrany bylo zkopírováno do schránky", "debug": "Debug", "is_usable": "Je použitelný?", @@ -107,7 +108,7 @@ "close_error": "Chyba zavření kanálu", "close_success_title": "Úspěšné uzavření kanálu", "close_success_msg": "Úspěšně uzavřeno {name}", - "close_text": "Uzavření tohoto Lightning spojení a převedení celého disponibilního zůstatku zpět do úspor stojí malé náklady. Přesný poplatek závisí na podmínkách sítě.\n\nPřevod prostředků na spoření obvykle trvá ±1 hodinu, ale vypořádání může za určitých podmínek sítě trvat až 14 dní.", + "close_text": "Uzavření tohoto Lightning spojení a převedení celého disponibilního zůstatku zpět do úspor stojí určitou menší částku. Přesný poplatek závisí na podmínkách sítě.\n\nPřevod prostředků na spoření obvykle trvá ±1 hodinu, ale vypořádání může za určitých podmínek sítě trvat až 14 dní.", "close_button": "Zavřít", "force_title": "Vynutit převod", "force_text": "Nelze zahájit přenos. Chcete tento převod vynutit? Tyto prostředky nebudete moci použít po dobu ±14 dní (!)", @@ -121,5 +122,17 @@ "order_given_up_title": "Nastavení okamžitých plateb se nezdařilo", "order_given_up_msg": "Platnost objednávky vypršela. Prosím zkuste to znovu.", "order_expired_title": "Nastavení okamžitých plateb se nezdařilo", - "order_expired_msg": "Platnost objednávky vypršela. Prosím zkuste to znovu." + "order_expired_msg": "Platnost objednávky vypršela. Prosím zkuste to znovu.", + "order_state": { + "awaiting_payment": "Čekání na platbu", + "paid": "Platba proběhla úspěšně", + "refunded": "Platba vrácena", + "queued": "Ve frontě na otevření", + "opening": "Zahajování spojení", + "closing": "Uzavírání spojení", + "given_up": "Ukončeno", + "expired": "Platnost objednávky vypršela", + "closed": "Spojení uzavřeno", + "open": "Spojení otevřeno" + } } diff --git a/src/utils/i18n/locales/cs/onboarding.json b/src/utils/i18n/locales/cs/onboarding.json index 7e0aa36c2..e2f53f300 100644 --- a/src/utils/i18n/locales/cs/onboarding.json +++ b/src/utils/i18n/locales/cs/onboarding.json @@ -1,5 +1,5 @@ { - "tos_header": "Bitkit\nPodmínky\npoužití.", + "tos_header": "Bitkit\nPodmínky\npoužití.", "tos_checkbox": "Podmínky použití", "tos_checkbox_value": "Prohlašuji, že jsem si přečetl a souhlasím s podmínkami použití.", "pp_checkbox": "Zásady ochrany osobních údajů", @@ -31,5 +31,19 @@ "restore_red_explain": "Pokud je slovo zobrazeno červeně, znamená to, že nebylo nalezeno ve slovníku frází pro obnovení. Zkontrolujte pravopisné chyby.", "restore_inv_checksum": "Kontrolní součet pro frázi pro obnovení se zdá být nesprávný. Zkontrolujte prosím svou frázi pro obnovení.", "restore_suggestions": "NÁVRHY", - "restore_passphrase_placeholder": "Passphrase* - přístupová fráze" + "restore_passphrase_placeholder": "Passphrase* - přístupová fráze", + "restore_passphrase_meaning": "*Volitelné, zadejte pouze v případě, že jste jej nastavili.", + "restore_error_title": "Při obnovování peněženky došlo k chybě", + "loading_header": "Nastavování\nvaší peněženky.", + "restore_error_no_backup": "Chyba: Bez zálohy nelze pokračovat", + "restore_success_header": "Peněženka obnovena.", + "restore_success_text": "Úspěšně jste obnovili svou peněženku ze zálohy. Užijte si Bitkit!", + "restore_failed_header": "Obnovení se nezdařilo.", + "restore_failed_text": "Obnovení zálohovaných dat se nezdařilo.", + "restore_no_backup_button": "Pokračovat bez zálohy", + "restore_no_backup_warn": "Pokud jste dříve měli lightning zálohu, bude přepsána a ztracena. To by mohlo vést ke ztrátě finančních prostředků.", + "empty_wallet": "Chcete-li začít, pošlete\nBitcoin do vaší peněženky.", + "error_create": "Vytvoření peněženky se nezdařilo", + "multiple_header": "Pozor:\nVíce zařízení", + "multiple_text": "Neinstalujte frázi pro obnovení Bitkit do více telefonů současně, protože by to mohlo poškodit vaše data." } diff --git a/src/utils/i18n/locales/cs/other.json b/src/utils/i18n/locales/cs/other.json index 0967ef424..4bcd6f7b6 100644 --- a/src/utils/i18n/locales/cs/other.json +++ b/src/utils/i18n/locales/cs/other.json @@ -1 +1,77 @@ -{} +{ + "beta": "BETA", + "beta_software": "Bitkit je beta software.", + "beta_warn": "Neukládejte všechny své peníze v peněžence Bitkit.", + "qr_scan": "Naskenovat QR kód", + "qr_scan_any": "Naskenovat libovolný QR kód", + "qr_error_header": "Nebyla zjištěna žádná data", + "qr_error_text": "Promiňte. Bitkit není schopen přečíst tento QR kód.", + "qr_error_no_data_header": "Nejsou poskytnuta žádná data", + "qr_error_no_data_text": "Nelze číst nebo interpretovat poskytnutá data.", + "qr_error_network_header": "Nesprávná síť", + "qr_error_network_text": "Bitkit je aktuálně nastaven na {selectedNetwork}, ale data jsou pro {dataNetwork}.", + "qr_paste": "Vložit QR kód", + "buy_header": "Bitcoin\npro Bitkit", + "buy_text": "Ještě nemáte Bitcoiny k odeslání do peněženky Bitkit? Naspořte několik satů.", + "buy_button": "Koupit Bitcoin", + "connection_lost_title": "Bitkit spojení ztraceno", + "connection_lost_message": "Zkontrolujte prosím nastavení serveru Electrum.", + "connection_restored_title": "Bitkit spojení obnoveno", + "connection_restored_message": "Úspěšně znovu připojeno k serveru Electrum.", + "connection_issue": "Problémy s připojením", + "connection_issue_explain": "Zdá se, že jste odpojeni", + "connection_reconnect_title": "Bitkit se znovu připojuje", + "connection_reconnect_msg": "Ztratilo se připojení k serveru, pokouším se znovu připojit...", + "connection_back_title": "Jste zpět online!", + "connection_back_msg": "Úspěšně znovu připojeno k internetu.", + "up_title": "Kritická aktualizace", + "up_text": "Pro Bitkit je k dispozici kritická aktualizace. Chcete-li nadále používat Bitkit, musíte provést aktualizaci.", + "up_button": "Aktualizovat Bitkit", + "camera_ask_title": "Povolení používat kameru", + "camera_ask_msg": "Bitkit potřebuje povolení k použití vaší kamery", + "camera_no_title": "Povolení", + "camera_no_text": "Zdá se, že Bitkit nemá oprávnění pro přístup k vaší kameře.\n\nChcete-li tuto funkci využívat v budoucnu, budete muset povolit oprávnění fotoaparátu pro tuto aplikaci v nastavení vašeho telefonu.", + "clipboard_redirect_title": "Zjištěna data ve schránce", + "clipboard_redirect_msg": "Chcete být přesměrováni na příslušnou obrazovku?", + "swipe": "Přejetím potvrďte", + "scan_err_decoding": "Chyba dekódování", + "scan_err_interpret_title": "Nelze interpretovat poskytnutá data", + "scan_err_interpret_msg": "Bitkit není schopen interpretovat poskytnutá data.", + "scan_err_not_payable_msg": "Poskytnuté údaje nejsou splatné - použitelné pro platbu.", + "rate_error_title": "Chyba rozhraní Blocktank FX API", + "rate_error_msg_date": "Nelze získat směnný kurz. Použití ceny od{date}", + "rate_error_msg_nodate": "Nelze získat směnný kurz. Prosím zkuste to znovu později.", + "lnurl_ln_error_title": "Chyba platby LNURL", + "lnurl_ln_error_msg": "V tuto chvíli nelze spustit místní lightning uzel. Zkuste to znovu nebo restartujte aplikaci.", + "lnurl_pay_error": "LNURL-platba se nezdařila", + "lnurl_pay_error_no_capacity": "Nedostatek odchozí/odesílací kapacity k dokončení požadavku platby lnurl.", + "lnurl_channel_error": "Chyba požadavku na kanál LNURL", + "lnurl_blocktank_error": "Nelze se připojit k serveru Blocktank.", + "lnurl_channel_success_title": "Úspěch!", + "lnurl_channel_success_msg_peer": "Úspěšně vyžádaný kanál od: {peer}", + "lnurl_channel_success_msg_no_peer": "Kanál byl úspěšně vyžádán.", + "lnurl_auth_error": "LNURL-Auth se nezdařilo", + "lnurl_auth_success_title": "Ověřeno!", + "lnurl_auth_success_msg_domain": "Úspěšně přihlášeno do: {domain}", + "lnurl_auth_success_msg_no_domain": "Úspěšné přihlášení.", + "lnurl_withdr_error": "LNURL-chyba výběru", + "lnurl_withdr_error_no_capacity": "Nedostatek příchozí/přijímací kapacity k dokončení požadavku na výběr lnurl.", + "lnurl_withdr_error_create_invoice": "Nelze úspěšně vytvořit fakturu pro lnurl-výběr.", + "lnurl_withdr_error_connect": "Nelze se připojit k serveru LNURL pro výběr.", + "lnurl_withdr_success_title": "Výběr vyžádán", + "lnurl_withdr_success_msg": "LNURL výběr byl úspěšně vyžádán.", + "bt_error_retrieve": "Nelze získat informace o objednávce", + "bt_channel_purchase_fee_error": "Nedostatek prostředků na pokrytí transakčního poplatku.", + "bt_channel_purchase_cost_error": "K dokončení této transakce potřebujete o {delta} více.", + "earlier": "DŘÍVE", + "update_title": "Aktualizace k dispozici", + "update_text": "Aktualizujte prosím Bitkit na nejnovější verzi pro nové funkce a opravy chyb!", + "update_button": "Aktualizace", + "high_title": "Vysoký zůstatek", + "high_text1": "Zůstatek v peněžence překročen", + "high_text2": "Z bezpečnostních důvodů doporučujeme přesunout část svých úspor do offline cold wallet nebo multisig řešení.", + "high_text2_beta": "Zvažte přesunutí části svých prostředků. Doporučujeme používat pouze malá množství, dokud je Bitkit v beta verzi.", + "high_button_more": "Další informace", + "caution_header": "Pozor:\nBeta riziko.", + "caution_text": "Beta software může ohrozit vaše peníze. Doporučujeme používat pouze malé částky (například 10 $), zatímco je Bitkit stále ve verzi beta." +} diff --git a/src/utils/i18n/locales/cs/security.json b/src/utils/i18n/locales/cs/security.json index fc2d75829..4ad5e172c 100644 --- a/src/utils/i18n/locales/cs/security.json +++ b/src/utils/i18n/locales/cs/security.json @@ -72,7 +72,12 @@ "reset_dialog_title": "Resetovat Bitkit?", "reset_dialog_desc": "Opravdu chcete resetovat svou peněženku Bitkit? Máte zálohu své fráze pro obnovení a dat peněženky?", "recovery": "Obnova", - "recovery_text": "Do režimu obnovy Bitkitu jste vstoupili klepnutím během spouštění. Zde je několik akcí, které je třeba provést, když narazíte na problémy, které brání plnému fungování aplikace. Restartujte aplikaci pro normální spuštění.", + "recovery_text": "Vstoupili jste do režimu obnovy Bitkitu. Zde je několik akcí, které je třeba provést když narazíte na problémy, které brání plnému fungování aplikace. Restartujte aplikaci pro normální spuštění.", + "lightning_recovery_title": "Lightning obnova", + "lightning_recovery_desc": "Varování: Toto vynutí uzavření všech vašich kanálů a obnovení veškerých prostředků do vaší on-chain peněženky. Tuto možnost použijte pouze v případě, že nemáte přístup ke své lightning peněžence kvůli chybě obnovení.", + "lightning_recovery_success": "Lightning obnova úspěšná", + "lightning_recovery_success_message": "Čekající zůstatek {sats} satů byl obnoven. Znovu otevřete aplikaci, abyste viděli svůj obnovený zůstatek.", + "lightning_recovery_error": "Chyba obnovy Lightning", "display_seed": "Zobrazit seed frázi", "contact_support": "Kontaktovat podporu", "wipe_app": "Vymazat aplikaci", diff --git a/src/utils/i18n/locales/cs/settings.json b/src/utils/i18n/locales/cs/settings.json index 8302734e1..f72b62cf6 100644 --- a/src/utils/i18n/locales/cs/settings.json +++ b/src/utils/i18n/locales/cs/settings.json @@ -5,10 +5,10 @@ "dev_disabled_title": "Dev nastavení zakázáno", "dev_disabled_message": "Dev nastavení zakázáno prostřednictvím aplikace", "general_title": "Obecné", - "security_title": "Bezpečnost a soukromí", + "security_title": "Zabezpečení a soukromí", "backup_title": "Zálohovat nebo obnovit", "advanced_title": "Pokročilý", - "about_title": "O Bitkit", + "about_title": "O nás", "about": { "text": "Bitkit vám předává klíče k vašim penězům, profilu, kontaktům a webovým účtům.\n\nTato Oranžová Pilulka byla pečlivě vytvořena společností Synonym Software Ltd.", "support": "Podpora", @@ -22,16 +22,18 @@ }, "dev_title": "Dev nastavení", "general": { + "section_title": "Kategorie", "currency_local": "Lokální měna", "currency_local_title": "Lokální měna", "currency_footer": "Ceny zprostředkované společnostmi Bitfinex & CoinGecko.", - "currency_most_used": "Nejvíce používané", + "currency_most_used": "Nejčastěji používané", "currency_other": "Ostatní měny", - "unit": "Bitcoin jednotka", - "unit_title": "Bitcoin jednotka", - "unit_display": "Zobrazit jednotku Bitcoin jako", + "unit": "Výchozí jednotka", + "unit_title": "Výchozí jednotka", + "unit_display": "Zobrazit částky v", "unit_bitcoin": "Bitcoin", "unit_satoshis": "Satoshi", + "unit_fiat": "Lokální měna", "speed": "Rychlost transakce", "speed_title": "Rychlost transakce", "speed_default": "Výchozí rychlost transakce", @@ -50,7 +52,8 @@ "reset_confirm": "Ano, resetovat" }, "security": { - "clipboard": "Pro snadné použití si přečtěte schránku", + "clipboard": "Číst schránku pro snadné použití", + "warn_100": "Upozornit při odesílání více než $100", "pin": "PIN kód", "pin_change": "Změna PIN kódu", "pin_launch": "Při spuštění vyžadovat PIN", @@ -68,7 +71,7 @@ "reset": "Resetovat a obnovit peněženku", "failed_title": "Zálohování dat selhalo", "failed_message": "Bitkitu se nepodařilo zálohovat svá data. Zkontrolujte připojení.", - "latest": "nejnovější záloha dat", + "latest": "nejnovější zálohy dat", "status_failed": "Zálohování se nezdařilo: {time}", "status_success": "Poslední záloha: {time}", "status_empty": "Zálohování není potřeba", @@ -84,6 +87,7 @@ "adv": { "section_payments": "Platby", "section_networks": "Sítě", + "section_other": "Další", "address_type": "Typ Bitcoin adresy", "coin_selection": "Výběr mince", "cs_method": "Metoda výběru mince", diff --git a/src/utils/i18n/locales/cs/slashtags.json b/src/utils/i18n/locales/cs/slashtags.json index 55bb491fd..3f7797d2c 100644 --- a/src/utils/i18n/locales/cs/slashtags.json +++ b/src/utils/i18n/locales/cs/slashtags.json @@ -1,10 +1,77 @@ { + "your_name": "Vaše jméno", + "your_name_capital": "Vaše jméno", + "contact_name": "Kontaktní jméno", "contact": "Kontakt", "contacts": "Kontakty", + "contact_add": "Přidat kontakt", + "contact_add_capital": "Přidat kontakt", + "contact_add_explain": "Přidejte nový kontakt naskenováním jeho QR kódu nebo vložením jeho klíče níže.", + "contact_key_paste": "Vložte klíč", + "contact_error_yourself": "Nemůžete přidat sebe jako kontakt.", + "contact_error_key": "Toto není platný klíč.", + "contact_edit_capital": "Upravit kontakt", + "contacts_name": "Jméno kontaktu", + "contact_your_name": "Vaše veřejné\nprofilové jméno", + "contact_retrieving": "Načítání\nkontaktní informace...", + "contact_no_links": "Zatím nebyly přidány žádné odkazy...", "contact_pay_error": "Tomuto kontaktu nelze zaplatit", + "contact_share": "Sdílet profilový klíč", + "contact_this": "tento kontakt", + "contact_copied": "Klíč profilu zkopírován do schránky", + "contact_delete_title": "Smazat {name}?", + "contact_delete_text": "Opravdu chcete smazat {name} ze svých kontaktů?", + "contact_delete_yes": "Ano, smazat", + "contact_select": "Vybrat kontakt", + "contact_assign": "Přiřadit kontakt", + "contacts_no_found": "Nebyly nalezeny žádné kontakty", + "disabled": "Slashtagy zakázány", + "signin_to": "Přihlásit se do {serviceName} svým profilem?", + "signin_to_loading": "Přihlašování do {serviceName}...", + "signin_to_error_header": "Chyba při přihlašování", + "signin_to_error_text": "Nelze se připojit k peer - druhé straně", + "signin_to_success_header": "Jste přihlášeni!", + "signin_to_success_text_name": "Úspěšně přihlášeno do {name}", + "signin_to_success_text_noname": "Úspěšné přihlášení.", + "signin_title": "Přihlásit se", + "signin_title_loading": "Přihlašování...", + "onboarding_header": "Dynamické\nkontakty.", + "onboarding_text": "Použijte Bitkit k získávání automatických aktualizací od vašich kontaktů, placení jim a sledování jejich veřejných profilů.", + "onboarding_button": "Přidejte svůj první kontakt", + "onboarding_profile1_header": "Vlastněte svůj\nsociální profil.", + "onboarding_profile1_text": "Pomocí Bitkitu můžete ovládat svůj veřejný profil a odkazy, aby vás vaše kontakty mohly kdykoli kontaktovat nebo vám zaplatit.", + "onboarding_profile2_header": "Zaplaťte svým\nkontaktům.", + "onboarding_profile2_text": "Vy a vaše kontakty můžete pomocí Bitkitu posílat platby přímo, bez bank, kdykoli a kdekoli.", + "onboarding_widgets1_header": "Ahoj,\nhesla.", + "onboarding_widgets1_text": "Zažijte web bez hesel. Použijte Bitkit pro přihlášení ke svým oblíbeným webovým službám.", + "onboarding_widgets2_header": "Ahoj,\nwidgety.", + "onboarding_widgets2_text": "Užijte si decentralizované feedy z vašich oblíbených webových služeb přidáním zábavných a užitečných widgetů do vaší peněženky.", + "my_profile": "Můj profil", "profile": "Profil", + "profile_save": "Uložit profil", + "profile_pay_contacts": "Zaplaťte svým kontaktům", + "profile_create": "Vytvořit profil", + "profile_public_warn": "Vezměte prosím na vědomí, že všechny informace o vašem profilu budou veřejně dostupné a viditelné.", + "profile_bio": "Krátký životopis. Řekni něco o sobě.", + "profile_add_link": "Vložit odkaz", + "profile_link_label": "Štítek", + "profile_link_label_placeholder": "Například „webová stránka“", + "profile_link_value": "Odkaz nebo text", + "profile_link_public": "Poznámka: Jakýkoli odkaz, který přidáte, bude veřejně viditelný.", "profile_link_suggestions": "Návrhy", + "profile_link_suggestions_to_add": "Návrhy k přidání", + "profile_scan_to_add": "Naskenujte k přidání {name}", + "profile_edit": "Upravit profil", "offline_enable": "Povolit platby s kontakty*", "offline_enable_explain": "* Toto vyžaduje sdílení dat o platbě", - "widgets": "Widgety" + "widgets": "Widgety", + "widget_add": "Přidat widget", + "widget_price": "Bitcoin cena", + "widget_headlines": "Bitcoinové titulky", + "widget_blocks": "Bitcoinové bloky", + "widget_facts": "Bitcoinová fakta", + "widget_qr": "nebo naskenujte QR", + "widget_delete_yes": "Ano, smazat", + "auth_signin": "Přihlásit se", + "auth_error_peer": "Nelze se připojit k peer - druhé straně" } diff --git a/src/utils/i18n/locales/cs/wallet.json b/src/utils/i18n/locales/cs/wallet.json index de7594569..043ab8ac0 100644 --- a/src/utils/i18n/locales/cs/wallet.json +++ b/src/utils/i18n/locales/cs/wallet.json @@ -1,10 +1,10 @@ { - "send": "Posláno", - "receive": "Přijmuto", + "send": "Odeslat", + "receive": "Přijmout", "balance_total": "Celkový zůstatek", "balance_total_pending": "Celkový zůstatek (nedokončený)", "assets": "Aktiva", - "send_bitcoin": "Poslat Bitcoin", + "send_bitcoin": "Odeslat Bitcoin", "send_to": "Komu", "send_invoice": "Faktura", "send_address_placeholder": "Naskenujte QR kód, vložte fakturu nebo vyberte kontakt", @@ -19,7 +19,7 @@ "send_confirming_in": "Potvrzení během", "send_invoice_expiration": "Expirace faktury", "send_swipe": "Zaplatit přejetím prstem", - "send_yes": "Ano, poslat", + "send_yes": "Ano, odeslat", "send_dialog1": "Zdá se, že posíláte více než $100. Přejete si pokračovat?", "send_dialog2": "Zdá se, že posíláte více než 50 % svého celkového zůstatku. Přejete si pokračovat?", "send_dialog3": "Zdá se, že transakční poplatek přesahuje 50 % částky, kterou odesíláte. Přejete si pokračovat?", @@ -36,6 +36,7 @@ "error_no_tx_msg": "Zkontrolujte prosím údaje o transakci a zkuste to znovu.", "error_min_fee_title": "Minimální poplatek za přenos nebyl splněn", "error_min_fee_msg": "Zvyšte prosím poplatek a zkuste to znovu.", + "send_amount_error_fee": "Nelze si dovolit poplatek.", "send_details": "Podrobnosti", "send_fee_and_speed": "Rychlost a poplatek", "send_fee_speed": "Rychlost", @@ -123,5 +124,7 @@ "details_spending_subtitle": "Okamžité BTC", "tx_invalid": "Neplatná transakce", "boost": "Posílit", - "payment_confirming": "Potvrzování" + "payment_confirming": "Potvrzování", + "filter_apply": "Aplikovat", + "lnurl_p_title": "Poslat Bitcoin" } diff --git a/src/utils/i18n/locales/de/lightning.json b/src/utils/i18n/locales/de/lightning.json index 7c86cd27c..51f7a8f63 100644 --- a/src/utils/i18n/locales/de/lightning.json +++ b/src/utils/i18n/locales/de/lightning.json @@ -1,4 +1,5 @@ { + "int_blocked": "Öffne eine Lightning-Verbindung und sende oder erhalte bitcoin sofort.\n\nLeider kann Bitkit aktuell (noch) keine automatische Lightning-Verbindung zu Personen wohnhaft in den USA zur Verfügung stellen.", "int_text": "Öffne eine Lightning-Verbindung und sende oder erhalte bitcoin sofort.", "int_header": "Sofortige\nZahlungen.", "int_quick": "Schnelles Einrichten", @@ -60,7 +61,6 @@ "availability_title": "Guthaben Verfügbarkeit", "availability_header": "Verfügbarkeit deines Guthabens", "availability_text": "Übertragung des Guthabens zum Sparkonto dauert in der Regel \n±1 Stunde, aber das Settlement kann 14 Tage unter gewissen Netzwerkbedingungen dauern.", - "node_info": "Lightning-Node Info", "node_id_copied": "LDK Node ID erfolgreich in die Zwischenablage kopiert.", "node_id": "LDK Node ID", "node_disconnected": "getrennt", diff --git a/src/utils/i18n/locales/de/onboarding.json b/src/utils/i18n/locales/de/onboarding.json index 2e3dd3efc..8b7feb49f 100644 --- a/src/utils/i18n/locales/de/onboarding.json +++ b/src/utils/i18n/locales/de/onboarding.json @@ -1,5 +1,4 @@ { - "tos_header": "Bitkit\nNutzungs-\nbedingungen.", "tos_checkbox": "Nutzungsbedingungen", "pp_checkbox": "Datenschutz-Bestimmungen", "toolkit": "Dein Bitcoin\nToolkit.", @@ -23,5 +22,23 @@ "passphrase_header": "Absichern mit Passwort", "passphrase_text": "Du kannst deiner 12-Wörter-langen Wiederherstellungsphrase ein geheimes Passwort hinzufügen. Wenn du das tust, stelle sicher, dass du es nicht vergisst.", "passphrase": "Passwort", - "create_new_wallet": "Erstelle neues Wallet" + "create_new_wallet": "Erstelle neues Wallet", + "restore_header": "Stelle\ndein Waller wieder her", + "restore_phrase": "Bitte gebe deine Wiederherstellungsphrase von jeglichem (Papier) Back-Up ein.", + "restore_red_explain": "Wenn eines der Wörter in rot, angezeigt wird, bedeutet das, dass es nicht im Wiederherstellungsphrasen-Wörterbuch zu finden ist. Überprüfe es auf Rechtschreibfehler.", + "restore_inv_checksum": "Die Checksumme der Wiederherstellungsphrase erscheint inkorrekt. Bitte überprüfe deine Wiederherstellungsphrase erneut.", + "restore_suggestions": "VORSCHLÄGE", + "restore_passphrase_placeholder": "Passphrase*", + "restore_passphrase_meaning": "*Optional, nur eingeben, falls wenn du eine eingerichtet hast.", + "restore_error_title": "Fehler bei der Wallet-Wiederherstellung", + "loading_header": "Einrichten\ndeines Wallets.", + "restore_error_no_backup": "Fehler: Weiterer Schritt ohne Back Up nicht erlaubt.", + "restore_success_header": "Wallet wiederhergestellt.", + "restore_success_text": "Du hast erfolgreich dein Wallet mittels deines Back Ups wiederhergestellt. Viel Spaß mit Bitkit!", + "restore_failed_header": "Wiederherstellung fehlgeschlagen.", + "restore_failed_text": "Wiederherstellung der Back-Up-Daten fehlgeschlagen.", + "restore_no_backup_button": "Weiter ohne Back Up", + "restore_no_backup_warn": "Falls du vorher ein Lightning Back Up eingerichtet hast, wird es überschrieben und verloren gehen. Dies könnte zu einem Verlust deines Geldes führen.", + "empty_wallet": "Um zu starten sende\nBitcoinan dein Wallet.", + "error_create": "Wallet-Erstellung fehlgeschlagen" } diff --git a/src/utils/i18n/locales/de/other.json b/src/utils/i18n/locales/de/other.json index 0967ef424..4c573c64f 100644 --- a/src/utils/i18n/locales/de/other.json +++ b/src/utils/i18n/locales/de/other.json @@ -1 +1,3 @@ -{} +{ + "lnurl_pay_error_no_capacity": "Nicht genug ausgehende/sendefähige Kapazität um lnurl-pay request zu vervollständigen." +} diff --git a/src/utils/i18n/locales/de/security.json b/src/utils/i18n/locales/de/security.json index 84f5554a8..4746c32e8 100644 --- a/src/utils/i18n/locales/de/security.json +++ b/src/utils/i18n/locales/de/security.json @@ -13,7 +13,6 @@ "reset_text": "Back up dein Wallet zuerst, um den Verlust deines Geldes und deiner Wallet-Daten vorzubeugen. Ein Reset wird dein aktuelles Bitkit-Setup überschreiben.", "reset_dialog_title": "Bitkit Reset?", "reset_dialog_desc": "Bist du dir sicher, dass du dein Bitkit-Wallet resetten willst? Hast du einen Back-Up deiner Wiederherstellungsphrase und deiner Wallet-Daten?", - "recovery_text": "Du hast den Bitkit-Wiederherstellungsmodus aufgerufen, als du beim Starten drauf getippt hast. Hier findest du einige Maßnahmen, die du ergreifen solltest, wenn Probleme auftreten, die die Funktionsfähigkeit der App beeinträchtigen können. Starte die App für einen normalen Start neu.", "export_error_msg": "Bitkit war nicht in der Lage, die Back-Up-Datei zu speichern.", "cp_text": "Du kannst deinen PIN code zu einer neuen\n4-Ziffern-Kombination ändern. Bitte gebe deinen aktuellen PIN Code zuerst ein.", "cp_changed_text": "Du hast erfolgreich deinen PIN zu einer 4-Ziffer-Kombination geändert.", diff --git a/src/utils/i18n/locales/de/settings.json b/src/utils/i18n/locales/de/settings.json index 1519fbdf1..41038ee2e 100644 --- a/src/utils/i18n/locales/de/settings.json +++ b/src/utils/i18n/locales/de/settings.json @@ -5,10 +5,8 @@ "dev_disabled_title": "Entwickler-Einstellungen aus", "dev_disabled_message": "Entwickler-Einstellungen sind jetzt innerhalb der App ausgeschaltet.", "general_title": "Allgemein", - "security_title": "Sicherheit und Privatsphäre", "backup_title": "Back up oder Wiederherstellung", "advanced_title": "Fortgeschritten", - "about_title": "Über Bitkit", "about": { "text": "Bitkit übergibt dir die Keys zu deinem Geld, Profil, deinen Kontakten und deinen Web Accounts.", "support": "Support", @@ -26,10 +24,8 @@ "currency_footer": "Preise bereitgestellt von Bitfinex & CoinGecko.", "currency_most_used": "Meist genutzt", "currency_other": "Andere Währungen", - "unit": "Bitcoin Einheit", - "unit_title": "Bitcoin Einheit", - "unit_display": "Zeige Bitcoin-Menge an als", "unit_bitcoin": "Bitcoin", + "unit_fiat": "Lokale Währung", "suggestions": "Verbesserungsvorschläge", "reset_desc": "Bist du dir sicher, dass du die Vorschläge löschen willst? Diese werden erneut auftauchen, wenn du diese von deiner Bitkit Wallet Übersicht entfernt hast. " }, @@ -41,6 +37,7 @@ "category_settings": "Einstellungen" }, "adv": { + "section_other": "Andere", "address_type": "Bitcoin Adressen-Typ", "lightning_connections": "Lightning Verbindungen", "bitcoin_network": "Bitcoin Netzwerk" diff --git a/src/utils/i18n/locales/de/wallet.json b/src/utils/i18n/locales/de/wallet.json index c3d930941..846af4398 100644 --- a/src/utils/i18n/locales/de/wallet.json +++ b/src/utils/i18n/locales/de/wallet.json @@ -2,8 +2,14 @@ "send_bitcoin": "Sende Bitcoin", "send_amount": "Bitcoin Menge", "send_sent": "Bitcoin versendet", + "send_amount_error_title": "Ungültige Menge", + "send_amount_error_balance": "Neue Menge übersteigt den aktuellen Kontostand.", + "send_amount_error_fee": "Zahlen der Gebühr fehlgeschlagen.", "activity_status": "Status", "activity_tabs": { "other": "Andere" - } + }, + "lnurl_w_success_description": "Abhebe-Request erfolgreich", + "lnurl_p_title": "Sende Bitcoin", + "lnurl_p_max": "Maximale Menge" } diff --git a/src/utils/i18n/locales/el/common.json b/src/utils/i18n/locales/el/common.json index 0967ef424..5adf75141 100644 --- a/src/utils/i18n/locales/el/common.json +++ b/src/utils/i18n/locales/el/common.json @@ -1 +1,27 @@ -{} +{ + "continue": "Συνέχεια", + "cancel": "Ακύρωση", + "close": "Κλείσιμο", + "are_you_sure": "Είσαι σίγουρος;", + "yes_proceed": "Ναι, Προχώρα", + "try_again": "Προσπαθείστε Ξανά", + "dialog_cancel": "Όχι, Ακύρωσε", + "sat_vbyte": "sat / vbyte", + "sat_vbyte_compact": "sat / vbyte", + "copy": "Αντιγραφή", + "share": "Διαμοιρασμός", + "search": "Αναζήτηση", + "discard": "Απόρριψη", + "save": "Καταχώρηση", + "done": "Ολοκληρώθηκε", + "delete": "Διαγραφή", + "ok": "ΟΚ", + "retry": "Δοκιμάστε Ξανά", + "later": "Αργότερα", + "skip": "Παράλειψη", + "copied": "Αντιγραφή", + "yes": "Ναι", + "no": "Όχι", + "back": "Επιστροφή", + "understood": "Κατανοητό" +} diff --git a/src/utils/i18n/locales/el/fee.json b/src/utils/i18n/locales/el/fee.json index 0967ef424..552f4584f 100644 --- a/src/utils/i18n/locales/el/fee.json +++ b/src/utils/i18n/locales/el/fee.json @@ -1 +1,35 @@ -{} +{ + "instant": { + "title": "Αμεσα", + "description": "±2-10 δευτερόλεπτα", + "shortRange": "2-10 δευτ.", + "shortDescription": "±2 δευτ." + }, + "fast": { + "title": "Γρήγορα", + "description": "±10-20 λεπτά", + "shortRange": "10-20 λεπτά", + "shortDescription": "±10 λεπτά" + }, + "normal": { + "title": "Κανονικά", + "description": "±20-60 λεπτά", + "shortRange": "20-60 λεπτά", + "shortDescription": "±20 λεπτά" + }, + "slow": { + "title": "Αργά", + "description": "±1-2 ώρες", + "shortRange": "1-2 ώρες", + "shortDescription": "±1 ώρα" + }, + "minimum": { + "title": "Ελάχιστο", + "description": "+2 ώρες", + "shortRange": "+2 ώρες", + "shortDescription": "+2 ώρες" + }, + "custom": { + "title": "Προσαρμοσμένο" + } +} diff --git a/src/utils/i18n/locales/el/lightning.json b/src/utils/i18n/locales/el/lightning.json index 14834ae4c..9cdfa2e38 100644 --- a/src/utils/i18n/locales/el/lightning.json +++ b/src/utils/i18n/locales/el/lightning.json @@ -1,5 +1,6 @@ { "setting_up_header": "Ρυθμίσεις", "setting_up_step1": "Αναμονή Πληρωμής", - "result_header": "Σύνδεση" + "result_header": "Σύνδεση", + "close_button": "Κλείσιμο" } diff --git a/src/utils/i18n/locales/el/onboarding.json b/src/utils/i18n/locales/el/onboarding.json index 0967ef424..f3852b3e5 100644 --- a/src/utils/i18n/locales/el/onboarding.json +++ b/src/utils/i18n/locales/el/onboarding.json @@ -1 +1,3 @@ -{} +{ + "skip": "Παράλειψη" +} diff --git a/src/utils/i18n/locales/el/settings.json b/src/utils/i18n/locales/el/settings.json index 33ea26ea3..2934d8eb9 100644 --- a/src/utils/i18n/locales/el/settings.json +++ b/src/utils/i18n/locales/el/settings.json @@ -1,5 +1,18 @@ { "general": { "suggestions": "Προτάσεις" + }, + "fee": { + "fast": { + "value": "Γρήγορα" + }, + "normal": { + "label": "Κανονικά", + "value": "Κανονικά" + }, + "custom": { + "label": "Προσαρμοσμένο", + "value": "Προσαρμοσμένο" + } } } diff --git a/src/utils/i18n/locales/es/lightning.json b/src/utils/i18n/locales/es/lightning.json index b6a17a684..1597d745c 100644 --- a/src/utils/i18n/locales/es/lightning.json +++ b/src/utils/i18n/locales/es/lightning.json @@ -45,7 +45,7 @@ "availability_title": "Disponibilidad de fondos", "availability_header": "Disponibilidad de sus fondos.", "availability_text": "La transferencia de fondos al ahorro suele tardar\n±1 hora, pero la confirmación puede tardar 14 días en determinadas condiciones de la red.", - "node_info": "Información sobre el nodo Lightning", + "node_info": "Nodo Lightning", "node_id": "ID del nodo LDK", "node_disconnected": "desconectado", "node_failed": "Bitkit ha fallado al inicializar el nodo Lightning.", diff --git a/src/utils/i18n/locales/es/onboarding.json b/src/utils/i18n/locales/es/onboarding.json index a5bddd17c..79deba943 100644 --- a/src/utils/i18n/locales/es/onboarding.json +++ b/src/utils/i18n/locales/es/onboarding.json @@ -1,5 +1,4 @@ { - "tos_header": "Bitkit\nTérminos\nde uso.", "tos_checkbox": "Condiciones de uso", "pp_checkbox": "Política de privacidad", "toolkit": "Su Bitcoin\nToolkit", diff --git a/src/utils/i18n/locales/es/security.json b/src/utils/i18n/locales/es/security.json index 0ee643e62..297ce1738 100644 --- a/src/utils/i18n/locales/es/security.json +++ b/src/utils/i18n/locales/es/security.json @@ -69,7 +69,6 @@ "reset_dialog_title": "¿Restablecer Bitkit a los padrones iniciales?", "reset_dialog_desc": "¿Está seguro de que desea restablecer su monedero Bitkit? ¿Tiene una copia de seguridad de su frase de recuperación y de los datos de su monedero?", "recovery": "Recuperación", - "recovery_text": "Ha entrado en el modo de recuperación de Bitkit pulsando durante el inicio. Estas son algunas acciones a realizar cuando se encuentras con problemas que impidan que la aplicación funcione correctamente. Reinicie la aplicación para un arranque normal.", "contact_support": "Contactar servicio de asistencia", "wipe_app": "Borrar App", "close_app": "Cerrar Bitkit", diff --git a/src/utils/i18n/locales/es/settings.json b/src/utils/i18n/locales/es/settings.json index f12b71f12..8c1877b04 100644 --- a/src/utils/i18n/locales/es/settings.json +++ b/src/utils/i18n/locales/es/settings.json @@ -5,10 +5,8 @@ "dev_disabled_title": "Opciones de desarrollo desactivadas", "dev_disabled_message": "Las opciones de desarrollo están ahora desactivadas en toda la aplicación.", "general_title": "Geral", - "security_title": "Seguridad y Privacidad", "backup_title": "Copia de seguridad o restauración", "advanced_title": "Avanzado", - "about_title": "Acerca de Bitkit", "about": { "text": "Bitkit le entrega las llaves de su dinero, perfil, contactos y cuentas web. Esta píldora naranja ha sido cuidadosamente elaborada por Synonym Software Ltd.", "support": "Soporte", @@ -25,11 +23,9 @@ "currency_footer": "Precios proporcionados por Bitfinex y CoinGecko.", "currency_most_used": "Más utilizados", "currency_other": "Otras monedas", - "unit": "Unidad de Bitcoin", - "unit_title": "Unidad Bitcoin", - "unit_display": "Mostrar las cantidades de Bitcoin como", "unit_bitcoin": "Bitcoin", "unit_satoshis": "Satoshis", + "unit_fiat": "Moneda local", "speed": "Velocidad de transacción", "speed_title": "Velocidad de la transacción", "speed_default": "Velocidad de transacción predeterminada", @@ -40,7 +36,6 @@ "suggestions_visible": "Visible", "suggestions_hidden": "Oculto", "suggestions_display": "Mostrar sugerencias", - "suggestions_reset": "Restablecer sugerencias", "tags": "Etiquetas", "tags_previously": "Etiquetas utilizadas anteriormente", "reset_title": "¿Restablecer sugerencias?", @@ -63,7 +58,6 @@ "export": "Exportar los datos del monedero al teléfono", "failed_title": "Falla en la copia de seguridad de los datos", "failed_message": "Bitkit no ha podido realizar una copia de seguridad de sus datos. Por favor, chequear la conexión.", - "latest": "última copia de seguridad de datos", "status_failed": "Copia de seguridad falló: {time}", "status_success": "Última Copia de Seguridad: {time}", "status_empty": "Copia de seguridad no és necesaria", @@ -77,6 +71,7 @@ "adv": { "section_payments": "Pagos", "section_networks": "Redes", + "section_other": "Otros", "address_type": "Tipo de dirección Bitcoin", "coin_selection": "Selección de monedas", "cs_method": "Método de selección de monedas", diff --git a/src/utils/i18n/locales/es/wallet.json b/src/utils/i18n/locales/es/wallet.json index ae6fe3eb0..1b997c12d 100644 --- a/src/utils/i18n/locales/es/wallet.json +++ b/src/utils/i18n/locales/es/wallet.json @@ -143,5 +143,6 @@ "filter_clear": "Limpiar", "filter_apply": "Aplicarse", "reorg_detected": "Reorganización Detectada", - "reorg_msg_end": "Por favor, compruebe su lista de actividades para ver las transacciones afectadas." + "reorg_msg_end": "Por favor, compruebe su lista de actividades para ver las transacciones afectadas.", + "lnurl_p_title": "Enviar Bitcoin" } diff --git a/src/utils/i18n/locales/it/lightning.json b/src/utils/i18n/locales/it/lightning.json index 2f01c32d5..d441d488f 100644 --- a/src/utils/i18n/locales/it/lightning.json +++ b/src/utils/i18n/locales/it/lightning.json @@ -62,7 +62,7 @@ "availability_title": "Disponibilità Fondi", "availability_header": "Disponibilità dei tuoi Fondi.", "availability_text": "Il trasferimento dei fondi ai risparmi richiede solitamente\n±1 ora, ma il settlement può richiedere 14 giorni in determinate condizioni di rete.", - "node_info": "Info del Nodo Lightning", + "node_info": "Nodo Lightning", "node_id_copied": "ID del nodo LDK copiato con successo negli appunti.", "node_id": "ID Nodo LDK", "node_disconnected": "disconnesso", diff --git a/src/utils/i18n/locales/it/onboarding.json b/src/utils/i18n/locales/it/onboarding.json index 5116bbf31..f2b9a0152 100644 --- a/src/utils/i18n/locales/it/onboarding.json +++ b/src/utils/i18n/locales/it/onboarding.json @@ -1,5 +1,4 @@ { - "tos_header": "Bitkit\nTermini\ndi Utilizzo.", "tos_checkbox": "Termini di Utilizzo", "tos_checkbox_value": "Dichiaro di aver letto e accettato le condizioni di utilizzo.", "pp_checkbox": "Informativa Privacy", diff --git a/src/utils/i18n/locales/it/security.json b/src/utils/i18n/locales/it/security.json index 2a274bff5..3b8690940 100644 --- a/src/utils/i18n/locales/it/security.json +++ b/src/utils/i18n/locales/it/security.json @@ -72,7 +72,6 @@ "reset_dialog_title": "Resettare Bitkit?", "reset_dialog_desc": "Sei sicuro di voler resettare il tuo Wallet Bitkit ? Hai un backup della recovery phrase e dei dati del wallet?", "recovery": "Recovery", - "recovery_text": "Sei entrato nella modalità di recovery di Bitkit durante l'avvio. Ecco alcune azioni da eseguire quando si verifica un problema che impedisce all'applicazione di funzionare completamente. Riavvia l'app per un avvio normale.", "display_seed": "Mostra la Seed Phrase", "contact_support": "Contatta l'Assistenza", "wipe_app": "Wipe App", diff --git a/src/utils/i18n/locales/it/settings.json b/src/utils/i18n/locales/it/settings.json index 110694bad..eef4579cd 100644 --- a/src/utils/i18n/locales/it/settings.json +++ b/src/utils/i18n/locales/it/settings.json @@ -5,10 +5,8 @@ "dev_disabled_title": "Opzioni Sviluppatore Disattivate", "dev_disabled_message": "Opzioni sviluppatore sono ora disabilitate ovunque nell'app.", "general_title": "Generale", - "security_title": "Sicurezza e Privacy", "backup_title": "Backup o Ripristino", "advanced_title": "Avanzate", - "about_title": "Informazioni su Bitkit", "about": { "text": "Bitkit ti consegna le chiavi del tuo denaro, del tuo profilo, dei tuoi contatti e dei tuoi account web.\n\nQuesta Orange-Pillazione è stata accuratamente realizzata da Synonym Software Ltd.", "support": "Supporto", @@ -27,11 +25,9 @@ "currency_footer": "Prezzi forniti da Bitfinex & CoinGecko.", "currency_most_used": "Più Utilizzati", "currency_other": "Altre Valute", - "unit": "Unità Bitcoin", - "unit_title": "Unità Bitcoin", - "unit_display": "Visualizza importo Bitcoin come", "unit_bitcoin": "Bitcoin", "unit_satoshis": "Satoshis", + "unit_fiat": "Valuta Locale", "speed": "Velocità transazione", "speed_title": "Velocità Transazione", "speed_default": "Velocità Transazione di Default", @@ -42,7 +38,6 @@ "suggestions_visible": "Visibile", "suggestions_hidden": "Nascosto", "suggestions_display": "Mostra suggerimenti", - "suggestions_reset": "Resetta i Suggerimenti", "tags": "Tag", "tags_previously": "Tag usati in precedenza", "reset_title": "Resettare i Suggerimenti?", @@ -69,7 +64,6 @@ "reset": "Resettare e ripristinare il wallet", "failed_title": "Fallimento del backup dei dati", "failed_message": "Bitkit non è riuscito a eseguire il backup dei dati. Controlla la tua connessione.", - "latest": "ultimo backup dei dati", "status_failed": "Backup fallito: {time}", "status_success": "Ultimo backup: {time}", "status_empty": "Backup non necessario", @@ -85,6 +79,7 @@ "adv": { "section_payments": "Pagamenti", "section_networks": "Reti", + "section_other": "Altro", "address_type": "Tipologia Indirizzo Bitcoin", "coin_selection": "Coin Selection", "cs_method": "Metodo di Coin Selection", diff --git a/src/utils/i18n/locales/it/wallet.json b/src/utils/i18n/locales/it/wallet.json index 54c971327..84ef33219 100644 --- a/src/utils/i18n/locales/it/wallet.json +++ b/src/utils/i18n/locales/it/wallet.json @@ -153,5 +153,6 @@ "filter_apply": "Applica", "reorg_detected": "Riorganizzazione Rilevata", "reorg_msg_begin": "{count, plural, one {# delle tue transazioni non è più confermata.} many {# delle tue transazioni non sono più confermate.} other {# delle tue transazioni non sono più confermate.}}", - "reorg_msg_end": "Controlla l'elenco delle attività per verificare le transazioni interessate." + "reorg_msg_end": "Controlla l'elenco delle attività per verificare le transazioni interessate.", + "lnurl_p_title": "Invia Bitcoin" } diff --git a/src/utils/i18n/locales/nl/lightning.json b/src/utils/i18n/locales/nl/lightning.json index 849c70ae3..f48a1b36a 100644 --- a/src/utils/i18n/locales/nl/lightning.json +++ b/src/utils/i18n/locales/nl/lightning.json @@ -62,7 +62,7 @@ "availability_title": "Beschikbare Balans", "availability_header": "Beschikbaarheid van uw Balans.", "availability_text": "Het overmaken naar uw spaargeld duurt meestal\n±1 uur, maar het kan tot 14 dagenduren afhankelijk van netwerk omstandigheden. ", - "node_info": "Lightning Node Info", + "node_info": "Lightning Node", "node_id_copied": "LDK Node ID gekopieerd naar het klembord.", "node_id": "LDK Node ID", "node_disconnected": "verbinding verbroken", diff --git a/src/utils/i18n/locales/nl/onboarding.json b/src/utils/i18n/locales/nl/onboarding.json index 73460027f..f5adef40a 100644 --- a/src/utils/i18n/locales/nl/onboarding.json +++ b/src/utils/i18n/locales/nl/onboarding.json @@ -1,5 +1,4 @@ { - "tos_header": "Bitkit Gebruikers-\nvoorwaarden.", "tos_checkbox": "Gebruikersvoorwaarden", "tos_checkbox_value": "Ik bevestig dat ik de gebruikersvoorwaarden heb gelezen en er mee akkoord ben. ", "pp_checkbox": "Privacyverklaring", diff --git a/src/utils/i18n/locales/nl/security.json b/src/utils/i18n/locales/nl/security.json index b4ea574af..8340374c9 100644 --- a/src/utils/i18n/locales/nl/security.json +++ b/src/utils/i18n/locales/nl/security.json @@ -72,7 +72,6 @@ "reset_dialog_title": "Bitkit Resetten?", "reset_dialog_desc": "Weet u zeker u uw Bitkit wallet wilt resetten? Heeft u een backup van uw herstelwoorden en wallet data?", "recovery": "Herstel", - "recovery_text": "U zit in de Bitkit herstelmodus omdat u getikt heeft tijdens het opstarten. Hier zijn enkele handelingen die u kunt verrichten wanneer er problemen zijn die de app belemmeren om volledig te functioneren. Herstart de app om normaal op te starten. ", "display_seed": "Toon Herstelwoorden", "contact_support": "Contact Opnemen", "wipe_app": "Wis de App", diff --git a/src/utils/i18n/locales/nl/settings.json b/src/utils/i18n/locales/nl/settings.json index 0d897188e..85b8ce240 100644 --- a/src/utils/i18n/locales/nl/settings.json +++ b/src/utils/i18n/locales/nl/settings.json @@ -5,10 +5,8 @@ "dev_disabled_title": "Dev Instellingen Uitgeschakeld", "dev_disabled_message": "Dev instellingen zijn nu overal uitgeschakeld.", "general_title": "Algemeen", - "security_title": "Beveiliging en Privacy", "backup_title": "Backup of Herstellen", "advanced_title": "Geavanceerd", - "about_title": "Over Bitkit", "about": { "text": "Bitkit geeft u de sleutels voor uw geld, profiel, contacten en webaccounts. \n\nDeze 'Orange Pill'is zorgvuldig ontworpen door Synonym Software Ltd.", "support": "Ondersteuning", @@ -27,11 +25,9 @@ "currency_footer": "Prijzen verzorgd door Bitfinex & CoinGecko.", "currency_most_used": "Meest Gebruikt", "currency_other": "Andere Valuta", - "unit": "Bitcoin eenheid", - "unit_title": "Bitcoin Eenheid", - "unit_display": "Geef Bitcoinhoeveelheden weer als ", "unit_bitcoin": "Bitcoin", "unit_satoshis": "Satoshis", + "unit_fiat": "Lokale Valuta", "speed": "Transactiesnelheid", "speed_title": "Transactiesnelheid", "speed_default": "Standaard Transactiesnelheid", @@ -42,7 +38,6 @@ "suggestions_visible": "Zichtbaar", "suggestions_hidden": "Verborgen", "suggestions_display": "Weergave suggesties", - "suggestions_reset": "Suggesties Resetten", "tags": "Labels", "tags_previously": "Eerder gebruikte labels", "reset_title": "De Suggesties Resetten?", @@ -69,7 +64,6 @@ "reset": "Reset en herstel wallet", "failed_title": "Data Backup Mislukt", "failed_message": "Het is Bitkit niet gelukt om een data backup te maken. Controleer uw verbinding. ", - "latest": "Meest recente data backup", "status_failed": "Mislukte Backups: {time}", "status_success": "Meest Recente Backup: {time}", "status_empty": "Backup niet nodig", @@ -85,6 +79,7 @@ "adv": { "section_payments": "Betalingen", "section_networks": "Netwerken", + "section_other": "Overige", "address_type": "Bitcoin adres type", "coin_selection": "Coin selectie", "cs_method": "Coin Selectie Methode", diff --git a/src/utils/i18n/locales/nl/wallet.json b/src/utils/i18n/locales/nl/wallet.json index 1b8d4a47f..2481aa673 100644 --- a/src/utils/i18n/locales/nl/wallet.json +++ b/src/utils/i18n/locales/nl/wallet.json @@ -153,5 +153,6 @@ "filter_apply": "Toepassen", "reorg_detected": "Blockchain Herindeling Gedetecteerd", "reorg_msg_begin": "{count, plural, one {# van uw transacties zijn niet langer bevestigd.} other {# van uw transacties zijn niet langer bevestigd.}}", - "reorg_msg_end": "Controleer uw activiteitenleest voor de beïnvloedde transacties." + "reorg_msg_end": "Controleer uw activiteitenleest voor de beïnvloedde transacties.", + "lnurl_p_title": "Bitcoin Versturen" } diff --git a/src/utils/i18n/locales/pl/wallet.json b/src/utils/i18n/locales/pl/wallet.json index d79327076..ae4e50916 100644 --- a/src/utils/i18n/locales/pl/wallet.json +++ b/src/utils/i18n/locales/pl/wallet.json @@ -22,5 +22,6 @@ "send_yes": "Tak, wyślij", "send_dialog1": "Wygląda na to, że wysyłasz ponad $100. Czy kontynuować?", "send_dialog2": "Wygląda na to, że wysyłasz ponad 50% swojego salda. Czy kontynuować?", - "activity_invoice": "Faktura" + "activity_invoice": "Faktura", + "lnurl_p_title": "Wyślij Bitcoin" } diff --git a/src/utils/i18n/locales/pt_BR/lightning.json b/src/utils/i18n/locales/pt_BR/lightning.json index 55e0f77af..8708abcde 100644 --- a/src/utils/i18n/locales/pt_BR/lightning.json +++ b/src/utils/i18n/locales/pt_BR/lightning.json @@ -45,7 +45,7 @@ "availability_title": "Disponibilidade de Fundos", "availability_header": "Disponibilidade dos seus Fundos.", "availability_text": "A transferência de fundos para a poupança geralmente leva\n±1 hora, mas a liquidação pode levar 14 dias em determinadas condições da rede.", - "node_info": "Informações sobre o Lightning Node", + "node_info": "Nó Lightning", "node_id_copied": "ID LDK do Node copiado para a área de transferência.", "node_id": "ID LDK do Node", "node_disconnected": "desconectado", diff --git a/src/utils/i18n/locales/pt_BR/onboarding.json b/src/utils/i18n/locales/pt_BR/onboarding.json index 06fde55e1..90957f542 100644 --- a/src/utils/i18n/locales/pt_BR/onboarding.json +++ b/src/utils/i18n/locales/pt_BR/onboarding.json @@ -1,5 +1,4 @@ { - "tos_header": "Bitkit\nTermos\nde Uso.", "tos_checkbox": "Termos de uso", "tos_checkbox_value": "Eu declaro que li e aceito os termos de uso.", "pp_checkbox": "Política de Privacidade", diff --git a/src/utils/i18n/locales/pt_BR/settings.json b/src/utils/i18n/locales/pt_BR/settings.json index a4e69f1f8..e74563492 100644 --- a/src/utils/i18n/locales/pt_BR/settings.json +++ b/src/utils/i18n/locales/pt_BR/settings.json @@ -5,10 +5,8 @@ "dev_disabled_title": "Modo Desenvolvedor Desativado", "dev_disabled_message": "As opções de desenvolvedor foram desativadas em todo o app.", "general_title": "Geral", - "security_title": "Segurança e Privacidade", "backup_title": "Fazer backup ou Restaurar", "advanced_title": "Avançado", - "about_title": "Sobre a Bitkit", "about": { "text": "A Bitkit lhe entrega as chaves do seu dinheiro, perfil, contatos e contas.\n\nEsta Pílula Laranja foi cuidadosamente desenvolvida pela Synonym Software Ltd.", "support": "Suporte", @@ -27,11 +25,9 @@ "currency_footer": "Preços fornecidos pela Bitfinex & CoinGecko.", "currency_most_used": "Mais usadas", "currency_other": "Outras moedas", - "unit": "Unidade de Bitcoin", - "unit_title": "Unidade de Bitcoin", - "unit_display": "Exibir valores de Bitcoin como", "unit_bitcoin": "Bitcoin", "unit_satoshis": "Satoshis", + "unit_fiat": "Moeda Local", "speed": "Velocidade da transação", "speed_title": "Velocidade da transação", "speed_default": "Velocidade de transação padrão", @@ -42,7 +38,6 @@ "suggestions_visible": "Visível", "suggestions_hidden": "Oculto", "suggestions_display": "Mostrar sugestões", - "suggestions_reset": "Redefinir sugestões", "tags": "Tags", "tags_previously": "Tags usadas anteriormente", "reset_title": "Redefinir Sugestões?", @@ -67,7 +62,6 @@ "reset": "Reiniciar e restaurar carteira", "failed_title": "Falha no Backup", "failed_message": "A Bitkit não conseguiu fazer o backup. Por favor, verifique sua conexão.", - "latest": "backup mais recente", "status_failed": "Falha no backup: {time}", "status_success": "Último backup: {time}", "status_empty": "Backup desnecessário", @@ -83,6 +77,7 @@ "adv": { "section_payments": "Pagamentos", "section_networks": "Redes", + "section_other": "Outros", "address_type": "Tipo de endereço Bitcoin", "coin_selection": "Controle de Moedas", "cs_method": "Método de Controle de Moedas", diff --git a/src/utils/i18n/locales/pt_BR/wallet.json b/src/utils/i18n/locales/pt_BR/wallet.json index 357f299e1..3b1219df9 100644 --- a/src/utils/i18n/locales/pt_BR/wallet.json +++ b/src/utils/i18n/locales/pt_BR/wallet.json @@ -120,5 +120,6 @@ "filter_clear": "Limpar", "filter_apply": "Aplicar", "reorg_detected": "Reorg Detectado", - "reorg_msg_end": "Verifique em sua lista de atividades as transações afetadas." + "reorg_msg_end": "Verifique em sua lista de atividades as transações afetadas.", + "lnurl_p_title": "Enviar Bitcoin" } diff --git a/src/utils/i18n/locales/ru/onboarding.json b/src/utils/i18n/locales/ru/onboarding.json index 626059cf0..75a3e95ff 100644 --- a/src/utils/i18n/locales/ru/onboarding.json +++ b/src/utils/i18n/locales/ru/onboarding.json @@ -1,5 +1,4 @@ { - "tos_header": "Bitkit\nУсловия", "tos_checkbox": "Условия использования", "pp_checkbox": "Политика Конфиденциальности", "toolkit": "Биткоин\nИнструменты", diff --git a/src/utils/i18n/locales/ru/security.json b/src/utils/i18n/locales/ru/security.json index ff53186e4..42f3ac2fc 100644 --- a/src/utils/i18n/locales/ru/security.json +++ b/src/utils/i18n/locales/ru/security.json @@ -68,7 +68,6 @@ "reset_dialog_title": "Сбросить Bitkit?", "reset_dialog_desc": "Вы уверены, что хотите сбросить настройки своего кошелька Bitkit? У вас есть резервная копия фразы восстановления и данных кошелька?", "recovery": "Восстановление", - "recovery_text": "Вы вошли в режим восстановления Bitkit, нажав во время запуска. Вот некоторые действия, которые необходимо выполнить при возникновении проблем, которые мешают полноценному функционированию приложения. Перезапустите приложение для нормального запуска.", "display_seed": "Показать Фразу Восстановления", "contact_support": "Связаться с Поддержкой", "wipe_app": "Сбросить Приложение", diff --git a/src/utils/i18n/locales/ru/settings.json b/src/utils/i18n/locales/ru/settings.json index 5e1b93e5d..611ad7a1c 100644 --- a/src/utils/i18n/locales/ru/settings.json +++ b/src/utils/i18n/locales/ru/settings.json @@ -5,10 +5,8 @@ "dev_disabled_title": "Режим Разработчика Выключен", "dev_disabled_message": "Режим разработчика теперь выключен во всём приложении.", "general_title": "Главные", - "security_title": "Безопасность и Конфиденциальность", "backup_title": "Резервное копирование", "advanced_title": "Расширенные", - "about_title": "О Bitkit", "about": { "text": "c Bitkit ключи от ваших денег, профиля, контактов и веб-аккаунтов принадлежат Вам.\n\nЭта Оранжевая Пилюля была тщательно разработана в Synonym Software Ltd.", "support": "Поддержка", @@ -27,11 +25,9 @@ "currency_footer": "Курсы валют с Bitfinex & CoinGecko.", "currency_most_used": "Наиболее Используемое", "currency_other": "Другие", - "unit": "Единицы Биткоин", - "unit_title": "Единицы Биткоина", - "unit_display": "Отображать количество Биткоинов в", "unit_bitcoin": "Биткоин", "unit_satoshis": "Сатоши", + "unit_fiat": "Валюта", "speed": "Скорость транзакций", "speed_title": "Скорость Транзакций", "speed_default": "Значение По Умолчанию", @@ -40,7 +36,6 @@ "suggestions_visible": "Показывать", "suggestions_hidden": "Скрывать", "suggestions_display": "Отображать рекомендации", - "suggestions_reset": "Сбросить рекомендации", "tags": "Теги", "tags_previously": "Ранее использовавшиеся теги", "reset_title": "Сбросить Рекомендации?", @@ -70,6 +65,7 @@ "adv": { "section_payments": "Платежи", "section_networks": "Сеть", + "section_other": "Другие", "address_type": "Тип Биткоин-Адреса", "coin_selection": "Выбор Монет", "cs_method": "Метод Выбора Монет", diff --git a/src/utils/i18n/locales/ru/wallet.json b/src/utils/i18n/locales/ru/wallet.json index ad6873c00..13dcdca73 100644 --- a/src/utils/i18n/locales/ru/wallet.json +++ b/src/utils/i18n/locales/ru/wallet.json @@ -142,5 +142,6 @@ "filter_title": "Выберите диапазон", "filter_clear": "Очистить", "filter_apply": "Применить", - "reorg_detected": "Обнаружен реорг" + "reorg_detected": "Обнаружен реорг", + "lnurl_p_title": "Отправить Биткоин" } From d7eb591d58f4e86fd1d437567f74a33c48f54179 Mon Sep 17 00:00:00 2001 From: Ivan Vershigora Date: Tue, 1 Aug 2023 12:19:59 +0100 Subject: [PATCH 14/14] fix: activity total = value + fee --- src/components/BalanceHeader.tsx | 2 - src/components/Money.tsx | 2 +- src/screens/Activity/ActivityDetail.tsx | 159 ++++++++++++++----- src/screens/Activity/ListItem.tsx | 9 +- src/screens/Wallets/LNURLWithdraw/Amount.tsx | 1 - src/screens/Wallets/Send/Amount.tsx | 1 - src/screens/Wallets/WalletsDetail/index.tsx | 1 - src/store/index.ts | 2 +- src/store/migrations/index.ts | 11 ++ src/store/types/activity.ts | 1 + src/utils/activity/index.ts | 2 +- src/utils/i18n/locales/en/wallet.json | 2 + src/utils/lightning/index.ts | 9 +- 13 files changed, 140 insertions(+), 62 deletions(-) diff --git a/src/components/BalanceHeader.tsx b/src/components/BalanceHeader.tsx index 95f9211a9..c48304437 100644 --- a/src/components/BalanceHeader.tsx +++ b/src/components/BalanceHeader.tsx @@ -47,7 +47,6 @@ const BalanceHeader = (): ReactElement => { unit={unit} enableHide={true} symbol={false} - decimalLength="long" /> ), }} @@ -65,7 +64,6 @@ const BalanceHeader = (): ReactElement => { enableHide={true} highlight={true} symbol={true} - decimalLength="long" /> {hideBalance && ( diff --git a/src/components/Money.tsx b/src/components/Money.tsx index b63090884..5f3810618 100644 --- a/src/components/Money.tsx +++ b/src/components/Money.tsx @@ -49,7 +49,7 @@ const Money = (props: IMoney): ReactElement => { const sats = Math.abs(props.sats); const highlight = props.highlight ?? false; - const decimalLength = props.decimalLength ?? 'short'; + const decimalLength = props.decimalLength ?? 'long'; const size = props.size ?? 'display'; const unit = props.unit ?? diff --git a/src/screens/Activity/ActivityDetail.tsx b/src/screens/Activity/ActivityDetail.tsx index 5b511bd50..43e454800 100644 --- a/src/screens/Activity/ActivityDetail.tsx +++ b/src/screens/Activity/ActivityDetail.tsx @@ -37,10 +37,10 @@ import { LightningIcon, ReceiveIcon, SendIcon, - SpeedFastIcon, TagIcon, TimerIcon, TimerIconAlt, + UserIcon, UserMinusIcon, UserPlusIcon, XIcon, @@ -64,7 +64,6 @@ import { } from '../../utils/wallet/transactions'; import useColors from '../../hooks/colors'; import { useAppSelector } from '../../hooks/redux'; -import useDisplayValues from '../../hooks/displayValues'; import Store from '../../store/types'; import { showBottomSheet } from '../../store/actions/ui'; import { IContactRecord } from '../../store/types/slashtags'; @@ -80,7 +79,6 @@ import { import { getTransactions } from '../../utils/wallet/electrum'; import { ITransaction, ITxHash } from '../../utils/wallet'; import { openURL } from '../../utils/helpers'; -import { btcToSats } from '../../utils/conversion'; import { getBoostedTransactionParents } from '../../utils/boost'; import { showToast } from '../../utils/notifications'; import { @@ -163,6 +161,9 @@ const OnchainActivityDetail = ({ exists, } = item; + const isSend = txType === EPaymentType.sent; + const total = isSend ? fee + value : value; + const { t } = useTranslation('wallet'); const { t: tTime } = useTranslation('intl', { i18n: i18nTime }); const [_, switchUnit] = useSwitchUnit(); @@ -171,7 +172,6 @@ const OnchainActivityDetail = ({ const selectedNetwork = useSelector(selectedNetworkSelector); const activityItems = useSelector(activityItemsSelector); const boostedTransactions = useSelector(boostedTransactionsSelector); - const feeDisplay = useDisplayValues(btcToSats(fee)); const [txDetails, setTxDetails] = useState['result']>(); const slashTagsUrl = useAppSelector((state) => { return slashTagsUrlSelector(state, id); @@ -305,8 +305,6 @@ const OnchainActivityDetail = ({ return ; }, [txDetails]); - const isSend = txType === EPaymentType.sent; - let status = ( @@ -344,14 +342,14 @@ const OnchainActivityDetail = ({ return ( <> - + @@ -366,20 +364,6 @@ const OnchainActivityDetail = ({ {!extended ? ( <> - {isSend && ( -
- - - {feeDisplay.satoshis} ({feeDisplay.fiatSymbol} - {feeDisplay.fiatFormatted}) - - - } - /> - )}
@@ -429,6 +413,55 @@ const OnchainActivityDetail = ({ /> + {isSend && ( + +
+ + + + + } + /> + +
+ + + + + } + /> + + )} + {(tags.length !== 0 || slashTagsUrl) && ( {slashTagsUrl && ( @@ -605,7 +638,8 @@ const LightningActivityDetail = ({ const { t: tTime } = useTranslation('intl', { i18n: i18nTime }); const [_, switchUnit] = useSwitchUnit(); const colors = useColors(); - const { id, txType, value, message, timestamp, address } = item; + const { id, txType, value, fee, message, timestamp, address } = item; + const total = value + (fee ?? 0); const tags = useSelector((state: Store) => tagSelector(state, id)); const slashTagsUrl = useSelector((state: Store) => { return slashTagsUrlSelector(state, id); @@ -659,14 +693,14 @@ const LightningActivityDetail = ({ return ( <> - + @@ -681,23 +715,6 @@ const LightningActivityDetail = ({ {!extended ? ( <> - {isSend && ( -
- - {/* TODO: get actual fee */} - $0.01 - - } - /> - )}
@@ -743,6 +760,57 @@ const LightningActivityDetail = ({ /> + {isSend && ( + +
+ + + + + } + /> + + {fee !== undefined && ( +
+ + + + + } + /> + )} + + )} + {(tags.length !== 0 || slashTagsUrl) && ( {slashTagsUrl && ( @@ -823,8 +891,8 @@ const LightningActivityDetail = ({ />