-
Notifications
You must be signed in to change notification settings - Fork 378
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Wallet] Add support for address pasting in send input field #1180
Conversation
@@ -10,6 +10,8 @@ | |||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | |||
<uses-permission android:name="android.permission.CAMERA" /> | |||
|
|||
<uses-sdk android:minSdkVersion="16" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding this back, I mistakenly removed the line in my last PR but should have just removed the targetSDK field in it
@@ -0,0 +1,88 @@ | |||
// HOC to add a label (e.g. an icon or a currency code) to a text input |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, this is mostly based on LabeledTextInput.tsx which was deleted
Codecov Report
@@ Coverage Diff @@
## master #1180 +/- ##
==========================================
+ Coverage 66.16% 66.16% +<.01%
==========================================
Files 262 261 -1
Lines 7610 7599 -11
Branches 443 440 -3
==========================================
- Hits 5035 5028 -7
+ Misses 2478 2476 -2
+ Partials 97 95 -2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Though I understand the idea to separate the different TextInput features (paste and labeling), I'm a bit wary of the usage of HOC for this, I find it makes it non obvious to understand how to use the HOCs.
What would happen if they aren't composed in the right order?
I might be missing something but having props to enable/disable labels and paste would seem simpler as a user of TextInput.
render() { | ||
const { isPasteIconVisible } = this.state | ||
|
||
// TODO(Rossy) Use a more paste-y instead of copy looking icon when we have one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly what I thought when I saw the icon 😄
this.setState({ isPasteIconVisible: true }) | ||
} else { | ||
this.setState({ isPasteIconVisible: false }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: not really a problem here but this style of async usage could make it call setState
after the component has been unmounted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a general strategy on how to avoid that?
* master: [Protocol] Fix network id for alfajores in truffle configs (#1211) When resetting and upgrading a VM testnet, new tx-nodes are included in the new instance group (#771) Upload static VM testnet nodes, add stackdriver logging (#750) Revert "Make packages depend on git vesrion (not npm)" (#1201) Make packages depend on git vesrion (not npm) (#1192) [contractkit] Document methods (#1195) [ck] consistent send tx object in kit (#1191) Move docker images to use node v10 (#1183) [ContractKit]Fill more fields before web3 signing (#1133) [codecov]Fix codecov errors (#1147) [Wallet] Add support for address pasting in send input field (#1180) Fix verification pool validation (#1176) Improve QR Code scan ability (#1036) Add CLI commands around identity metadata (#1167) [wallet]Run geth in an infura-like mode (#1108) # Conflicts: # yarn.lock
Description
Tested
Loaded send with and without address in clipboard
Ran through send flow
Ran through invite flow
Related issues
Backwards compatibility
Yes