mirror of
https://github.com/RoboSats/robosats.git
synced 2025-01-18 12:11:35 +00:00
Add timestamp to devfund script
This commit is contained in:
parent
35b8f56527
commit
4023b7ee0f
@ -2,6 +2,7 @@ import os
|
|||||||
import json
|
import json
|
||||||
import requests
|
import requests
|
||||||
import base64
|
import base64
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
devfund_data_path = os.path.normpath(os.path.join("..", "devfund_pubkey.json"))
|
devfund_data_path = os.path.normpath(os.path.join("..", "devfund_pubkey.json"))
|
||||||
|
|
||||||
@ -19,7 +20,9 @@ response_data = r.json()
|
|||||||
|
|
||||||
for invoice in response_data["invoices"]:
|
for invoice in response_data["invoices"]:
|
||||||
if invoice["is_keysend"] and invoice["htlcs"][0]["custom_records"]["34349334"]:
|
if invoice["is_keysend"] and invoice["htlcs"][0]["custom_records"]["34349334"]:
|
||||||
|
dt = datetime.fromtimestamp(int(invoice["creation_date"]))
|
||||||
print(f"Index {invoice['add_index']}")
|
print(f"Index {invoice['add_index']}")
|
||||||
|
print(f'Timestamp {dt.strftime("%Y-%m-%d %H:%M:%S")}')
|
||||||
print(
|
print(
|
||||||
f"{base64.b64decode(invoice['htlcs'][0]['custom_records']['34349334']).decode('utf-8')}"
|
f"{base64.b64decode(invoice['htlcs'][0]['custom_records']['34349334']).decode('utf-8')}"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user