mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-11 05:04:35 +00:00
update ref and throw on null addr (addr!.publicKey throws)
This commit is contained in:
parent
4db1d0b9c2
commit
7c1c1cba7d
2 changed files with 7 additions and 3 deletions
|
@ -1 +1 @@
|
|||
Subproject commit c7e9521a03aa8e6e0b11134027d6ea301acbc273
|
||||
Subproject commit 2908a9599c0f15e04e14d90e3303bb84e83de121
|
|
@ -287,14 +287,18 @@ mixin FusionWalletInterface {
|
|||
for (final utxo in walletUtxos) {
|
||||
// Check if address is available.
|
||||
if (utxo.address == null) {
|
||||
// A utxo object should always have a non null address
|
||||
// as per the db query above
|
||||
// A utxo object should always have a non null address.
|
||||
throw Exception("UTXO ${utxo.txid}:${utxo.vout} address is null");
|
||||
}
|
||||
|
||||
// Find public key.
|
||||
final addr = await _db.getAddress(_walletId, utxo.address!);
|
||||
|
||||
if (addr == null) {
|
||||
// A utxo object should always have a non null address.
|
||||
throw Exception("UTXO ${utxo.txid}:${utxo.vout} address not found");
|
||||
}
|
||||
|
||||
final dto = fusion.UtxoDTO(
|
||||
txid: utxo.txid,
|
||||
vout: utxo.vout,
|
||||
|
|
Loading…
Reference in a new issue