-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MOB-2097 Blockchains refactoring (#608)
* "ETH" made a ref to the String constant * removed rawValue from BlockchainType * removed cases * added Bitcoin and Solana to the BlockchainType enum * removed SemiSupported * setting apart a method * refactored BlockchainNetwork into Chain within BlockchainType * ChainSpec refactored * fix * marked cases to throw * parsing networks from a data json file * added tests * removed default * refactoring * removed comments * refactoring * remove comment
- Loading branch information
Showing
40 changed files
with
477 additions
and
228 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,30 @@ | ||
// | ||
// SupportedTokensTests.swift | ||
// domains-manager-iosTests | ||
// | ||
// Created by Roman Medvid on 16.07.2024. | ||
// | ||
|
||
import XCTest | ||
@testable import domains_manager_ios | ||
|
||
final class SupportedTokensTests: XCTestCase { | ||
|
||
override func setUpWithError() throws { | ||
// Put setup code here. This method is called before the invocation of each test method in the class. | ||
} | ||
|
||
override func tearDownWithError() throws { | ||
// Put teardown code here. This method is called after the invocation of each test method in the class. | ||
} | ||
|
||
func testUSDCMainnetValue() throws { | ||
let bundler = Bundle.main | ||
let filePath = bundler.url(forResource: "supported-tokens", withExtension: "json")! | ||
let data = try! Data(contentsOf: filePath) | ||
print(String(data: data, encoding: .utf8)!) | ||
let tokensInfo = try! CryptoSender.SupportedToken.getContractArray() | ||
let usdc = tokensInfo[.usdc]![.Ethereum]!.mainnet | ||
XCTAssertEqual(usdc, "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48") | ||
} | ||
} |
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
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
Oops, something went wrong.