Skip to content

Commit

Permalink
Merge pull request #3303 from safe-global/GH-3297/more-links
Browse files Browse the repository at this point in the history
Gh 3297/more links
  • Loading branch information
MouazAlzahabi authored Aug 23, 2023
2 parents f17b43f + 8c4097f commit d52cab3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Multisig/UI/App/NavigationRouter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ class ExtendedNavigationRouter: NavigationRouter {
func routeFrom(from url: URL) -> NavigationRoute? {

switch url.path {
case "/welcome", "/home":
return NavigationRoute.showAssets()
case "/balances":
guard let safeAddress = eip3770AddressQueryParameter(named: "safe", in: url) else {
return nil
Expand Down
12 changes: 12 additions & 0 deletions MultisigTests/Logic/DefaultNavigationRouterTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,18 @@ final class DefaultNavigationRouterTests: XCTestCase {

final class ExtendedNavigationRouterTests: XCTestCase {
let router = ExtendedNavigationRouter()

func testWelcome() {
let url = "https://some.host/welcome"
let route = router.routeFrom(from: URL(url))
XCTAssertEqual(route?.path, "/assets/")
}

func testHome() {
let url = "https://some.host/home"
let route = router.routeFrom(from: URL(url))
XCTAssertEqual(route?.path, "/assets/")
}

func testAssets() {
let url = "https://some.host/balances?safe=eth:0x46F228b5eFD19Be20952152c549ee478Bf1bf36b"
Expand Down

0 comments on commit d52cab3

Please sign in to comment.