Closed markopoloparadox closed 2 years ago
It depends on what the user expect. From the dapp dev perspective, how can you expect the extrinsic to be included in a block without the signature ? If I want to sign with polkadot extension, use wallet connect or else, I need a hash to sign (valid or invalid)
I think that just creating the TX without signing it is a different use case that we need to handle. In my example I was talking about the case where you pass your keyring and in return the call gives you a TX hash (which means that the extrinsic was signed and executed),
Some functions like createNft or createCollection return the hash of the transactions. This is pretty much useless because a) you cannot do anything with it b) the hash might be invalid c) TX hashes are not unique and D) the user expects to get some real data
One option is to make the call blocking and return either an error or the corresponding extrinsic event. The second option is to return a promise which when the user waits on it returns the extrinsic event (or an error).
There should be two modes of operating. Either wait for the TX to be included in a block or wait for the TX to be in a finalized block. The last option should be the default case.