Skip to content

Commit d000979

Browse files
authored
Merge pull request #46 from elliottech/add_id_param_ws
add id param to ws send_tx
2 parents 53aca1e + 0edb694 commit d000979

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

examples/ws_send_batch_tx.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ async def ws_flow(tx_types, tx_infos):
2424
{
2525
"type": "jsonapi/sendtxbatch",
2626
"data": {
27+
"id": f"my_random_batch_id_{12345678}", # optional, helps id the response
2728
"tx_types": json.dumps(tx_types),
2829
"tx_infos": json.dumps(tx_infos),
2930
},

examples/ws_send_tx.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"0xed636277f3753b6c0275f7a28c2678a7f3a95655e09deaebec15179b50c5da7f903152e50f594f7b"
1212
)
1313
ACCOUNT_INDEX = 65
14-
API_KEY_INDEX = 1
14+
API_KEY_INDEX = 3
1515

1616

1717
async def ws_flow(tx_type, tx_info):
@@ -24,6 +24,7 @@ async def ws_flow(tx_type, tx_info):
2424
{
2525
"type": "jsonapi/sendtx",
2626
"data": {
27+
"id": f"my_random_id_{12345678}", # optional, helps id the response
2728
"tx_type": tx_type,
2829
"tx_info": json.loads(tx_info),
2930
},

0 commit comments

Comments
 (0)