-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1302 from novasamatech/feature/route-details
Crosschain swap route details
- Loading branch information
Showing
33 changed files
with
1,008 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
...allet/Assets.xcassets/colors/background/colorRouteNumberBackground.colorset/Contents.json
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,20 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"color" : { | ||
"color-space" : "srgb", | ||
"components" : { | ||
"alpha" : "1.000", | ||
"blue" : "0x3B", | ||
"green" : "0x2D", | ||
"red" : "0x2B" | ||
} | ||
}, | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
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,16 @@ | ||
import UIKit | ||
|
||
class AssetAmountView: GenericPairValueView<AssetIconView, UILabel> { | ||
var assetIconView: AssetIconView { fView } | ||
var amountLabel: UILabel { sView } | ||
|
||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
|
||
configure() | ||
} | ||
|
||
private func configure() { | ||
setHorizontalAndSpacing(1) | ||
} | ||
} |
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,51 @@ | ||
import Foundation | ||
import SoraUI | ||
|
||
final class LinePatternView: UIView { | ||
var style: Style = .defaultStyle { | ||
didSet { | ||
setNeedsDisplay() | ||
} | ||
} | ||
|
||
override func draw(_ rect: CGRect) { | ||
guard let context = UIGraphicsGetCurrentContext() else { | ||
return | ||
} | ||
|
||
context.setLineWidth(style.lineWidth) | ||
context.setStrokeColor(style.color.cgColor) | ||
|
||
if let pattern = style.pattern { | ||
context.setLineDash(phase: pattern.phase, lengths: pattern.segments) | ||
} | ||
|
||
context.move(to: CGPoint(x: rect.midX, y: 0)) | ||
context.addLine(to: CGPoint(x: rect.midX, y: rect.maxY)) | ||
context.drawPath(using: .stroke) | ||
} | ||
} | ||
|
||
extension LinePatternView { | ||
struct Pattern { | ||
let segments: [CGFloat] | ||
let phase: CGFloat | ||
} | ||
|
||
struct Style { | ||
let color: UIColor | ||
let lineWidth: CGFloat | ||
let pattern: Pattern? | ||
|
||
static var defaultStyle: Style { | ||
Style( | ||
color: R.color.colorIconSecondary()!, | ||
lineWidth: 1, | ||
pattern: LinePatternView.Pattern( | ||
segments: [2, 3], | ||
phase: 0 | ||
) | ||
) | ||
} | ||
} | ||
} |
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
7 changes: 7 additions & 0 deletions
7
novawallet/Modules/Swaps/RouteDetails/SwapRouteDetailsInteractor.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,7 @@ | ||
import UIKit | ||
|
||
final class SwapRouteDetailsInteractor { | ||
weak var presenter: SwapRouteDetailsInteractorOutputProtocol? | ||
} | ||
|
||
extension SwapRouteDetailsInteractor: SwapRouteDetailsInteractorInputProtocol {} |
Oops, something went wrong.