public static boolean isDigitalAssetComplete(DigitalAssetMetadata digitalAssetMetadata) { try { DigitalAsset digitalAsset = digitalAssetMetadata.getDigitalAsset(); areObjectsSettled(digitalAsset); CryptoAddress genesisAddress = digitalAsset.getGenesisAddress(); if (Validate.isObjectNull(genesisAddress)) { return false; } String digitalAssetHash = digitalAssetMetadata.getDigitalAssetHash(); if (Validate.isValidString(digitalAssetHash)) { return false; } return true; } catch (ObjectNotSetException e) { return false; } }
public IssuerRedemptionMonitorAgent( AssetIssuerWalletManager assetIssuerWalletManager, ActorAssetIssuerManager actorAssetIssuerManager, BitcoinNetworkManager bitcoinNetworkManager, CryptoAddressBookManager cryptoAddressBookManager, ErrorManager errorManager, UUID pluginId, PluginDatabaseSystem pluginDatabaseSystem, AssetVaultManager assetVaultManager, IssuerAppropriationManager issuerAppropriationManager, WalletManagerManager walletMiddlewareManager, AssetTransmissionNetworkServiceManager assetTransmissionManager, ActorAssetUserManager actorAssetUserManager, ActorAssetRedeemPointManager actorAssetRedeemPointManager) throws CantSetObjectException, CantExecuteDatabaseOperationException { this.assetTransmissionManager = assetTransmissionManager; this.actorAssetUserManager = actorAssetUserManager; this.actorAssetRedeemPointManager = actorAssetRedeemPointManager; this.assetIssuerWalletManager = Validate.verifySetter(assetIssuerWalletManager, "assetIssuerWalletManager is null"); this.errorManager = Validate.verifySetter(errorManager, "errorManager is null"); this.bitcoinNetworkManager = Validate.verifySetter(bitcoinNetworkManager, "bitcoinNetworkManager is null"); this.actorAssetIssuerManager = Validate.verifySetter(actorAssetIssuerManager, "actorAssetIssuerManager is null"); this.cryptoAddressBookManager = Validate.verifySetter(cryptoAddressBookManager, "cryptoAddressBookManager is null"); this.assetVaultManager = Validate.verifySetter(assetVaultManager, "assetVaultManager is null"); this.issuerAppropriationManager = Validate.verifySetter(issuerAppropriationManager, "issuerAppropriationManager is null"); issuerRedemptionDao = new IssuerRedemptionDao(pluginId, pluginDatabaseSystem); List<InstalledWallet> installedWallets = new ArrayList<>(); try { installedWallets = walletMiddlewareManager.getInstalledWallets(); // TODO REMOVE HARDCODE InstalledWallet installedWallet = installedWallets.get(0); btcWallet = installedWallet.getWalletPublicKey(); } catch (CantListWalletsException e) { e.printStackTrace(); } }