Conversation
Enable AGP Kotlin testFixtures support and expose CurveTestInitializer and FileTableLoader so other modules can initialize the DiscreteBondingCurve in unit tests without an Android Context. Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
…ange Introduce VerifiedFiatCalculator that computes LocalFiat using the verified supply from VerifiedProtoManager, ensuring underlyingTokenAmount, nativeAmount, and fx are all consistent with the VerifiedState sent to the server. - Move valueExchangeIn logic from LocalFiat into RealVerifiedFiatCalculator - Add supplyOverride parameter to Fiat.tokenBalance - Bind via Hilt in OpenCodeModule - Remove unused imports from TransactionController Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
cdf31f5 to
2ede53f
Compare
…bmission Thread VerifiedFiat (LocalFiat + VerifiedState) atomically from VerifiedFiatCalculator.compute() through ViewModels to TransactionController, eliminating TOCTOU race where bonding curve supply could diverge between amount computation and intent submission. - Add VerifiedFiat wrapper type pairing LocalFiat with pinned VerifiedState - Update TransactionOperations buy/sell/withdraw to accept VerifiedFiat - Thread VerifiedFiat through SwapViewModel, WithdrawalViewModel, OnRampViewModel, CashScreenViewModel, CurrencyCreatorViewModel - Thread through ExternalWalletOnRampState and CoinbaseOnRampState pipelines - Add LocalFiat.rounded() and fix totalBalance penny rounding discrepancy Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
Thread the pinned VerifiedState from Bill.Cash through the entire gift card funding chain: shareGiftCard → initiateGiftCardFunding → BillController → BillTransactionManager → SendGiftCardTransactor → TransactionController.remoteSend. This eliminates the cache lookup in remoteSend that could return stale exchange data, making it consistent with the give-bill and swap paths that already receive a pinned VerifiedState from compute(). Remove VerifiedProtoManager dependency from TransactionController since remoteSend was its only consumer. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
bmc08gt
added a commit
that referenced
this pull request
Apr 24, 2026
…le-calculations feat(opencode): add VerifiedFiatCalculator for supply-consistent exchange
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.
No description provided.