<commit_before>import { integerToDecimal } from '../../utils/currency';
import BaseModel from '../BaseModel';

export default class extends BaseModel {
  get idAttribute() {
    return 'code';
  }

  parse(response) {
    return {
      ...response,
      // Convert from base units - these will be set to undefined if the client doesn't
      // support the currency as a wallet currency (i.e. no entry in the cryptoCurrencies
      // data file). The wallet will list the currency, but it will be marked as
      // unsupported.
      confirmed: integerToDecimal(response.confirmed, response.code),
      unconfirmed: integerToDecimal(response.unconfirmed, response.code),
    };
  }
}<commit_msg>using the coinDivisibility to convert wallet balances<commit_after>import { integerToDecimal, getCoinDivisibility } from '../../utils/currency';
import BaseModel from '../BaseModel';

export default class extends BaseModel {
  get idAttribute() {
    return 'code';
  }

  parse(response) {
    return {
      ...response,
      // Convert from base units - these will be set to undefined if the client doesn't
      // support the currency as a wallet currency (i.e. no entry in the cryptoCurrencies
      // data file). The wallet will list the currency, but it will be marked as
      // unsupported.

      // TODO: temp use of local coin div until the server provides it
      // TODO: temp use of local coin div until the server provides it
      // TODO: temp use of local coin div until the server provides it
      // TODO: temp use of local coin div until the server provides it
      // TODO: temp use of local coin div until the server provides it
      // TODO: temp use of local coin div until the server provides it
      // TODO: temp use of local coin div until the server provides it
      // TODO: temp use of local coin div until the server provides it
      confirmed: integerToDecimal(response.confirmed, getCoinDivisibility(response.code)),
      unconfirmed: integerToDecimal(response.unconfirmed, getCoinDivisibility(response.code)),
    };
  }
}
{'fraction_non_alphanumeric': 0.08357487922705314, 'fraction_numerical': 0.0, 'mean_word_length': 2.9149338374291114, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2104683', 'n_tokens_mistral': 529, 'n_tokens_neox': 513, 'n_words': 239}