mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
feat: warn when txCount != 1 (#3644)
This commit is contained in:
@@ -4,11 +4,13 @@ class PendingTransactionDescription {
|
||||
required this.fee,
|
||||
required this.hash,
|
||||
required this.hex,
|
||||
required this.pointerAddress});
|
||||
required this.pointerAddress,
|
||||
required this.txCount});
|
||||
|
||||
final int amount;
|
||||
final int fee;
|
||||
final String hash;
|
||||
final String hex;
|
||||
final int pointerAddress;
|
||||
final int txCount;
|
||||
}
|
||||
|
||||
@@ -219,6 +219,7 @@ Future<PendingTransactionDescription> createTransactionSync(
|
||||
fee: rFee,
|
||||
hash: rHash,
|
||||
hex: rHex,
|
||||
txCount: pendingTx.txCount(),
|
||||
pointerAddress: pendingTx.ffiAddress(),
|
||||
);
|
||||
}
|
||||
@@ -263,6 +264,7 @@ Future<PendingTransactionDescription> createTransactionMultDest(
|
||||
hash: tx.txid(''),
|
||||
hex: tx.hex(''),
|
||||
pointerAddress: tx.ffiAddress(),
|
||||
txCount: tx.txCount(),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -491,7 +491,10 @@ abstract class MoneroWalletBase
|
||||
paymentId: '');
|
||||
}
|
||||
|
||||
// final status = monero.PendingTransaction_status(pendingTransactionDescription);
|
||||
if (pendingTransactionDescription.txCount != 1) {
|
||||
throw MoneroTransactionCreationException(
|
||||
"This payment would be split into ${pendingTransactionDescription.txCount} transactions. Send smaller transaction to yourself first.",);
|
||||
}
|
||||
|
||||
return PendingMoneroTransaction(pendingTransactionDescription, this);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user