Skip to content

Commit 576f843

Browse files
authored
Fix typo (#30)
* fix: Rename emailAddres to emailAddress * chore: bump versions * docs: update changelogs * docs: fix version * refactor: format code
1 parent 9fc18d7 commit 576f843

File tree

15 files changed

+54
-34
lines changed

15 files changed

+54
-34
lines changed

example/lib/main.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import 'package:flutter/material.dart';
2-
32
import 'package:mad_pay/mad_pay.dart';
43

54
void main() {
@@ -23,7 +22,7 @@ class _MyAppState extends State<MyApp> {
2322
final AppleParameters appleParameters = AppleParameters(
2423
merchantIdentifier: 'example_id',
2524
billingContact: Contact(
26-
emailAddres: 'test@test.com',
25+
emailAddress: 'test@test.com',
2726
postalAddress: PostalAddress(
2827
street: 's',
2928
city: 'c',
@@ -47,7 +46,7 @@ class _MyAppState extends State<MyApp> {
4746
),
4847
),
4948
shippingContact: Contact(
50-
emailAddres: 'test@test.com',
49+
emailAddress: 'test@test.com',
5150
),
5251
);
5352

packages/mad_pay/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 2.2.5
2+
3+
* Fix typo `emailAddress`
4+
* Bump `mad_pay_android` version to `2.2.4`
5+
* Bump `mad_pay_ios` version to `2.2.3`
6+
* Bump `mad_pay_platform_interface` version to `2.2.2`
7+
18
## 2.2.4
29

310
* Bump `mad_pay_android` version

packages/mad_pay/pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: mad_pay
22
description: Mad Pay will help you make payments through Apple Pay and Google Pay
3-
version: 2.2.4
3+
version: 2.2.5
44
repository: https://github.com/MadBrains/Mad-Pay-Flutter
55
issue_tracker: https://github.com/MadBrains/Mad-Pay-Flutter/issues
66
homepage: https://madbrains.ru/
@@ -12,9 +12,9 @@ environment:
1212
dependencies:
1313
flutter:
1414
sdk: flutter
15-
mad_pay_platform_interface: ^2.2.1
16-
mad_pay_android: ^2.2.3
17-
mad_pay_ios: ^2.2.2
15+
mad_pay_platform_interface: ^2.2.2
16+
mad_pay_android: ^2.2.4
17+
mad_pay_ios: ^2.2.3
1818

1919
# For development. Remove/comment before publishing to pub.
2020
# dependency_overrides:

packages/mad_pay_android/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 2.2.4
2+
3+
* Fix typo `emailAddress`
4+
* Bump `mad_pay_platform_interface` version to `2.2.2`
5+
16
## 2.2.3
27

38
* Bump `mad_pay_platform_interface` version

packages/mad_pay_android/android/protos/apple.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ enum MerchantCapabilities {
2626

2727

2828
message Contact {
29-
string email_addres = 1;
29+
string email_address = 1;
3030
PersonNameComponents name = 2;
3131
string phone_number = 3;
3232
PostalAddress postal_address = 4;

packages/mad_pay_android/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: mad_pay_android
22
description: A plug-in to add support for payments on the Android side of Mad Pay
3-
version: 2.2.3
3+
version: 2.2.4
44
repository: https://github.com/MadBrains/Mad-Pay-Flutter
55
issue_tracker: https://github.com/MadBrains/Mad-Pay-Flutter/issues
66
homepage: https://madbrains.ru/
@@ -14,7 +14,7 @@ dependencies:
1414
sdk: flutter
1515
flutter_localizations:
1616
sdk: flutter
17-
mad_pay_platform_interface: ^2.2.1
17+
mad_pay_platform_interface: ^2.2.2
1818
flutter_svg: ^0.22.0
1919

2020
# For development. Remove/comment before publishing to pub.

packages/mad_pay_ios/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 2.2.3
2+
3+
* Fix typo `emailAddress`
4+
* Bump `mad_pay_platform_interface` version to `2.2.2`
5+
16
## 2.2.2
27

38
* Bump `mad_pay_platform_interface` version

packages/mad_pay_ios/ios/Classes/PaymentHelpers.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class PaymentNetworkHelper {
162162
static func getContact(_ appleContact: Apple_Contact) -> PKContact? {
163163
let contact = PKContact()
164164

165-
contact.emailAddress = appleContact.emailAddres
165+
contact.emailAddress = appleContact.emailAddress
166166
if appleContact.hasName {
167167
contact.name = getPersonNameComponents(appleContact.name)
168168
}

packages/mad_pay_ios/ios/Classes/protos/apple.pb.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ struct Apple_Contact {
191191
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
192192
// methods supported on all messages.
193193

194-
var emailAddres: String = String()
194+
var emailAddress: String = String()
195195

196196
var name: Apple_PersonNameComponents {
197197
get {return _name ?? Apple_PersonNameComponents()}
@@ -477,7 +477,7 @@ extension Apple_AppleParameters: SwiftProtobuf.Message, SwiftProtobuf._MessageIm
477477
extension Apple_Contact: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
478478
static let protoMessageName: String = _protobuf_package + ".Contact"
479479
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
480-
1: .standard(proto: "email_addres"),
480+
1: .standard(proto: "email_address"),
481481
2: .same(proto: "name"),
482482
3: .standard(proto: "phone_number"),
483483
4: .standard(proto: "postal_address"),
@@ -489,7 +489,7 @@ extension Apple_Contact: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa
489489
// allocates stack space for every case branch when no optimizations are
490490
// enabled. https://github.com/apple/swift-protobuf/issues/1034
491491
switch fieldNumber {
492-
case 1: try { try decoder.decodeSingularStringField(value: &self.emailAddres) }()
492+
case 1: try { try decoder.decodeSingularStringField(value: &self.emailAddress) }()
493493
case 2: try { try decoder.decodeSingularMessageField(value: &self._name) }()
494494
case 3: try { try decoder.decodeSingularStringField(value: &self.phoneNumber) }()
495495
case 4: try { try decoder.decodeSingularMessageField(value: &self._postalAddress) }()
@@ -499,8 +499,8 @@ extension Apple_Contact: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa
499499
}
500500

501501
func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
502-
if !self.emailAddres.isEmpty {
503-
try visitor.visitSingularStringField(value: self.emailAddres, fieldNumber: 1)
502+
if !self.emailAddress.isEmpty {
503+
try visitor.visitSingularStringField(value: self.emailAddress, fieldNumber: 1)
504504
}
505505
if let v = self._name {
506506
try visitor.visitSingularMessageField(value: v, fieldNumber: 2)
@@ -515,7 +515,7 @@ extension Apple_Contact: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementa
515515
}
516516

517517
static func ==(lhs: Apple_Contact, rhs: Apple_Contact) -> Bool {
518-
if lhs.emailAddres != rhs.emailAddres {return false}
518+
if lhs.emailAddress != rhs.emailAddress {return false}
519519
if lhs._name != rhs._name {return false}
520520
if lhs.phoneNumber != rhs.phoneNumber {return false}
521521
if lhs._postalAddress != rhs._postalAddress {return false}

packages/mad_pay_ios/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: mad_pay_ios
22
description: A plug-in to add support for payments on the iOS side of Mad Pay
3-
version: 2.2.2
3+
version: 2.2.3
44
repository: https://github.com/MadBrains/Mad-Pay-Flutter
55
issue_tracker: https://github.com/MadBrains/Mad-Pay-Flutter/issues
66
homepage: https://madbrains.ru/
@@ -12,7 +12,7 @@ environment:
1212
dependencies:
1313
flutter:
1414
sdk: flutter
15-
mad_pay_platform_interface: ^2.2.1
15+
mad_pay_platform_interface: ^2.2.2
1616

1717
# For development. Remove/comment before publishing to pub.
1818
# dependency_overrides:

0 commit comments

Comments
 (0)