This repository has been archived by the owner on Dec 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
877 additions
and
5 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
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
25 changes: 25 additions & 0 deletions
25
BlockchainSdk/Blockchains/ICP/ICPExternalLinkProvider.swift
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,25 @@ | ||
// | ||
// ICPExternalLinkProvider.swift | ||
// BlockchainSdk | ||
// | ||
// Created by Dmitry Fedorov on 12.06.2024. | ||
// Copyright © 2024 Tangem AG. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
struct ICPExternalLinkProvider: ExternalLinkProvider { | ||
var testnetFaucetURL: URL? { | ||
return nil | ||
} | ||
|
||
private let baseExplorerURL = URL(string: "https://dashboard.internetcomputer.org") | ||
|
||
func url(address: String, contractAddress: String?) -> URL? { | ||
baseExplorerURL?.appendingPathComponent("account").appendingPathComponent(address) | ||
} | ||
|
||
func url(transaction hash: String) -> URL? { | ||
baseExplorerURL?.appendingPathComponent("transaction").appendingPathComponent(hash) | ||
} | ||
} |
Oops, something went wrong.