mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
CW-745 don't show txkey when it's unavailable (#1692)
This commit is contained in:
@@ -319,27 +319,9 @@ class Transaction {
|
||||
final txKey = monero.Wallet_getTxKey(wptr!, txid: monero.TransactionInfo_hash(txInfo));
|
||||
final status = monero.Wallet_status(wptr!);
|
||||
if (status != 0) {
|
||||
return monero.Wallet_errorString(wptr!);
|
||||
return "";
|
||||
}
|
||||
return breakTxKey(txKey);
|
||||
}
|
||||
|
||||
static String breakTxKey(String input) {
|
||||
final x = 64;
|
||||
StringBuffer buffer = StringBuffer();
|
||||
|
||||
for (int i = 0; i < input.length; i += x) {
|
||||
int endIndex = i + x;
|
||||
if (endIndex > input.length) {
|
||||
endIndex = input.length;
|
||||
}
|
||||
buffer.write(input.substring(i, endIndex));
|
||||
if (endIndex != input.length) {
|
||||
buffer.write('\n\n');
|
||||
}
|
||||
}
|
||||
|
||||
return buffer.toString().trim();
|
||||
return txKey;
|
||||
}
|
||||
|
||||
Transaction.dummy({
|
||||
|
||||
Reference in New Issue
Block a user