mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
bch zero conf fixes
This commit is contained in:
parent
d582eb9062
commit
951c9638f3
2 changed files with 23 additions and 13 deletions
|
@ -968,17 +968,25 @@ class _TransactionDetailsViewState
|
|||
? const EdgeInsets.all(16)
|
||||
: const EdgeInsets.all(12),
|
||||
child: Builder(builder: (context) {
|
||||
final height = widget.coin != Coin.epicCash &&
|
||||
_transaction.isConfirmed(
|
||||
currentHeight,
|
||||
coin.requiredConfirmations,
|
||||
)
|
||||
? "${_transaction.height == 0 ? "Unknown" : _transaction.height}"
|
||||
: _transaction.getConfirmations(
|
||||
currentHeight) >
|
||||
0
|
||||
? "${_transaction.height}"
|
||||
: "Pending";
|
||||
final String height;
|
||||
|
||||
if (widget.coin == Coin.bitcoincash ||
|
||||
widget.coin == Coin.bitcoincashTestnet) {
|
||||
height =
|
||||
"${_transaction.height != null && _transaction.height! > 0 ? _transaction.height! : "Pending"}";
|
||||
} else {
|
||||
height = widget.coin != Coin.epicCash &&
|
||||
_transaction.isConfirmed(
|
||||
currentHeight,
|
||||
coin.requiredConfirmations,
|
||||
)
|
||||
? "${_transaction.height == 0 ? "Unknown" : _transaction.height}"
|
||||
: _transaction.getConfirmations(
|
||||
currentHeight) >
|
||||
0
|
||||
? "${_transaction.height}"
|
||||
: "Pending";
|
||||
}
|
||||
|
||||
return Row(
|
||||
mainAxisAlignment:
|
||||
|
|
|
@ -2114,8 +2114,10 @@ class BitcoinCashWallet extends CoinServiceAPI
|
|||
.txidEqualTo(txHash["tx_hash"] as String)
|
||||
.findFirst();
|
||||
|
||||
if (storedTx == null ||
|
||||
!storedTx.isConfirmed(currentHeight, MINIMUM_CONFIRMATIONS)) {
|
||||
if (storedTx == null || storedTx.address.value == null
|
||||
// zero conf messes this up
|
||||
// !storedTx.isConfirmed(currentHeight, MINIMUM_CONFIRMATIONS)
|
||||
) {
|
||||
final tx = await cachedElectrumXClient.getTransaction(
|
||||
txHash: txHash["tx_hash"] as String,
|
||||
verbose: true,
|
||||
|
|
Loading…
Reference in a new issue