mirror of
https://github.com/logos-blockchain/logos-execution-zone-module.git
synced 2026-04-03 04:33:08 +00:00
Remove unnecessary free methods
This commit is contained in:
parent
2aced61648
commit
02723b5922
@ -25,7 +25,6 @@ public:
|
||||
virtual WalletFfiError create_account_public(WalletHandle* handle, FfiBytes32* out_account_id) = 0;
|
||||
virtual WalletFfiError create_account_private(WalletHandle* handle, FfiBytes32* out_account_id) = 0;
|
||||
virtual WalletFfiError list_accounts(WalletHandle* handle, FfiAccountList* out_list) = 0;
|
||||
virtual void free_account_list(FfiAccountList* list) = 0;
|
||||
|
||||
// Account Queries
|
||||
virtual WalletFfiError get_balance(
|
||||
@ -44,7 +43,6 @@ public:
|
||||
const FfiBytes32* account_id,
|
||||
FfiAccount* out_account
|
||||
) = 0;
|
||||
virtual void free_account_data(FfiAccount* account) = 0;
|
||||
virtual WalletFfiError get_public_account_key(
|
||||
WalletHandle* handle,
|
||||
const FfiBytes32* account_id,
|
||||
@ -55,7 +53,6 @@ public:
|
||||
const FfiBytes32* account_id,
|
||||
FfiPrivateAccountKeys* out_keys
|
||||
) = 0;
|
||||
virtual void free_private_account_keys(FfiPrivateAccountKeys* keys) = 0;
|
||||
|
||||
// Account Encoding
|
||||
virtual QString account_id_to_base58(const FfiBytes32* account_id) = 0;
|
||||
@ -119,7 +116,6 @@ public:
|
||||
const FfiBytes32* account_id,
|
||||
FfiTransferResult* out_result
|
||||
) = 0;
|
||||
virtual void free_transfer_result(FfiTransferResult* result) = 0;
|
||||
|
||||
// Wallet Lifecycle
|
||||
virtual WalletHandle* create_new(
|
||||
@ -128,14 +124,10 @@ public:
|
||||
const QString& password
|
||||
) = 0;
|
||||
virtual WalletHandle* open(const QString& config_path, const QString& storage_path) = 0;
|
||||
virtual void destroy_wallet(WalletHandle* handle) = 0;
|
||||
virtual WalletFfiError save(WalletHandle* handle) = 0;
|
||||
|
||||
// Configuration & Metadata
|
||||
virtual QString get_sequencer_addr(WalletHandle* handle) = 0;
|
||||
|
||||
// Memory Management
|
||||
virtual void free_string(char* ptr) = 0;
|
||||
};
|
||||
|
||||
#define ILogosExecutionZoneWalletModule_iid "org.logos.ilogosexecutionzonewalletmodule"
|
||||
|
||||
@ -38,10 +38,6 @@ WalletFfiError LogosExecutionZoneWalletModule::list_accounts(WalletHandle* handl
|
||||
return wallet_ffi_list_accounts(handle, out_list);
|
||||
}
|
||||
|
||||
void LogosExecutionZoneWalletModule::free_account_list(FfiAccountList* list) {
|
||||
wallet_ffi_free_account_list(list);
|
||||
}
|
||||
|
||||
// === Account Queries ===
|
||||
|
||||
WalletFfiError LogosExecutionZoneWalletModule::get_balance(
|
||||
@ -76,10 +72,6 @@ WalletFfiError LogosExecutionZoneWalletModule::get_account_private(
|
||||
return wallet_ffi_get_account_private(handle, account_id, out_account);
|
||||
}
|
||||
|
||||
void LogosExecutionZoneWalletModule::free_account_data(FfiAccount* account) {
|
||||
wallet_ffi_free_account_data(account);
|
||||
}
|
||||
|
||||
WalletFfiError LogosExecutionZoneWalletModule::get_public_account_key(
|
||||
WalletHandle* handle,
|
||||
const FfiBytes32* account_id,
|
||||
@ -96,10 +88,6 @@ WalletFfiError LogosExecutionZoneWalletModule::get_private_account_keys(
|
||||
return wallet_ffi_get_private_account_keys(handle, account_id, out_keys);
|
||||
}
|
||||
|
||||
void LogosExecutionZoneWalletModule::free_private_account_keys(FfiPrivateAccountKeys* keys) {
|
||||
wallet_ffi_free_private_account_keys(keys);
|
||||
}
|
||||
|
||||
// === Account Encoding ===
|
||||
|
||||
QString LogosExecutionZoneWalletModule::account_id_to_base58(const FfiBytes32* account_id) {
|
||||
@ -264,10 +252,6 @@ WalletFfiError LogosExecutionZoneWalletModule::register_private_account(
|
||||
return wallet_ffi_register_private_account(handle, account_id, out_result);
|
||||
}
|
||||
|
||||
void LogosExecutionZoneWalletModule::free_transfer_result(FfiTransferResult* result) {
|
||||
wallet_ffi_free_transfer_result(result);
|
||||
}
|
||||
|
||||
// === Wallet Lifecycle ===
|
||||
|
||||
WalletHandle* LogosExecutionZoneWalletModule::create_new(
|
||||
@ -289,10 +273,6 @@ WalletHandle* LogosExecutionZoneWalletModule::open(const QString& config_path, c
|
||||
return wallet_ffi_open(config_utf8.constData(), storage_utf8.constData());
|
||||
}
|
||||
|
||||
void LogosExecutionZoneWalletModule::destroy_wallet(WalletHandle* handle) {
|
||||
wallet_ffi_destroy(handle);
|
||||
}
|
||||
|
||||
WalletFfiError LogosExecutionZoneWalletModule::save(WalletHandle* handle) {
|
||||
return wallet_ffi_save(handle);
|
||||
}
|
||||
@ -309,9 +289,3 @@ QString LogosExecutionZoneWalletModule::get_sequencer_addr(WalletHandle* handle)
|
||||
wallet_ffi_free_string(addr);
|
||||
return result;
|
||||
}
|
||||
|
||||
// === Memory Management ===
|
||||
|
||||
void LogosExecutionZoneWalletModule::free_string(char* ptr) {
|
||||
wallet_ffi_free_string(ptr);
|
||||
}
|
||||
|
||||
@ -33,7 +33,6 @@ public:
|
||||
Q_INVOKABLE WalletFfiError create_account_public(WalletHandle* handle, FfiBytes32* out_account_id) override;
|
||||
Q_INVOKABLE WalletFfiError create_account_private(WalletHandle* handle, FfiBytes32* out_account_id) override;
|
||||
Q_INVOKABLE WalletFfiError list_accounts(WalletHandle* handle, FfiAccountList* out_list) override;
|
||||
Q_INVOKABLE void free_account_list(FfiAccountList* list) override;
|
||||
|
||||
// Account Queries
|
||||
Q_INVOKABLE WalletFfiError get_balance(
|
||||
@ -46,7 +45,6 @@ public:
|
||||
get_account_public(WalletHandle* handle, const FfiBytes32* account_id, FfiAccount* out_account) override;
|
||||
Q_INVOKABLE WalletFfiError
|
||||
get_account_private(WalletHandle* handle, const FfiBytes32* account_id, FfiAccount* out_account) override;
|
||||
Q_INVOKABLE void free_account_data(FfiAccount* account) override;
|
||||
Q_INVOKABLE WalletFfiError get_public_account_key(
|
||||
WalletHandle* handle,
|
||||
const FfiBytes32* account_id,
|
||||
@ -57,7 +55,6 @@ public:
|
||||
const FfiBytes32* account_id,
|
||||
FfiPrivateAccountKeys* out_keys
|
||||
) override;
|
||||
Q_INVOKABLE void free_private_account_keys(FfiPrivateAccountKeys* keys) override;
|
||||
|
||||
// Account Encoding
|
||||
Q_INVOKABLE QString account_id_to_base58(const FfiBytes32* account_id) override;
|
||||
@ -115,7 +112,6 @@ public:
|
||||
register_public_account(WalletHandle* handle, const FfiBytes32* account_id, FfiTransferResult* out_result) override;
|
||||
Q_INVOKABLE WalletFfiError
|
||||
register_private_account(WalletHandle* handle, const FfiBytes32* account_id, FfiTransferResult* out_result) override;
|
||||
Q_INVOKABLE void free_transfer_result(FfiTransferResult* result) override;
|
||||
|
||||
// Wallet Lifecycle
|
||||
Q_INVOKABLE WalletHandle* create_new(
|
||||
@ -124,15 +120,11 @@ public:
|
||||
const QString& password
|
||||
) override;
|
||||
Q_INVOKABLE WalletHandle* open(const QString& config_path, const QString& storage_path) override;
|
||||
Q_INVOKABLE void destroy_wallet(WalletHandle* handle) override;
|
||||
Q_INVOKABLE WalletFfiError save(WalletHandle* handle) override;
|
||||
|
||||
// Configuration
|
||||
Q_INVOKABLE QString get_sequencer_addr(WalletHandle* handle) override;
|
||||
|
||||
// Memory Management
|
||||
Q_INVOKABLE void free_string(char* ptr) override;
|
||||
|
||||
signals:
|
||||
void eventResponse(const QString& eventName, const QVariantList& data);
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user