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

fix: mf-5903 redpacket histories #11239

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

UncleBill
Copy link
Contributor

https://mask.atlassian.net/browse/MF-5903

No need to filter history

@UncleBill UncleBill added this to the 2.24.0 milestone Jan 2, 2024
@@ -121,13 +121,14 @@ class RedPacketAPI implements RedPacketBaseAPI.Provider<ChainId, SchemaType> {
transactions: Array<Transaction<ChainId, SchemaType>> | undefined,
senderAddress: string,
): NftRedPacketJSONPayload[] {
if (!transactions) return EMPTY_LIST
if (!transactions) return []
Copy link
Member

Choose a reason for hiding this comment

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

If the outcome needs to be mutable at any point, it's advisable to refactor the code.

Copy link
Contributor Author

@UncleBill UncleBill Jan 3, 2024

Choose a reason for hiding this comment

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

Agree.

But it's not explicitly immutable here, besides, return transactions.flatMap() is mutable, keeping all returns consistent would be good. We cannot restrict how others use the result.

And I think EMPTY_LIST should be preferred to use in hooks, props and some other places need references comparison.

@guanbinrui guanbinrui merged commit da298fc into release/2.24.0 Jan 3, 2024
17 checks passed
@guanbinrui guanbinrui deleted the fix/mf-5903-redpacket-history branch January 3, 2024 07:27
guanbinrui added a commit that referenced this pull request Jan 12, 2024
* chore: bump version to 2.24.0

* fix: duplicate subscription creation (#11230)

* fix: invalid chain context in swap page (#11233)

* fix: incorrect decode when create tweet (#11234)

* fix: mf-5919 reverse lens handle (#11235)

* fix: mf-5908 expand collapsed tweet in detail page (#11236)

* fix: mf-5914 color of twitter tabs (#11237)

* fix(ui): mf-5551 expand redpacket title (#11238)

* fix: decode data value might not be BigNumber (#11229)

* fix: decode data value might not be BigNumber

* fix: get redpacket password lazy

* chore: reduce size (#11240)

* fix: mf-5903 redpacket histories (#11239)

* fix(Twitter): mf-5924 post image via Twitter API (#11242)

* fix: mf-5926 decode function parameters (#11243)

* fix: mf-5929 adjust popup window if page get zoom in (#11241)

* fix: mf-5929 adjust popup window if page get zoom in

* refactor: remove logs

---------

Co-authored-by: guanbinrui <[email protected]>

* fix: mf-5930 decode events return values (#11244)

* fix: mf-5930 decode events return values

* add unit test

* refactor: fetch NFTs in TrendingView (#11245)

* refactor: fetch NFTs in TrendingView

* fix: mf-5933 treat CryptoPunks as ERC721

* fix: mf-5915 mf-5680 plugin message sendToLocal (#11246)

* fix: mf-5915 mf-5680 plugin message sendToLocal

* fix: mui complains about spacing on grid that not contianer

* fix: mf-5928 publish post for popup only, and reload after publishing (#11247)

* fix: mf-5937 update collectible (#11248)

* fix: mf-5937 update collectible

* fix: mf-5936 avoid flickering in nft list

* fixup! fix: mf-5937 update collectible

* fix: mf-5671 close transaction confirm modal (#11249)

* fix(Tips): mf-5922 mf-5923 mirror dom and url gets updated (#11252)

* fix: mf-5953 friend tech in app setting (#11253)

* fix(DSearch): mf-5679 search wallet address (#11254)

* fix: mf-5940 setting avatar (#11256)

* fix: some small issues (#11257)

* chore: patch @tanstack/query-async-storage-persister to fix performance problem (#11227)

* fix: ui bugs (#11258)

* fix: mf-5212

* fix: mf-5338

* fix: revert tab color

* fix: mf-5476

* fix: mf-5434

* fix: mf-5239

* fix: asset

* fix: prettier

* chore: review

* chore: remove unused

---------

Co-authored-by: beyond009 <[email protected]>

* fix(RedPacket): some UI issues (#11260)

* fix: mf-5551 don't break words in redpacket

* fix: mf-5631 invalid simple hash queries

* fix: mf-5941 disable outline for transaction link in snackbar

* fix: mf-5960 claimed progress

* refactor: redpacket history code style

* fix: bugfix for popup (#11255)

* fix: bugfix for popup

* fix: incorrect chainId

* chore: reply review

* refactor: replace invalidate queries to remove queries (#11262)

* chore: disable address reading from bio (#11265)

* fix: multiple webpack runtime (#11264)

* fix: type check (#11267)

* fix: mf-5422 hide lens popup (#11268)

* fix: mf-5422 hide lens popup

* fix(FileService): small ui issues

---------

Co-authored-by: guanbinrui <[email protected]>

* fix: mf-5927 responsive mask icon size in toolbar (#11269)

* fix: bugfix for lens manager (#11271)

* fix(ScamSniffer): mf-5938 check url with scamsniffer's api (#11270)

* fix: fixup mf-5482

* fix: mf-5561 adjust menu padding

* fix: mf-5965 adjust nft red packet layout

* fix(ScamSniffer): mf-5938 check url with scamsniffer's api

* refactor: mv constants

---------

Co-authored-by: guanbinrui <[email protected]>

* fix: bugfix for calendar (#11272)

* fix: mf-5435

* fix: mf-5645

* fix: mf-5450

* Revert "fix: bugfix for calendar" (#11274)

* refactor: MF-5950 (#11275)

* fix: mf-5450

* fix: mf-5645

* fix: mf-5435

* fix: tab color

---------

Co-authored-by: Harlan Sun <[email protected]>

* fix(Identity): mf-5973 address social account should be verified by Firefly (#11277)

* fix(Identity): mf-5973 address social account should be verified by Firefly

* fix: mf-5965 adjust nft redpacket layout

* fix: remove twitter blue (#11278)

* refactor: adjust get nft avalibility (#11279)

* fix: mf-5270 check response in interaction page (#11273)

* fix: mf-5476 calendar img loading (#11280)

* fix: bugfix for lens manage tag (#11281)

* fix: mf-5597 revert showNextId in web3 tab (#11276)

* fix: mf-5964 catch error during getting address from nextid (#11282)

* fix: mf-5964 catch error during getting address from nextid

* fixup! fix(Identity): mf-5973 address social account should be verified by Firefly (#11277)

* fix: calendar img loading (#11283)

* fix: create wallet with mnemonic (#11284)

* fix: incorrect sign (#11286)

* fix: refresh persona avatar (#11285)

* fix: cancel transaction (#11287)

* fix: cancel transaction

* chore: revert gas

---------

Co-authored-by: nuanyang233 <[email protected]>
Co-authored-by: UncleBill <[email protected]>
Co-authored-by: Jack Works <[email protected]>
Co-authored-by: Harlan Sun <[email protected]>
Co-authored-by: beyond009 <[email protected]>
Co-authored-by: Harlan Sun <[email protected]>
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.

2 participants