Skip to content

feat(wallet)_: Add BNB Smart Chain #6466

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

Merged
merged 19 commits into from
May 13, 2025
Merged

Conversation

smohamedjavid
Copy link
Member

needed for status-im/status-mobile#22309

Summary

This PR adds BNB Smart Chain support

Notes

The bridge is supported as Hop doesn't support BSC

@smohamedjavid smohamedjavid self-assigned this Mar 25, 2025
@status-im-auto
Copy link
Member

status-im-auto commented Mar 25, 2025

Jenkins Builds

Click to see older builds (201)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 1cdf97f #1 2025-03-25 22:27:55 ~2 min android 📦aar
✔️ 1cdf97f #1 2025-03-25 22:28:04 ~2 min ios 📦zip
✔️ 1cdf97f #1 2025-03-25 22:29:17 ~4 min macos 📦zip
✖️ 1cdf97f #1 2025-03-25 22:29:24 ~4 min tests 📄log
✔️ 1cdf97f #1 2025-03-25 22:30:16 ~5 min macos 📦zip
✔️ 1cdf97f #1 2025-03-25 22:30:25 ~5 min linux 📦zip
✔️ 1cdf97f #1 2025-03-25 22:30:38 ~5 min windows 📦zip
✔️ 1cdf97f #1 2025-03-25 22:57:16 ~32 min tests-rpc 📄log
✔️ 1cdf97f #1 2025-03-28 09:40:50 ~6 min linux 📦zip
✔️ ff97a8b #2 2025-04-01 10:37:59 ~2 min android 📦aar
✔️ ff97a8b #2 2025-04-01 10:38:06 ~2 min ios 📦zip
✔️ ff97a8b #2 2025-04-01 10:38:53 ~3 min macos 📦zip
✔️ ff97a8b #2 2025-04-01 10:40:20 ~5 min macos 📦zip
✔️ ff97a8b #2 2025-04-01 10:40:34 ~5 min linux 📦zip
✔️ ff97a8b #2 2025-04-01 10:40:43 ~5 min windows 📦zip
✔️ ff97a8b #2 2025-04-01 10:43:48 ~8 min tests-rpc 📄log
✖️ ff97a8b #2 2025-04-01 11:11:13 ~35 min tests 📄log
✔️ cd0d253 #3 2025-04-07 11:56:30 ~2 min android 📦aar
✔️ cd0d253 #3 2025-04-07 11:57:23 ~3 min macos 📦zip
✔️ cd0d253 #3 2025-04-07 11:57:31 ~3 min ios 📦zip
✔️ cd0d253 #3 2025-04-07 11:59:21 ~5 min linux 📦zip
✔️ cd0d253 #3 2025-04-07 11:59:23 ~5 min macos 📦zip
✔️ cd0d253 #3 2025-04-07 11:59:23 ~5 min windows 📦zip
✔️ cd0d253 #3 2025-04-07 12:03:12 ~9 min tests-rpc 📄log
✖️ cd0d253 #3 2025-04-07 12:29:12 ~35 min tests 📄log
ee6515a #4 2025-04-07 12:17:21 ~1 min macos 📄log
ee6515a #4 2025-04-07 12:17:31 ~2 min ios 📄log
ee6515a #4 2025-04-07 12:17:41 ~2 min android 📄log
ee6515a #4 2025-04-07 12:18:03 ~2 min linux 📄log
ee6515a #4 2025-04-07 12:18:31 ~2 min windows 📄log
ee6515a #4 2025-04-07 12:19:52 ~4 min macos 📄log
✖️ ee6515a #4 2025-04-07 12:22:42 ~7 min tests-rpc 📄log
✔️ 87ad407 #5 2025-04-07 12:28:00 ~2 min android 📦aar
✔️ 87ad407 #5 2025-04-07 12:28:11 ~2 min ios 📦zip
✔️ 87ad407 #5 2025-04-07 12:28:59 ~3 min macos 📦zip
✔️ 87ad407 #5 2025-04-07 12:29:43 ~4 min windows 📦zip
✔️ 87ad407 #5 2025-04-07 12:30:26 ~5 min macos 📦zip
✔️ 87ad407 #5 2025-04-07 12:30:57 ~5 min linux 📦zip
✔️ 87ad407 #5 2025-04-07 12:33:35 ~8 min tests-rpc 📄log
✖️ 87ad407 #4 2025-04-07 13:04:17 ~34 min tests 📄log
✔️ 22eaefe #6 2025-04-10 12:44:21 ~2 min android 📦aar
✔️ 22eaefe #6 2025-04-10 12:44:23 ~2 min ios 📦zip
✔️ 22eaefe #6 2025-04-10 12:45:02 ~3 min macos 📦zip
✔️ 22eaefe #6 2025-04-10 12:46:02 ~4 min windows 📦zip
✔️ 22eaefe #6 2025-04-10 12:46:39 ~5 min macos 📦zip
✔️ 22eaefe #6 2025-04-10 12:48:13 ~6 min linux 📦zip
✔️ 22eaefe #6 2025-04-10 12:50:53 ~9 min tests-rpc 📄log
✖️ 22eaefe #5 2025-04-10 13:16:05 ~34 min tests 📄log
✔️ 7c35ae6 #7 2025-04-15 13:40:39 ~2 min android 📦aar
✔️ 7c35ae6 #7 2025-04-15 13:41:24 ~3 min macos 📦zip
✔️ 7c35ae6 #7 2025-04-15 13:41:32 ~3 min ios 📦zip
✔️ 7c35ae6 #7 2025-04-15 13:42:17 ~4 min windows 📦zip
✔️ 7c35ae6 #7 2025-04-15 13:43:02 ~5 min macos 📦zip
✔️ 7c35ae6 #7 2025-04-15 13:43:28 ~5 min linux 📦zip
✔️ 7c35ae6 #7 2025-04-15 13:46:14 ~8 min tests-rpc 📄log
✖️ 7c35ae6 #6 2025-04-15 14:11:51 ~33 min tests 📄log
✔️ ca682dc #8 2025-04-15 17:08:25 ~2 min android 📦aar
✔️ ca682dc #8 2025-04-15 17:10:07 ~4 min windows 📦zip
✔️ ca682dc #8 2025-04-15 17:10:45 ~5 min macos 📦zip
✔️ ca682dc #8 2025-04-15 17:10:52 ~5 min macos 📦zip
✔️ ca682dc #8 2025-04-15 17:11:32 ~5 min linux 📦zip
✔️ ca682dc #8 2025-04-15 17:12:19 ~6 min ios 📦zip
✔️ ca682dc #8 2025-04-15 17:13:30 ~7 min tests-rpc 📄log
✖️ ca682dc #7 2025-04-15 17:40:56 ~35 min tests 📄log
✔️ 4b78e43 #9 2025-04-15 17:53:29 ~2 min android 📦aar
✔️ 4b78e43 #9 2025-04-15 17:54:18 ~3 min ios 📦zip
✔️ 4b78e43 #9 2025-04-15 17:55:16 ~4 min macos 📦zip
✔️ 4b78e43 #9 2025-04-15 17:55:16 ~4 min windows 📦zip
✔️ 4b78e43 #9 2025-04-15 17:55:49 ~5 min macos 📦zip
✔️ 4b78e43 #9 2025-04-15 17:55:56 ~5 min linux 📦zip
✔️ 4b78e43 #9 2025-04-15 17:59:27 ~8 min tests-rpc 📄log
✖️ 4b78e43 #8 2025-04-15 18:25:00 ~34 min tests 📄log
✔️ 3ce5431 #10 2025-04-15 17:56:35 ~3 min android 📦aar
✔️ 3ce5431 #10 2025-04-15 17:58:02 ~3 min ios 📦zip
✔️ 3ce5431 #10 2025-04-15 17:59:30 ~4 min windows 📦zip
✔️ 3ce5431 #10 2025-04-15 18:00:57 ~5 min macos 📦zip
✔️ 3ce5431 #10 2025-04-15 18:01:09 ~5 min macos 📦zip
✔️ 3ce5431 #10 2025-04-15 18:01:44 ~5 min linux 📦zip
✔️ 3ce5431 #10 2025-04-15 18:07:16 ~7 min tests-rpc 📄log
✖️ 3ce5431 #9 2025-04-15 19:01:36 ~36 min tests 📄log
✔️ e89a270 #11 2025-04-17 10:57:27 ~2 min android 📦aar
✔️ e89a270 #11 2025-04-17 10:57:33 ~2 min ios 📦zip
✔️ e89a270 #11 2025-04-17 10:58:06 ~3 min macos 📦zip
✔️ e89a270 #11 2025-04-17 10:59:12 ~4 min windows 📦zip
✔️ e89a270 #11 2025-04-17 10:59:42 ~5 min macos 📦zip
✔️ e89a270 #11 2025-04-17 11:00:14 ~5 min linux 📦zip
✔️ e89a270 #11 2025-04-17 11:02:26 ~7 min tests-rpc 📄log
✖️ e89a270 #10 2025-04-17 11:28:41 ~34 min tests 📄log
✔️ 333643b #12 2025-04-24 14:21:20 ~2 min android 📦aar
✔️ 333643b #12 2025-04-24 14:21:32 ~3 min ios 📦zip
✔️ 333643b #12 2025-04-24 14:22:00 ~3 min macos 📦zip
✔️ 333643b #12 2025-04-24 14:24:44 ~6 min windows 📦zip
✔️ 333643b #12 2025-04-24 14:25:17 ~6 min linux 📦zip
✔️ 333643b #12 2025-04-24 14:26:15 ~7 min macos 📦zip
✖️ 333643b #12 2025-04-24 14:29:53 ~11 min tests-rpc 📄log
✖️ 333643b #11 2025-04-24 14:54:30 ~35 min tests 📄log
✔️ 12e11a0 #13 2025-04-25 07:24:57 ~2 min android 📦aar
✔️ 12e11a0 #13 2025-04-25 07:25:09 ~3 min ios 📦zip
✔️ 12e11a0 #13 2025-04-25 07:25:41 ~3 min macos 📦zip
✔️ 12e11a0 #13 2025-04-25 07:26:25 ~4 min windows 📦zip
✔️ 12e11a0 #13 2025-04-25 07:27:52 ~5 min linux 📦zip
✔️ 12e11a0 #13 2025-04-25 07:27:57 ~5 min macos 📦zip
✖️ 12e11a0 #13 2025-04-25 07:33:03 ~10 min tests-rpc 📄log
✔️ 12e11a0 #12 2025-04-25 07:57:28 ~35 min tests 📄log
✔️ 4be80d4 #14 2025-05-06 09:20:50 ~3 min android 📦aar
✔️ 4be80d4 #14 2025-05-06 09:21:06 ~3 min ios 📦zip
✔️ 4be80d4 #14 2025-05-06 09:21:21 ~3 min macos 📦zip
✔️ 4be80d4 #14 2025-05-06 09:22:57 ~5 min macos 📦zip
✔️ 4be80d4 #14 2025-05-06 09:23:15 ~5 min windows 📦zip
✔️ 4be80d4 #14 2025-05-06 09:24:57 ~7 min linux 📦zip
✖️ 4be80d4 #14 2025-05-06 09:31:22 ~13 min tests-rpc 📄log
✔️ 4be80d4 #13 2025-05-06 09:53:06 ~35 min tests 📄log
✔️ 75b7f4c #15 2025-05-07 07:58:34 ~2 min android 📦aar
✔️ 75b7f4c #15 2025-05-07 07:58:54 ~3 min ios 📦zip
✔️ 75b7f4c #15 2025-05-07 08:00:28 ~4 min windows 📦zip
✔️ 75b7f4c #15 2025-05-07 08:00:46 ~5 min macos 📦zip
✔️ 75b7f4c #15 2025-05-07 08:01:22 ~5 min linux 📦zip
✔️ 75b7f4c #15 2025-05-07 08:01:32 ~5 min macos 📦zip
✖️ 75b7f4c #15 2025-05-07 08:06:52 ~11 min tests-rpc 📄log
✔️ 75b7f4c #14 2025-05-07 08:32:23 ~36 min tests 📄log
✔️ 48293b0 #16 2025-05-07 14:10:54 ~3 min android 📦aar
✔️ 48293b0 #16 2025-05-07 14:11:11 ~3 min ios 📦zip
✔️ 48293b0 #16 2025-05-07 14:12:13 ~4 min windows 📦zip
✔️ 48293b0 #16 2025-05-07 14:13:01 ~5 min macos 📦zip
✔️ 48293b0 #16 2025-05-07 14:13:43 ~5 min linux 📦zip
✔️ 48293b0 #16 2025-05-07 14:13:53 ~5 min macos 📦zip
✖️ 48293b0 #16 2025-05-07 14:17:41 ~9 min tests-rpc 📄log
✖️ 48293b0 #15 2025-05-07 14:42:03 ~34 min tests 📄log
✔️ 5a76cfb #17 2025-05-08 09:35:12 ~2 min android 📦aar
✔️ 5a76cfb #17 2025-05-08 09:35:32 ~3 min ios 📦zip
✔️ 5a76cfb #17 2025-05-08 09:36:43 ~4 min windows 📦zip
✔️ 5a76cfb #17 2025-05-08 09:37:23 ~5 min macos 📦zip
✔️ 5a76cfb #17 2025-05-08 09:37:33 ~5 min macos 📦zip
✔️ 5a76cfb #17 2025-05-08 09:38:01 ~5 min linux 📦zip
✖️ 5a76cfb #17 2025-05-08 09:43:00 ~10 min tests-rpc 📄log
✖️ 5a76cfb #16 2025-05-08 10:07:11 ~34 min tests 📄log
✔️ fafe2d5 #18 2025-05-08 10:39:10 ~3 min android 📦aar
✔️ fafe2d5 #18 2025-05-08 10:39:40 ~3 min macos 📦zip
✔️ fafe2d5 #18 2025-05-08 10:39:41 ~3 min ios 📦zip
✔️ fafe2d5 #18 2025-05-08 10:41:05 ~4 min windows 📦zip
✔️ fafe2d5 #18 2025-05-08 10:41:19 ~5 min macos 📦zip
✔️ fafe2d5 #18 2025-05-08 10:43:09 ~6 min linux 📦zip
✖️ fafe2d5 #18 2025-05-08 10:47:55 ~11 min tests-rpc 📄log
✖️ fafe2d5 #17 2025-05-08 11:12:06 ~35 min tests 📄log
✔️ de9756c #19 2025-05-09 16:49:52 ~2 min android 📦aar
✔️ de9756c #19 2025-05-09 16:50:14 ~3 min ios 📦zip
✔️ de9756c #19 2025-05-09 16:51:31 ~4 min windows 📦zip
✔️ de9756c #19 2025-05-09 16:52:07 ~5 min macos 📦zip
✔️ de9756c #19 2025-05-09 16:52:14 ~5 min macos 📦zip
✔️ de9756c #19 2025-05-09 16:54:06 ~7 min linux 📦zip
✖️ de9756c #19 2025-05-09 16:58:13 ~11 min tests-rpc 📄log
✖️ de9756c #18 2025-05-09 17:22:06 ~35 min tests 📄log
✔️ c5a5910 #20 2025-05-12 06:42:59 ~2 min android 📦aar
✔️ c5a5910 #20 2025-05-12 06:43:22 ~3 min ios 📦zip
✔️ c5a5910 #20 2025-05-12 06:44:33 ~4 min windows 📦zip
✔️ c5a5910 #20 2025-05-12 06:45:12 ~5 min macos 📦zip
✔️ c5a5910 #20 2025-05-12 06:45:21 ~5 min macos 📦zip
✔️ c5a5910 #20 2025-05-12 06:46:07 ~5 min linux 📦zip
✖️ c5a5910 #20 2025-05-12 06:52:25 ~12 min tests-rpc 📄log
✖️ c5a5910 #19 2025-05-12 07:15:30 ~35 min tests 📄log
✔️ 751f98b #21 2025-05-12 09:56:22 ~2 min android 📦aar
✔️ 751f98b #21 2025-05-12 09:56:42 ~3 min ios 📦zip
✔️ 751f98b #21 2025-05-12 09:57:51 ~4 min windows 📦zip
✔️ 751f98b #21 2025-05-12 09:58:36 ~5 min macos 📦zip
✔️ 751f98b #21 2025-05-12 09:58:41 ~5 min macos 📦zip
✔️ 751f98b #21 2025-05-12 09:59:14 ~5 min linux 📦zip
✖️ 751f98b #21 2025-05-12 10:03:14 ~9 min tests-rpc 📄log
✖️ 751f98b #22 2025-05-12 10:27:32 ~10 min tests-rpc 📄log
✖️ 751f98b #20 2025-05-12 10:28:19 ~34 min tests 📄log
✔️ 0211872 #22 2025-05-12 11:35:03 ~2 min android 📦aar
✔️ 0211872 #22 2025-05-12 11:35:27 ~3 min ios 📦zip
✔️ 0211872 #22 2025-05-12 11:36:25 ~4 min windows 📦zip
✔️ 0211872 #22 2025-05-12 11:37:19 ~5 min macos 📦zip
✔️ 0211872 #22 2025-05-12 11:37:23 ~5 min linux 📦zip
✔️ 0211872 #22 2025-05-12 11:37:28 ~5 min macos 📦zip
✖️ 0211872 #23 2025-05-12 11:43:12 ~10 min tests-rpc 📄log
✔️ 0211872 #21 2025-05-12 12:07:35 ~35 min tests 📄log
✔️ 1767bcd #23 2025-05-12 12:50:15 ~2 min android 📦aar
✔️ 1767bcd #23 2025-05-12 12:50:36 ~3 min ios 📦zip
✔️ 1767bcd #23 2025-05-12 12:51:33 ~4 min windows 📦zip
✔️ 1767bcd #23 2025-05-12 12:52:27 ~5 min macos 📦zip
✔️ 1767bcd #23 2025-05-12 12:52:33 ~5 min macos 📦zip
✔️ 1767bcd #23 2025-05-12 12:53:06 ~5 min linux 📦zip
✖️ 1767bcd #24 2025-05-12 12:59:09 ~11 min tests-rpc 📄log
✖️ 1767bcd #22 2025-05-12 13:22:01 ~34 min tests 📄log
✔️ 04b6baa #24 2025-05-12 13:57:00 ~3 min ios 📦zip
✔️ 04b6baa #24 2025-05-12 13:57:24 ~4 min android 📦aar
✔️ 04b6baa #24 2025-05-12 13:57:55 ~4 min windows 📦zip
✔️ 04b6baa #24 2025-05-12 13:58:17 ~5 min linux 📦zip
✔️ 04b6baa #24 2025-05-12 13:59:11 ~6 min macos 📦zip
✔️ 04b6baa #24 2025-05-12 13:59:54 ~6 min macos 📦zip
✖️ 04b6baa #25 2025-05-12 14:09:54 ~16 min tests-rpc 📄log
✖️ 04b6baa #23 2025-05-12 14:31:35 ~38 min tests 📄log
✔️ 26c9fbc #25 2025-05-12 18:41:50 ~2 min ios 📦zip
✔️ 26c9fbc #25 2025-05-12 18:41:57 ~3 min android 📦aar
✔️ 26c9fbc #25 2025-05-12 18:42:25 ~3 min macos 📦zip
✔️ 26c9fbc #25 2025-05-12 18:43:16 ~4 min windows 📦zip
✔️ 26c9fbc #25 2025-05-12 18:44:06 ~5 min macos 📦zip
✔️ 26c9fbc #25 2025-05-12 18:44:43 ~5 min linux 📦zip
✖️ 26c9fbc #26 2025-05-12 18:48:45 ~9 min tests-rpc 📄log
✖️ 26c9fbc #24 2025-05-12 19:13:30 ~34 min tests 📄log
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 9f98111 #26 2025-05-13 08:19:46 ~2 min android 📦aar
✔️ 9f98111 #26 2025-05-13 08:20:15 ~3 min ios 📦zip
✔️ 9f98111 #26 2025-05-13 08:21:45 ~4 min windows 📦zip
✔️ 9f98111 #26 2025-05-13 08:22:05 ~5 min macos 📦zip
✔️ 9f98111 #26 2025-05-13 08:22:08 ~5 min macos 📦zip
✔️ 9f98111 #26 2025-05-13 08:22:38 ~5 min linux 📦zip
✖️ 9f98111 #27 2025-05-13 08:27:17 ~10 min tests-rpc 📄log
✔️ 9f98111 #25 2025-05-13 08:51:10 ~34 min tests 📄log
✔️ bbe8e10 #27 2025-05-13 09:30:21 ~2 min android 📦aar
✔️ bbe8e10 #27 2025-05-13 09:30:41 ~3 min ios 📦zip
✔️ bbe8e10 #27 2025-05-13 09:32:23 ~4 min windows 📦zip
✔️ bbe8e10 #27 2025-05-13 09:32:33 ~5 min macos 📦zip
✔️ bbe8e10 #27 2025-05-13 09:32:39 ~5 min macos 📦zip
✔️ bbe8e10 #27 2025-05-13 09:33:33 ~6 min linux 📦zip
✖️ bbe8e10 #28 2025-05-13 09:38:05 ~10 min tests-rpc 📄log
✔️ bbe8e10 #29 2025-05-13 09:51:33 ~9 min tests-rpc 📄log
✔️ bbe8e10 #26 2025-05-13 10:02:55 ~35 min tests 📄log

@dlipicar
Copy link
Contributor

dlipicar commented Apr 1, 2025

We can get away with treating BEP-20 tokens as ERC-20 tokens since they're basically identical, but for correctness we'll probably want to make this difference explicit at some point.
Also, give me a minute to check the thousand places where we're probably hardcoding ETH instead of using the value of NativeToken for the chain.

@dlipicar
Copy link
Contributor

dlipicar commented Apr 4, 2025

@smohamedjavid I tried swapping DAI to BNB, it did the approval but then I didn't get the actual Swap. Could you try this in mobile?

@dlipicar dlipicar force-pushed the feat/bnb-smart-chain branch from ff97a8b to cd0d253 Compare April 7, 2025 11:53
@smohamedjavid smohamedjavid force-pushed the feat/bnb-smart-chain branch 2 times, most recently from ee6515a to 87ad407 Compare April 7, 2025 12:24
@smohamedjavid
Copy link
Member Author

@smohamedjavid I tried swapping DAI to BNB, it did the approval but then I didn't get the actual Swap. Could you try this in mobile?

@dlipicar

I swapped 2 BUSD for 1.998 DAI: Approval TX | Swap TX

Then 1.99 DAI to 0.00368 BNB: Approval TX | Swap TX

Everything worked as expected and performed on BSC Mainnet. Let me know if I need to try any different/higher amount values.

@dlipicar
Copy link
Contributor

dlipicar commented Apr 9, 2025

@smohamedjavid alright, swap fixed on Desktop, it was a mistake on my side!

@dlipicar dlipicar marked this pull request as ready for review April 9, 2025 12:52
@dlipicar dlipicar marked this pull request as draft April 9, 2025 12:52
@smohamedjavid smohamedjavid force-pushed the feat/bnb-smart-chain branch 3 times, most recently from 4b78e43 to 3ce5431 Compare April 15, 2025 17:53
@smohamedjavid smohamedjavid marked this pull request as ready for review April 15, 2025 17:55
@saledjenic
Copy link
Contributor

@smohamedjavid I don't see that you've updated this function

func (tm *Manager) ToToken(network *params.Network) *tokenTypes.Token {
as well as place that are using it.

Also I don't see a function similar to getNativeTokens, this one

func (tm *Manager) getNativeTokens() ([]*tokenTypes.Token, error) {
for BSC's native token?

Basically, we should add it to all places where we use getNativeTokens, cause not sure how the client will know about BNB if it's not included in GetList function.

@saledjenic
Copy link
Contributor

I see how the native BNB is added, forget the previous comment.

Copy link

codecov bot commented Apr 25, 2025

Codecov Report

Attention: Patch coverage is 78.35400% with 192 lines in your changes missing coverage. Please review.

Project coverage is 60.51%. Comparing base (06e149f) to head (bbe8e10).
Report is 3 commits behind head on develop.

Files with missing lines Patch % Lines
services/wallet/token/token-lists/analyzer/main.go 0.00% 75 Missing ⚠️
services/wallet/router/router.go 2.50% 39 Missing ⚠️
services/wallet/market/market.go 67.69% 17 Missing and 4 partials ⚠️
services/wallet/currency/currency.go 38.70% 16 Missing and 3 partials ⚠️
services/wallet/currency/service.go 60.86% 9 Missing ⚠️
...allet/router/pathprocessor/processor_bridge_hop.go 0.00% 5 Missing ⚠️
services/wallet/transfer/commands.go 0.00% 4 Missing ⚠️
services/wallet/api.go 0.00% 3 Missing ⚠️
...et/router/pathprocessor/processor_swap_paraswap.go 0.00% 3 Missing ⚠️
services/wallet/activity/activity_v2.go 0.00% 2 Missing ⚠️
... and 7 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #6466      +/-   ##
===========================================
+ Coverage    60.40%   60.51%   +0.11%     
===========================================
  Files          832      833       +1     
  Lines       103779   104359     +580     
===========================================
+ Hits         62688    63155     +467     
- Misses       33546    33665     +119     
+ Partials      7545     7539       -6     
Flag Coverage Δ
functional 25.59% <34.97%> (+0.06%) ⬆️
unit 58.36% <76.09%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
api/default_networks.go 99.41% <100.00%> (+0.10%) ⬆️
services/wallet/activity/common/types.go 100.00% <ø> (ø)
services/wallet/common/const.go 91.17% <100.00%> (+1.17%) ⬆️
services/wallet/onramp/provider_mercuryo.go 58.02% <100.00%> (-2.47%) ⬇️
services/wallet/onramp/provider_moonpay.go 76.00% <100.00%> (ø)
services/wallet/onramp/provider_ramp.go 76.00% <100.00%> (ø)
services/wallet/reader.go 78.71% <100.00%> (ø)
services/wallet/router/router_test_data.go 100.00% <100.00%> (ø)
services/wallet/router/router_updates.go 41.73% <100.00%> (+1.03%) ⬆️
services/wallet/router/routes/router_path.go 86.40% <100.00%> (+0.33%) ⬆️
... and 21 more

... and 36 files with indirect coverage changes

@saledjenic saledjenic force-pushed the feat/bnb-smart-chain branch from 12e11a0 to 4be80d4 Compare May 6, 2025 09:17
smohamedjavid and others added 12 commits May 12, 2025 08:39
What's changed:
- analyzer updated to identify symbol and decimals collisons
- before resolving the collision, the duplicate symbols are resolved within each list by skipping other entries
- if there is a symbol collision the uniswap tokens list is the source of truth
- if there is a decimal collision (the same symbol, but different decimals used) the symbol is updated (e.g. USDC(6), USDC(18))
Since the decimal collision is solved by adding the decimals as postfix to the symbol name
an extra mapping is necessary to map those symbols to/from symbols recognized by the price providers.
…mark

Changes include:
- Replaced postfix for decimals collision, symbols include l1 chain based mark instead of decimals.
- Token filtering logic added to ensure that only chains the app knows about are present (otherwise, it cannot guarantee uniqueness without decimals included).
- Replaced hardcoded chain ID with a constant for `TestnetChainID` and added to `AllChainIDs`, which fixed tests balancechecker.
- Updated no-balance tests for the router that were failing due to the new BSC chain added.
@saledjenic saledjenic force-pushed the feat/bnb-smart-chain branch from de9756c to c5a5910 Compare May 12, 2025 06:39
@smohamedjavid
Copy link
Member Author

Need some approval to merge 🙏

Copy link
Contributor

@saledjenic saledjenic left a comment

Choose a reason for hiding this comment

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

As agreed let's merge all this and continue fixing branching off the develop branch.

@smohamedjavid smohamedjavid merged commit 5163085 into develop May 13, 2025
21 checks passed
@smohamedjavid smohamedjavid deleted the feat/bnb-smart-chain branch May 13, 2025 10:40
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.

5 participants