Repository navigation
fix(chat): return to the group after buying in from its gate - #1532
Merged
Merged
Conversation
Buy More on a group's gate opens Token Info over the chat, and buying from there only closed the swap, leaving the reader on Token Info with no way back to Join except the back arrow. Token.Info now takes returnAfterBuy, which the gate sets. When a buy of that currency succeeds, Token Info closes too and the chat is back on top. Add Money from Token Info also ends in a successful buy, but of USDF, so it only counts when USDF is the gate's currency. Token taps in the transcript open Token Info as before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Buy More on a group's gate opens Token Info over the chat. Buying from there closed only the swap, so the reader landed on Token Info instead of back at Join.
AppRoute.Token.InfogainsreturnAfterBuy, set only byGroupGateBarthroughChatAction.ViewToken(mint, returnAfterBuy = true). When the swap returnsSwapResult.Successfor a buy of that mint,TokenInfoScreenpops itself and the chat is on top again.The mint check is there because Add Money from Token Info also ends in a successful buy, of USDF, to fund the real purchase. That returns to Token Info as before, unless USDF is the gate's currency, in which case the deposit is what gets the reader in.
Swap results are queued until Token Info is back on top, so Token Info shows briefly before it pops.