mirror of
https://github.com/logos-blockchain/logos-execution-zone-module.git
synced 2026-07-09 03:59:41 +00:00
fix: try return QString with messages
This commit is contained in:
parent
9ad5e83615
commit
6ecaa57fc5
@ -90,7 +90,7 @@ public:
|
||||
|
||||
virtual QList<uint32_t> serialization_helper(const QList<uint8_t>& input_data) = 0;
|
||||
|
||||
virtual QList<uint8_t> authenticated_transfer_elf() = 0;
|
||||
virtual QString authenticated_transfer_elf(QList<uint8_t>& output) = 0;
|
||||
virtual QList<uint8_t> token_elf() = 0;
|
||||
virtual QList<uint8_t> amm_elf() = 0;
|
||||
virtual QList<uint8_t> ata_elf() = 0;
|
||||
|
||||
@ -802,17 +802,16 @@ QList<uint8_t> LogosExecutionZoneWalletModule::ata_elf() {
|
||||
return result;
|
||||
}
|
||||
|
||||
QList<uint8_t> LogosExecutionZoneWalletModule::authenticated_transfer_elf() {
|
||||
QString LogosExecutionZoneWalletModule::authenticated_transfer_elf(QList<uint8_t>& output) {
|
||||
FfiProgram ffi_program {};
|
||||
WalletFfiError error = wallet_ffi_transfer_elf(&ffi_program);
|
||||
if (error != SUCCESS) {
|
||||
qWarning() << "authenticated_transfer_elf: wallet FFI error " << error;
|
||||
return QList<uint8_t> {};
|
||||
return QString("authenticated_transfer_elf: wallet FFI error %1").arg(error);
|
||||
}
|
||||
|
||||
QList<uint8_t> result(ffi_program.elf_data, ffi_program.elf_data + ffi_program.elf_size);
|
||||
output = QList<uint8_t>(ffi_program.elf_data, ffi_program.elf_data + ffi_program.elf_size);
|
||||
wallet_ffi_free_ffi_program(&ffi_program);
|
||||
return result;
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -118,7 +118,7 @@ public:
|
||||
|
||||
Q_INVOKABLE QList<uint32_t> serialization_helper(const QList<uint8_t>& input_data) override;
|
||||
|
||||
Q_INVOKABLE QList<uint8_t> authenticated_transfer_elf() override;
|
||||
Q_INVOKABLE QString authenticated_transfer_elf(QList<uint8_t>& output) 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