Skip to content

Commit

Permalink
Use hex v,r,s
Browse files Browse the repository at this point in the history
  • Loading branch information
spylogsster committed Nov 9, 2021
1 parent 702c771 commit 766a10e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions components/brave_wallet/browser/eth_transaction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,12 @@ bool EthTransaction::ProcessVRS(const std::string& v,
}

std::vector<uint8_t> r_decoded;
if (!base::HexStringToBytes(r, &r_decoded)) {
if (!base::HexStringToBytes(r.substr(2), &r_decoded)) {
LOG(ERROR) << "Unable to decode r param";
return false;
}
std::vector<uint8_t> s_decoded;
if (!base::HexStringToBytes(s, &s_decoded)) {
if (!base::HexStringToBytes(s.substr(2), &s_decoded)) {
LOG(ERROR) << "Unable to decode s param";
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion components/brave_wallet_ui/common/async/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ export async function signTrezorTransaction (apiProxy: APIProxyControllers, path
}
const { v, r, s } = signed.payload
const result =
await apiProxy.ethTxController.processHardwareSignature(txInfo.id, v, r.replace('0x', ''), s.replace('0x', ''))
await apiProxy.ethTxController.processHardwareSignature(txInfo.id, v, r, s)
if (!result.status) {
return { success: false, error: getLocale('braveWalletProcessTransactionError') }
}
Expand Down

0 comments on commit 766a10e

Please sign in to comment.