Skip to content

Commit

Permalink
fix: handle contract call transactions with no function args
Browse files Browse the repository at this point in the history
Some contract call transactions have no function args.  The code
didn't handle that case.  On the current testnet, there are only
five such transactions.
  • Loading branch information
fariedt authored and zone117x committed Nov 11, 2020
1 parent 2c29327 commit 531d9ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rosetta-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ function makeCallContractOperation(tx: BaseTx, index: number): RosettaOperation
metadata: {
contract_call_function_name: tx.contract_call_function_name,
contract_call_function_args: bufferToHexPrefixString(
unwrapOptional(tx.contract_call_function_args, () => '')
tx.contract_call_function_args ? tx.contract_call_function_args : Buffer.from('')
),
raw_result: tx.raw_result,
},
Expand Down

0 comments on commit 531d9ad

Please sign in to comment.