mirror of
https://github.com/logos-blockchain/logos-execution-zone-module.git
synced 2026-07-09 03:59:41 +00:00
fix: try return QByteArray
This commit is contained in:
parent
6ecaa57fc5
commit
ee5a7e7e3b
@ -90,7 +90,7 @@ public:
|
||||
|
||||
virtual QList<uint32_t> serialization_helper(const QList<uint8_t>& input_data) = 0;
|
||||
|
||||
virtual QString authenticated_transfer_elf(QList<uint8_t>& output) = 0;
|
||||
virtual QByteArray authenticated_transfer_elf() = 0;
|
||||
virtual QList<uint8_t> token_elf() = 0;
|
||||
virtual QList<uint8_t> amm_elf() = 0;
|
||||
virtual QList<uint8_t> ata_elf() = 0;
|
||||
|
||||
@ -802,19 +802,19 @@ QList<uint8_t> LogosExecutionZoneWalletModule::ata_elf() {
|
||||
return result;
|
||||
}
|
||||
|
||||
QString LogosExecutionZoneWalletModule::authenticated_transfer_elf(QList<uint8_t>& output) {
|
||||
QByteArray LogosExecutionZoneWalletModule::authenticated_transfer_elf() {
|
||||
FfiProgram ffi_program {};
|
||||
WalletFfiError error = wallet_ffi_transfer_elf(&ffi_program);
|
||||
if (error != SUCCESS) {
|
||||
return QString("authenticated_transfer_elf: wallet FFI error %1").arg(error);
|
||||
qWarning() << "authenticated_transfer_elf: wallet FFI error " << error;
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
output = QList<uint8_t>(ffi_program.elf_data, ffi_program.elf_data + ffi_program.elf_size);
|
||||
QByteArray result(reinterpret_cast<const char*>(ffi_program.elf_data), ffi_program.elf_size);
|
||||
wallet_ffi_free_ffi_program(&ffi_program);
|
||||
return QString();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
QString LogosExecutionZoneWalletModule::send_generic_public_transaction(
|
||||
const QList<QString>& account_ids,
|
||||
const QList<bool>& signing_requirements,
|
||||
|
||||
@ -118,7 +118,7 @@ public:
|
||||
|
||||
Q_INVOKABLE QList<uint32_t> serialization_helper(const QList<uint8_t>& input_data) override;
|
||||
|
||||
Q_INVOKABLE QString authenticated_transfer_elf(QList<uint8_t>& output) override;
|
||||
Q_INVOKABLE QByteArray authenticated_transfer_elf() override;
|
||||
Q_INVOKABLE QList<uint8_t> token_elf() override;
|
||||
Q_INVOKABLE QList<uint8_t> amm_elf() override;
|
||||
Q_INVOKABLE QList<uint8_t> ata_elf() override;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user