updateSelectedAccountIsDeployed method
dynamic
updateSelectedAccountIsDeployed({})
Implementation
updateSelectedAccountIsDeployed({
required String walletId,
required int accountId,
required bool isDeployed,
}) {
final wallet = state.wallets[walletId];
if (wallet == null) {
throw Exception("Wallet not found");
}
final account = wallet.accounts[accountId];
if (account == null) {
throw Exception("Account not found");
}
state = state.copyWith(
wallets: {
...state.wallets,
walletId: wallet.copyWith(
accounts: {
...wallet.accounts,
accountId: account.copyWith(
isDeployed: isDeployed,
),
},
),
},
selected: (accountId: accountId, walletId: wallet.id),
);
}