Refactor convertToKeycardAccount
not to take Account
and Settings
argument
#5359
Labels
convertToKeycardAccount
not to take Account
and Settings
argument
#5359
Problem
convertToKeycardAccount
method takseAccount
andSettings
as arguments.This shouldn't be done, we should not use those structs directly. Instead, a single
CovertToKeycardAccountRequest
struct should be created and all required parameters should be added there.status-go/api/geth_backend.go
Line 1154 in 6c98c63
Implementation
Notes:
account multiaccounts.Account
can be read from multiaccountsDBKeycardPairedOn
- just set totime.Now()
KeycardPairing
- should be read fromsettings.KeycardPairingsDataFile
Acceptance Criteria
This code can be removed from status-desktop:
https://github.com/status-im/status-desktop/blob/ca879b7facedaf5c54372ee059b3d4fe913d715a/src/app_service/service/accounts/service.nim#L491-L495
https://github.com/status-im/status-desktop/blob/ca879b7facedaf5c54372ee059b3d4fe913d715a/src/app_service/service/accounts/service.nim#L190-L202
Notes
To keep the API backwards compatible, we should introduce
convertToKeycardAccountV2
and deprecate the old one. Remove it when both clients switch to the new endpoint.The text was updated successfully, but these errors were encountered: