getwax / bls-wallet

Core components to use layer 2 smart contract wallets with the BLS signature scheme
MIT License
177 stars 46 forks source link

fix: assing TransactionReceipt to getOperationResults always results in no WalletOperationProcessed events found in transaction error #583

Closed deepaksing closed 1 year ago

deepaksing commented 1 year ago

What is this PR doing?

This PR adds an additional check on the truthiness of txnReceipt.events in getOperationResults function and throws an error with a message such as "no events found in transaction [TXN_HASH], are you sure it is a ContractReceipt from a VerificationGateway.processBundle transaction?", when there are no events found.

How can these changes be manually tested?

You can test these changes by running the existing test suite, which will include the new test case for this change.

Does this PR resolve or contribute to any issues?

This PR resolves the issue #563

Checklist

Guidelines