In our updated script, we added a check to ensure that ordinalsid is not None before proceeding with updating the invoice. This prevents the script from trying to update invoices with incomplete or invalid data.
Changed ORD_RPC_USER and ORD_RPC_PASS to parse as list
Added fee estimation via get_fee_rate function which calls bitcoin-cli estimatesmartfee with a conf_target of 3 blocks