Skip to content

Commit

Permalink
Merge pull request #235 from ChainSafe/ava-bug
Browse files Browse the repository at this point in the history
Update Web3PrivateKey.cs
  • Loading branch information
KBryan authored Sep 27, 2022
2 parents bd7e6d9 + 1f549f8 commit 7be6fb1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Web3Unity/Scripts/Library/Web3PrivateKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public class Web3PrivateKey
const int CRONOS_TESTNET = 338;
const int FTM_MAINNET = 250;
const int FTM_TESTNET = 0xfa2;
const int AVA_MAINNET = 43114;
const int AVA_TESTNET = 43113;

public static string SignTransaction(string _privateKey, string _transaction, string _chainId)
{
Expand All @@ -25,7 +27,7 @@ public static string SignTransaction(string _privateKey, string _transaction, st
BigInteger chainId = BigInteger.Parse(_chainId);
// sign transaction
if ((CHAIN_ID == MATIC_MAIN) || (CHAIN_ID == MATIC_MUMBAI) || (CHAIN_ID == HARMONY_MAINNET) ||
(CHAIN_ID == HARMONY_TESTNET) || (CHAIN_ID == CRONOS_MAINNET) || (CHAIN_ID == CRONOS_TESTNET) || (CHAIN_ID == FTM_MAINNET) || (CHAIN_ID == FTM_TESTNET))
(CHAIN_ID == HARMONY_TESTNET) || (CHAIN_ID == CRONOS_MAINNET) || (CHAIN_ID == CRONOS_TESTNET) || (CHAIN_ID == FTM_MAINNET) || (CHAIN_ID == FTM_TESTNET) || (CHAIN_ID == AVA_MAINNET) || (CHAIN_ID == AVA_TESTNET))
{
signature = EthECDSASignature.CreateStringSignature(key.SignAndCalculateYParityV(hashByteArr));
return signature;
Expand Down

0 comments on commit 7be6fb1

Please sign in to comment.