Skip to content

Commit

Permalink
chore: redundant toHex (#10403)
Browse files Browse the repository at this point in the history
  • Loading branch information
nuanyang233 committed Aug 15, 2023
1 parent 7f970da commit 723e767
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/web3-shared/evm/src/helpers/signTransaction.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { toHex } from 'web3-utils'
import Accounts from 'web3-eth-accounts'
import type { Transaction } from '../types/index.js'

export function signTransaction(transaction: Transaction, privateKey: string) {
const accounts = new (Accounts as unknown as new () => Accounts.Accounts)()
return accounts.signTransaction(transaction, toHex(privateKey))
return accounts.signTransaction(transaction, privateKey)
}

0 comments on commit 723e767

Please sign in to comment.