aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny <awesome.observer@yandex.com>2018-10-16 06:34:50 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-10-16 06:34:50 +0800
commit331fa6d3075cb89fc295b36d9039620ec1d741ad (patch)
tree87bd9d2176fa7a89a627f7e4b575df0b44b75f57
parent3e92c853fb74fa887dff6497c5d92952c31ff7ec (diff)
downloaddexon-331fa6d3075cb89fc295b36d9039620ec1d741ad.tar
dexon-331fa6d3075cb89fc295b36d9039620ec1d741ad.tar.gz
dexon-331fa6d3075cb89fc295b36d9039620ec1d741ad.tar.bz2
dexon-331fa6d3075cb89fc295b36d9039620ec1d741ad.tar.lz
dexon-331fa6d3075cb89fc295b36d9039620ec1d741ad.tar.xz
dexon-331fa6d3075cb89fc295b36d9039620ec1d741ad.tar.zst
dexon-331fa6d3075cb89fc295b36d9039620ec1d741ad.zip
accounts/usbwallet: simplify code using -= operator (#17904)
-rw-r--r--accounts/usbwallet/ledger.go2
-rw-r--r--accounts/usbwallet/trezor.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/accounts/usbwallet/ledger.go b/accounts/usbwallet/ledger.go
index 2583fbc4d..7d5f67908 100644
--- a/accounts/usbwallet/ledger.go
+++ b/accounts/usbwallet/ledger.go
@@ -350,7 +350,7 @@ func (w *ledgerDriver) ledgerSign(derivationPath []uint32, tx *types.Transaction
signer = new(types.HomesteadSigner)
} else {
signer = types.NewEIP155Signer(chainID)
- signature[64] = signature[64] - byte(chainID.Uint64()*2+35)
+ signature[64] -= byte(chainID.Uint64()*2 + 35)
}
signed, err := tx.WithSignature(signer, signature)
if err != nil {
diff --git a/accounts/usbwallet/trezor.go b/accounts/usbwallet/trezor.go
index b84a95599..a9d2e9959 100644
--- a/accounts/usbwallet/trezor.go
+++ b/accounts/usbwallet/trezor.go
@@ -221,7 +221,7 @@ func (w *trezorDriver) trezorSign(derivationPath []uint32, tx *types.Transaction
signer = new(types.HomesteadSigner)
} else {
signer = types.NewEIP155Signer(chainID)
- signature[64] = signature[64] - byte(chainID.Uint64()*2+35)
+ signature[64] -= byte(chainID.Uint64()*2 + 35)
}
// Inject the final signature into the transaction and sanity check the sender
signed, err := tx.WithSignature(signer, signature)