-
Notifications
You must be signed in to change notification settings - Fork 246
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(wallet)_: enrich status changed and tx update signals' payload with tx route data #6050
base: develop
Are you sure you want to change the base?
Conversation
Jenkins BuildsClick to see older builds (40)
|
1a92352
to
9f0261c
Compare
import "github.com/status-im/status-go/errors" | ||
|
||
var ( | ||
ErrInvalidSignatureDetails = &errors.ErrorResponse{Code: errors.ErrorCode("WT-004"), Details: "invalid signature details"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
errors of a given type should all be in the same file IMO, hard to track down which error code I need to use for the next one otherwise. If this was causing a circular dependency we might need a separate errors
package under the router dir or wherever this used to be
UsdcSymbol = "USDC" | ||
HopSymbol = "HOP" | ||
|
||
ProcessorTransferName = "Transfer" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm these don't really sound like a "common" thing, it's a very pathprocessor-specific thing. I'd favour doing a new package like pathprocessortypes
or something like that if it casuses circular dependency, otherwise the common
package will just become a dump of every constant used in more than one place.
9f0261c
to
4a6f483
Compare
@dlipicar I agree with both things you've stated above, but was very hard to fix all cyclic dependencies, cause there were many, without such changes. We should think about and work more on sorting out the code organization for the wallet service. |
Changes I've done were necessary to have what I need for ephemeral notifications, which is the last commit in this PR. If you can apply the last commit on top of your changes done here #5970 solving all cyclic dependencies with better code organization I am up for that. We should have a separate PR where we will clean the wallet service and improve its architecture. Also, because of many things that are potentially used by mobile app, we cannot fully clean them. I hope things will get better once the mobile app starts using a new sending flow and all txs (for ens usernames, collectibles, stickers, other txs) go over the router and new sending flow. |
2b16ad1
to
ddfcc79
Compare
4a6f483
to
a30cc4c
Compare
fc6637e
to
ff68921
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6050 +/- ##
============================================
- Coverage 60.87% 13.33% -47.55%
============================================
Files 811 800 -11
Lines 108894 107756 -1138
============================================
- Hits 66293 14371 -51922
- Misses 34843 91533 +56690
+ Partials 7758 1852 -5906
Flags with carried forward coverage won't be shown. Click here to find out more.
|
New EnsResolver type identified and will be responsible for network calls, while ens api will use it (until mobile app switches to a new sending flow) and continue managing other (db) interactions.
- path processor constants moved to wallet constants - FetchPrices and FindToken functions moved from send type package to router package
…ith tx route data
ff68921
to
5786466
Compare
As can be seen, by commits, all but the last commit were necessary to get rid of cyclic dependencies I ran into when I wanted to add route tx data to the payload of the status-changed signal.
What's done:
SendTxArgs
type defined and used across many packages) moved to services/wallet/wallettypesThese changes depend on the work done here #5970