Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Commit

Permalink
Mobile: Reenable and refactor deep linking (#1143)
Browse files Browse the repository at this point in the history
* Shared: Localise strings

* Mobile: Update transaction history modal buttons

* Mobile: Adjust topbar scrollable

* Node Quorum (#631)

* Implement quorum for wereAddressesSpentFrom

* Simply #findSyncedNodes implementation

* Add quorum support for getBalances IRI endpoint

* Minor updates

- Add quorum support for getTrytes IRI endpoint
- Minor clean up in quorum methods

* Add quorum support for findTransactions IRI endpoint

* Rename quorum methods for better readability

* Integrate quorum methods with extended api

* Remove findTransactions & getTrytes endpoints from quorum

* Refactor quorum implementation and do minor fixes

- Update JSDoc typos
- Simplify quorum implementation (Remove duplications)
- Add a timeout for network request to each node
- Fix issues in findSyncedNodes implementation
- Update error messages

* Add coverage
- Add coverage for #determineQuorumResult
- Add coverage for #fallbackToSafeResult
- Add coverage for #findSyncedNodes

* Add empty payload checks in quorum methods

* Wrap percentage calculation in parentheses for clarity

Co-Authored-By: laumair <aquadestructor@icloud.com>

* Use develop branch of iota.lib.js

* Enforce quorum (by default) on supported methods

* Fix tests failing because of quorum enforcement

* Add code documentation and rename parameters & variables for clarity

- Related discussion #631 (comment)

* [Security] Bump cryptiles from 3.1.2 to 3.1.4 (#829)

* [Security] Bump nokogiri from 1.8.4 to 1.9.1 in /src/mobile/android (#828)

* Make sure accounts are always iterated in correct order (by account index) (#824)

Object.keys(<object>) function does not always preseve the order, especially if the object key starts with a number. This causes an issue when Object.keys is used for iterating on account names. #715 adds account indexes to state to make sure the order of accounts is always intact. However, some components in desktop use Object.keys directly on accounts object, which leads to certain issues of incorrect references to accounts. This commit fixes this issue by replacing Object.keys implementation on accounts with getAccountNamesFromState selector that guarantees the accounts order.

Fixes #811

Note that the issues Object.keys create are not always noticeable. Steps to reproduce these issues are:

- Add account with name "M"
- Add another account with name "0"
- Notice account names order in sidebar (Instead of "0" being the second account, it becomes the first)
- Generate receive address from account "M" (Instead of generating receive address for account "M", it generates receive address for account "0")

* New Crowdin translations [ci skip] (#826)

* New translations translation.json (Czech)

* New translations translation.json (Czech)

* New translations translation.json (Japanese)

* New translations translation.json (Spanish)

* Mobile: Update findSyncedNodes

* Update quorum.js

* Improve parameters and variable names

* Include custom nodes in quorum nodes

* Reduce node request timeout for getNodeInfo api calls (in quorum)

* Mobile: Minor cleanup

* Mobile: Bump build numbers for release v0.6.0 (33) (#808)

* Mobile: Bump build no

* Mobile: Fix account name opacity during certain tasks

* Mobile: Adjust chart animations

* Mobile: Adjust chart timeframe order

* Shared: Rebuild realm after installing dependencies (#842)

* Remove undefined i18next translate function from progressSteps

* Mobile: Replace seed and password usage with global instance

* Mobile: Add ability to force GC on iOS

* Mobile: Work on forced garbage collection for Android

* Mobile: Link Android GarbageCollector

* Update prepateTransferArray implementation to accept addressData as an array instead of an object

* Minor fixes and updates

- Remove manual state rehydration from src/desktop/src/index.js
- Pass in theme object to UnitInfoModal
- Fix JSDocs for addCustomNodeSuccess action creator
- Fix notificationFn trigger in syncAccount
- Relocate mapNormalisedTransactions util

* Always find transaction hashes diff from transactions with own addresses

* Update UI for migration screen

* Assign index & meta to account object during migration

* Use buildNumber for detecting & triggering redux->realm migration

* Shared: Ignore chownr vulnerability in Snyk

* Desktop: Realm Database implementation Desktop fixes (#874)

* Desktop related fixes:
- Fix balance setting in `Balance` and `Sidebar` components
- Fix latest address retrieval
- Fix notification function
- Fix List component transaction list retrieval

* Remove `reverse` from account address list

* Mobile: Resolve lint errors

* Revert 5291972 and fix eslint config (see eslint/eslint#11231)

* Fix failing tests for libs/iota/accounts

* Fix checksum for latestAddressObject & add a separate constant for latestAddressBalance

* Fix attachAndFormatAddresses util implementation

* Mobile: Fix migration step strings

* Mobile: Update prop types

* Shared: Fix documentation for delete and addNodes

* Remove hash as a primary key from Transaction schema

* Add realm-object-server/ to gitignore

* Bump realm to v2.21.1

* Update Transaction schema

- Add attachmentTimestamp
- Add attachmentTimestampLowerBound
- Add attachmentTimestampUpperBound
- Add obsoleteTag

* Minor fixes

- Map correct persistence to normalised transactions
- Fix parameters for constructBundleFromTransactions util

* Minor fixes

- Make completedMigration a required prop in Login & Migration component
- Make sure missing properties like completedMigration are correctly mapped to redux store on entry

* Include version check on app entry

* Minor fixes and updates

- Update method description for realm Wallet class method updateLatest
- Rename setMigrationStatus action creator to setRealmMigrationStatus

* Desktop: Realm Database - remove redux persist settings dependency (#877)

* Update tray application state sync and initialisation

* Update Proxy settings to use separate electronSettings entry

* Shared: Fix periodically failing sortTransactionTrytesArray test (#878)

* Shared: Fix periodically failing sortTransactionTrytesArray test

* Shared: Make recommended changes

* Remove unnecessary assert statements

* Mobile: Use delete operator instead of nulling out secret references

* Mobile: Move seed storage to byte array, update secret handling, store seed against account name hash

* Mobile: Use secure method of inactivity logout

* Mobile: Fix password fields error

* Mobile: Remove password field from redux

* Mobile: Do not pass seed to redux when adding additional seed

* Fix skipped tests for #isNodeHealthy

* Fix skipped tests

* Update build number check realm migration detection

* Update build number to 40 for migration detection check

* Add missing getCustomNodesFromState state selector

* Pass nodes array in correct format to quorum methods

* Migrate accountIndex property for account from AsyncStorage to realm

* Remove primary key (address) from AddressSchema

* Fix invalid bundle construction for failed transactions

* Preserve local spend status before updating account data in realm

* Refactor #getFullAddressHistory tests

* Make sure we fetch persisted account indexes from realm

* Check for undefined addressData prop before updating address data in realm

* Realm data encryption (#1018)

* Add base setup for realm data encryption

* Pass #getEncryptionKeyPromise when storage is reinitialised

* Store realm encryption key in keychain

* Initialise realm instance with encryption key in tests

* Store realm encryption key in keychain

* Address comments

- Remove base64-js
- Perform Uint8Array to string conversions with vanilla JS

* Skip realm encryption key to be reset on password change

* Simplify #getEncryptionKey implementation

* Update build number to 41 for migration detection check

* Mobile: Fix notification icon touch radius

* Include isRetryingFailedTransaction in modalProps when modalProps are updated

* Move manual bundle construction implementation (for failed transactions) in constructBundlesFromTransactions

* Mobile: Fix iPhone X modal visual bug

* Mobile Release 0.4.1 (41) (#1029)

* Mobile: Bump build number to 41

* Mobile: Bump Realm migration versioning

* Shared: Only rebuild Realm on Debian

* Correctly assign new account name in realm storage (#1045)

* Update isFailedTransaction prop when modal props are updated (#1046)

* Mobile: Add retry button, error log and change node to Realm migration (#1041)

* Mobile: Add ability to change node and retry during migration

* Mobile: Address comments

* Mobile: Fix notification button import and padding

* Mobile: Disable iOS pop gesture

* Mobile Release 0.6.1 (42) (#1048)

* Mobile: Bump build no to 42

* Mobile: Update realm migration versioning

* Mobile: Add logout HOC. Full logout after 30 minutes inactivity

* Realm Database implementation desktop bugfixes (#1025)

* - Fix Realm storage path
- Add missing wallet reset triggers
- Fix address component prop use
- Remove failed bundle hash action

* Update Realm path for test environment

* - Remove Realm instance init from Tray application
- Keep Realm encryption key on keychain initialisation

* Focus wallet window after initial store update

* Add missing Windows required dependency

* Mobile: Add new Entangled trit methods and intergrate Android

* Mobile: Use correct bundle hash encoding for native signatures in Android

* Mobile: Remove unused imports

* Mobile: Update password/seed handling by text inputs

* Mobile: Update text input handling of secrets

* Mobile: Fix QR Scan

* Mobile: Fix text inputs and SeedVault

* Mobile: Fix view seed

* Mobile: Fix write seed down

* Desktop: Create Migration component to migrate data (#857)

* Desktop: Create Migration component to migrate data

* Desktop: Add 'history' to PropTypes

* Desktop: Document getAllStorageKeys

* - Fix Realm storage path
- Add missing wallet reset triggers
- Fix address component prop use
- Remove failed bundle hash action

* Update Realm path for test environment

* - Remove Realm instance init from Tray application
- Keep Realm encryption key on keychain initialisation

* Focus wallet window after initial store update

* Add missing Windows required dependency

* Move Migration to `ui/global`

* Migration bugfixes

* Desktop: Fix off-by-one mistake on Migration component

* Code review fixes

* Fix Wallet reset functionallity

* Mobile: SeedVault, ViewSeed and reentry fixes

* Mobile: Store seed as basic trit array

* Mobile/iOS: Rebuild Entangled with new bindings

Ref: rajivshah3/entangled@5a11ee1

* Mobile: Add seed storage migration and update hashing

* Mobile: Remove garbage collector

* Mobile: Remove gc comments and unnecessary null outs

* Mobile: Fix isUniqueSeed

* Mobile: Fix wallet reset

* Mobile: Fix empty text input issues

* Mobile: Fix prop warning

* Mobile: Fix seed reentry

* Batched proof-of-work (#1071)

* Rebuild entangled android

Commit used: iotaledger/entangled@84f7446
PR: iotaledger/entangled#810

* Add batched proof-of-work methods in EntangledAndroid native module

* Integrate entangled batched proof-of-work methods

* Fix failing tests

* Shared: Update comment

* Mobile: Clear reset timeout

* Mobile: Update gitignore

* Fix account duplication on account rename operation (#1077)

Related issue: #1066

* Mobile: Reorder seed storage check on login

* Mobile: Readd react-native-translucent-moddal (#1083)

* Mobile: Fix up migration

* Mobile/iOS: Rebuild Entangled with new bindings

* Mobile/iOS: Update EntangledIOS RCT_EXPORT_METHODS

* Shared: Update config

* Mobile: Fix migration

* Mobile: Add ios-specific hashing method

* Mobile: Fix seed migration detection

* Fix invalid address data issue (#1089)

Interrupting new account onboarding (on loading screen) leads wallet to throw continuous exceptions. The reason for exceptions was missing "completed" property in realm schema. This commit fixes the issue and also adds realm migration from schema version 0 to latest schema.

* Fix invalid bundle issue on zero value transaction with bundle size > 1 (#1093)

* Integrate native signing (android)

* Mobile: Link translucent modal

* Mobile: Link translucent modal library

* Mobile: Fix failing test

* Mobile: Fix transaction history account mismatch

* Update rn-nodeify

* Add @iota/signing to yarn resolutions

* Mobile: Fix promotion/retry

* Shared: Fix migration when app is first installed (#1098)

* Link @iota/signing iOS

* Mobile: Fix wallet reset crash

* Minor updates

* Use prepareTransfersAsync method in promoteTransaction

* Mobile/iOS: Fix code signing

* Update @iota/core

* Mobile/Android: Rebuild Entangled library (#1109)

Ref: iotaledger/entangled@e63422b

* Mobile: Fix bundle storage order (#1108)

* Desktop: Bump entangled-node to fix failing CI

* New translations translation.json (German)

* New translations translation.json (Polish)

* New translations translation.json (Polish)

* Mobile/iOS: Fix bugs in Entangled methods (#1100)

* Mobile/iOS: Fix multi-address generation

* Shared: Fix migration when app is first installed

* Mobile/iOS: Create trit array conversion utils, fix address gen bugs

* Mobile/iOS: Remove unnecessary printf statements

* Mobile/iOS: Fix memory leaks in multi-address generation

* Mobile/iOS: Fix signature generation bugs

* Mobile/iOS: Rebuild EntangledKit framework

Ref: rajivshah3/entangled@f894cd8

* Mobile/iOS: Fix single-address generation bugs

* Mobile/Android: Remove libc++_shared.so and libjsc.so

* Shared: Revert gitignore edits

* Mobile: Fix qr message input

* Mobile: Remove unnecessary deletes and add necessary deletes

* Resolve conflicts

* Mobile: Temporarily convert to trytes for checksum

* Mobile: Fix lockfile

* New translations translation.json (Czech)

* New translations translation.json (Czech)

* New translations translation.json (Czech)

* New translations translation.json (Czech)

* New translations translation.json (Czech)

* New translations translation.json (Czech)

* New translations translation.json (Czech)

* New translations translation.json (Czech)

* New translations translation.json (Czech)

* New translations translation.json (Czech)

* New translations translation.json (Czech)

* New translations translation.json (Czech)

* New translations translation.json (Slovak)

* New translations translation.json (Slovak)

* New translations translation.json (Slovak)

* New translations translation.json (Slovak)

* New translations translation.json (Slovak)

* New translations translation.json (Slovak)

* New translations translation.json (Chinese Simplified)

* Fix invalid mnemonic issue occurring on realm initialization (#1113)

* Mobile: Increase seed migration timeout to 7.5s

* Mobile: Fix empty password checks

* Mobile: Add additional seed reentry check

* Mobile: Bump versioning to 0.6.2

* Mobile/iOS: Fix code signing

* Shared, Mobile: Bump @iota/signing and other packages to 1.0.0-alpha.a09e7908

* Mobile: Patch Buffer.prototype.slice to prevent Android crash

* Mobile: Bump build numbers for alpha release 0.6.2 (45)

* Mobile/Android: Fix HTTP connection timeout

Ref: facebook/react-native@695784a

* Shared: Revert lockfile changes

* Bump build numbers for alpha release 0.6.2 (46)

* Mobile: Use Uint8 constructor in hashing

* Bump build numbers for alpha release 0.6.2 (47)

* New translations translation.json (Czech)

* New translations translation.json (Czech)

* New translations translation.json (Lithuanian)

* Mobile: Replace QR lib (#1119)

* Fix invalid mnemonic issue occurring on realm initialization

* Resolve conflicts

* Update @iota/core to latest  (#1118)

* Fix invalid mnemonic issue occurring on realm initialization

* Update @iota/core to latest

* Update yarn.lock (#1120)

* Fix invalid mnemonic issue occurring on realm initialization

* Update yarn.lock file

* Mobile: Fix change password alert trigger

* Mobile: Bump build no to 48 (#1121)

* Mobile: Fix iOS QR codes

* Shared: Pass native signing function to prepareTransfers (#1123)

* Shared: Update prepareTransfers to accept native signature method

* Mobile: Unlink @iota/signing

* Shared: Update @iota/core

* Mobile: Fix main application

* Mobile: Fix function call

* Shared: Do not store invalid bundles constructed with local PoW (#1122)

* Shared: Delete bundles created with local PoW that fail validation checks

* Shared: Fix error message check

* Mobile: Bump build no to 49 (#1126)

* Shared, Mobile: Bump iota.lib.js to iotaledger/iota.js@eb27c18

* Mobile: Remove unused qrcode patch

* Mobile/Android: Rebuild Entangled libs with API level 19 (#1138)

* Mobile/Android: Rebuild Entangled libs with API level 19

* Remove unnecessary linker flags

* Desktop: Revert shrinkwrap changes

* Shared: Add null default param

* Mobile: Reenable deep linking

* Mobile: Move deep linking to HOC

* Mobile: Remove unnecessary bind

* Shared: Rename deep link methods/vars

* Shared: Add deep linking setting

* Shared: Add ddeep linking settings and mobile UI

* Mobile: Clear previous deep link request if deep linking is not enabled

* Mobile: Update font weighting

* Shared: Revert shrinkwrap changes

* Update src/mobile/src/ui/views/wallet/DeepLinking.js

Co-Authored-By: cvarley100 <cvarley100@gmail.com>

* Mobile: Update deeplink HOC
  • Loading branch information
cvarley100 committed Apr 8, 2019
1 parent 44c69af commit 5ebb5fe
Show file tree
Hide file tree
Showing 31 changed files with 488 additions and 117 deletions.
15 changes: 11 additions & 4 deletions src/desktop/src/ui/Index.js
Expand Up @@ -14,7 +14,14 @@ import { fetchVersions } from 'libs/utils';
import { getAccountNamesFromState, isSettingUpNewAccount } from 'selectors/accounts';

import { setOnboardingComplete, setAccountInfoDuringSetup } from 'actions/accounts';
import { setPassword, clearWalletData, setDeepLink, setSeedIndex, shouldUpdate, forceUpdate } from 'actions/wallet';
import {
setPassword,
clearWalletData,
initiateDeepLinkRequest,
setSeedIndex,
shouldUpdate,
forceUpdate,
} from 'actions/wallet';
import { updateTheme } from 'actions/settings';
import { fetchNodeList } from 'actions/polling';
import { dismissAlert, generateAlert } from 'actions/alerts';
Expand Down Expand Up @@ -88,7 +95,7 @@ class App extends React.Component {
/** @ignore */
t: PropTypes.func.isRequired,
/** @ignore */
setDeepLink: PropTypes.func.isRequired,
initiateDeepLinkRequest: PropTypes.func.isRequired,
};

constructor(props) {
Expand Down Expand Up @@ -170,7 +177,7 @@ class App extends React.Component {
const parsedData = parseAddress(data);

if (parsedData) {
this.props.setDeepLink(
this.props.initiateDeepLinkRequest(
parsedData.amount ? String(parsedData.amount) : '0',
parsedData.address,
parsedData.message || '',
Expand Down Expand Up @@ -330,7 +337,7 @@ const mapStateToProps = (state) => ({
const mapDispatchToProps = {
clearWalletData,
setPassword,
setDeepLink,
initiateDeepLinkRequest,
setSeedIndex,
dismissAlert,
generateAlert,
Expand Down
2 changes: 1 addition & 1 deletion src/desktop/src/ui/views/wallet/Dashboard.js
Expand Up @@ -132,7 +132,7 @@ const mapStateToProps = (state) => ({
accountName: getSelectedAccountName(state),
accountMeta: getSelectedAccountMeta(state),
password: state.wallet.password,
isDeepLinkActive: state.wallet.deepLinkActive,
isDeepLinkActive: state.wallet.deepLinkRequestActive,
});

const mapDispatchToProps = {
Expand Down
5 changes: 1 addition & 4 deletions src/mobile/android/app/src/main/AndroidManifest.xml
Expand Up @@ -3,17 +3,13 @@
xmlns:tools="http://schemas.android.com/tools"
android:versionCode="1"
android:versionName="0.1.0">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.CAMERA" />


<uses-sdk
tools:overrideLibrary="com.rnprint.RNPrint"/>

<application
android:name="com.iota.trinity.MainApplication"
android:allowBackup="false"
Expand Down Expand Up @@ -45,6 +41,7 @@
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="iota" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
Expand Down
Binary file modified src/mobile/android/app/src/main/assets/fonts/Icons.ttf
Binary file not shown.
9 changes: 9 additions & 0 deletions src/mobile/ios/iotaWallet/Info.plist
Expand Up @@ -2,6 +2,15 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>iota</string>
</array>
</dict>
</array>
<key>BugsnagAPIKey</key>
<string>fakeAPIkey</string>
<key>CFBundleAllowMixedLocalizations</key>
Expand Down
89 changes: 89 additions & 0 deletions src/mobile/src/ui/components/DeepLinking.js
@@ -0,0 +1,89 @@
import React, { Component } from 'react';
import { Linking } from 'react-native';
import { withNamespaces } from 'react-i18next';
import { connect } from 'react-redux';
import PropTypes from 'prop-types';
import { initiateDeepLinkRequest, setSetting } from 'shared-modules/actions/wallet';
import { parseAddress } from 'shared-modules/libs/iota/utils';
import { generateAlert } from 'shared-modules/actions/alerts';
import { changeHomeScreenRoute } from 'shared-modules/actions/home';

export default () => (C) => {
class WithDeepLinking extends Component {
constructor() {
super();
this.setDeepUrl = this.setDeepUrl.bind(this);
}

componentDidMount() {
Linking.addEventListener('url', this.setDeepUrl);
}

componentWillUnmount() {
Linking.removeEventListener('url', this.setDeepUrl);
}

/**
* Prefills transactional information on deep link
* @param {Object} data
*/
setDeepUrl(data) {
const { t, generateAlert, deepLinking } = this.props;

if (!deepLinking) {
return this.navigateToSettings();
}
const parsedData = parseAddress(data.url);
if (parsedData) {
this.props.initiateDeepLinkRequest(
parsedData.amount.toString() || '0',
parsedData.address,
parsedData.message || null,
);
this.props.changeHomeScreenRoute('send');
} else {
generateAlert('error', t('send:invalidAddress'), t('send:invalidAddressExplanation1'));
}
}

/**
* Navigates to deep linking settings
*/
navigateToSettings() {
this.props.changeHomeScreenRoute('settings');
this.props.setSetting('deepLinking');
}

render() {
return <C {...this.props} />;
}
}

WithDeepLinking.propTypes = {
/** @ignore */
t: PropTypes.func.isRequired,
/** @ignore */
generateAlert: PropTypes.func.isRequired,
/** @ignore */
setSetting: PropTypes.func.isRequired,
/** @ignore */
initiateDeepLinkRequest: PropTypes.func.isRequired,
/** @ignore */
changeHomeScreenRoute: PropTypes.func.isRequired,
/** @ignore */
deepLinking: PropTypes.bool.isRequired,
};

const mapStateToProps = (state) => ({
deepLinking: state.settings.deepLinking,
});

const mapDispatchToProps = {
initiateDeepLinkRequest,
generateAlert,
changeHomeScreenRoute,
setSetting,
};

return withNamespaces(['global'])(connect(mapStateToProps, mapDispatchToProps)(WithDeepLinking));
};
4 changes: 2 additions & 2 deletions src/mobile/src/ui/components/InfoBox.js
Expand Up @@ -36,8 +36,8 @@ class InfoBox extends PureComponent {
const { children, containerStyle, theme: { dark } } = this.props;

return (
<View style={[styles.fieldContainer, containerStyle, { backgroundColor: dark.color }]}>
<View style={[styles.innerContainer]}>{children}</View>
<View style={[styles.fieldContainer, { backgroundColor: dark.color }, containerStyle]}>
<View style={styles.innerContainer}>{children}</View>
</View>
);
}
Expand Down
2 changes: 2 additions & 0 deletions src/mobile/src/ui/components/SettingsContent.js
Expand Up @@ -12,6 +12,7 @@ import ViewSeed from 'ui/views/wallet/ViewSeed';
import ViewAddressesComponent from 'ui/views/wallet/ViewAddresses';
import ProofOfWork from 'ui/views/wallet/Pow';
import AutoPromotion from 'ui/views/wallet/AutoPromotion';
import DeepLinking from 'ui/views/wallet/DeepLinking';
import EditAccountNameComponent from 'ui/views/wallet/EditAccountName';
import DeleteAccount from 'ui/views/wallet/DeleteAccount';
import AddNewAccount from 'ui/views/wallet/AddNewAccount';
Expand Down Expand Up @@ -54,6 +55,7 @@ const SETTINGS_COMPONENTS = {
modeSelection: ModeSelection,
pow: ProofOfWork,
autoPromotion: AutoPromotion,
deepLinking: DeepLinking,
about: About,
exportSeedVault: SeedVaultSettings,
};
Expand Down
4 changes: 2 additions & 2 deletions src/mobile/src/ui/components/Toggle.js
Expand Up @@ -44,9 +44,9 @@ class Toggle extends PureComponent {
{
alignItems: active ? 'flex-end' : 'flex-start',
borderColor: bodyColor,
width: size / 13,
width: size / 12,
height: size / 22,
borderRadius: size / 40,
borderRadius: size / 24,
paddingHorizontal: size / 300,
opacity: isAndroid ? opacity * 2 : 1,
},
Expand Down
11 changes: 10 additions & 1 deletion src/mobile/src/ui/views/wallet/AdvancedSettings.js
Expand Up @@ -37,6 +37,8 @@ export class AdvancedSettings extends PureComponent {
autoPromotion: PropTypes.bool.isRequired,
/** @ignore */
remotePoW: PropTypes.bool.isRequired,
/** @ignore */
deepLinking: PropTypes.bool.isRequired,
};

constructor() {
Expand Down Expand Up @@ -108,7 +110,7 @@ export class AdvancedSettings extends PureComponent {
* @returns {function}
*/
renderSettingsContent() {
const { theme, t, node, autoPromotion, remotePoW } = this.props;
const { theme, t, node, autoPromotion, remotePoW, deepLinking } = this.props;
const rows = [
{ name: t('selectNode'), icon: 'node', function: this.onNodeSelection, currentSetting: node },
{ name: t('addCustomNode'), icon: 'plusAlt', function: this.onAddCustomNode },
Expand All @@ -124,6 +126,12 @@ export class AdvancedSettings extends PureComponent {
function: () => this.props.setSetting('autoPromotion'),
currentSetting: autoPromotion ? t('enabled') : t('disabled'),
},
{
name: t('deepLinking'),
icon: 'link',
function: () => this.props.setSetting('deepLinking'),
currentSetting: deepLinking ? t('enabled') : t('disabled'),
},
{ name: 'separator' },
{
name: t('snapshotTransition'),
Expand All @@ -148,6 +156,7 @@ const mapStateToProps = (state) => ({
node: state.settings.node,
autoPromotion: state.settings.autoPromotion,
remotePoW: state.settings.remotePoW,
deepLinking: state.settings.deepLinking,
isSendingTransfer: state.ui.isSendingTransfer,
});

Expand Down

0 comments on commit 5ebb5fe

Please sign in to comment.