Add generic passwork checker before sending transaction#867
Add generic passwork checker before sending transaction#867
Conversation
|
@BloodyPixy I have added a new coordinator, forgot that name, take a look in the Lock coordinators. I haven’t done much tho. |
|
this has to be separated an tested. |
|
@BloodyPixy You need to pass view model that will describe actions! |
|
|
||
| let transaction = configurator.signTransaction | ||
| if needsPasscodeCheck { | ||
| delegate?.confirmPaymentControllerNeedsAuthentication(self) |
There was a problem hiding this comment.
is there a way to check this on coordinator level?
…ansactions * master: Add option to skip import main wallet Disable AuthenticateUserCoordinatorTests Version bump Use valueToSend() Add RPCServer as new parameter of the NonFungibleTokenObject. So now we could open nftokens. (#872) Fix an issue with adding extra ether to each transaction Enable deletion of the main wallet Average USD field update on QR code scanning. (#861)
vikmeup
left a comment
There was a problem hiding this comment.
@BloodyPixy can you add tests?
| $0.title = self?.viewModel.verifyTransactionsWithPasscodeTitle | ||
| $0.value = self?.viewModel.isPasscodeTransactionLockEnabled | ||
| $0.hidden = Condition.function([Values.passcodeRow], { form in | ||
| return !((form.rowBy(tag: Values.passcodeRow) as? SwitchRow)?.value ?? false) |
There was a problem hiding this comment.
Do something along this:
var privateKeyRow: TextAreaRow? {
return form.rowBy(tag: Values.privateKey)
}
There was a problem hiding this comment.
you mean for passcodeRow, and use it instead of this
!((form.rowBy(tag: Values.passcodeRow) as? SwitchRow)?.value ?? false)
like this
!(self?.passcodeRow?.value ?? false),
did I get you right?
| } | ||
|
|
||
| private func updatePasscodeTransactionLockRow(enabled: Bool) { | ||
| self.viewModel.isPasscodeTransactionLockEnabled = enabled |
| } | ||
|
|
||
| var verifyTransactionsWithPasscodeTitle: String { | ||
| return NSLocalizedString("settings.lockTransactions.label.title", value: "Authenticate Transactions", comment: "") |
|
|
||
| extension ConfirmCoordinator: ConfirmPaymentAuthenticationDelegate { | ||
| func confirmPaymentControllerNeedsAuthentication(_ controller: ConfirmPaymentViewController) { | ||
| guard let needsPasscodeCheck = PreferencesController() |
There was a problem hiding this comment.
This means you can modify user defaults to enable this feature?
It needs to be stored on keychain level then
|
I decided to put it inside of the lock. Seems logical to me, as we use Lock for keychain work with a passcode, and transaction authorization is directly connected to it. Good thing would be to have a new icon for this option in settings, as for now it uses same icon as Passcode app lock. It works like this:
|
…ansactions * master: Move reload into separate function Crash: Signing on watch address via browser #885 fix crash when signing on watch address via browser #885 (#887) Update localized string and use R Move into separate function Update Analitics.swift (#882) Link "Settings → Telegram Group" should open channel according to user's locale (#879) Improve currentWalletDescriptionString Move Help center higher in order Version Bump
|
Let's hold off on this one. It still requires UX/UI work to figure this out. |
Referencing #830, I will create new coordinator for this one, and reuse the
LockEnterPasscodeViewController.I would like to get some info before finishing: