-
Notifications
You must be signed in to change notification settings - Fork 5
test: swap scenario erc20-erc20 #217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
8732fdd to
e02f187
Compare
packages/client/src/actions/swap.ts
Outdated
| * kind: SwapKind.Sell, | ||
| * user: evmAddress('0x742d35cc...'), | ||
| * }, | ||
| * quoteId: swapQuoteId('quote_123'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * quoteId: swapQuoteId('quote_123'), | |
| * quoteId: quote.quoteId, |
packages/client/src/actions/swap.ts
Outdated
| * case 'InsufficientBalanceError': | ||
| * return errAsync( | ||
| * new Error(`Insufficient balance: ${plan.required.value} required.`) | ||
| * ); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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]
packages/spec/swap/business.spec.ts
Outdated
| assertOk(setup); | ||
| }); | ||
|
|
||
| it('Then they should be able to swap by signing 1 transaction', async ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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 ({ |
packages/spec/swap/business.spec.ts
Outdated
| assertOk(setup); | ||
| }); | ||
|
|
||
| it('Then they should be able to swap by signing 2 transactions', async ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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 ({ |
No description provided.