app/api/v2/webhooks_helpers.rb
def create_address(address_id, address, currency_id, blockchain_key)
        Rails.logger.info { "Address detected: #{address}" }

        payment_address = PaymentAddress.where(address: nil, wallet: Wallet.deposit_wallets(currency_id, blockchain_key))
                                        .find { |address| address.details['address_id'] == address_id }

        payment_address.update!(address: address) if payment_address.present?
      end
# This method will update payment address by specific detail value
This method will update payment address by specific detail value
This method will update payment address by specific detail value
def create_address(address_id, address, currency_id, blockchain_key)
        Rails.logger.info { "Address detected: #{address}" }
        payment_address = PaymentAddress.where(address: nil, wallet: Wallet.deposit_wallets(currency_id, blockchain_key))
                                        .find { |address| address.details['address_id'] == address_id }
        payment_address.update!(address: address) if payment_address.present?
      end
def create_address ( address_id , address , currency_id , blockchain_key ) Rails . logger . info { "Address detected: #{address}" } payment_address = PaymentAddress . where ( address : nil , wallet : Wallet . deposit_wallets ( currency_id , blockchain_key ) ) . find { | address | address . details [ 'address_id' ] == address_id } payment_address . update! ( address : address ) if payment_address . present? end
This method will update payment address by specific detail value
This method will update payment address by specific detail value
address_id
address
currency_id
blockchain_key