Closed pwoosam closed 9 months ago
I will look in to how to make this able to support multiple requests, for the time being you should lock the UI until the current transaction is resolved
I tried to resolve this by turning transactionResolver into a map where the key was the message's id and the value is the resolver. This should work, but the message we're sending to hashpack has a different id from the message we are receiving from hashpack. This may be intended because messages are technically different messages, but there does not seem to be a way to relate the message going to hashpack to the message coming from hashpack.
You may need to add some additional metadata to the messages that are persisted going to/from hashpack. Maybe an End-to-end ID or thread id, or something along those lines that let's hashconnect know that the messages are related and are part of the same interaction.
sendTransaction
,requestAdditionalAccounts
, andauthenticate
all return a Promise which may never resolve due to race conditions.For example, if we call
sendTransaction
twice rapidly, thentransactionResolver
will be set twice. This will cause the first call tosendTransaction
to never resolve because the first reference totransactionResolver
will be lost beforeMessageHandler
calls it receiving aRelayMessageType.TransactionResponse
payload.The following three properties are set by their corresponding methods, and may never resolve due to the error described above.