Skip to content

Conversation

@Kolibri1990
Copy link
Contributor

No description provided.

DFX and others added 30 commits December 10, 2024 09:09
 - @dfx.swiss/react@1.3.0-beta.104
 - @dfx.swiss/react-components@1.3.0-beta.104
 - @dfx.swiss/react@1.3.0-beta.105
 - @dfx.swiss/react-components@1.3.0-beta.105
* [DEV-3412] extend Fees DTO

* [DEV-3414] extend Country DTO

* [DEV-3424, DEV-3426] extend TransactionState + RefundData changes
 - @dfx.swiss/react@1.3.0-beta.106
 - @dfx.swiss/react-components@1.3.0-beta.106
 - @dfx.swiss/react@1.3.0-beta.107
 - @dfx.swiss/react-components@1.3.0-beta.107
* [DEV-2394] Change discountCode to specialCode

* [DEV-3414] add TransactionError.NATIONALITY_NOT_ALLOWED

---------

Co-authored-by: Kolibri <>
Co-authored-by: lapatric <42653152+lapatric@users.noreply.github.com>
 - @dfx.swiss/react@1.3.0-beta.108
 - @dfx.swiss/react-components@1.3.0-beta.108
 - @dfx.swiss/react@1.3.0-beta.109
 - @dfx.swiss/react-components@1.3.0-beta.109
 - @dfx.swiss/react@1.3.0-beta.110
 - @dfx.swiss/react-components@1.3.0-beta.110
 - @dfx.swiss/react@1.3.0-beta.111
 - @dfx.swiss/react-components@1.3.0-beta.111
* [DEV-3384] extend BankAccount DTO

* [NO-TASK] add onClick ability to StyledDataTableRow
 - @dfx.swiss/react@1.3.0-beta.112
 - @dfx.swiss/react-components@1.3.0-beta.112
 - @dfx.swiss/react@1.3.0-beta.113
 - @dfx.swiss/react-components@1.3.0-beta.113
 - @dfx.swiss/react@1.3.0-beta.114
 - @dfx.swiss/react-components@1.3.0-beta.114
 - @dfx.swiss/react@1.3.0-beta.115
 - @dfx.swiss/react-components@1.3.0-beta.115
 - @dfx.swiss/react@1.3.0-beta.116
 - @dfx.swiss/react-components@1.3.0-beta.116
 - @dfx.swiss/react@1.3.0-beta.117
 - @dfx.swiss/react-components@1.3.0-beta.117
davidleomay and others added 30 commits December 12, 2025 22:05
 - @dfx.swiss/react@1.3.0-beta.211
 - @dfx.swiss/react-components@1.3.0-beta.211
 - @dfx.swiss/react@1.3.0-beta.212
 - @dfx.swiss/react-components@1.3.0-beta.212
 - @dfx.swiss/react@1.3.0-beta.213
 - @dfx.swiss/react-components@1.3.0-beta.213
 - @dfx.swiss/react@1.3.0-beta.214
 - @dfx.swiss/react-components@1.3.0-beta.214
* [NO-TASK] Add ADA

* [NO-TASK] Recatoring

* [NO-TASK] Added xmlns

---------

Co-authored-by: Kolibri <>
Co-authored-by: David May <david.leo.may@gmail.com>
 - @dfx.swiss/react@1.3.0-beta.215
 - @dfx.swiss/react-components@1.3.0-beta.215
* Add bank account fields to TransactionRefundData

- Add name, address, houseNumber, zip, city, country, iban, bic fields
- Fields are optional and populated from BankTx data

* [NO-TASK] Refactoring

---------

Co-authored-by: David May <david.leo.may@gmail.com>
 - @dfx.swiss/react@1.3.0-beta.216
 - @dfx.swiss/react-components@1.3.0-beta.216
This commit fixes a critical issue where unstable function references in React hooks and contexts were causing infinite re-render loops and excessive API calls.

Changes:
- Wrapped all hook functions in useCallback to ensure stable references
- Fixed useMemo dependencies to reference memoized callbacks
- Removed unnecessary session dependencies from useEffect hooks
- Simplified store.hook.ts with empty dependency array
- Fixed recursive call pattern in api.hook.ts to avoid stale closures

Affected files:
- All hooks in packages/react/src/hooks/ (17 files)
- Context providers in packages/react/src/contexts/ (4 files)

This ensures that function references remain stable across re-renders, preventing unnecessary cascading updates throughout the component tree.
For buy-specific IBANs, no reference is required as the IBAN is unique to the asset.
 - @dfx.swiss/react@1.3.0-beta.217
 - @dfx.swiss/react-components@1.3.0-beta.217
* Add EIP-7702 delegation support for Sell and Swap

- Add UnsignedTx, Eip7702DelegationData, Eip7702SignedData, and Eip7702Authorization interfaces
- Extend Sell and Swap interfaces with optional depositTx field
- Add ConfirmSellData and ConfirmSwapData interfaces for transaction confirmation
- Implement confirmSell and confirmSwap methods in hooks
- Export new types from index for external usage

This enables gasless token transfers for users with zero native balance on EVM chains.

* Wrap confirmSell in useCallback for consistency
 - @dfx.swiss/react@1.3.0-beta.218
 - @dfx.swiss/react-components@1.3.0-beta.218
 - @dfx.swiss/react@1.3.0-beta.219
 - @dfx.swiss/react-components@1.3.0-beta.219
Changes:
- Add `?includeTx=true` parameter to sell receiveFor endpoint
- Update confirmSell to return Transaction instead of void
- Change confirmSell HTTP method from POST to PUT to match API
 - @dfx.swiss/react@1.3.0-beta.220
 - @dfx.swiss/react-components@1.3.0-beta.220
Changed confirmSwap return type from Promise<void> to Promise<Transaction>
to match the actual API endpoint response type (TransactionDto).

This fixes TypeScript compilation errors when using the confirmSwap hook
with EIP-7702 delegation flow where transaction.id is accessed.
 - @dfx.swiss/react@1.3.0-beta.221
 - @dfx.swiss/react-components@1.3.0-beta.221
Convert native fetch errors (TypeError, network failures) into ApiError
objects with statusCode 0 to enable uniform error handling across the
application. The original error message is preserved for debugging.
 - @dfx.swiss/react@1.3.0-beta.222
 - @dfx.swiss/react-components@1.3.0-beta.222
Replace plain objects with Error subclass so that error handlers
(webpack-dev-server overlay, browser console, logging tools) can
properly display the error message instead of [object Object].

ApiException extends Error and implements ApiError, maintaining
backward compatibility with existing error handling code.

Changes:
- Add ApiException class extending Error
- Add Object.setPrototypeOf fix for ES5 compatibility
- Wrap network errors in ApiException
- Wrap API error responses in ApiException with fallback handling
 - @dfx.swiss/react@1.3.0-beta.223
 - @dfx.swiss/react-components@1.3.0-beta.223
- Add includeTx parameter to sell.hook.ts receiveFor (default: false)
- Add includeTx parameter to swap.hook.ts receiveFor (default: false)
- Only request depositTx when explicitly needed (e.g., when user clicks send button)
- Prevents 'insufficient funds for intrinsic transaction cost' errors during quote requests

This fixes the issue where the API would attempt to create a deposit transaction
even when the user is just viewing a price quote, causing errors when the wallet
has insufficient gas for transaction estimation.
 - @dfx.swiss/react@1.3.0-beta.224
 - @dfx.swiss/react-components@1.3.0-beta.224
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.

7 participants