Skip to content

feat: implement Cashout/Topups/Transfers#621

Open
Nodirbek75 wants to merge 97 commits into
mainfrom
feat/fygaro
Open

feat: implement Cashout/Topups/Transfers#621
Nodirbek75 wants to merge 97 commits into
mainfrom
feat/fygaro

Conversation

@Nodirbek75

Copy link
Copy Markdown
Contributor

No description provided.

islandbitcoin and others added 25 commits July 14, 2025 20:33
@Nodirbek75 Nodirbek75 self-assigned this Apr 22, 2026
@islandbitcoin islandbitcoin added the enhancement New feature or request label Apr 22, 2026
The Namchee/conventional-pr action defaults to closing any non-draft PR
whose title isn't conventional. With Actions re-enabled, this auto-closed
the feat/fygaro umbrella PR #621 on every reopen. Set close: false so it
comments/reports instead of closing.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lnflash lnflash deleted a comment from github-actions Bot Jun 17, 2026
@lnflash lnflash deleted a comment from github-actions Bot Jun 17, 2026
@lnflash lnflash deleted a comment from github-actions Bot Jun 17, 2026
islandbitcoin and others added 4 commits June 18, 2026 07:57
Co-authored-by: Vandana <forge@getflash.io>
Co-authored-by: Vandana <forge@getflash.io>
Co-authored-by: Vandana <forge@getflash.io>
- tsconfig: module was 'Node16' while the extended @react-native config
  uses moduleResolution 'bundler', which requires an esnext-class module
  (TS5095). Set module=esnext + moduleResolution=bundler explicitly.
- typos: accept the earns quiz-ID misspellings (Aggrement/Governement) as
  bare words too — they're a backend contract and can't be renamed.

Addresses ENG-420. Does not cover Test (ttypescript — see #640) or the
i18n drift (needs `yarn update-translations` run locally).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
islandbitcoin and others added 4 commits June 18, 2026 09:22
Add main to the push trigger for the core check-code and test workflows
so main's own tip is continuously validated, not only PRs into it. Lands
on main via #621 (feat/fygaro -> main).

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… lnUsdInvoiceCreate

USDT money amounts are denominated in smallest units (micros) by the price
conversion layer, which are USDT_MICROS_PER_USD_CENT (10,000x) smaller than a
cent. The lnUsdInvoiceCreate mutation expects USD cents, but the receive flow
forwarded the raw USDT settlement amount, so a $5.00 request (500 cents) was
sent as 5,000,000 and the backend minted a ~$50,000 invoice.

Convert USDT micros back to cents at the mutation boundary (USD amounts are
already in cents and pass through unchanged). Add a regression test asserting a
$5.00 USDT request calls the mutation with amount=500.

Manually verified on device: scanning a $5.00 USDT invoice now displays $5.00.
Stablecoin wallets (USDT today; USDC, USDB, PYUSD, EURC, etc. in the
future) should display as their underlying fiat currency — not the
stablecoin ticker. Users see "USD" whether their cash wallet is USDT,
USDC, or any future USD-pegged stablecoin.

This is a UI-only change. Underlying wallet routing, currency enums,
amount conversions, and settlement logic remain unchanged.

Changes:
- Add currency-display.ts with extensible STABLECOIN_DISPLAY_MAP
  (USDT → "USD" today; add new stablecoins with one line)
- CurrencyTag: render displayCurrencyCode() instead of raw enum
- use-display-currency: set currencyCode "USD" for USDT, suppress
  suffix so USDT amounts render identically to USD amounts
- amounts.ts: set currencyCode "USD" in USDT amount objects
- Balance.tsx: map currency code through displayCurrencyCode()
- CashoutWithdrawTo: map bank account currency through displayCurrencyCode()
- Update currency-tag test to assert display mapping

Adding a future stablecoin = one line in STABLECOIN_DISPLAY_MAP.
No other display code needs to change.

Co-authored-by: Vandana <forge@getflash.io>
forge0x and others added 6 commits June 19, 2026 11:55
Two issues in TxItem.tsx:

1. 'Received USDT' / 'Sent USDT' label used raw settlementCurrency
   — now passes through displayCurrencyCode() to show 'USD'

2. Secondary amount for USDT transactions was rendering the raw USDT
   settlement amount with no currency indicator (after removing the
   suffix). USDT transactions now follow the same path as USD —
   showing the BTC equivalent as the secondary amount.
Two fixes:

1. TxItem.tsx: revert USDT secondary amount to raw settlement amount
   (not BTC conversion). USD transactions show BTC as secondary because
   their wallet settlement is USD. USDT transactions should show the
   settlement amount formatted as USD.

2. use-display-currency.ts: set USDT minorUnitToMajorUnitOffset to
   usdDisplayCurrency.fractionDigits (2) instead of hardcoded 6.
   The raw→major conversion uses /USDT_MICROS_PER_USDT (1M) which is
   correct. The offset is only used for display fraction digits, so
   it should match USD (2 digits) to show '$1.00' not '$1.0000000'.
Restore 6 decimal places (minorUnitToMajorUnitOffset: 6) and re-add
currencyCode suffix for USDT so users can see exact stablecoin amounts
and rounding. Suffix now reads 'USD' (from usdDisplayCurrency.id)
instead of 'USDT'.
Removes two `console.log("BRIDGE INITIATE KYC RESPONSE: ", res)` statements in
the Bridge KYC-initiation flow (AccountType.tsx, TopupCashout.tsx). Logging the
KYC response writes sensitive identity data to the console; it serves no
purpose in production. `res` is still used for error handling, so behavior is
unchanged.

Surfaced during review of #621. The transaction-details TODO stub on the
cashout success screen is intentionally left as-is.

Co-authored-by: Dread <dread@example.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ency

Leftover from iteration — the hook uses usdDisplayCurrency.id directly
instead of the helper, so the import was unused.
The WalletBottomSheet showed two 'Cash' entries (USD + USDT) in
advanced mode. Since setReceivingWallet routes both USD and USDT to
the same cash wallet (first USD or USDT wallet from the query), the
duplicate was redundant and confusing.

Now shows just 'Cash' and 'Bitcoin'.
forge0x and others added 3 commits June 19, 2026 12:28
Cash wallet transactions were using the backend-provided
settlementDisplayAmount/settlementDisplayCurrency for the primary
line, which always showed USD regardless of the user's configured
display currency. Now uses moneyAmountToDisplayCurrencyString (same
as BTC transactions) to convert through the price feed to the user's
actual display currency.
The formatMoneyAmount output for USDT changed from '$0.179554 USDT'
to '$0.179554 USD' after mapping USDT currencyCode to usdDisplayCurrency.id.
#650)

* fix selfie step on the bridge kyc flow not showing the overlay with informative texts

* fix term of services and privacy policy links not opening on the external browser

* fix(bridge-kyc): scope ToS legal-link external-open to bridge.xyz host

The ToS-step handler opened any URL containing '/legal' in the external
browser. Restrict it to bridge.xyz (and subdomains) + a /legal path so an
unrelated host can't be shelled out via Linking.openURL.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Dread <dread@example.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@islandbitcoin islandbitcoin removed the enhancement New feature or request label Jun 25, 2026
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.

5 participants