Initial commit

This commit is contained in:
Yaser
2026-08-13 19:50:53 +03:30
commit 38084458fe
879 changed files with 95198 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
# encoding: UTF-8
# frozen_string_literal: true
class MultipleDepositAddresses < ActiveRecord::Migration[4.2]
class Currency < ActiveRecord::Base
serialize :options, JSON
self.inheritance_column = nil
end
def change
Currency.transaction do
Currency.where(type: :coin).find_each do |ccy|
unless ccy.options.key?('supports_hd_protocol')
ccy.options['supports_hd_protocol'] = \
ccy.id.in?(%w[btc btcd bch bchd ltc ltcd dash dashd]) ||
(ccy.id.in?(%w[xrp eth]) && ccy.options['api_client'] == 'BitGo')
end
unless ccy.options.key?('allow_multiple_deposit_addresses')
ccy.options['allow_multiple_deposit_addresses'] = false
end
ccy.save!
end
end
end
end