IntersectMBO / govtool

πŸ”© GovTool and utilities monorepo.
https://gov.tools
Apache License 2.0
14 stars 9 forks source link

πŸ› No feedback on governance action submission if the stake is not registered #2384

Open spannercode opened 3 days ago

spannercode commented 3 days ago

Area

Wrapper

Domain

preview.gov.tools

Which wallet were you using?

Eternl

Context

As an Ada holder, if I try to submit a governance action while my stake key is not registered, I get a wallet pop up to sign the transaction to pay 100K Ada but nothing happens afterwards and I'm stuck on this screen without any feedback.

Screenshot 2024-11-19 at 07 16 47

Steps to reproduce

  1. As an Ada holder, create a completely new account on your wallet so that your stake key is not registered yet. Top up the balance as necessary.
  2. Create an info action proposal by filling up the necessary form fields and try to submit as governance action when the proposal is created.
  3. Store the metadata as necessary and paste the metadata URL.
  4. Click submit
  5. It will open a wallet pop up to pay the deposit. Sign the transaction to pay.
  6. It will show a pop up showing GovTool is validating the metadata.
  7. Nothing happens further.
  8. Look in the console logs for error message related to wallet transaction submission.

Actual behavior

An error is logged in the console preventing further processing.

index-b99608ed.js:90 TxSendError: Unknown error: {}
    at getTxSendError (dom.js:2903:12)
    at Object.submitTx (dom.js:2699:13)
    at async Object.buildSignSubmitConwayCertTx (index-b99608ed.js:413:45658) 'error'

Expected behavior

Since the stake key is not registered, it is expected to fail. However, the user has no idea what went wrong. User should be informed about what went wrong and how he/she can recover from the error.

In this case, it might be better to check if the stake key already registered or not before the user tries to submit a governance action so user is already aware of the situation.

m-i-k-e commented 1 day ago

Is this a bug in the code, or an error that could happen from time to time due to network issues, etc? If it's the latter, then we need to test for it and handle it in a way to let the user know and recover from it.