<commit_before>import {insurechain} from "../../modules/ethereum/contract-definitions";

function EthereumService ($q, AppWeb3CheckService) {
    this.insurechain = web3.eth.contract (insurechain.abi).at (insurechain.contractAddress);

    this.toPromise = (contractFunc) => {
        const defer = $q.defer();
        return AppWeb3CheckService.userCheck().then(() => {
            contractFunc(Array.from(arguments).slice(1), (err, result) => {
                if(err) {
                    defer.reject(err);
                } else {
                    defer.resolve(result);
                }
            });

            return defer.promise;
        });
    };

    return this;
}

export default ['$q', 'AppWeb3CheckService', EthereumService]

<commit_msg>revert to original<commit_after>import {insurechain} from "../../modules/ethereum/contract-definitions";

function EthereumService ($q, AppWeb3CheckService) {
    this.insurechain = web3.eth.contract (insurechain.abi).at (insurechain.contractAddress);

    this.toPromise = (contractFunc) => {
        const defer = $q.defer();

        return AppWeb3CheckService.userCheck().then(() => {
            contractFunc(arguments, (err, result) => {
                if(err) {
                    defer.reject(err);
                } else {
                    defer.resolve(result);
                }
            });

            return defer.promise;
        });
    };

    return this;
}

export default ['$q', 'AppWeb3CheckService', EthereumService]


{'fraction_non_alphanumeric': 0.1361533377395902, 'fraction_numerical': 0.005948446794448116, 'mean_word_length': 2.0524193548387095, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6707692', 'n_tokens_mistral': 445, 'n_tokens_neox': 412, 'n_words': 72}