Skip to content

Commit 531d9ad

Browse files
fariedtzone117x
authored andcommitted
fix: handle contract call transactions with no function args
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.
1 parent 2c29327 commit 531d9ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rosetta-helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ function makeCallContractOperation(tx: BaseTx, index: number): RosettaOperation
171171
metadata: {
172172
contract_call_function_name: tx.contract_call_function_name,
173173
contract_call_function_args: bufferToHexPrefixString(
174-
unwrapOptional(tx.contract_call_function_args, () => '')
174+
tx.contract_call_function_args ? tx.contract_call_function_args : Buffer.from('')
175175
),
176176
raw_result: tx.raw_result,
177177
},

0 commit comments

Comments
 (0)