Skip to content

Conversation

@samholmes
Copy link
Contributor

@samholmes samholmes commented Aug 15, 2025

CHANGELOG

Does this branch warrant an entry to the CHANGELOG?

  • Yes
  • No

Dependencies

none

Requirements

If you have made any visual changes to the GUI. Make sure you have:

  • Tested on iOS device
  • Tested on Android device
  • Tested on small-screen device (iPod Touch)
  • Tested on large-screen device (tablet)

cursor[bot]

This comment was marked as outdated.

} else {
// Toggle on max mode
setIsMaxAmount(true)
setLastUsedInput('crypto')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intentional for max mode?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meh

{/* Bottom Input (Crypto by design) */}
<InputRow>
<DropDownInputButton onPress={handleCryptDropdown}>
{selectedCrypto == null || selectedWallet == null ? (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When no wallet is selected, rendering FlagIcon with an empty URI may show a broken image; consider a placeholder or null.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll make it null

Comment on lines 643 to 648
const ts = Math.floor(Date.now() / 1000)
let socn: string, tacn: string
let soam: number
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improve these var names.

Also, one decl per line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah f*ck that noise.

Comment on lines 1022 to 1055
const cacheKey = getCacheKey(
direction,
fiatCode,
banxaCoin,
paymentType,
amountType
)
const cached = maxAmountCache.get(cacheKey)
const now = Date.now()

if (cached && now - cached.timestamp < MAX_CACHE_TTL) {
maxAmountString = cached.amount
} else {
if (amountType === 'fiat') {
maxAmountString = paymentObj.max
} else {
// For crypto, we need to fetch a quote with max fiat to get the crypto amount
const maxFiatQueryParams: any = {
account_reference: username,
payment_method_id: paymentObj.id,
source: direction === 'buy' ? fiatCode : banxaCoin,
target: direction === 'buy' ? banxaCoin : fiatCode
}
if (direction === 'buy') {
maxFiatQueryParams.source_amount = paymentObj.max
} else {
maxFiatQueryParams.target_amount = paymentObj.max
}
const maxResponse = await banxaFetch({
method: 'GET',
url,
hmacUser,
path: 'api/prices',
apiKey,
queryParams: maxFiatQueryParams
})
const maxPrices = asBanxaPricesResponse(maxResponse)
maxAmountString = maxPrices.data.prices[0].coin_amount
}
// Cache the result
maxAmountCache.set(cacheKey, {
amount: maxAmountString,
timestamp: now
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider a shared cache utility to use across providers

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've decided over the should to drop caching because we observed that caching was not included as a feature for the original provider plugins architecture.

Comment on lines 265 to 290
const decimals =
denomination?.multiplier.match(/0/g)?.length ?? DECIMAL_PRECISION
Copy link
Collaborator

@Jon-edge Jon-edge Sep 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const decimals = denomination != null ? mulToPrecision(denomination.multiplier) : DECIMAL_PRECISION

@Jon-edge
Copy link
Collaborator

Jon-edge commented Sep 5, 2025

As with the other PRs, address non-deprecation warnings.
Really simple hands off task with gpt-5-fast in Cursor if claude+opencode is struggling for some reason on this.

This is an attempt to get the agent to automatically document lessons
learned to the docs/ directory. This way conventions are maintained and
over time as the agent is course corrected.
- Create docs/localization-guidelines.md with mandatory UI string localization rules
- Create docs/component-styling-guidelines.md with styled HOC usage patterns
- Update AGENTS.md with Documentation section indexing all docs/ files
- Add rule requiring all docs/ markdown files to be indexed in AGENTS.md
- Add localized strings for TradeRegionSelectScene to en_US.ts
This file contains run configuration such as RN_SIMULATOR and RN_PORT
to be used by a rn-ios script. This is for development purposes
This is a consistent card design for the new fiat buy UI.
- Implement TradeCreateScene and TradeOptionSelectScene for buy/sell flow
- Add Paybis as first ramp plugin with full API integration
- Create reusable hooks for ramp plugin management (useRampPlugins, useRampQuotes)
- Add payment type icon system with comprehensive mappings
- Implement quote fetching and comparison across multiple providers
- Add best rate badge component for quote comparison
- Create ramp plugin type definitions and store utilities
- Add comprehensive documentation for migration and architecture
- Include unit tests for payment types and store IDs
- Update navigation and deeplink handlers for ramp flows

BREAKING CHANGE: Replaces legacy FiatPluginUi with new ramp plugin system
Include plugin IDs in React Query key so quotes refetch when
region/currency/wallet changes affect available plugins. Simplify
queryFn to always check current plugins while reusing valid cached
quotes.
@samholmes samholmes force-pushed the sam/max-button-ramp-plugins branch from e969e43 to ba4d205 Compare September 10, 2025 04:23
@samholmes samholmes force-pushed the sam/max-button-ramp-plugins branch from ba4d205 to 895bc92 Compare September 11, 2025 00:13
@EdgeApp EdgeApp deleted a comment from chatgpt-codex-connector bot Sep 11, 2025
@samholmes
Copy link
Contributor Author

Replaced by #5740

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants