Skip to content

Commit

Permalink
fix ask rlp number
Browse files Browse the repository at this point in the history
  • Loading branch information
pengpengliu committed Aug 28, 2020
1 parent a00cddd commit 3c58d22
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.bitcorej.chain.ask;

import org.bitcorej.chain.ethereum.EthereumStateProvider;
import org.bitcorej.chain.naka.RawTransaction;
import org.bitcorej.chain.naka.TransactionEncoder;
import org.bitcorej.utils.NumericUtil;
import org.json.JSONObject;
import org.web3j.crypto.Credentials;
import org.web3j.crypto.RawTransaction;
import org.web3j.utils.Numeric;

import java.math.BigInteger;
Expand All @@ -22,7 +22,7 @@ public String signRawTransaction(String rawTx, List<String> keys) {
String to = jsonObject.getString("to");
String data = jsonObject.getString("data");
RawTransaction tx = RawTransaction.createTransaction(nonce,
gasPrice, gasLimit, to, value, data, null, null, null);
gasPrice, gasLimit, to, value, data);

String signedTx = NumericUtil.bytesToHex(TransactionEncoder.signMessage(tx, 222L, Credentials.create(keys.get(0))));

Expand Down

0 comments on commit 3c58d22

Please sign in to comment.