Check Address is valid before sending #445

Closed
opened 2017-08-06 20:25:15 +02:00 by MSFTserver · 8 comments
MSFTserver commented 2017-08-06 20:25:15 +02:00 (Migrated from github.com)

The Issue

issue comes about when trying to send funds to a non legit account like "aaaaaaaa"

Steps to reproduce

1.enter address aaaaaaaaaa
2.enter amount
3.send

Expected behaviour

i would expect this to do an api call to see if this address is existence and has funds linked to it or if it does not have a public or private key don't send the funds, and have error pop up if it doesnt work

Actual behaviour

it claims it sent the funds to the non existence account

System Configuration

  • LBRY Daemon version: 0.14.2
  • LBRY App version: 0.14.3
  • LBRY Installation ID: 9JKT6nrdGYoFKshVLmjnbfUdqNvHRkzWmsLXk5xNdbXzGEwpraZ6MVg1KoD5jrBrf2
  • Operating system: Windows 10

Anything Else

Screenshots

<!-- Thanks for reporting an issue to LBRY and helping us improve! To make it possible for us to help you, please fill out below information carefully. Before reporting any issues, please make sure that you're using the latest version. - App releases: https://github.com/lbryio/lbry-app/releases - Standalone daemon: https://github.com/lbryio/lbry/releases We are also available on Slack at https://slack.lbry.io --> ## The Issue issue comes about when trying to send funds to a non legit account like "aaaaaaaa" ### Steps to reproduce 1.enter address aaaaaaaaaa 2.enter amount 3.send ### Expected behaviour i would expect this to do an api call to see if this address is existence and has funds linked to it or if it does not have a public or private key don't send the funds, and have error pop up if it doesnt work ### Actual behaviour it claims it sent the funds to the non existence account ## System Configuration <!-- For the app, this info is in the About section at the bottom of the Help page. You can include a screenshot instead of typing it out --> <!-- For the daemon, run: curl 'http://localhost:5279/lbryapi' --data '{"method":"version"}' and include the full output --> - LBRY Daemon version: 0.14.2 - LBRY App version: 0.14.3 - LBRY Installation ID: 9JKT6nrdGYoFKshVLmjnbfUdqNvHRkzWmsLXk5xNdbXzGEwpraZ6MVg1KoD5jrBrf2 - Operating system: Windows 10 ## Anything Else <!-- Include anything else that does not fit into the above sections --> ## Screenshots <!-- If a screenshot would help explain the bug, please include one or two here -->
tzarebczan commented 2017-08-06 20:31:54 +02:00 (Migrated from github.com)

We may be able to do some semantic checks on the address (length, etc) but checking if the address exists or if it has public / private keys is impossible.

We may be able to do some semantic checks on the address (length, etc) but checking if the address exists or if it has public / private keys is impossible.
MSFTserver commented 2017-08-06 20:34:52 +02:00 (Migrated from github.com)

even just an error saying it didn't send would be nice at this point even if it doesn't exist and it doesn't send it says it sent and its in my queue

even just an error saying it didn't send would be nice at this point even if it doesn't exist and it doesn't send it says it sent and its in my queue
MSFTserver commented 2017-08-06 20:36:26 +02:00 (Migrated from github.com)

image

![image](https://user-images.githubusercontent.com/18357967/29005962-79f4be4c-7a9b-11e7-9da2-371530124975.png)
kauffj commented 2017-08-06 20:58:18 +02:00 (Migrated from github.com)

This issue exists in the daemon as well, and there are likely changes required for both. Here's the daemon ticket: https://github.com/lbryio/lbry/issues/828

This issue exists in the daemon as well, and there are likely changes required for both. Here's the daemon ticket: https://github.com/lbryio/lbry/issues/828
kauffj commented 2017-08-06 21:00:40 +02:00 (Migrated from github.com)

On the app side of this, the proper solution is probably one of:

  • Create a component, FormFieldWalletAddress, that verifies the value is a valid address on blur/submit
  • Modify FormField to take a regexp parameter, that matches on blur/submit, and submit the proper regexp as defined in lbryuri.
On the app side of this, the proper solution is probably one of: - Create a component, `FormFieldWalletAddress`, that verifies the value is a valid address on blur/submit - Modify `FormField` to take a `regexp` parameter, that matches on blur/submit, and submit the proper regexp as defined in `lbryuri`.
akinwale commented 2017-08-08 15:38:02 +02:00 (Migrated from github.com)

I think we can run a base58 address validation check at the very least. Perhaps, something like https://github.com/wzbg/base58check/blob/master/index.js#L30-L47 which would require the use of an external module.

I think we can run a base58 address validation check at the very least. Perhaps, something like https://github.com/wzbg/base58check/blob/master/index.js#L30-L47 which would require the use of an external module.
kauffj commented 2017-08-30 16:25:41 +02:00 (Migrated from github.com)

Per discussion in meeting, the correct resolution for this is still https://github.com/lbryio/lbry-app/issues/445#issuecomment-320525524

Per discussion in meeting, the correct resolution for this is still https://github.com/lbryio/lbry-app/issues/445#issuecomment-320525524
kauffj commented 2017-09-06 21:07:04 +02:00 (Migrated from github.com)

Merged, will be released in 0.15.1.

Merged, will be released in 0.15.1.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#445
No description provided.