Verify that for a version-1 namespace, the nameop paid the right amount of BTC or STACKs.
    nameop is either a name registration or name renewal
    Return {'status': True, 'tokens_paid': ..., 'token_units': ...}
    Return {'status': False} if not

def check_payment_v1(state_engine, state_op_type, nameop, fee_block_id, token_address, burn_address, name_fee, block_id):
    """
    Verify that for a version-1 namespace, the nameop paid the right amount of BTC or STACKs.
    nameop is either a name registration or name renewal
    Return {'status': True, 'tokens_paid': ..., 'token_units': ...}
    Return {'status': False} if not
    """
    # priced in BTC or Stacks
    assert name_fee is not None
    assert isinstance(name_fee, (int,long))

    epoch_features = get_epoch_features(block_id)
    
    name = nameop['name']
    namespace_id = get_namespace_from_name(name)
    name_without_namespace = get_name_from_fq_name(name)
    namespace = state_engine.get_namespace( namespace_id )
    assert namespace['version'] == NAMESPACE_VERSION_PAY_TO_BURN

    res = None

    # burn address must be the default burn address
    if burn_address != BLOCKSTACK_BURN_ADDRESS:
        log.warning('Buyer of {} used the wrong burn address ({}): expected {}'.format(name, burn_address, BLOCKSTACK_BURN_ADDRESS))
        return {'status': False}

    # possible that the transaction paid in Stacks?
    if EPOCH_FEATURE_NAMEOPS_COST_TOKENS in epoch_features:
        # did we pay any stacks?
        res = get_stacks_payment(state_engine, nameop, state_op_type)
        if res['status']:
            # paid something in Stacks. Will ignore BTC.
            res = check_payment_in_stacks(state_engine, nameop, state_op_type, fee_block_id)
            if not res['status']:
                log.warning("Buyer of {} paid in Stacks, but did not pay enough".format(name))
                return {'status': False}

            tokens_paid = res['tokens_paid']
            token_units = res['token_units']
            return {'status': True, 'tokens_paid': tokens_paid, 'token_units': token_units}

    # did not pay in Stacks.
    # did the transaction pay in BTC?
    btc_price = price_name(name_without_namespace, namespace, fee_block_id)  # price in BTC
    if name_fee < btc_price:
        log.debug('Paid {} satoshis for {}, but need at least {}.'.format(name_fee, name, btc_price))
        return {'status': False}
        
    # paid in BTC
    log.debug('Paid {} satoshis for {}'.format(name_fee, name))
    return {'status': True, 'tokens_paid': name_fee, 'token_units': 'BTC'}