Skip to content

Feat/e2e compose #159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 98 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
4e164cb
feat: compose view
May 20, 2022
6629cc6
fix: put entry to dashboard left
May 20, 2022
c469c0b
feat: finish base ux
May 20, 2022
36d4f73
feat: add localization
May 20, 2022
6666dae
fix: encryptButtonEnable
May 20, 2022
a999c96
fix: adjust SelectAccount scene shadow
May 23, 2022
004663c
feat: add MessageComposePluginContentPayload
May 24, 2022
727f274
fix: ui adjust
May 24, 2022
76eedf4
feat: uiadjust
May 24, 2022
af06f38
fix: revert useless code
May 24, 2022
6991697
fix: another way to implement placeholder
May 24, 2022
c767213
feat: add entry point for encrypt post v38
foxsin10 May 24, 2022
28c1113
feat: add new rust lib and support post encryption api
foxsin10 May 24, 2022
5299ae1
Feat/redpacket payload (#145)
cythb May 25, 2022
e87887b
add selectContact
hydraCy May 25, 2022
0d398c4
Merge branch 'feat/compose' of https://github.com/DimensionDev/Mask-i…
hydraCy May 25, 2022
449945e
fix: add CodingKeys for `RedPacketPayload`
May 25, 2022
354fe98
fix: add recipient in bottom tool bar
May 25, 2022
80ea3f6
Merge branch 'feat/compose' of https://github.com/DimensionDev/Mask-i…
hydraCy May 25, 2022
5307680
refactor: refactor red packet payload encoding
foxsin10 May 25, 2022
7175994
feat: support plugin meta appending
foxsin10 May 25, 2022
70766ea
refactor: remove `MessageComposePluginContent` and refine UI code style
foxsin10 May 25, 2022
72bc928
refactor: add meta param for messagecompose case
foxsin10 May 25, 2022
b11c662
add twitterEncoder
hydraCy May 25, 2022
2b23b31
Merge branch 'feat/compose' of https://github.com/DimensionDev/Mask-i…
hydraCy May 25, 2022
1affb16
Feat/attach redpacket meta (#146)
cythb May 25, 2022
075db04
feat: support fetch raw data of persona's public key (#147)
jk234ert May 25, 2022
c5280c2
feat: encryptContent
May 25, 2022
9fc3bbd
feat: add localization for encryptedMessage
foxsin10 May 25, 2022
8c65082
Update WalletCoreHelper.swift
hydraCy May 25, 2022
d1718b1
Merge branch 'feat/compose' of https://github.com/DimensionDev/Mask-i…
hydraCy May 25, 2022
9543a5f
feat: update localization
foxsin10 May 25, 2022
8f56754
Merge branch 'feat/compose' of https://github.com/DimensionDev/Mask-i…
foxsin10 May 25, 2022
beda646
fix: slience compliler error
foxsin10 May 25, 2022
02c72ce
Feat/share redpacket (#148)
cythb May 26, 2022
dfcb138
fix: use correct stringfy format for plugin metas
foxsin10 May 26, 2022
8aae7e3
feat: add comments for `stringfy(:)` function
foxsin10 May 26, 2022
4557ea6
fix: UI adjust
May 26, 2022
445dbca
fix: use correct authorId
foxsin10 May 26, 2022
f17e684
fix: use right frame
sxiaojian88 May 26, 2022
2a72651
fix: post by `https://twitter.com/intent/tweet?text=...`
May 26, 2022
da68ecf
fix: condition for checking if has a profile
May 26, 2022
9a7e532
chore: 2.9.0
May 26, 2022
7556962
feat: specify a profile as selectProfile
sxiaojian88 May 26, 2022
25d6044
fix: add PluginMetaShareViewModel to handle luckydrop share and lucky…
sxiaojian88 May 26, 2022
40192b4
fix: UX fix when share guide
sxiaojian88 May 27, 2022
30a6d60
fix: clean selectedProfile when profile be deleted
sxiaojian88 May 27, 2022
87f619b
fix: finish share guide UX
sxiaojian88 May 27, 2022
eb765ac
fix: send redpacket
May 27, 2022
f99c7ca
fix: #MM-629
May 27, 2022
cbe1a6f
refactor: refine hex prefix checking for rpid
foxsin10 May 27, 2022
da4fba9
chore: remove duplicate struct
May 27, 2022
58aa9c2
fix: iOS14 dismiss by remove presentationMode
sxiaojian88 May 27, 2022
6a83b78
fix: selectAccount scene bottom distance
sxiaojian88 May 30, 2022
3803602
fix: hide editButton when edit disable
sxiaojian88 May 30, 2022
73e9ef5
add compose button
hydraCy May 30, 2022
ba08598
Merge branch 'feat/compose' of https://github.com/DimensionDev/Mask-i…
hydraCy May 30, 2022
56199bd
fix: use max height in selectAccount scene
sxiaojian88 May 30, 2022
a9b5163
Update MaskSocialViewController.swift
hydraCy May 30, 2022
03d0761
Merge branch 'feat/compose' of https://github.com/DimensionDev/Mask-i…
hydraCy May 30, 2022
8ad83c8
fix: make editor become first responder when compose view first appears
foxsin10 May 30, 2022
ce37c06
fix: remove debug entry for compose
sxiaojian88 May 30, 2022
a7593ac
fix: update `fullEvmName` for `bsc` and `xdai`
May 30, 2022
db1e68d
fix: use `Introspect` instead of `ResponderChain` to interact with ed…
foxsin10 May 30, 2022
359160b
Merge branch 'feat/compose' of https://github.com/DimensionDev/Mask-i…
foxsin10 May 30, 2022
17b77e7
feat: refine text editor focus api
foxsin10 May 31, 2022
5166bd0
fix MM-639
hydraCy May 31, 2022
870ec7a
Merge branch 'feat/compose' of https://github.com/DimensionDev/Mask-i…
hydraCy May 31, 2022
eec3d19
Feat/notify composition change (#150)
jk234ert Jun 1, 2022
9648765
fix: two crashes and show detail of error
Jun 1, 2022
4f45482
fix: interupt processing transactions
Jun 1, 2022
3a1113b
build: update version of ios deployment target
Jun 1, 2022
7df4eb3
chore: optimize `errorDescription` for `Web3Error`
Jun 1, 2022
beb61fc
Update MaskSocialViewController.swift
hydraCy Jun 1, 2022
5168b0a
Merge branch 'feat/compose' of https://github.com/DimensionDev/Mask-i…
hydraCy Jun 1, 2022
070ca84
Modify the judgment for compse url
hydraCy Jun 2, 2022
aa5a94f
Merge branch 'develop' into feat/compose
foxsin10 Jun 2, 2022
2888a2b
refactor: refine pending transaction manager
foxsin10 Jun 2, 2022
d04be43
refactor: rename `PendTransactionManager` to `PendingTransactionManag…
foxsin10 Jun 2, 2022
81dde6b
chore: update dark UI of red-pakcet creation (#153)
cythb Jun 2, 2022
a7d9084
add selected person callback
hydraCy Jun 9, 2022
cc62436
Update SearchPersonaViewModel.swift
hydraCy Jun 9, 2022
75b3399
feat: support e2e encryption in native compose
jk234ert Jun 9, 2022
92a4dfe
Merge branch 'develop' into feat/compose
hydraCy Jun 9, 2022
96c765f
Update SelectContactViewController.swift
hydraCy Jun 9, 2022
b893c7b
Merge branch 'feat/compose' into feat/e2eCompose
jk234ert Jun 9, 2022
a130040
Merge branch 'feat/compose' into feat/e2eCompose
jk234ert Jun 9, 2022
623df25
feat: support only me encryption in native compose view
jk234ert Jun 9, 2022
f8c1bd5
change current profile
hydraCy Jun 9, 2022
0bebb3c
fix selectpersona delegate
hydraCy Jun 9, 2022
9673285
feat: update select contact
jk234ert Jun 9, 2022
cdfefd9
Merge branch 'feat/e2eCompose' of https://github.com/DimensionDev/Mas…
jk234ert Jun 9, 2022
ed33d6a
Update SearchPersonaViewModel.swift
hydraCy Jun 10, 2022
23c48f7
format code
hydraCy Jun 10, 2022
3efbce7
feat: support e2e encryption post
jk234ert Jun 22, 2022
470493b
Merge branch 'feat/e2eCompose' of https://github.com/DimensionDev/Mas…
jk234ert Jun 22, 2022
ea6c29f
Merge branch 'develop' into feat/e2eCompose
jk234ert Jun 27, 2022
05a121b
fix: merge conflicts
jk234ert Jun 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -457,10 +457,10 @@ public struct Api_MWResponse {
set {response = .respGeneratePersona(newValue)}
}

public var respPostEncryption: Api_PostEncrypedResp {
public var respPostEncryption: Api_PostEncryptedResp {
get {
if case .respPostEncryption(let v)? = response {return v}
return Api_PostEncrypedResp()
return Api_PostEncryptedResp()
}
set {response = .respPostEncryption(newValue)}
}
Expand All @@ -486,7 +486,7 @@ public struct Api_MWResponse {
case respGetStoredKeyExportType(Api_GetKeyStoreSupportExportTypeResp)
case respGenerateMnemonic(Api_GenerateMnemonicResp)
case respGeneratePersona(Api_PersonaGenerationResp)
case respPostEncryption(Api_PostEncrypedResp)
case respPostEncryption(Api_PostEncryptedResp)

#if !swift(>=4.1)
public static func ==(lhs: Api_MWResponse.OneOf_Response, rhs: Api_MWResponse.OneOf_Response) -> Bool {
Expand Down Expand Up @@ -1264,7 +1264,7 @@ extension Api_MWResponse: SwiftProtobuf.Message, SwiftProtobuf._MessageImplement
}
}()
case 26: try {
var v: Api_PostEncrypedResp?
var v: Api_PostEncryptedResp?
var hadOneofValue = false
if let current = self.response {
hadOneofValue = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,75 @@ extension Api_EncryptOption.Version: CaseIterable {

#endif // swift(>=4.2)

public struct Api_JWK {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.

public var crv: String = String()

public var ext: Bool = false

public var x: String = String()

public var y: String = String()

public var keyOps: [String] = []

public var kty: String = String()

public var d: String {
get {return _d ?? String()}
set {_d = newValue}
}
/// Returns true if `d` has been explicitly set.
public var hasD: Bool {return self._d != nil}
/// Clears the value of `d`. Subsequent reads from it will return its default value.
public mutating func clearD() {self._d = nil}

public var unknownFields = SwiftProtobuf.UnknownStorage()

public init() {}

fileprivate var _d: String? = nil
}

public struct Api_AesJWK {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.

public var alg: String = String()

public var ext: Bool = false

public var k: String = String()

public var keyOps: [String] = []

public var kty: String = String()

public var unknownFields = SwiftProtobuf.UnknownStorage()

public init() {}
}

public struct Api_E2EEncryptParam {
// SwiftProtobuf.Message conformance is added in an extension below. See the
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
// methods supported on all messages.

public var localKeyData: Data = Data()

public var target: Dictionary<String,Data> = [:]

public var authorPrivateKey: Data = Data()

public var unknownFields = SwiftProtobuf.UnknownStorage()

public init() {}
}

#if swift(>=5.5) && canImport(_Concurrency)
extension Api_Coin: @unchecked Sendable {}
extension Api_StoredKeyType: @unchecked Sendable {}
Expand All @@ -335,6 +404,9 @@ extension Api_StoredKeyInfo: @unchecked Sendable {}
extension Api_StoredKeyAccountInfo: @unchecked Sendable {}
extension Api_EncryptOption: @unchecked Sendable {}
extension Api_EncryptOption.Version: @unchecked Sendable {}
extension Api_JWK: @unchecked Sendable {}
extension Api_AesJWK: @unchecked Sendable {}
extension Api_E2EEncryptParam: @unchecked Sendable {}
#endif // swift(>=5.5) && canImport(_Concurrency)

// MARK: - Code below here is support for the SwiftProtobuf runtime.
Expand Down Expand Up @@ -523,3 +595,175 @@ extension Api_EncryptOption.Version: SwiftProtobuf._ProtoNameProviding {
1: .same(proto: "V38"),
]
}

extension Api_JWK: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".JWK"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "crv"),
3: .same(proto: "ext"),
4: .same(proto: "x"),
5: .same(proto: "y"),
6: .standard(proto: "key_ops"),
7: .same(proto: "kty"),
8: .same(proto: "d"),
]

public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularStringField(value: &self.crv) }()
case 3: try { try decoder.decodeSingularBoolField(value: &self.ext) }()
case 4: try { try decoder.decodeSingularStringField(value: &self.x) }()
case 5: try { try decoder.decodeSingularStringField(value: &self.y) }()
case 6: try { try decoder.decodeRepeatedStringField(value: &self.keyOps) }()
case 7: try { try decoder.decodeSingularStringField(value: &self.kty) }()
case 8: try { try decoder.decodeSingularStringField(value: &self._d) }()
default: break
}
}
}

public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every if/case branch local when no optimizations
// are enabled. https://github.com/apple/swift-protobuf/issues/1034 and
// https://github.com/apple/swift-protobuf/issues/1182
if !self.crv.isEmpty {
try visitor.visitSingularStringField(value: self.crv, fieldNumber: 1)
}
if self.ext != false {
try visitor.visitSingularBoolField(value: self.ext, fieldNumber: 3)
}
if !self.x.isEmpty {
try visitor.visitSingularStringField(value: self.x, fieldNumber: 4)
}
if !self.y.isEmpty {
try visitor.visitSingularStringField(value: self.y, fieldNumber: 5)
}
if !self.keyOps.isEmpty {
try visitor.visitRepeatedStringField(value: self.keyOps, fieldNumber: 6)
}
if !self.kty.isEmpty {
try visitor.visitSingularStringField(value: self.kty, fieldNumber: 7)
}
try { if let v = self._d {
try visitor.visitSingularStringField(value: v, fieldNumber: 8)
} }()
try unknownFields.traverse(visitor: &visitor)
}

public static func ==(lhs: Api_JWK, rhs: Api_JWK) -> Bool {
if lhs.crv != rhs.crv {return false}
if lhs.ext != rhs.ext {return false}
if lhs.x != rhs.x {return false}
if lhs.y != rhs.y {return false}
if lhs.keyOps != rhs.keyOps {return false}
if lhs.kty != rhs.kty {return false}
if lhs._d != rhs._d {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}

extension Api_AesJWK: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".AesJWK"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "alg"),
2: .same(proto: "ext"),
3: .same(proto: "k"),
4: .standard(proto: "key_ops"),
5: .same(proto: "kty"),
]

public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularStringField(value: &self.alg) }()
case 2: try { try decoder.decodeSingularBoolField(value: &self.ext) }()
case 3: try { try decoder.decodeSingularStringField(value: &self.k) }()
case 4: try { try decoder.decodeRepeatedStringField(value: &self.keyOps) }()
case 5: try { try decoder.decodeSingularStringField(value: &self.kty) }()
default: break
}
}
}

public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if !self.alg.isEmpty {
try visitor.visitSingularStringField(value: self.alg, fieldNumber: 1)
}
if self.ext != false {
try visitor.visitSingularBoolField(value: self.ext, fieldNumber: 2)
}
if !self.k.isEmpty {
try visitor.visitSingularStringField(value: self.k, fieldNumber: 3)
}
if !self.keyOps.isEmpty {
try visitor.visitRepeatedStringField(value: self.keyOps, fieldNumber: 4)
}
if !self.kty.isEmpty {
try visitor.visitSingularStringField(value: self.kty, fieldNumber: 5)
}
try unknownFields.traverse(visitor: &visitor)
}

public static func ==(lhs: Api_AesJWK, rhs: Api_AesJWK) -> Bool {
if lhs.alg != rhs.alg {return false}
if lhs.ext != rhs.ext {return false}
if lhs.k != rhs.k {return false}
if lhs.keyOps != rhs.keyOps {return false}
if lhs.kty != rhs.kty {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}

extension Api_E2EEncryptParam: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
public static let protoMessageName: String = _protobuf_package + ".E2EEncryptParam"
public static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
1: .same(proto: "localKeyData"),
2: .same(proto: "target"),
3: .same(proto: "authorPrivateKey"),
]

public mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
while let fieldNumber = try decoder.nextFieldNumber() {
// The use of inline closures is to circumvent an issue where the compiler
// allocates stack space for every case branch when no optimizations are
// enabled. https://github.com/apple/swift-protobuf/issues/1034
switch fieldNumber {
case 1: try { try decoder.decodeSingularBytesField(value: &self.localKeyData) }()
case 2: try { try decoder.decodeMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufBytes>.self, value: &self.target) }()
case 3: try { try decoder.decodeSingularBytesField(value: &self.authorPrivateKey) }()
default: break
}
}
}

public func traverse<V: SwiftProtobuf.Visitor>(visitor: inout V) throws {
if !self.localKeyData.isEmpty {
try visitor.visitSingularBytesField(value: self.localKeyData, fieldNumber: 1)
}
if !self.target.isEmpty {
try visitor.visitMapField(fieldType: SwiftProtobuf._ProtobufMap<SwiftProtobuf.ProtobufString,SwiftProtobuf.ProtobufBytes>.self, value: self.target, fieldNumber: 2)
}
if !self.authorPrivateKey.isEmpty {
try visitor.visitSingularBytesField(value: self.authorPrivateKey, fieldNumber: 3)
}
try unknownFields.traverse(visitor: &visitor)
}

public static func ==(lhs: Api_E2EEncryptParam, rhs: Api_E2EEncryptParam) -> Bool {
if lhs.localKeyData != rhs.localKeyData {return false}
if lhs.target != rhs.target {return false}
if lhs.authorPrivateKey != rhs.authorPrivateKey {return false}
if lhs.unknownFields != rhs.unknownFields {return false}
return true
}
}
Loading