Skip to content

Commit

Permalink
fix gas formatting methods
Browse files Browse the repository at this point in the history
  • Loading branch information
gtsonevv committed Sep 30, 2024
1 parent 20f77e8 commit c36474d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion packages/near-sdk-js/lib/cli/cli.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/near-sdk-js/lib/cli/utils.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/near-sdk-js/src/cli/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,8 @@ async function processMethod(account, contract, method, params) {
TotalGas: formatGas(
tx.result.transaction_outcome.outcome.gas_burnt +
tx.result.receipts_outcome[0].outcome.gas_burnt +
tx.result.receipts_outcome[1].outcome.gas_burnt
// TODO: remove after near-workspaces is updated
(tx.result.receipts_outcome[1].outcome.gas_burnt || 0)
)
}
}
3 changes: 2 additions & 1 deletion packages/near-sdk-js/src/cli/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ export function logTotalGas(r) {
formatGas(
r.result.transaction_outcome.outcome.gas_burnt +
r.result.receipts_outcome[0].outcome.gas_burnt +
r.result.receipts_outcome[1].outcome.gas_burnt
// TODO: remove after near-workspaces is updated
(r.result.receipts_outcome[1].outcome.gas_burnt || 0)
),
'\n'
);
Expand Down

0 comments on commit c36474d

Please sign in to comment.