Skip to content

Map IBEX crypto sends as USDT on-chain transactions#405

Merged
islandbitcoin merged 2 commits into
tmp/bridge-rebase-pr-readyfrom
vandana/bridge-usdt-transaction-history
Jun 18, 2026
Merged

Map IBEX crypto sends as USDT on-chain transactions#405
islandbitcoin merged 2 commits into
tmp/bridge-rebase-pr-readyfrom
vandana/bridge-usdt-transaction-history

Conversation

@islandbitcoin

Copy link
Copy Markdown
Contributor

Summary

  • Maps IBEX transaction type 10 as an outgoing on-chain transaction.
  • Preserves USDT amounts and network fees as integer micro-USDT settlement values.
  • Adds unit coverage for the $2.50-style crypto send transaction shape.

Verification

  • git diff --check
  • eslint --no-ignore src/app/wallets/get-transactions-for-wallet.ts test/flash/unit/app/wallets/get-transactions-for-wallet.spec.ts
  • jest --config ./test/flash/unit/jest.config.js test/flash/unit/app/wallets/get-transactions-for-wallet.spec.ts --runInBand

@islandbitcoin islandbitcoin left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Reviewed the type-10 (IBEX crypto send → USDT on-chain) mapping. Core change looks sound; the rest of the diff is prettier reformatting. Two things to confirm inline. (Noted the flow is validated end-to-end on MacMax.)

Comment thread src/app/wallets/get-transactions-for-wallet.ts
Comment thread src/app/wallets/get-transactions-for-wallet.ts
@islandbitcoin islandbitcoin self-assigned this Jun 18, 2026
@linear

linear Bot commented Jun 18, 2026

Copy link
Copy Markdown

ENG-414

@islandbitcoin

Copy link
Copy Markdown
Contributor Author

Addressed in 2444ccf66:

  • Kept IBEX transaction type 10 mapped as outgoing on-chain USDT, and aligned settlementDisplayAmount with the signed settlementAmount for outgoing IBEX send types.
  • Verified the mobile transaction item derives direction from settlementAmount and formats Math.abs(settlementAmount), while detail/report surfaces can consume the signed display string.

Focused verification run:

  • yarn test:unit test/flash/unit/app/wallets/get-transactions-for-wallet.spec.ts

@islandbitcoin

Copy link
Copy Markdown
Contributor Author

Review comments addressed

Both threads resolved.

Thread Resolution
Type-10 send-only (get-transactions-for-wallet.ts:176) Confirmed via IBEX docs (docs.poweredbyibex.io → Transaction Types): 9 = Crypto Receive, 10 = Crypto Send. Distinct ids, so type 10 is send-only; unconditional negation is correct. Live list: GET /v2/transaction-types/all.
Display-sign (get-transactions-for-wallet.ts:117) settlementDisplayAmount now signs types 2/4/10 via toSettlementDisplayAmount (type-10 renders -2.5), so it agrees with settlementAmount. settlementDisplayFee stays unsigned, consistent with the rest of the codebase.

Verification

  • get-transactions-for-wallet.spec.ts 8/8, including type-10 assertions: settlementAmount === -2_500_000, settlementDisplayAmount === "-2.5", on-chain initiation/settlement.

@islandbitcoin islandbitcoin merged commit 340c9cb into tmp/bridge-rebase-pr-ready Jun 18, 2026
2 checks passed
@islandbitcoin islandbitcoin deleted the vandana/bridge-usdt-transaction-history branch June 18, 2026 22:00
heyolaniran pushed a commit to heyolaniran/flash that referenced this pull request Jun 20, 2026
* fix(ibex): map crypto send transactions as USDT sends

* fix: sign IBEX crypto send display amounts

---------

Co-authored-by: Vandana <forge@getflash.io>
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