-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore_: router response moved to wallet responses location
Following the approach we did for keeping requests at the same location, these changes introduce new location for responses. `SuggestedRoutesResponse` is moved there and renamed to `RouterSuggestedRoutes` and code is updated accordingly. New type `Route` defined (since a single route is composed of zero or more paths). Types `Route`, `Path`, `Graph` and `Node` belong to a new `routs` package now.
- Loading branch information
1 parent
a759fe6
commit e57bf22
Showing
10 changed files
with
337 additions
and
316 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package responses | ||
|
||
import ( | ||
"github.com/status-im/status-go/errors" | ||
routs "github.com/status-im/status-go/services/wallet/router/routes" | ||
) | ||
|
||
type RouterSuggestedRoutes struct { | ||
Uuid string `json:"Uuid"` | ||
Best routs.Route `json:"Best,omitempty"` | ||
Candidates routs.Route `json:"Candidates,omitempty"` | ||
TokenPrice *float64 `json:"TokenPrice,omitempty"` | ||
NativeChainTokenPrice *float64 `json:"NativeChainTokenPrice,omitempty"` | ||
ErrorResponse *errors.ErrorResponse `json:"ErrorResponse,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.