app/services/token_management/grant_eth_stake_currency.rb
# Check if the given address is associated with client id which is provided
#
# * Author: Ankit
# * Date: 24/01/2019
# * Reviewed By:
#
# @return [Result::Base]
#
Check if the given address is associated with client id which is provided
Author: Ankit
Date: 24/01/2019
Reviewed By.
Check if the given address is associated with client id which is provided Author : Ankit Date : 24 / 01 / 2019 Reviewed By .
def check_address_association_with_client
      client_wallet_address = ClientWalletAddress.where('address = ?' , @address).first
      if client_wallet_address.present?
        if client_wallet_address.client_id != @client_id
          return validation_error(
            'a_s_tm_g_4',
            'invalid_api_params',
            ['invalid_client_id', 'invalid_staker_address'],
            GlobalConstant::ErrorAction.default
          )
        end
      else
        return validation_error(
          'a_s_tm_g_5',
          'invalid_api_params',
          ['invalid_staker_address'],
          GlobalConstant::ErrorAction.default
        )
      end
      success
    end
def check_address_association_with_client client_wallet_address = ClientWalletAddress . where ( 'address = ?' , @address ) . first if client_wallet_address . present? if client_wallet_address . client_id != @client_id return validation_error ( 'a_s_tm_g_4' , 'invalid_api_params' , [ 'invalid_client_id' , 'invalid_staker_address' ] , GlobalConstant :: ErrorAction . default ) end else return validation_error ( 'a_s_tm_g_5' , 'invalid_api_params' , [ 'invalid_staker_address' ] , GlobalConstant :: ErrorAction . default ) end success end
Check if the given address is associated with client id which is provided
 Author: Ankit
 Date: 24/01/2019
 Reviewed By:
Check if the given address is associated with client id which is provided Author : Ankit Date : 24 / 01 / 2019 Reviewed By :
None
Result::Base