project-serum / swap-ui

React Component for Swapping on the Serum DEX
Apache License 2.0
113 stars 115 forks source link

Change swap button to "create token account" if the user doesn't have a token account #62

Open armaniferrante opened 3 years ago

armaniferrante commented 3 years ago

Instead of dynamically creating the account, we should provide an explicit flow. This will help prevent transactions from going over the tx size limit.

armaniferrante commented 3 years ago

Instead of "create token account" we should relabel this to "initialize swap accounts" or something similar, which can both create the token account and create the open orders account. This will solve issues as encountered here https://github.com/project-serum/swap-ui/issues/62.