pera-wallet icon indicating copy to clipboard operation
pera-wallet copied to clipboard

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

Open ivnsch opened this issue 3 years ago • 1 comments

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.

ivnsch avatar Nov 20 '21 15:11 ivnsch

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

jasonpaulos avatar Nov 22 '21 17:11 jasonpaulos