Skip to content

Commit

Permalink
Merge pull request #1835 from nervosnetwork/develop
Browse files Browse the repository at this point in the history
Deploy to testnet
  • Loading branch information
zmcNotafraid authored May 7, 2024
2 parents 4e79252 + 8705f13 commit 3df08c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
5 changes: 2 additions & 3 deletions app/models/concerns/cell_outputs/extra_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,19 @@ def nrc_721_nft_info
code_hash: factory_cell_type_script.code_hash,
hash_type: factory_cell_type_script.hash_type,
args: factory_cell_type_script.args,
verified: true,
)
value = {
symbol: factory_cell&.symbol,
amount: udt_amount,
decimal: "",
type_hash:,
published: factory_cell&.verified,
published: true,
display_name: factory_cell&.name,
uan: "",
}
when "nrc_721_token"
udt = Udt.find_by(type_hash:)
factory_cell = NrcFactoryCell.where(id: udt.nrc_factory_cell_id, verified: true).first
factory_cell = NrcFactoryCell.where(id: udt.nrc_factory_cell_id).first
udt_account = UdtAccount.where(udt_id: udt.id).first
value = {
symbol: factory_cell&.symbol,
Expand Down
7 changes: 1 addition & 6 deletions test/services/charts/daily_statistic_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,12 @@ class DailyStatisticGeneratorTest < ActiveSupport::TestCase

@daily_dao_withdraw = DaoEvent.processed.withdraw_from_dao.created_after(@started_at).created_before(@ended_at).sum(:value)
@current_tip_block = Block.created_after(@started_at).created_before(@ended_at).recent.first || Block.recent.first
aggron_first_day =
begin
genesis_block_timestamp = Block.find_by(number: 0).timestamp
ENV["CKB_NET_MODE"] == "testnet" && to_be_counted_date.beginning_of_day.to_i == Time.at(genesis_block_timestamp / 1000).in_time_zone.beginning_of_day.to_i
end
@yesterday_daily_statistic ||=
begin
yesterday_statistic = ::DailyStatistic.where(
"created_at_unixtimestamp < ?", to_be_counted_date.beginning_of_day.to_i
).recent.first
if to_be_counted_date.beginning_of_day.to_i == Time.at(GENESIS_TIMESTAMP / 1000).in_time_zone.beginning_of_day.to_i || aggron_first_day.present? || yesterday_statistic.blank?
if to_be_counted_date.beginning_of_day.to_i == Time.at(GENESIS_TIMESTAMP / 1000).in_time_zone.beginning_of_day.to_i || yesterday_statistic.blank?
OpenStruct.new(addresses_count: 0, total_dao_deposit: 0,
dao_depositors_count: 0, unclaimed_compensation: 0, claimed_compensation: 0, average_deposit_time: 0, mining_reward: 0, deposit_compensation: 0, treasury_amount: 0, total_depositors_count: 0, live_cells_count: 0, dead_cells_count: 0, occupied_capacity: 0)
else
Expand Down

0 comments on commit 3df08c3

Please sign in to comment.