pera-wallet
pera-wallet copied to clipboard
Stack overflow on iOS / WalletConnect when there are equal transactions in a group
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.
@ivanschuetz thank you for reporting this, we're looking into it