Skip to content

Conversation

@findolor
Copy link
Collaborator

Chained PRs

Motivation

See issues:

Phase 5 of the vaultless orders implementation. Updates the webapp order detail page to properly display vaultless tokens which use vault_id = 0 to indicate direct wallet-based trading rather than vault-based.

Solution

Core Changes

  • Added vaultless field to RaindexVault to distinguish wallet-based from vault-based tokens
  • Unified RaindexAmount type across rust and js_api for consistent balance/allowance representation
  • Created VaultlessTokenDisplay component for rendering vaultless tokens with wallet balance and allowance info

Order Detail Updates

  • OrderDetail.svelte now detects vaultless tokens and renders them differently
  • VaultCard.svelte updated to handle vaultless tokens - hides deposit/withdraw buttons and shows wallet info
  • Vaultless tokens don't link to vault detail page (vault doesn't exist as entity)

Modal Updates

  • DepositModal.svelte and WithdrawModal.svelte updated to work with RaindexAmount type
  • Tauri modals similarly updated for consistency

Testing

  • Added VaultlessTokenDisplay.test.ts with comprehensive test coverage
  • Updated VaultCard.test.ts for vaultless behavior
  • Added TokenIOInput.test.ts tests

Checks

By submitting this for review, I'm confirming I've done the following:

  • made this PR as small as possible
  • unit-tested any new functionality
  • linked any relevant issues or PRs
  • included screenshots (if this involves a front-end change)

fix #2407

@findolor findolor self-assigned this Jan 21, 2026
@findolor findolor force-pushed the 2026-01-21-vaultless-phase-4-webapp-order-creation-ui branch from c63f528 to 2520c89 Compare January 22, 2026 13:03
@findolor findolor force-pushed the 2026-01-21-vaultless-phase-5-webapp-order-detail branch from efe9473 to c875f1e Compare January 22, 2026 13:03
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 22, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@findolor findolor force-pushed the 2026-01-21-vaultless-phase-4-webapp-order-creation-ui branch from 2520c89 to 36e34fa Compare January 22, 2026 14:05
- Add vaultless: bool field derived from vault_id == 0
- Replace AccountBalance and RaindexVaultAllowance with unified RaindexAmount
- RaindexAmount has amount (Float) and formattedAmount (String)
- getAllowance returns "Unlimited" for max allowance values
- Add tests for vaultless field behavior
- Create VaultlessTokenDisplay for order detail vaultless tokens
- Fetches wallet balance and allowance via TanStack Query
- Shows blue badge, wallet balance, and approved amount
- Update VaultCard to show vaultless badge without balance/link
- Add tests for vaultless vault rendering
- Conditionally render VaultlessTokenDisplay for vaultless vaults
- Hide deposit/withdraw buttons for vaultless tokens
- Replace AccountBalance with RaindexAmount type
- Update field references: balance -> amount, formattedBalance -> formattedAmount
Check for max U256 allowance before attempting Float conversion
to avoid LossyConversionToFloat error in vaultless token display.
- Update gui.test.ts to use amount/formattedAmount fields
- Reposition vaultless badge in VaultCard with absolute positioning
- Update rain.strategies commit hash in webapp and tauri
getAllowance and getOwnerBalance now return RaindexAmount with
amount (Float) and formattedAmount (String) fields instead of
raw hex strings.
…into 2026-01-21-vaultless-phase-5-webapp-order-detail
@findolor findolor force-pushed the 2026-01-21-vaultless-phase-5-webapp-order-detail branch from c875f1e to 94ece61 Compare January 23, 2026 09:20
…eld names

Update mock responses to use correct field names (amount/formattedAmount)
instead of deprecated balance/formattedBalance fields.
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