瀏覽代碼

accounts/usbwallet: fix staticcheck warnings (#20372)

Guillaume Ballet 6 年之前
父節點
當前提交
5cc6e7a71e
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      accounts/usbwallet/ledger.go

+ 2 - 1
accounts/usbwallet/ledger.go

@@ -162,7 +162,8 @@ func (w *ledgerDriver) SignTx(path accounts.DerivationPath, tx *types.Transactio
 		return common.Address{}, nil, accounts.ErrWalletClosed
 		return common.Address{}, nil, accounts.ErrWalletClosed
 	}
 	}
 	// Ensure the wallet is capable of signing the given transaction
 	// Ensure the wallet is capable of signing the given transaction
-	if chainID != nil && w.version[0] <= 1 && w.version[1] <= 0 && w.version[2] <= 2 {
+	if chainID != nil && w.version[0] <= 1 && w.version[2] <= 2 {
+		//lint:ignore ST1005 brand name displayed on the console
 		return common.Address{}, nil, fmt.Errorf("Ledger v%d.%d.%d doesn't support signing this transaction, please update to v1.0.3 at least", w.version[0], w.version[1], w.version[2])
 		return common.Address{}, nil, fmt.Errorf("Ledger v%d.%d.%d doesn't support signing this transaction, please update to v1.0.3 at least", w.version[0], w.version[1], w.version[2])
 	}
 	}
 	// All infos gathered and metadata checks out, request signing
 	// All infos gathered and metadata checks out, request signing