Fixed test-wallet for phantomjs (it does not like the "let" keyword).
This commit is contained in:
parent
dfdbb9bb28
commit
df2a00a2fc
@ -119,16 +119,16 @@ describe('Test Transaction Signing and Parsing', function() {
|
||||
assert.equal(parsedTransaction.chainId, 0, 'parses chainId (legacy)');
|
||||
|
||||
// Legacy serializes unsigned transaction
|
||||
{
|
||||
let unsignedTx = ethers.utils.serializeTransaction(transaction);
|
||||
(function() {
|
||||
var unsignedTx = ethers.utils.serializeTransaction(transaction);
|
||||
assert.equal(unsignedTx, test.unsignedTransaction,
|
||||
'serializes undsigned transaction (legacy)');
|
||||
|
||||
// Legacy signed serialized transaction
|
||||
let signature = signDigest(ethers.utils.keccak256(unsignedTx));
|
||||
var signature = signDigest(ethers.utils.keccak256(unsignedTx));
|
||||
assert.equal(ethers.utils.serializeTransaction(transaction, signature), test.signedTransaction,
|
||||
'signs transaction (legacy)');
|
||||
}
|
||||
})();
|
||||
|
||||
|
||||
// EIP155
|
||||
@ -156,17 +156,17 @@ describe('Test Transaction Signing and Parsing', function() {
|
||||
|
||||
transaction.chainId = 5;
|
||||
|
||||
{
|
||||
(function() {
|
||||
// EIP-155 serialized unsigned transaction
|
||||
let unsignedTx = ethers.utils.serializeTransaction(transaction);
|
||||
var unsignedTx = ethers.utils.serializeTransaction(transaction);
|
||||
assert.equal(unsignedTx, test.unsignedTransactionChainId5,
|
||||
'serializes unsigned transaction (eip155) ');
|
||||
|
||||
// EIP-155 signed serialized transaction
|
||||
let signature = signDigest(ethers.utils.keccak256(unsignedTx));
|
||||
var signature = signDigest(ethers.utils.keccak256(unsignedTx));
|
||||
assert.equal(ethers.utils.serializeTransaction(transaction, signature), test.signedTransactionChainId5,
|
||||
'signs transaction (eip155)');
|
||||
}
|
||||
})();
|
||||
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user