private HashMap<DigitalAssetMetadata, ActorAssetUser> createMapDistribution( String walletPublicKey, String assetPublicKey, List<ActorAssetUser> actorAssetUsers) throws CantGetTransactionsException, FileNotFoundException, CantCreateFileException, CantLoadWalletException, CantGetDigitalAssetFromLocalStorageException { List<AssetIssuerWalletTransaction> assetIssuerWalletTransactions = getTransactionsAssetAll(walletPublicKey, assetPublicKey); // TODO: Comentado para la prueba del Distribution no Borrar HashMap<DigitalAssetMetadata, ActorAssetUser> hashMap = new HashMap<>(); int i = 0; for (AssetIssuerWalletTransaction assetIssuerWalletTransactionList : assetIssuerWalletTransactions) { // TODO: Optimizar para que vea el registro de la tabla Balance Wallet DigitalAssetMetadata digitalAssetMetadata = assetIssuerWalletManager .loadAssetIssuerWallet(walletPublicKey) .getDigitalAssetMetadata(assetIssuerWalletTransactionList.getAssetPublicKey()); hashMap.put(digitalAssetMetadata, actorAssetUsers.get(i)); if (i > actorAssetUsers.size()) { break; } i++; } return hashMap; }
public List<AssetIssuerWalletTransaction> getTransactionsAssetAll( String walletPublicKey, String assetPublicKey) throws CantGetTransactionsException { try { return assetIssuerWalletManager .loadAssetIssuerWallet(walletPublicKey) .getTransactionsAssetAll(assetPublicKey); } catch (Exception exception) { throw new CantGetTransactionsException( "Error Error load Wallet Asset Transaction", exception, "Method: getTransactionsAssetAll", "Class: AssetIssuerWalletModuleManager"); } }
public List<AssetIssuerWalletList> getAssetIssuerWalletBalances(String publicKey) throws CantLoadWalletException { try { return assetIssuerWalletManager .loadAssetIssuerWallet(publicKey) .getBookBalance(BalanceType.BOOK) .getAssetIssuerWalletBalances(); } catch (Exception exception) { throw new CantLoadWalletException( "Error load Wallet Balances Book", exception, "Method: getAssetIssuerWalletBalancesBook", "Class: AssetIssuerWalletModuleManager"); } }