Skip to content

Commit 6110307

Browse files
authored
Merge pull request #2407 from nervosnetwork/testnet
Deploy to mainnet
2 parents 6e3023c + 099e22e commit 6110307

File tree

6 files changed

+19
-19
lines changed

6 files changed

+19
-19
lines changed

app/controllers/api/v1/blocks_controller.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ def index
2020
order_by, asc_or_desc = params[:sort].split(".", 2)
2121
order_by =
2222
case order_by
23-
when "height"
24-
"number"
25-
when "transactions"
26-
"ckb_transactions_count"
27-
else
28-
order_by
23+
when "height"
24+
"number"
25+
when "transactions"
26+
"ckb_transactions_count"
27+
else
28+
order_by
2929
end
3030

3131
head :not_found and return unless order_by.in? %w[number reward timestamp ckb_transactions_count]
3232

33-
blocks = blocks.order(order_by => asc_or_desc).page(@page).per(@page_size)
33+
blocks = blocks.order(order_by => asc_or_desc).order("number DESC").page(@page).per(@page_size)
3434

3535
json =
3636
Rails.cache.realize(blocks.cache_key, version: blocks.cache_version, race_condition_ttl: 3.seconds) do

app/controllers/api/v1/omiga_inscriptions_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def sort_udts(records)
9393
if sort == "mint_status"
9494
records.joins(:omiga_inscription_info).order("omiga_inscription_infos.mint_status #{order}")
9595
else
96-
records.order("#{sort} #{order}")
96+
records.order("#{sort} #{order}").order("full_name ASC, id ASC")
9797
end
9898
end
9999
end

app/controllers/api/v1/udts_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def sort_udts(records)
135135
order = "asc"
136136
end
137137

138-
records.order("#{sort} #{order}")
138+
records.order("#{sort} #{order}").order("full_name ASC, id ASC")
139139
end
140140
end
141141
end

app/controllers/api/v1/xudts_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def sort_udts(records)
101101
order = "asc"
102102
end
103103

104-
records.order("#{sort} #{order}")
104+
records.order("#{sort} #{order}").order("full_name ASC, id ASC")
105105
end
106106

107107
def parse_tags

app/controllers/api/v2/pending_transactions_controller.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def index
1111
where.not(previous_cell_output_id: nil, from_cell_base: false).
1212
pluck(:ckb_transaction_id).uniq
1313
pending_transactions = CkbTransaction.where(id: unique_tx_ids).
14-
order(transactions_ordering).page(@page).per(@page_size)
14+
order(transactions_ordering).order("id DESC").page(@page).per(@page_size)
1515

1616
json = {
1717
data: pending_transactions.map do |tx|
@@ -20,21 +20,21 @@ def index
2020
capacity_involved: tx.capacity_involved,
2121
transaction_fee: tx.transaction_fee,
2222
created_at: tx.created_at,
23-
create_timestamp: (tx.created_at.to_f * 1000).to_i
23+
create_timestamp: (tx.created_at.to_f * 1000).to_i,
2424
}
2525
end,
2626
meta: {
2727
total: pending_transactions.total_count,
28-
page_size: @page_size.to_i
29-
}
28+
page_size: @page_size.to_i,
29+
},
3030
}
3131

3232
render json: json
3333
end
3434

3535
def count
3636
render json: {
37-
data: CkbTransaction.tx_pending.count
37+
data: CkbTransaction.tx_pending.count,
3838
}
3939
end
4040

app/workers/fiber_graph_detect_worker.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,10 @@ def build_channel_attributes(channel)
102102
node1: channel["node1"],
103103
node2: channel["node2"],
104104
created_timestamp: channel["created_timestamp"],
105-
last_updated_timestamp_of_node1: channel["last_updated_timestamp_of_node1"].to_i(16),
106-
last_updated_timestamp_of_node2: channel["last_updated_timestamp_of_node2"].to_i(16),
107-
fee_rate_of_node1: channel["fee_rate_of_node1"].to_i(16),
108-
fee_rate_of_node2: channel["fee_rate_of_node2"].to_i(16),
105+
last_updated_timestamp_of_node1: channel["last_updated_timestamp_of_node1"]&.to_i(16),
106+
last_updated_timestamp_of_node2: channel["last_updated_timestamp_of_node2"]&.to_i(16),
107+
fee_rate_of_node1: channel["fee_rate_of_node1"]&.to_i(16),
108+
fee_rate_of_node2: channel["fee_rate_of_node2"]&.to_i(16),
109109
capacity: channel["capacity"].to_i(16),
110110
chain_hash: channel["chain_hash"],
111111
open_transaction_id: open_transaction&.id,

0 commit comments

Comments
 (0)