This commit is contained in:
programmer10110 2020-08-12 21:01:25 +03:00
parent 03094aca9d
commit 7f9a73aa44
1 changed files with 2 additions and 1 deletions

View File

@ -341,6 +341,7 @@ func (am *AirgappedMachine) handleStateDkgMasterKeyAwaitConfirmations(o *client.
// TODO @oopcode: reconstruct key and sign handlers
// HandleQR - gets an operation from a QR code, do necessary things for the operation and returns paths to QR-code images
func (am *AirgappedMachine) HandleQR() ([]string, error) {
var (
err error
@ -401,7 +402,7 @@ func (am *AirgappedMachine) HandleQR() ([]string, error) {
return nil, fmt.Errorf("failed to marshal operation: %w", err)
}
if err := am.qrProcessor.WriteQR(fmt.Sprintf(qrPath, resultQRFolder, o.Type, o.ID, o.To), operationBz); err != nil {
if err = am.qrProcessor.WriteQR(fmt.Sprintf(qrPath, resultQRFolder, o.Type, o.ID, o.To), operationBz); err != nil {
return nil, fmt.Errorf("failed to write QR")
}
qrPaths = append(qrPaths, qrPath)