Skip to content
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

API accepting undefined destination for transfer #5697

Open
3 of 10 tasks
bee344 opened this issue Jul 27, 2023 · 0 comments
Open
3 of 10 tasks

API accepting undefined destination for transfer #5697

bee344 opened this issue Jul 27, 2023 · 0 comments

Comments

@bee344
Copy link
Contributor

bee344 commented Jul 27, 2023

  • I'm submitting a ...
  • Bug report
  • Feature request
  • Support request
  • Other
  • What is the current behavior and expected behavior?

Currently when calling api.tx.balances.transfer and leaving the destination address as undefined, the funds are taken from the sender's account and sent to the address 111111111111111111111111111111111HC1. In these cases the transaction should fail and alert the sender they should input the destination address.

  • What is the motivation for changing the behavior?

Now the funds sent this way are being lost, since trying to retrieve them using keyring.createFromUri("0x Hex") to recreate the private key of the undefined address and sending the funds back to the original address returns:

"error": "1010: Invalid Transaction: Inability to pay some fees , e.g. account balance too low"
  • Please tell us about your environment:
  • Version: api v10.9.1

  • Environment:

    • Node.js
    • Browser
    • Other (limited support for other environments)
  • Language:

    • JavaScript
    • TypeScript (include tsc --version) v4.9.4
    • Other
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant