Skip to content

Commit

Permalink
fix(tx): show bytecode and call data instead of missed payload
Browse files Browse the repository at this point in the history
  • Loading branch information
davidyuk committed Apr 1, 2023
1 parent 836f421 commit 75f5eee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/utils/print.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ function printContractCreateTransaction(tx = {}, tabs = '') {
printUnderscored(`${tabs}Deposit`, tx?.tx?.deposit ?? 'N/A');
printUnderscored(`${tabs}Gas`, tx?.tx?.gas ?? 'N/A');
printUnderscored(`${tabs}Gas Price`, tx?.tx?.gasPrice ?? 'N/A');
printUnderscored(`${tabs}Payload`, tx?.tx?.payload ?? 'N/A');
printUnderscored(`${tabs}Bytecode`, tx.tx.code);
printUnderscored(`${tabs}Call data`, tx.tx.callData);

printUnderscored(`${tabs}Fee`, tx?.tx?.fee ?? 'N/A');
printUnderscored(`${tabs}Nonce`, tx?.tx?.nonce ?? 'N/A');
Expand All @@ -115,7 +116,7 @@ function printContractCallTransaction(tx = {}, tabs = '') {
printUnderscored(`${tabs}Deposit`, tx?.tx?.deposit ?? 0);
printUnderscored(`${tabs}Gas`, tx?.tx?.gas ?? 0);
printUnderscored(`${tabs}Gas Price`, tx?.tx?.gasPrice ?? 0);
printUnderscored(`${tabs}Payload`, tx?.tx?.payload ?? 'N/A');
printUnderscored(`${tabs}Call data`, tx.tx.callData);

printUnderscored(`${tabs}Fee`, tx?.tx?.fee ?? 'N/A');
printUnderscored(`${tabs}Nonce`, tx?.tx?.nonce ?? 'N/A');
Expand Down
5 changes: 3 additions & 2 deletions test/tx.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,8 @@ Amount __________________________________ 0
Deposit _________________________________ 0
Gas _____________________________________ 5921420
Gas Price _______________________________ 1000000000
Payload _________________________________ N/A
Bytecode ________________________________ ${bytecode}
Call data _______________________________ ${callData}
Fee _____________________________________ 78580000000000
Nonce ___________________________________ ${nonce}
TTL _____________________________________ N/A
Expand Down Expand Up @@ -392,7 +393,7 @@ Amount __________________________________ 0
Deposit _________________________________ 0
Gas _____________________________________ 5817960
Gas Price _______________________________ 1000000000
Payload _________________________________ N/A
Call data _______________________________ ${callData}
Fee _____________________________________ 182040000000000
Nonce ___________________________________ ${nonce}
TTL _____________________________________ N/A
Expand Down

0 comments on commit 75f5eee

Please sign in to comment.