Skip to content

Conversation

@juangm
Copy link
Collaborator

@juangm juangm commented Dec 19, 2025

No description provided.

@juangm juangm requested a review from cesarenaldi December 19, 2025 12:35
@juangm juangm force-pushed the test/swap-scenario branch from 8732fdd to e02f187 Compare January 8, 2026 09:59
* kind: SwapKind.Sell,
* user: evmAddress('0x742d35cc...'),
* },
* quoteId: swapQuoteId('quote_123'),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
* quoteId: swapQuoteId('quote_123'),
* quoteId: quote.quoteId,

* case 'InsufficientBalanceError':
* return errAsync(
* new Error(`Insufficient balance: ${plan.required.value} required.`)
* );
Copy link
Collaborator

Choose a reason for hiding this comment

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

Include a default, cause the plan type disallow exhaustive checking.

Copy link
Collaborator

@cesarenaldi cesarenaldi Jan 12, 2026

Choose a reason for hiding this comment

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

Given a user who want to swap tokens
  When swapping ERC-20 for the first time
    Then they should be able to swap via permit [todo]
    Then they shoyld be able to swap by signing 2 transactions
  When swapping and ERC-20 for which they have already approved
    Then they shoyld be able to swap by signing 1 transaction
  When swapping native for ERC-20
    Then they should be able to swap by signing 1 transaction [todo]

assertOk(setup);
});

it('Then they should be able to swap by signing 1 transaction', async ({
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
it('Then they should be able to swap by signing 1 transaction', async ({
it('Then they should be able to swap by signing just the swap order typed data', async ({

assertOk(setup);
});

it('Then they should be able to swap by signing 2 transactions', async ({
Copy link
Collaborator

@cesarenaldi cesarenaldi Jan 13, 2026

Choose a reason for hiding this comment

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

Suggested change
it('Then they should be able to swap by signing 2 transactions', async ({
it('Then they should be able to swap by sending the ERC20 approval transaction and by signing the swap order typed data', async ({

@juangm juangm merged commit 8494210 into main Jan 13, 2026
7 checks passed
@juangm juangm deleted the test/swap-scenario branch January 13, 2026 12:31
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