mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 01:37:40 +00:00
fix nullable type
This commit is contained in:
parent
2fa7365218
commit
912a4af866
1 changed files with 16 additions and 21 deletions
|
@ -99,27 +99,22 @@ abstract class WalletAddressEditOrCreateViewModelBase with Store {
|
||||||
await wallet.walletAddresses.updateAddress(_item.address as String);
|
await wallet.walletAddresses.updateAddress(_item.address as String);
|
||||||
await wallet.save();
|
await wallet.save();
|
||||||
}*/
|
}*/
|
||||||
|
final index = _item?.id;
|
||||||
if (wallet.type == WalletType.monero) {
|
if (index != null) {
|
||||||
await monero
|
if (wallet.type == WalletType.monero) {
|
||||||
!.getSubaddressList(wallet)
|
await monero!.getSubaddressList(wallet).setLabelSubaddress(wallet,
|
||||||
.setLabelSubaddress(
|
accountIndex: monero!.getCurrentAccount(wallet).id, addressIndex: index, label: label);
|
||||||
wallet,
|
await wallet.save();
|
||||||
accountIndex: monero!.getCurrentAccount(wallet).id,
|
return;
|
||||||
addressIndex: _item?.id as int,
|
}
|
||||||
label: label);
|
if (wallet.type == WalletType.haven) {
|
||||||
await wallet.save();
|
await haven!.getSubaddressList(wallet).setLabelSubaddress(wallet,
|
||||||
}
|
accountIndex: haven!.getCurrentAccount(wallet).id,
|
||||||
|
addressIndex: _item?.id as int,
|
||||||
if (wallet.type == WalletType.haven) {
|
label: label);
|
||||||
await haven
|
await wallet.save();
|
||||||
!.getSubaddressList(wallet)
|
return;
|
||||||
.setLabelSubaddress(
|
}
|
||||||
wallet,
|
|
||||||
accountIndex: haven!.getCurrentAccount(wallet).id,
|
|
||||||
addressIndex: _item?.id as int,
|
|
||||||
label: label);
|
|
||||||
await wallet.save();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue