Now saving gerty screen display preferences as JSON in a single db field i 🙂

This commit is contained in:
Black Coffee
2022-09-29 12:13:29 +01:00
parent 2d18153b1d
commit 45dcd7f21f
4 changed files with 79 additions and 138 deletions
+3 -37
View File
@@ -17,26 +17,9 @@ async def create_gerty(wallet_id: str, data: Gerty) -> Gerty:
lnbits_wallets,
mempool_endpoint,
exchange,
show_lnbits_wallets_balance,
show_sats_quote,
show_pieter_wuille_facts,
show_exchange_market_rate,
show_onchain_difficulty_epoch_progress,
show_onchain_difficulty_retarget_date,
show_onchain_difficulty_blocks_remaining,
show_onchain_difficulty_epoch_time_remaining,
show_onchain_mempool_recommended_fees,
show_onchain_mempool_number_of_tx,
show_mining_current_hash_rate,
show_mining_current_difficulty,
show_lightning_channel_count,
show_lightning_node_count,
show_lightning_tor_node_count,
show_lightning_clearnet_nodes,
show_lightning_unannounced_nodes,
show_lightning_average_channel_capacity
display_preferences
)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
VALUES (?, ?, ?, ?, ?, ?, ?)
""",
(
gerty_id,
@@ -45,24 +28,7 @@ async def create_gerty(wallet_id: str, data: Gerty) -> Gerty:
data.lnbits_wallets,
data.mempool_endpoint,
data.exchange,
data.show_lnbits_wallets_balance,
data.show_sats_quote,
data.show_pieter_wuille_facts,
data.show_exchange_market_rate,
data.show_onchain_difficulty_epoch_progress,
data.show_onchain_difficulty_retarget_date,
data.show_onchain_difficulty_blocks_remaining,
data.show_onchain_difficulty_epoch_time_remaining,
data.show_onchain_mempool_recommended_fees,
data.show_onchain_mempool_number_of_tx,
data.show_mining_current_hash_rate,
data.show_mining_current_difficulty,
data.show_lightning_channel_count,
data.show_lightning_node_count,
data.show_lightning_tor_node_count,
data.show_lightning_clearnet_nodes,
data.show_lightning_unannounced_nodes,
data.show_lightning_average_channel_capacity
data.display_preferences
),
)