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

chore(wallet)_: returns last timestamps of successful GetWalletToken updates #5988

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

friofry
Copy link
Contributor

@friofry friofry commented Oct 24, 2024

In wallet/reader.go we already have a mechanism to store timestamps when token info is updated in FetchBalances and GetWalletToken.
In this PR I just expose this map (address -> last update timestamp) to the API.

This should help @alwx with status-im/status-mobile#21401
Closed #5957

@friofry friofry requested a review from alwx October 24, 2024 13:18
@status-im-auto
Copy link
Member

status-im-auto commented Oct 24, 2024

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ f9f96c9 #1 2024-10-24 13:23:51 ~4 min linux 📦zip
✔️ f9f96c9 #1 2024-10-24 13:23:58 ~4 min ios 📦zip
✔️ f9f96c9 #1 2024-10-24 13:25:01 ~6 min android 📦aar
✔️ f9f96c9 #1 2024-10-24 13:25:31 ~6 min tests-rpc 📄log
✔️ f9f96c9 #1 2024-10-24 13:53:32 ~34 min tests 📄log
✔️ 9ea9bea #1 2024-11-14 17:37:55 ~4 min macos 📦zip
✔️ 9ea9bea #2 2024-11-14 17:38:09 ~4 min linux 📦zip
✔️ 9ea9bea #2 2024-11-14 17:38:15 ~4 min tests-rpc 📄log
✔️ 9ea9bea #1 2024-11-14 17:38:42 ~5 min windows 📦zip
✔️ 9ea9bea #2 2024-11-14 17:39:13 ~5 min ios 📦zip
✔️ 9ea9bea #2 2024-11-14 17:39:26 ~6 min android 📦aar
✔️ 9ea9bea #1 2024-11-14 17:41:08 ~7 min macos 📦zip
✔️ 9ea9bea #2 2024-11-14 18:07:56 ~34 min tests 📄log

Copy link

codecov bot commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 81.81818% with 2 lines in your changes missing coverage. Please review.

Project coverage is 60.99%. Comparing base (1887b00) to head (9ea9bea).

Files with missing lines Patch % Lines
services/wallet/api.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5988      +/-   ##
===========================================
+ Coverage    60.97%   60.99%   +0.02%     
===========================================
  Files          814      814              
  Lines       109253   109264      +11     
===========================================
+ Hits         66619    66649      +30     
+ Misses       34794    34782      -12     
+ Partials      7840     7833       -7     
Flag Coverage Δ
functional 13.53% <0.00%> (-0.02%) ⬇️
unit 60.21% <81.81%> (+0.02%) ⬆️

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

Files with missing lines Coverage Δ
services/wallet/reader.go 78.67% <100.00%> (+0.54%) ⬆️
services/wallet/api.go 16.10% <0.00%> (-0.06%) ⬇️

... and 38 files with indirect coverage changes

@@ -137,6 +137,10 @@ func (api *API) GetWalletToken(ctx context.Context, addresses []common.Address)
return api.reader.GetWalletToken(ctx, clients, addresses, currency)
}

func (api *API) GetLastWalletTokenUpdate() map[common.Address]time.Time {
Copy link
Contributor

Choose a reason for hiding this comment

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

we tend to use unix timestamps everywhere. What does a time.Time look like in JSON?

@VolodLytvynenko
Copy link

VolodLytvynenko commented Nov 14, 2024

@friofry hi. Could you please rebase the current PR? Thanx!

@friofry friofry force-pushed the ab/issue-5987-last-token-update-time branch from f9f96c9 to 9ea9bea Compare November 14, 2024 17:33
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.

6 participants