mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-12 09:27:01 +00:00
block possible ordinal containing utxos
This commit is contained in:
parent
0933546806
commit
d7aa8134d3
1 changed files with 24 additions and 3 deletions
|
@ -1793,6 +1793,27 @@ class LitecoinWallet extends CoinServiceAPI
|
|||
coin: coin,
|
||||
);
|
||||
|
||||
final storedTx = await db.getTransaction(
|
||||
walletId,
|
||||
jsonUTXO["tx_hash"] as String,
|
||||
);
|
||||
|
||||
bool shouldBlock = false;
|
||||
String? blockReason;
|
||||
String? label;
|
||||
|
||||
if (storedTx?.amountString != null) {
|
||||
final amount = Amount.fromSerializedJsonString(
|
||||
storedTx!.amountString!,
|
||||
);
|
||||
|
||||
if (amount.raw <= BigInt.from(10000)) {
|
||||
shouldBlock = true;
|
||||
blockReason = "May contain ordinal";
|
||||
label = "Possible ordinal";
|
||||
}
|
||||
}
|
||||
|
||||
final vout = jsonUTXO["tx_pos"] as int;
|
||||
|
||||
final outputs = txn["vout"] as List;
|
||||
|
@ -1812,9 +1833,9 @@ class LitecoinWallet extends CoinServiceAPI
|
|||
txid: txn["txid"] as String,
|
||||
vout: vout,
|
||||
value: jsonUTXO["value"] as int,
|
||||
name: "",
|
||||
isBlocked: false,
|
||||
blockedReason: null,
|
||||
name: label ?? "",
|
||||
isBlocked: shouldBlock,
|
||||
blockedReason: blockReason,
|
||||
isCoinbase: txn["is_coinbase"] as bool? ?? false,
|
||||
blockHash: txn["blockhash"] as String?,
|
||||
blockHeight: jsonUTXO["height"] as int?,
|
||||
|
|
Loading…
Reference in a new issue