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

can't send iotas with enough balance #811

Closed
gnodaij opened this issue Dec 16, 2018 · 25 comments · Fixed by #824
Closed

can't send iotas with enough balance #811

gnodaij opened this issue Dec 16, 2018 · 25 comments · Fixed by #824
Assignees
Labels
C - Desktop P1 - Critical Priority - Do this ASAP T - Bug Type - Bug: Something isn't working

Comments

@gnodaij
Copy link

gnodaij commented Dec 16, 2018

can't send iotas with enough balance

0.4.4
macos 10.13

@rajivshah3
Copy link
Member

@gnodaij are you seeing a blue screen after trying to send?

@gnodaij
Copy link
Author

gnodaij commented Dec 16, 2018

yes only after sending, say 0 value

@gnodaij
Copy link
Author

gnodaij commented Dec 16, 2018

my question is it won't let me send the balance i have and remind of not enough balance

@rajivshah3
Copy link
Member

Can you post a screenshot of the error?

@gnodaij
Copy link
Author

gnodaij commented Dec 16, 2018

2018-12-16 12 28 42

@rajivshah3
Copy link
Member

Can you also post a screenshot of your addresses? You can view them by going to Settings > [account name] > View addresses

@rajivshah3 rajivshah3 added C - Desktop L - Need more information Lifecycle - Waiting for more information labels Dec 16, 2018
@gnodaij
Copy link
Author

gnodaij commented Dec 16, 2018

2018-12-16 12 32 34

@rajivshah3
Copy link
Member

Sorry, last question 😄 could you post the address that begins with GEV?

@gnodaij
Copy link
Author

gnodaij commented Dec 16, 2018

GEVCWBDQW9UTEEAJYBGYSZMYAYMQNFMOOVOATMNFSNVIMIICOMDZBIELZJFEZYKFGARLZMF9RUNEZYYYXIZNQAPXID

@rajivshah3
Copy link
Member

Hmm, that's really odd. Which node are you connected to?

@gnodaij
Copy link
Author

gnodaij commented Dec 16, 2018

2018-12-16 12 36 27

@rajivshah3 rajivshah3 added T - Bug Type - Bug: Something isn't working and removed L - Need more information Lifecycle - Waiting for more information labels Dec 16, 2018
@rajivshah3
Copy link
Member

@gnodaij it looks like there's an outgoing transaction from that address now. Were you able to send the transaction this time?

@gnodaij
Copy link
Author

gnodaij commented Dec 16, 2018

it is even more strange, i am actually trying to send from another wallet, but it happened to be sending from the previous one

@gnodaij
Copy link
Author

gnodaij commented Dec 16, 2018

now with the current wallet, there is no "max" button anymore, means trinity thinks there is 0 balance from my wallet, which is not the case

@laumair
Copy link
Contributor

laumair commented Dec 16, 2018

i am actually trying to send from another wallet, but it happened to be sending from the previous one

@gnodaij Can you please elaborate? Which other wallet are you using?

@gnodaij
Copy link
Author

gnodaij commented Dec 16, 2018

oki, somehow i can't recall how, i was able to send....

now with more balance i can't even send 1 iota out and there is no "max" button either which means trinity thinks i have a 0 balance?
2018-12-16 1 27 05
2018-12-16 1 27 19

@gnodaij
Copy link
Author

gnodaij commented Dec 16, 2018

here is where it messed up:

i have two wallets, "0" with a balance 102m, "m" with 0 balance.

i created a receiving address from "m"(but actually it is generated from "0"), and i am able to send out balances of "0" from "m"(0 balance). the result is i am actually sending and receiving both from "0". but i can only do this from "m". i can do nothing from "0".

so weird...
2018-12-16 3 22 11
2018-12-16 3 22 44

@laumair
Copy link
Contributor

laumair commented Dec 17, 2018

@gnodaij Thank you for providing the information. This seems like a bug to me. I will investigate.

@laumair laumair self-assigned this Dec 17, 2018
@laumair
Copy link
Contributor

laumair commented Dec 17, 2018

@gnodaij What was the sequence in which you added accounts? Did you add account 0 first? Also, did you rename any account?

@gnodaij
Copy link
Author

gnodaij commented Dec 17, 2018

i did more experiments and i believe it has something to do with the seeds and ledger nano s

wallet "0" 's seed is in the ledger nano and wallet "m" 's seed is in the trinity. "0" is added later through ledger nano s.

when i try to send, it seems i can only send "0"'s balance through "M" and vise versa.
2018-12-17 11 03 01
2018-12-17 11 03 12

@laumair
Copy link
Contributor

laumair commented Dec 17, 2018

@gnodaij I can see that the order of accounts is wrong if you added the 0 account after. Did you add the 0 account after updating to v0.4.4 or before?

@gnodaij
Copy link
Author

gnodaij commented Dec 17, 2018

added it before 0.4.4, no problem

deleted "0" and added in 0.4.4 and 0.4.5, both went wrong

@laumair laumair added the P1 - Critical Priority - Do this ASAP label Dec 17, 2018
laumair added a commit to laumair/trinity-wallet that referenced this issue Dec 17, 2018
…ndex)

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. iotaledger#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 iotaledger#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")
@laumair
Copy link
Contributor

laumair commented Dec 19, 2018

@gnodaij Thank you for reporting this bug. #824 should fix it.

Till the next desktop release, I would suggest that you name your accounts with non-numeric characters to avoid this issue.

@gnodaij
Copy link
Author

gnodaij commented Dec 19, 2018

you can't prevent people from using numbers to name their wallets, so this should not be an issue.

@cvarley100
Copy link
Contributor

Yeah @gnodaij, it’s a bug that has since been fixed. When the next version is released it will be resolved.

cvarley100 pushed a commit that referenced this issue Dec 20, 2018
…ndex) (#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")
laumair added a commit that referenced this issue Dec 20, 2018
* 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)
cvarley100 added a commit that referenced this issue Jan 15, 2019
* Mobile: Fix bar colours

* Mobile: Add new receive page UI

* Mobile: Clear timeouts on unmount

* Mobile: Adjust receive page animations

* Mobile: Rename component

* Mobile: Fix progress bar on fingerprint authentication

* Mobile: Fix topbar spacing

* Mobile: Fix topbar opacity when disabled

* Mobile: Fix Android alert padding when modal is open

* 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: Bump build numbers for release 0.6.0 (35) (#844)

* Mobile: Fix account name opacity during certain tasks

* Mobile: Adjust chart animations

* Mobile: Adjust chart timeframe order

* Mobile: Fix View Addresses scrollable area

* Fix failing tests (#879)

* Mobile: Fix issues with animations in settings (#881)

* Mobile: Fix settings animations issues

* Mobile: Fix settings animations issues

* Mobile: Fade out on logout

* Mobile: Fix login animation direction

* Mobile: Remove unused prop

* Mobile: Fix notification icon when modal is open

* Mobile: Fix retry text opacity during promotion

* Quorum refinements (#884)

* Remove unnecessary node sync checks

With quorum integration, some node sync checks are now unnecessary as quorum will ensure we always query synced nodes. This commit removes these checks.

* Use default timeout for getNodeInfo while checking node's health

* Disable quorum for getLatestInclusion (#900)

- Add node health checks for account sync utils because getLatestInclusion support for quorum is (temporarily) disabled.

* Mobile: Add request-specific timeouts to quorum

* Mobile: Add request-specific timeouts to quorum (#903)

* Mobile: Add request-specific timeouts to quorum

* Mobile: Update GET_NODE_INFO_REQUEST_TIMEOUT in config

* Alpha 0.6.0 (36) Release (#904)

* Mobile: Add request-specific timeouts to quorum

* Mobile: bump build no

* Fix findSyncedNodes implementation (#915)

findSyncedNodes wasn't filtering unsynced nodes from selected nodes in one case. This commit fixes the issue.

* Fix modal layout issues on Android and iPhone X (#916)

* Mobile: Add request-specific timeouts to quorum

* Mobile: Fix modal layout issues and refactor

* Update src/mobile/src/ui/components/ModalView.js

Co-Authored-By: cvarley100 <cvarley100@gmail.com>
cvarley100 added a commit that referenced this issue Feb 26, 2019
* Mobile: Fix bar colours

* Mobile: Add new receive page UI

* Mobile: Clear timeouts on unmount

* Show desktop window only after persisted state has been restored

* Send payload only if provided

* Mobile: Adjust receive page animations

* Mobile: Rename component

* Mobile: Fix progress bar on fingerprint authentication

* Mobile: Fix topbar spacing

* Mobile: Fix topbar opacity when disabled

* Mobile: Fix Android alert padding when modal is open

* 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
cvarley100 added a commit that referenced this issue Apr 8, 2019
* 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C - Desktop P1 - Critical Priority - Do this ASAP T - Bug Type - Bug: Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants