Skip to content

chore(wallet): fix encrypted input not working and add color fallback#1057

Merged
DalderupMaurice merged 2 commits intodevelopfrom
chore/fix-encrypted-input
Aug 4, 2019
Merged

chore(wallet): fix encrypted input not working and add color fallback#1057
DalderupMaurice merged 2 commits intodevelopfrom
chore/fix-encrypted-input

Conversation

@DalderupMaurice
Copy link
Copy Markdown
Member

@DalderupMaurice DalderupMaurice commented Aug 3, 2019

also cleaned up some props

Description

fixes an issue with the encrypted input, which went bork due to bip39 updates

Motivation and Context

it was broken

How Has This Been Tested?

Screenshots (if appropriate)

Types of changes

  • Chore (tests, refactors, and fixes)
  • New feature (adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • I have read the CONTRIBUTING guidelines and confirm that my code follows the code style of this project.
  • Tests for the changes have been added (for bug fixes/features)

Documentation

  • Docs need to be added/updated (for bug fixes/features)

Closing issues

Fixes #


const coinType = COINS[wallet.coinType];
const identityColor = styles[coinType ? coinType.symbol.toLowerCase() : DEFAULT_COIN];
// TODO dont hardcode fallback color
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is something we'll do when nOS has it's native coin. As we cannot include it yet in the coins consts for this reason

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 3, 2019

Codecov Report

Merging #1057 into develop will decrease coverage by 0.02%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           develop   #1057      +/-   ##
==========================================
- Coverage    51.02%     51%   -0.03%     
==========================================
  Files          238     238              
  Lines         2046    2047       +1     
  Branches       271     271              
==========================================
  Hits          1044    1044              
- Misses         833     834       +1     
  Partials       169     169

try {
if (wallet) {
const walletInstance = Wallet({ encryptedMnemonic: data, passphrase, wallet });
const walletInstance = await Wallet({ encryptedMnemonic: data, passphrase, wallet });
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice if this was an actual class, but not relevant to this PR

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you cannot await new Wallet(), right :P That's what I meant with refactoring it to be sync

@jeroenptrs jeroenptrs added PR: good to merge Reviewed and approved and removed PR: needs review Pull request labels Aug 3, 2019
@DalderupMaurice DalderupMaurice merged commit 33d62c4 into develop Aug 4, 2019
@DalderupMaurice DalderupMaurice deleted the chore/fix-encrypted-input branch August 4, 2019 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: good to merge Reviewed and approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants