-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
417 Update evm tx history API (#553)
417 Update evm tx history API #417
- Loading branch information
Showing
39 changed files
with
186 additions
and
238 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// | ||
// FlowNetworkType.swift | ||
// FRW | ||
// | ||
// Created by Antonio Bello on 11/20/24. | ||
// | ||
|
||
import Foundation | ||
import Flow | ||
import struct SwiftUI.Color | ||
|
||
enum FlowNetworkType: String, CaseIterable, Codable { | ||
case testnet | ||
case mainnet | ||
|
||
// MARK: Lifecycle | ||
|
||
init?(chainId: Flow.ChainID) { | ||
switch chainId { | ||
case .testnet: | ||
self = .testnet | ||
case .mainnet: | ||
self = .mainnet | ||
default: | ||
return nil | ||
} | ||
} | ||
|
||
// MARK: Internal | ||
|
||
var color: Color { | ||
switch self { | ||
case .mainnet: | ||
return Color.LL.Primary.salmonPrimary | ||
case .testnet: | ||
return Color(hex: "#FF8A00") | ||
} | ||
} | ||
|
||
var isMainnet: Bool { | ||
self == .mainnet | ||
} | ||
|
||
func toFlowType() -> Flow.ChainID { | ||
switch self { | ||
case .testnet: | ||
return Flow.ChainID.testnet | ||
case .mainnet: | ||
return Flow.ChainID.mainnet | ||
} | ||
} | ||
} |
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
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.