multiversx / mx-sdk-js-wallet-connect-provider

Signing provider for dApps: Wallet Connect.
Other
5 stars 2 forks source link

signTransactions throws an error in case of single trasaction signed with maiar app #6

Closed CiprianDraghici closed 2 years ago

CiprianDraghici commented 2 years ago

Main issue: When only one transaction is signed with maiar app, walletConnectProvider - signTransactions method throws an error: Wallet Connect could not sign the transactions.

This happens because of the response of the erd_batch_sign method which returns an object that contains the signature or an array of objects with signatures. This case is not handled in signTransactions method.

An idea would be to change the erd_batch_sign method to return only an array, but a workaround for this limitation is to pass the transaction from the list (only one) to the signTransaction method which does the correct transaction handling.