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

feat(@desktop/activity): Handle token received notification #13447

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

Cuteivist
Copy link
Contributor

@Cuteivist Cuteivist commented Feb 7, 2024

Tasks

Related status-go change: status-im/status-go#4682

What does the PR do

  • Added handling of activity center notification tokenData property
  • Added TokenData objects for activity center model
  • Added handling for community collectible received notification
  • Updated UI elemenets to work with updated backend

Affected areas

  • Toast messages
  • Activity Center

Screenshot of functionality (including design for comparison)

Toast Messages

Collectibles

image

image

Assets

image

image

Activity Center

Collectibles

receive_community_collectibles

Assets

receive_community_tokens

@status-im-auto
Copy link
Member

status-im-auto commented Feb 7, 2024

Jenkins Builds

Click to see older builds (31)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ df736be #1 2024-02-07 12:39:12 ~7 min tests/nim 📄log
✔️ df736be #1 2024-02-07 12:41:36 ~9 min macos/aarch64 🍎dmg
✔️ df736be #1 2024-02-07 12:44:35 ~12 min tests/ui 📄log
✔️ df736be #1 2024-02-07 12:45:16 ~13 min macos/x86_64 🍎dmg
✔️ df736be #1 2024-02-07 12:50:44 ~18 min linux/x86_64 📦tgz
✔️ df736be #1 2024-02-07 13:04:31 ~32 min tests/e2e 📄log
✔️ df736be #1 2024-02-07 13:11:04 ~38 min windows/x86_64 💿exe
✔️ b5fd412 #2 2024-02-13 12:36:23 ~4 min macos/aarch64 🍎dmg
✔️ b5fd412 #2 2024-02-13 12:40:24 ~8 min tests/nim 📄log
✔️ b5fd412 #2 2024-02-13 12:41:51 ~10 min macos/x86_64 🍎dmg
✔️ b5fd412 #2 2024-02-13 12:44:57 ~13 min tests/ui 📄log
✔️ b5fd412 #2 2024-02-13 12:50:26 ~18 min linux/x86_64 📦tgz
✔️ b5fd412 #2 2024-02-13 13:07:43 ~36 min windows/x86_64 💿exe
✔️ dea2ed3 #3 2024-02-15 10:32:13 ~4 min macos/aarch64 🍎dmg
✔️ dea2ed3 #3 2024-02-15 10:33:57 ~6 min tests/nim 📄log
✔️ dea2ed3 #3 2024-02-15 10:35:58 ~8 min macos/x86_64 🍎dmg
✔️ dea2ed3 #3 2024-02-15 10:39:10 ~11 min tests/ui 📄log
✔️ dea2ed3 #3 2024-02-15 10:44:23 ~16 min linux/x86_64 📦tgz
✔️ dea2ed3 #3 2024-02-15 10:55:06 ~27 min windows/x86_64 💿exe
73bb3ea #4 2024-02-16 05:59:42 ~3 min macos/aarch64 📄log
73bb3ea #4 2024-02-16 06:02:04 ~5 min macos/x86_64 📄log
✔️ 73bb3ea #4 2024-02-16 06:02:25 ~5 min tests/nim 📄log
73bb3ea #4 2024-02-16 06:06:31 ~9 min linux/x86_64 📄log
73bb3ea #4 2024-02-16 06:07:19 ~10 min tests/ui 📄log
73bb3ea #4 2024-02-16 06:14:19 ~17 min windows/x86_64 📄log
7f46bc2 #5 2024-02-16 06:40:43 ~4 min macos/x86_64 📄log
7f46bc2 #5 2024-02-16 06:41:10 ~4 min macos/aarch64 📄log
✔️ 7f46bc2 #5 2024-02-16 06:42:06 ~5 min tests/nim 📄log
7f46bc2 #5 2024-02-16 06:44:33 ~8 min linux/x86_64 📄log
7f46bc2 #5 2024-02-16 06:46:54 ~10 min tests/ui 📄log
7f46bc2 #5 2024-02-16 06:50:47 ~14 min windows/x86_64 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 5c0c053 #6 2024-02-19 10:47:28 ~4 min macos/aarch64 🍎dmg
✔️ 5c0c053 #6 2024-02-19 10:48:53 ~5 min tests/nim 📄log
✔️ 5c0c053 #6 2024-02-19 10:52:38 ~9 min macos/x86_64 🍎dmg
5c0c053 #6 2024-02-19 10:53:50 ~10 min tests/ui 📄log
✔️ 5c0c053 #6 2024-02-19 10:57:21 ~14 min linux/x86_64 📦tgz
✔️ 5c0c053 #6 2024-02-19 11:08:50 ~25 min windows/x86_64 💿exe
5c0c053 #8 2024-02-19 12:27:21 ~10 min tests/ui 📄log
✔️ 41edc7b #7 2024-02-19 12:43:13 ~4 min macos/aarch64 🍎dmg
✔️ 41edc7b #7 2024-02-19 12:46:01 ~6 min tests/nim 📄log
✔️ 41edc7b #7 2024-02-19 12:47:16 ~8 min macos/x86_64 🍎dmg
✔️ 41edc7b #9 2024-02-19 12:49:28 ~10 min tests/ui 📄log
✔️ 41edc7b #7 2024-02-19 12:55:47 ~16 min linux/x86_64 📦tgz
✔️ 41edc7b #7 2024-02-19 13:01:05 ~21 min windows/x86_64 💿exe

@Cuteivist Cuteivist force-pushed the feat/13250-community-receive-notification branch from df736be to b5fd412 Compare February 13, 2024 12:31
Copy link
Contributor

@noeliaSD noeliaSD left a comment

Choose a reason for hiding this comment

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

Code LGTM, I just have 1 question and suggestion.

I didn't test it bc I don't have currently the necessary setup. If you want me to explicitly test, please ping me!

chainId: id.contractID.chainID,
txHash: txHash,
name: collectibleName,
amount: 1,
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this always be 1?? I can mint 100 collectibles of the same "type" in my community and then airdrop 3 to the same wallet address. Will they always be treated as individual collectibles? This question could be indeed linked with this pending task: #12940

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I went and double checked what exactly happens. It's a little complicated :)

When I airdrop 3 community collectibles, itself it is 3 unique collectibles. Each one of them has separate TokenID.

Each collectible airdrop has same tx hash, but is displayed separately in wallet activity feed:
image

Current implementation will also emit 5 notifications.

We could start discussion here whether consider 3 collectibles airdrop as single notification, because each one of them will open same tx details anyway.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I think it makes sense to just consider the 3 collectibles are the "same" although they have different tokenID. As said before, the following task #12940 and design considers them as a unique item (like a collectible container) with an specific amount. I'm thinking that whenever the #12940 task is done, it will directly emit only 1 notification, so it will come together with this resolution, isn't 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.

Updated the code to handle multiple collectibles
image

Copy link
Member

@caybro caybro left a comment

Choose a reason for hiding this comment

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

LGTM

@Cuteivist Cuteivist force-pushed the feat/13250-community-receive-notification branch from 7f46bc2 to 5c0c053 Compare February 19, 2024 10:42
@Cuteivist Cuteivist force-pushed the feat/13250-community-receive-notification branch from 5c0c053 to 41edc7b Compare February 19, 2024 12:38
@Cuteivist Cuteivist merged commit 7dedb22 into master Feb 19, 2024
8 checks passed
@Cuteivist Cuteivist deleted the feat/13250-community-receive-notification branch February 19, 2024 13:58
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.

None yet

5 participants