Skip to content

Commit

Permalink
Merge pull request #2220 from nervosnetwork/develop
Browse files Browse the repository at this point in the history
Deploy to testnet
  • Loading branch information
zmcNotafraid authored Oct 9, 2024
2 parents 131dda0 + c9ab862 commit 16cc7d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/api/v1/ckb_transactions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def validate_query_params
end

def find_transaction
@ckb_transaction = CkbTransaction.where(tx_hash: params[:id]).order(tx_status: :desc).first
@ckb_transaction = CkbTransaction.where(tx_hash: params[:id]).order(tx_status: :asc).first
raise Api::V1::Exceptions::CkbTransactionNotFoundError if @ckb_transaction.blank?
end
end
Expand Down
4 changes: 2 additions & 2 deletions test/factories/udt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
20.times do |i|
block = create(:block, :with_block_hash)
transaction = create(:ckb_transaction, block:,
contained_udt_ids: [udt.id], tags: ["udt"], tx_index: i + 2)
contained_udt_ids: [udt.id], tags: ["udt"], tx_index: i * 2)
transaction1 = create(:ckb_transaction, block:,
contained_udt_ids: [udt.id], tags: ["udt"], tx_index: i + 1 == 1 ? 0 : i + 1)
contained_udt_ids: [udt.id], tags: ["udt"], tx_index: i * 2 + 1)
cell_output = create(:cell_output, block:,
ckb_transaction: transaction,
consumed_by: transaction1,
Expand Down

0 comments on commit 16cc7d4

Please sign in to comment.