Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
fix: run Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
marcnjaramillo committed May 11, 2022
1 parent 75f9b96 commit 7745581
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions web3.js/src/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,14 @@ export class Transaction {
) {
if (!opts) {
return;
} else if (Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')) {
} else if (
Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')
) {
const newOpts = opts as TransactionBlockhashCtor;
Object.assign(this, newOpts);
this.recentBlockhash = newOpts.recentBlockhash;
this.lastValidBlockHeight = newOpts.lastValidBlockHeight;
} else {
} else {
const oldOpts = opts as TransactionCtorFields_DEPRECATED;
Object.assign(this, oldOpts);
this.recentBlockhash = oldOpts.recentBlockhash;
Expand Down
4 changes: 3 additions & 1 deletion web3.js/test/transaction.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,9 @@ describe('Transaction', () => {
const recentBlockhash = 'EETubP5AKHgjPAhzPAFcb8BAY1hMH639CWCFTqi3hq1k';
const lastValidBlockHeight = 1234;

const transaction = new Transaction({ recentBlockhash, lastValidBlockHeight,
const transaction = new Transaction({
recentBlockhash,
lastValidBlockHeight,
});
expect(transaction.recentBlockhash).to.eq(recentBlockhash);
expect(transaction.lastValidBlockHeight).to.eq(lastValidBlockHeight);
Expand Down

0 comments on commit 7745581

Please sign in to comment.