Skip to content

Dev to main#170

Merged
arentant merged 723 commits into
mainfrom
dev
May 26, 2026
Merged

Dev to main#170
arentant merged 723 commits into
mainfrom
dev

Conversation

@arentant

Copy link
Copy Markdown
Contributor

No description provided.

arentant and others added 30 commits April 3, 2026 19:23
- Bumped version of @train-protocol/auth to 0.1.0-dev.1
- Updated @train-protocol/evm and @train-protocol/sdk to 0.1.0-dev.3
…ts with react-package refactor

Moves URL-based swap recovery (sourceNetwork + txHash) into the package
architecture. Adds findSwapByTx to the package store so useRecoverSwap
checks local persisted swaps before making chain RPC calls. Updates URL
scheme from ?hashlock to ?sourceNetwork+txHash across the app. Fixes
recovery loading flicker by initializing recovering state from URL params.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Bumped version of @train-protocol/starknet to 0.1.0-dev.0
- Updated @train-protocol/sdk to 0.1.0-dev.4
- Modified getQuote method in TrainApiClient to accept optional amount and receiveAmount parameters
- Introduced a new tsconfig.json file to manage TypeScript settings and module resolution for the project.
- Updated tsconfig.json files in aztec, evm, and starknet packages to ensure proper inclusion and exclusion of files.
…dling

- Replaced instances of `tokenContractAddress` with `contract` in various components and hooks to unify token contract references.
- Enhanced error handling in the ManualClaim and Refund hooks by integrating the useSwapActions for state management.
- Updated the ManualClaim action to clear errors before processing claims, ensuring a smoother user experience.
- Adjusted the handling of destination and source token contracts in the SwapForm and UserActions components for consistency.
…sistency

- Removed the SwapConfig interface and related logic from the store, simplifying the swap management process.
- Updated hooks and components to directly utilize the SwapData structure, enhancing type consistency across the application.
- Refactored the useSwapActions and useDerivedSwapState hooks to eliminate dependencies on the removed SwapConfig, ensuring a more cohesive data flow.
- Improved error handling and state management in various hooks related to swap operations.
…dling

- Replaced the use of `useAccount` with a custom `useWallet` hook to streamline wallet provider access.
- Updated the adapter's client creation methods to utilize the active wallet's Starknet account metadata for improved account management.
- Simplified the login configuration logic to ensure it correctly references the Starknet account, enhancing overall clarity and functionality.
…ndling

- Removed the 'windows_hello_no_prf' platform hint from the passkey support logic, streamlining the user experience.
- Updated the PrfSupportResult interface to eliminate unnecessary properties, enhancing clarity and maintainability.
- Adjusted the passkey description logic in the OptionSelect component to reflect the changes in platform hint handling.
- Modified API endpoints to use hashlock and optional solverAddress instead of solverId for order retrieval and secret revealing, enhancing flexibility.
- Updated related hooks and components to reflect the new API structure, improving type consistency and reducing unnecessary dependencies on solverId.
- Simplified swap handling in various components by removing solver references, leading to cleaner code and improved maintainability.
Fix: improve Aztec wallet connection handling and error states
- Added Tron blockchain support in the main tsconfig.json and included its path in the app's tsconfig.json.
- Updated Zustand store imports across multiple files to use `createWithEqualityFn` for improved state management.
- Modified various tsconfig.json files in blockchain packages to enable composite projects and added references to SDK and auth packages.
- Adjusted the explorer URL function to replace the placeholder with `{hash}` instead of `{0}` for better clarity.
- Cleaned up unused LockResult interface in the SDK types.
- Updated getUserLockDetails method to include decimals in the amount calculation.
- Added a check to return null if the timelock is not present in the result, improving error handling.
…dAddress to store

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
arentant and others added 27 commits May 18, 2026 21:13
fix amount display across multiple devices
…tyle

- Mirror layerswap's primary/secondary swap on isUsdMode for both send/receive rows
- Wrap truncated token amounts in MobileTooltip showing full value on hover/tap
- Apply the 8/12 fraction-digit cap to send side so it truncates symmetrically with receive
- Restyle MobileTooltip's mobile popover to match the desktop tooltip pill

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
summary: USD mode swap, truncated-amount tooltips, mobile popover restyle
Expose pure `build{Method}Tx` builders alongside the existing `userLock` /
`refund` / `redeemSolver` executors so integrators can construct unsigned
transactions and sign/submit them via their own infrastructure (Safe SDK,
smart accounts, custom relayers).

Each chain gets a `{Chain}TransactionRequest` type matching its natural
unsigned-transaction unit, plus `buildApproveTx` / `get{Erc,Trc}20Allowance`
where the chain has allowance semantics. Executors are refactored as thin
orchestrators that consume the builders.

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

- Open `HTLCTransactionRequestMap` interface so chain SDKs surface their
  unsigned-transaction shape to the SDK core via declaration merging,
  matching the existing config-map pattern.
- `TransactionRequestFor<N>` helper for consumers.
- Generic `IHTLCWalletClient<TTx = unknown>` adds `buildUserLockTx` /
  `buildRefundTx` / `buildRedeemSolverTx` (+ optional `buildApproveTx`)
  to the polymorphic contract; concrete classes already narrow TTx.
- Shared `BuildApproveTxParams` type for chains with allowances.
- `createHTLCWalletClient<N>` now returns `IHTLCWalletClient<TransactionRequestFor<N>>`
  so callers via the registry get the chain's TX shape automatically.
- Each chain `types.ts` augments the new map with its TransactionRequest.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
refactor(blockchains): split transaction builders from executors
fix(swap): prefer RedeemCompleted over failureReason in progress UI
fix: improve error messages in mapPasskeyError function for clarity
@vercel

vercel Bot commented May 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
trainapp Ready Ready Preview May 26, 2026 12:22pm

Request Review

@arentant arentant merged commit 1f85150 into main May 26, 2026
1 of 2 checks passed
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.

3 participants