Add approveTransaction AuthenticationReason

This commit is contained in:
Ivan Grachev 2022-05-02 19:58:16 +03:00
parent 1b976c61fa
commit fe9c1d2034
3 changed files with 9 additions and 0 deletions

View File

@ -4,6 +4,7 @@ enum ApprovalSubject {
case signMessage
case signPersonalMessage
case signTypedData
case approveTransaction
var asAuthenticationReason: AuthenticationReason {
switch self {
@ -13,6 +14,8 @@ enum ApprovalSubject {
return .signPersonalMessage
case .signTypedData:
return .signTypedData
case .approveTransaction:
return .approveTransaction
}
}
@ -24,6 +27,8 @@ enum ApprovalSubject {
return Strings.signPersonalMessage
case .signTypedData:
return Strings.signTypedData
case .approveTransaction:
return Strings.approveTransaction
}
}
}

View File

@ -9,6 +9,7 @@ enum AuthenticationReason {
case signMessage
case signPersonalMessage
case signTypedData
case approveTransaction
var title: String {
switch self {
@ -28,6 +29,8 @@ enum AuthenticationReason {
return Strings.signPersonalMessage
case .signTypedData:
return Strings.signTypedData
case .approveTransaction:
return Strings.approveTransaction
}
}
}

View File

@ -76,5 +76,6 @@ struct Strings {
static let calculating = "Calculating…"
static let howToEnableSafariExtension = "How to enable Safari extension?"
static let shareInvite = "Share an invite"
static let approveTransaction = "Approve Transaction"
}