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,15 @@
# encoding: UTF-8
# frozen_string_literal: true
class MigrateDepositChannelsToCurrency < ActiveRecord::Migration[4.2]
def change
if defined?(Currency) && File.file?('config/deposit_channels.old.yml')
(YAML.load_file('config/deposit_channels.old.yml') || []).each do |channel|
next unless channel.key?('min_confirm')
Currency.find(channel.fetch('currency')).tap do |ccy|
ccy.update_columns(options: ccy.options.reverse_merge(deposit_confirmations: channel['min_confirm']))
end
end
end
end
end