As a user signing via metamask, I should see the signature appear as part of the transaction group in both the pending count in the "Pending" button, and in the UserHub transactions list.
Description
Originally raised as part of #2883
When voting on a motion, or revealing your vote on a motion, there will be two metamask popups. The first is a signature (not to be confused with a multi-sig signature) and the second is a transaction. Currently the "Pending" button only counts transactions, so the signature will not be included.
Ideally the signature should also be included and the pending button should show Pending 0/2, then after it is signed increase to Pending 1/2.
The signature should also be included as part of the transaction group in the UserHub transactions list, and it should be possible to retry the transaction group if the signature is rejected.
Implementation
This issue is complete when...
[ ] Signatures are included in the "Pending" button count
[ ] Signatures are included in the UserHub transactions list as part of the same transaction group as the related transactions (i.e. if voting on a motion, the first item in the transaction group should be the signature, the second should be the motion vote transaction).
[ ] It should be possible to retry the signature via the UserHub transactions list "retry" button.
[ ] If a signature is rejected, the UserHub should automatically open on the transactions list in the same way that it does if a transaction is rejected or fails
Suggestions (optional)
Both the txButton and the UserHub transactions list use the useGroupedTransactions hook which fetches the user's transactions and groups them together. A possible solution is to add a new "Signature" model to the schema which would store the transaction group id, index, status, etc.
Then when we query the transactions in the useGroupedTransactions hook, we would create an array of all the transaction groupIds which could then be used to query the signatures for any matches. We could then combine the transactions array with the signatures array so the are both included in the txButton and UserHub transactions list.
This will likely require some messing with types and expected props for components as the Signature items in this array will have much fewer props than the Transaction items in the array.
Specification
Story
As a user signing via metamask, I should see the signature appear as part of the transaction group in both the pending count in the "Pending" button, and in the UserHub transactions list.
Description
Originally raised as part of #2883
When voting on a motion, or revealing your vote on a motion, there will be two metamask popups. The first is a signature (not to be confused with a multi-sig signature) and the second is a transaction. Currently the "Pending" button only counts transactions, so the signature will not be included.
Ideally the signature should also be included and the pending button should show
Pending 0/2
, then after it is signed increase toPending 1/2
.The signature should also be included as part of the transaction group in the UserHub transactions list, and it should be possible to retry the transaction group if the signature is rejected.
Implementation
This issue is complete when...
Suggestions (optional)
Both the txButton and the UserHub transactions list use the
useGroupedTransactions
hook which fetches the user's transactions and groups them together. A possible solution is to add a new "Signature" model to the schema which would store the transaction group id, index, status, etc.Then when we query the transactions in the
useGroupedTransactions
hook, we would create an array of all the transaction groupIds which could then be used to query the signatures for any matches. We could then combine the transactions array with the signatures array so the are both included in the txButton and UserHub transactions list.This will likely require some messing with types and expected props for components as the Signature items in this array will have much fewer props than the Transaction items in the array.