Skip to content

Commit

Permalink
Update project data structure
Browse files Browse the repository at this point in the history
  • Loading branch information
lmcmz committed Dec 6, 2022
1 parent ae293db commit e7d9e58
Show file tree
Hide file tree
Showing 40 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ let package = Package(
.target(
name: "Flow",
dependencies: ["BigInt"],
path: "Sources/Flow"
path: "Sources"
),
.testTarget(
name: "FlowTests",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,13 @@ extension Double {
return (self * multiplier).rounded() / multiplier
}
}

extension Decimal {
func tokenFormat(maximumFractionDigits: Int = 8) -> String {
let formatter = NumberFormatter()
formatter.maximumFractionDigits = maximumFractionDigits
formatter.minimumFractionDigits = 0
formatter.numberStyle = .decimal
return formatter.string(for: self) ?? String(NSDecimalNumber(decimal: self).doubleValue)
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e7d9e58

Please sign in to comment.