class MultisigRepositoryOkHttpImpl extends AbstractRepositoryOkHttpImpl implements MultisigRepository {

  @Override
  public Observable<MultisigAccountGraphInfo> getMultisigAccountGraphInfo(Address address) {
    return exceptionHandling(
        networkTypeObservable.flatMap(
            networkType ->
                call(() -> getClient().getAccountMultisigGraph(address.plain()))
                    .map(
                        multisigAccountGraphInfoDTOList -> {
                          Map<Integer, List<MultisigAccountInfo>> multisigAccountInfoMap =
                              new HashMap<>();
                          multisigAccountGraphInfoDTOList.forEach(
                              item ->
                                  multisigAccountInfoMap.put(
                                      item.getLevel(), toMultisigAccountInfo(item)));
                          return new MultisigAccountGraphInfo(multisigAccountInfoMap);
                        })));
  }

  public  MultisigRepositoryOkHttpImpl(
      ApiClient apiClient, Observable<NetworkType> networkTypeObservable);

}