Closed kcw-grunt closed 1 year ago
Hey @majestic84!
Maybe you can spot the issue here? Basically, iOS was working fine for years and we merged the loafwallet-core to have both Android and iOS use the same commit.
When trying to migrate, the tx filtering fails as the structure of the addresses are different and so any segwit addresses are not found.
I'm not savvy enough on BRCore to understand why the filtering fails. Ironically enough, the addresses are found but it doesn't make sense that they worked fine (for years) and now they are violating the filter
Do you have a cycle or 2 to take a look? I'm stumped here.
Thanks if you can!
This PR is the best argument to write tests. Note: Check out this commit f200ecc
cc: @josikie @Iferencak
Thanks for the bounty 21Ł Thanks to the Lite.Space and Indigo Nakamoto Please visit Lite.Space to learn and learn more about other bounties!
Note the distribution for this effort:
Developer | Percentage | Amount |
---|---|---|
Lead Developer | 75% | 15.75Ł |
PR Review | 20% | 4.2Ł |
Litewallet Operations | 5% | 1.05Ł |
Cool! Thanks @kcw-grunt
On this code:
addressText = String(format: transaction.direction.addressTextFormat, transaction.toAddress ?? "DEBUG-UPDATED-ADDRESS")
Why there are two questions mark?
@josikie in Swift there is syntax where an object could be nil and in swift ??
says " if it could be nil, put in something that is live and valid"
This is referred to an Optional. This was added to Swift to properly manage memory leaks. That is it forces the developer to retire objects more pristinely. Its one of the biggest improvements in Swift over Obj-C
that's a cool syntax, thank you for the explanation @kcw-grunt
Problem
When updating the loafwallet-core module / library the address is failing a UnsafeUnmutablePointer when the opening the history of transactions.
As a result, the sent and receive addresses are showing as normal if they are
LNgqTxjWxmjsULeugZd7ee6wwVFsVGkz4js
butltc1qrledc2grd0lvluvcn388szkjhxllqmtyzr37rxn
orM
or ltc1 addresses are not showing.The issue is the standard of UnsafeUnmutablePointers has changed over the few years so the way to properly handle has changed.
Positives
Snapshot
Goal
Fix the unwrapping so the addresses can be shown. Most of my investigation is around the Transaction.swift class line 174