@@ -225,6 +225,11 @@ namespace sdk {
225
225
// FIXME: Remove this function when the wallets are upgraded to use "supports_ae_protocol"
226
226
nlohmann::json ret = hw_device;
227
227
json_rename_key (ret, " ae_protocol_support_level" , " supports_ae_protocol" );
228
+ const bool overwrite_null = true ;
229
+ json_add_if_missing (ret, " supports_low_r" , false , overwrite_null);
230
+ json_add_if_missing (ret, " supports_arbitrary_scripts" , false , overwrite_null);
231
+ json_add_if_missing (ret, " supports_liquid" , liquid_support_level::none, overwrite_null);
232
+ json_add_if_missing (ret, " supports_ae_protocol" , ae_protocol_support_level::none, overwrite_null);
228
233
return ret;
229
234
}
230
235
@@ -241,19 +246,22 @@ namespace sdk {
241
246
if (get_ae_protocol_support () != ae_protocol_support_level::none) {
242
247
return false ; // Always use AE if the HW supports it
243
248
}
244
- return json_get_value ( m_hw_device, " supports_low_r" , false ) ;
249
+ return m_hw_device[ " supports_low_r" ] ;
245
250
}
251
+
246
252
bool hardware_signer::supports_arbitrary_scripts () const
247
253
{
248
- return json_get_value ( m_hw_device, " supports_arbitrary_scripts" , false ) ;
254
+ return m_hw_device[ " supports_arbitrary_scripts" ] ;
249
255
}
256
+
250
257
liquid_support_level hardware_signer::get_liquid_support () const
251
258
{
252
- return json_get_value ( m_hw_device, " supports_liquid" , liquid_support_level::none) ;
259
+ return m_hw_device[ " supports_liquid" ] ;
253
260
}
261
+
254
262
ae_protocol_support_level hardware_signer::get_ae_protocol_support () const
255
263
{
256
- return json_get_value ( m_hw_device, " supports_ae_protocol" , ae_protocol_support_level::none) ;
264
+ return m_hw_device[ " supports_ae_protocol" ] ;
257
265
}
258
266
259
267
bool hardware_signer::is_hw_device () const { return true ; }
0 commit comments