perawallet / pera-wallet

Source code for Pera Wallet, simply the best Algorand wallet.
https://perawallet.app
Other
178 stars 62 forks source link

Stack overflow on iOS / WalletConnect when there are equal transactions in a group #38

Closed ivnsch closed 11 months ago

ivnsch commented 2 years ago

For testing purposes I tried to sign a transaction in a group with 2 identical transactions (a swap where the user sends/receives the same tokens, the last transaction has an empty signers array). The app crashes (production/current master).

The problem is in this recursion: https://github.com/algorand/algorand-wallet/blob/master/ios/Classes/ViewControllers/WalletConnect/Transaction/Main/WCMainTransactionViewController.swift#L301

It returns the index of the first transaction, calls continueSigningTransactions with the next, since the first is identical, returns again the index of the first, etc.

A possible solution would be to pass the index to the recursion instead.

jasonpaulos commented 2 years ago

@ivanschuetz thank you for reporting this, we're looking into it