diff --git a/ios/RCTConvert+TransactionList.h b/ios/RCTConvert+TransactionList.h index de05e616a18..930583e1b15 100644 --- a/ios/RCTConvert+TransactionList.h +++ b/ios/RCTConvert+TransactionList.h @@ -30,6 +30,7 @@ { json = [self NSArray:json]; NSMutableArray *result = [[NSMutableArray alloc] init]; + int index = 0; for (id t in json) { NSDictionary *data = [self NSDictionary:t]; @@ -80,6 +81,9 @@ transaction.minedAt = [[NSDate alloc] init]; } + transaction.originalIndex = [[NSNumber alloc] initWithInt:index]; + index+=1; + [result addObject:transaction]; } return result; diff --git a/ios/Transaction.swift b/ios/Transaction.swift index b11b2021717..8211741c0de 100644 --- a/ios/Transaction.swift +++ b/ios/Transaction.swift @@ -31,6 +31,7 @@ import Foundation @objcMembers class Transaction: NSObject { + var originalIndex: NSNumber!; var transactionDescription: String! var title: String! var type: String! diff --git a/ios/TransactionListView.swift b/ios/TransactionListView.swift index 59c27258c5a..371052363a6 100644 --- a/ios/TransactionListView.swift +++ b/ios/TransactionListView.swift @@ -365,7 +365,7 @@ class TransactionListView: UIView, UITableViewDelegate, UITableViewDataSource { cell.onItemPress = onTransactionPress cell.layer.anchorPoint = transformOrigin - cell.row = indexPath.row + cell.row = transaction.originalIndex.intValue cell.scaleTo = scaleTo cell.set(transaction: transaction) cell.selectionStyle = .none