Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

help messaging and transaction options to reduce duplicate transaction errors #422

Merged

Conversation

wanderingbort
Copy link
Contributor

closes #384

  • more informative error messages
    • client side system for translating non-human-friendly error spew
    • optional -v,--verbose option to get back the error spew of olde
  • standard transaction options composable on any sub-command
    • expiration support -x,--expiration[=]<milliseconds til expiration>
    • force unique transaction support -f,--force-unique
      • uses the transfer memo when it can
      • uses a superfluous message to eos with type nonce otherwise
      • do we want to just pad out the last messages payload bytes instead?
  • BONUS: human readable error messaging for:
    • permissions you dont have the keys for
    • referring to accounts that don't exist
    • using push message for an unknown ABI
    • opening an unknown wallet
    • incorrect password when unlocking wallet
    • trying to access a locked wallet

@wanderingbort
Copy link
Contributor Author

examples of the new error messaging:

$ ./eosc transfer inita user1 100 "The Memo"
An error occurred while submitting the transaction for this command!

The transaction references an account which does not exist.
Unknown accounts:
  - user1

Please check the account names and try again!   

$ ./eosc wallet open -n foo
Unable to find a wallet named "foo", are you sure you typed the name correctly?

$ ./eosc wallet unlock
password: <obviously bad password>
Invalid password for wallet named "default"

$ ./eosc transfer inita user1 100 "The Memo"
An error occurred while submitting the transaction for this command!

The transaction requires permissions that could not be authorized by the wallet.
Missing authrizations:
  - inita@active

Please make sure the proper keys are imported into an unlocked wallet and try again!    

@bytemaster
Copy link
Contributor

This looks amazing, your bonus efforts also look good except it may invalidate one of the steps in my tutorial! Need to check to see if I can use push message with hex data or if your new checks cause that to fail.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate transaction error
2 participants