Skip to content
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

Add "recent" swaps section to token to buy list #5956

Merged
merged 6 commits into from
Jul 31, 2024
Merged

Conversation

walmat
Copy link
Contributor

@walmat walmat commented Jul 25, 2024

Fixes APP-1635

What changed (plus any additional context for devs)

Added a new section that shows the last three user swaps per chain. These recents prioritize favorites and bridge assets if they exist in those lists.

Screen recordings / screenshots

Screenshot 2024-07-25 at 12 04 27 PM Screenshot 2024-07-25 at 12 04 35 PM

What to test

Copy link

linear bot commented Jul 25, 2024

src/state/swaps/swapsStore.ts Outdated Show resolved Hide resolved
Comment on lines +28 to +30
export type RecentSwap = {
swappedAt: number;
} & ExtendedAnimatedAssetWithColors;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we want more metadata here?

@@ -34,6 +36,74 @@ export interface SwapsState {
setSource: (source: Source | 'auto') => void;
degenMode: boolean;
setDegenMode: (degenMode: boolean) => void;

// recent swaps
latestSwapAt: Map<ChainId, number>;
Copy link
Contributor

Choose a reason for hiding this comment

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

is this prop used? do we need it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

gotcha cool cool

@walmat walmat merged commit ae43947 into develop Jul 31, 2024
6 checks passed
@walmat walmat deleted the @matthew/APP-1635 branch July 31, 2024 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants