Skip to content

Commit

Permalink
feature/DTONBWTWO-702 release beta 17 (#327)
Browse files Browse the repository at this point in the history
Beta 17 release
  • Loading branch information
fmattos-hw authored May 18, 2022
1 parent 0517d52 commit 453187e
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 76 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
Changelog
=========
[1.0.0-beta17](https://github.com/hyperwallet/hyperwallet-ios-ui-sdk/releases/tag/1.0.0-beta17)
-------------------
- iOS upgrade to version 13

[1.0.0-beta16](https://github.com/hyperwallet/hyperwallet-ios-ui-sdk/releases/tag/1.0.0-beta16)
-------------------
- Fixed currency formatting issues
- Fixed add transfer method qraphQL calls
- Fixed memory leaks
- Fixed no fee display issue


[1.0.0-beta15](https://github.com/hyperwallet/hyperwallet-ios-ui-sdk/releases/tag/1.0.0-beta15)
-------------------
- Fixed frameworks issue after upgrade to Xcode 12
Expand Down
5 changes: 2 additions & 3 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
github "hyperwallet/hyperwallet-ios-sdk" "1.0.0-beta14"
github "hyperwallet/hyperwallet-ios-insight" "1.0.0-beta04"

github "hyperwallet/hyperwallet-ios-sdk" "1.0.0-beta16"
github "hyperwallet/hyperwallet-ios-insight" "1.0.0-beta05"
6 changes: 4 additions & 2 deletions Common/CurrencyFormatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ class CurrencyFormatterTests: XCTestCase {
("Vietnam Currency", "1000000", "VND", "1.000.000,00")
]
cases.forEach {
let expected = $3.replacingOccurrences(of: "\u{200F}", with: "", options: NSString.CompareOptions.literal, range: nil)
XCTAssertEqual(CurrencyFormatter.formatStringAmount($1, with: $2),
$3,
expected,
"\($0) \($2) test case - currency should be equal to \($3)")
}
}
Expand Down Expand Up @@ -147,9 +148,10 @@ class CurrencyFormatterTests: XCTestCase {
("Vietnam Currency", "1000000", "VND", "1.000.000,00")
]
cases.forEach {
let expected = $3.replacingOccurrences(of: "\u{200F}", with: "", options: NSString.CompareOptions.literal, range: nil)
let doubleAmount = NSString(string: $1).doubleValue
XCTAssertEqual(CurrencyFormatter.formatDoubleAmount(doubleAmount, with: $2),
$3,
expected,
"\($0) test case - currency should be equal to \($3)")
}
}
Expand Down
4 changes: 2 additions & 2 deletions Common/Sources/Helper/CurrencyFormatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public struct CurrencyFormatter {
formatter.currencySymbol = ""

if let amount = formatter.string(from: NSNumber(value: amount)) {
return amount.trimmingCharacters(in: .whitespaces)
return amount.replacingOccurrences(of: "\u{200F}", with: "", options: NSString.CompareOptions.literal, range: nil).trimmingCharacters(in: .whitespaces)
}
}
return "\(amount)"
Expand Down Expand Up @@ -92,7 +92,7 @@ public struct CurrencyFormatter {
formatter.currencyCode = currencyCode
formatter.locale = getLocaleIdentifer(for: currencyCode)
formatter.currencySymbol = ""
return formatter.string(for: number)?.trimmingCharacters(in: .whitespaces) ?? amount
return formatter.string(for: number)?.replacingOccurrences(of: "\u{200F}", with: "", options: NSString.CompareOptions.literal, range: nil).trimmingCharacters(in: .whitespaces) ?? amount
} else {
return amount
}
Expand Down
3 changes: 2 additions & 1 deletion Common/Tests/Extensions/StringTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ class StringTests: XCTestCase {
("Vietnam Currency", "1000000", "VND", "₫1.000.000,00")
]
cases.forEach {
XCTAssertEqual($1.formatToCurrency(with: $2), $3, "\($0) test case - currency should be equal to \($3)")
let expected = $3.replacingOccurrences(of: "\u{200F}", with: "", options: NSString.CompareOptions.literal, range: nil)
XCTAssertEqual($1.formatToCurrency(with: $2), expected, "\($0) test case - currency should be equal to \($3)")
}
}
}
8 changes: 4 additions & 4 deletions HyperwalletUISDK.podspec
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
Pod::Spec.new do |spec|
spec.name = 'HyperwalletUISDK'
spec.version = '1.0.0-beta16'
spec.version = '1.0.0-beta17'
spec.summary = 'Hyperwallet UI SDK for iOS to integrate with Hyperwallet Platform'
spec.homepage = 'https://github.com/hyperwallet/hyperwallet-ios-ui-sdk'
spec.license = { :type => 'MIT', :file => 'LICENSE' }
spec.author = { 'Hyperwallet Systems Inc' => 'devsupport@hyperwallet.com' }
spec.platform = :ios
spec.ios.deployment_target = '10.0'
spec.ios.deployment_target = '13.0'
spec.source = { :git => 'https://github.com/hyperwallet/hyperwallet-ios-ui-sdk.git', :tag => "#{spec.version}"}
spec.requires_arc = true
spec.swift_version = '5.0'
spec.dependency 'HyperwalletSDK', '1.0.0-beta14'
spec.dependency 'HyperwalletSDK', '1.0.0-beta16'

spec.default_subspec = 'TransferMethod', 'Receipt', 'Transfer'

spec.subspec "Common" do |common|
common.resources = ['Common/Sources/Resources/*', 'Common/**/*.xib', 'Common/**/*.strings']
common.source_files = "Common/Sources/**/*.{swift,h}"
common.dependency 'Insights', '1.0.0-beta04'
common.dependency 'Insights', '1.0.0-beta05'
end

spec.subspec "TransferMethodRepository" do |transferMethodRepository|
Expand Down
Loading

0 comments on commit 453187e

Please sign in to comment.