Add Coinbase support for iOS - #2020
Merged
Merged
Conversation
Two artifacts for the Coinbase iOS app: wallets and balances, and account and device. Coinbase is a React Native app and keeps its state in an MMKV store. This ports the MMKV reader and its test from ALEAPP, so no new dependency is added and iLEAPP CI guards the reader the same way ALEAPP does. Inside the store the offline GraphQL cache is a normalised Apollo cache: an account record links to its balances by reference and each reference resolves to an amount carrying a value and a currency. The wallets artifact reports only the accounts whose balance reference resolves, because the same cache holds a record for every currency the app can display, which is the currency catalogue rather than the account's wallets. On the tested device 5 of 429 account records were real wallets, all zero balance, which records that they existed and were empty. The account artifact reads the wallet-link user id, the login flag, the push token and the app version from the store's top-level keys, and counts the wallets from the same cache so the two artifacts agree by construction. The account identifier is base64 and is decoded. Every copy of the store is read rather than the first, proven against a two-container tree that reported exactly twice the rows. A cached currency-quotes table was considered and dropped: it is 607 exchange rates for currencies the account does not hold, a downloaded catalogue rather than anything the account holder did. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Coinbase support for iOS. Two artifacts: wallets and balances, and account and device.
Coinbase is React Native and keeps its state in MMKV. This ports the MMKV reader and its test from ALEAPP, so no new dependency and iLEAPP CI guards the reader too.
The offline GraphQL cache is a normalised Apollo cache: an account links to its balances by reference. The wallets artifact reports only accounts whose balance reference resolves, because the cache also holds a record for every displayable currency (the catalogue, not the account's wallets). On the tested device 5 of 429 were real wallets, all zero balance.
The account artifact reads the wallet-link user id, login flag, push token and app version, and counts the wallets from the same cache. The account id is base64 and is decoded. Every store copy is read, proven against a two-container tree. A cached currency-quotes table was dropped as a downloaded catalogue.