osbc 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0959a1f1814a23d86916f914b28842a0f009ddd8e22bdd8fecf14d2d0d29f659'
4
- data.tar.gz: a8473f6072c95c8af77a9d402ab6988ace065ce177e688a35828275910c9d1b5
3
+ metadata.gz: bd1d73f028ec3088b5eaeb186edaeaa6cb1251e93c68810e1dffc520ab4a2d37
4
+ data.tar.gz: 11cd22644ea8bf53f2428b415550e61092214a7c1dd299a47526f5d3dbaaee72
5
5
  SHA512:
6
- metadata.gz: 6a76df0d7eeb1f18f9ec34eee953a5fb1df36dab4375d514cd59a67e8ba3960486eb28dd9bf86ebba7755f666caa61b76d163f7a08fdfa33ba4b2fbb762b9d30
7
- data.tar.gz: f778bf73d3de0a3d51f7f69e7e11796b5305756552681f4e82d39487ec932a13b87fe293842f75d1f160db8d64c77847259f5e1d6c9bc9faf13d2daa461b6210
6
+ metadata.gz: 2de4088d38539c8054ac620b7fbaa8655d8607af1555dec37a4c5b1ca2e8ab002d47fcd0078da39e41203078713d6d92ceedc1a30a01663d87b3aaf62ee0911b
7
+ data.tar.gz: '0688ddf35ac525fe9a584f12a1831ef35f5967dba4f5eec2686a9430edfe453d218c4c9b3ce9faa7d283d3a56a10b4a5611466a3a72025025a724247a6a7bafd'
data/.env CHANGED
@@ -3,3 +3,4 @@ FIRST_CHAIN_MAINTAINER=YOUR_NAME
3
3
  CONTRACTS_LIMIT=2
4
4
  SIGNATURES_LIMIT=5
5
5
  REDIS_URL=redis://redis:6379
6
+ ENV_MACHINE=docker
@@ -11,15 +11,15 @@ class Api::V1::BlockConfirmationsController < ActionController::API
11
11
  assign_contract
12
12
  end
13
13
 
14
- def transactions_to_mine
15
- return unauthorized_response unless find_user_by_header
16
- ticket = Ticket.find_by(user_id: @user.id)
17
- return ticket_not_found_response unless ticket.present?
18
- transactions_ids = ticket.transaction_id_list
19
- transactions = Transaction.where(id: transactions_ids)
20
- transactions_json = transactions.to_json
21
- render json: transactions_json, status: :ok
22
- end
14
+ # def transactions_to_mine
15
+ # return unauthorized_response unless find_user_by_header
16
+ # ticket = Ticket.find_by(user_id: @user.id)
17
+ # return ticket_not_found_response unless ticket.present?
18
+ # transactions_ids = ticket.transaction_id_list
19
+ # transactions = Transaction.where(id: transactions_ids)
20
+ # transactions_json = transactions.to_json
21
+ # render json: transactions_json, status: :ok
22
+ # end
23
23
 
24
24
  def info_to_mine
25
25
  return unauthorized_response unless find_user_by_header
@@ -31,11 +31,11 @@ class Api::V1::BlockConfirmationsController < ActionController::API
31
31
 
32
32
  private
33
33
  def find_user_by_header
34
- return unless request.headers["X-Api-Key"].present?
35
- api_key = request.headers["X-Api-Key"]
34
+ return unless request.headers["X-API-KEY"].present?
35
+ api_key = request.headers["X-API-KEY"]
36
36
  @user = User.find_by(api_key: api_key)
37
37
  return unless @user.present?
38
- @user.api_secret == request.headers["X-Api-Secret"]
38
+ @user.api_secret == request.headers["X-API-SECRET"]
39
39
  end
40
40
 
41
41
  def unauthorized_response
@@ -17,9 +17,4 @@ class ContractsController < ApplicationController
17
17
  def set_contract
18
18
  @contract = Contract.find(params[:id])
19
19
  end
20
-
21
- # Only allow a list of trusted parameters through.
22
- def contract_params
23
- params.require(:contract).permit(:first_sig, :second_sig, :third_sig, :fourth_sig, :status, :transaction_id)
24
- end
25
20
  end
@@ -13,61 +13,9 @@ class PoolsController < ApplicationController
13
13
  def show
14
14
  end
15
15
 
16
- # GET /pools/new
17
- def new
18
- @pool = Pool.new
19
- end
20
-
21
- # GET /pools/1/edit
22
- def edit
23
- end
24
-
25
- # POST /pools or /pools.json
26
- def create
27
- @pool = Pool.new(pool_params)
28
-
29
- respond_to do |format|
30
- if @pool.save
31
- format.html { redirect_to pool_url(@pool), notice: "Pool was successfully created." }
32
- format.json { render :show, status: :created, location: @pool }
33
- else
34
- format.html { render :new, status: :unprocessable_entity }
35
- format.json { render json: @pool.errors, status: :unprocessable_entity }
36
- end
37
- end
38
- end
39
-
40
- # PATCH/PUT /pools/1 or /pools/1.json
41
- def update
42
- respond_to do |format|
43
- if @pool.update(pool_params)
44
- format.html { redirect_to pool_url(@pool), notice: "Pool was successfully updated." }
45
- format.json { render :show, status: :ok, location: @pool }
46
- else
47
- format.html { render :edit, status: :unprocessable_entity }
48
- format.json { render json: @pool.errors, status: :unprocessable_entity }
49
- end
50
- end
51
- end
52
-
53
- # DELETE /pools/1 or /pools/1.json
54
- def destroy
55
- @pool.destroy
56
-
57
- respond_to do |format|
58
- format.html { redirect_to pools_url, notice: "Pool was successfully destroyed." }
59
- format.json { head :no_content }
60
- end
61
- end
62
-
63
16
  private
64
17
  # Use callbacks to share common setup or constraints between actions.
65
18
  def set_pool
66
19
  @pool = Pool.find(params[:id])
67
20
  end
68
-
69
- # Only allow a list of trusted parameters through.
70
- def pool_params
71
- params.require(:pool).permit(:block_id, :users_count, :signatures_count, :amount, :stage)
72
- end
73
21
  end
@@ -17,9 +17,4 @@ class SignaturesController < ApplicationController
17
17
  def set_signature
18
18
  @signature = Signature.find(params[:id])
19
19
  end
20
-
21
- # Only allow a list of trusted parameters through.
22
- def signature_params
23
- params.require(:signature).permit(:signature, :time_ref, :contract_id, :common_word, :symbol_sequence, :number_sequence, :verify_sig, :block_hash, :signature_hash)
24
- end
25
20
  end
@@ -18,10 +18,6 @@ class TicketsController < ApplicationController
18
18
  @ticket = Ticket.new
19
19
  end
20
20
 
21
- # GET /tickets/1/edit
22
- def edit
23
- end
24
-
25
21
  # POST /tickets or /tickets.json
26
22
  def create
27
23
  return no_transactions_response if block_transactions.empty?
@@ -29,29 +25,6 @@ class TicketsController < ApplicationController
29
25
  redirect_to tickets_path, notice: "Processing ticket, please wait, wait a minute and refresh the page"
30
26
  end
31
27
 
32
- # PATCH/PUT /tickets/1 or /tickets/1.json
33
- def update
34
- respond_to do |format|
35
- if @ticket.update(ticket_params)
36
- format.html { redirect_to ticket_url(@ticket), notice: "Ticket was successfully updated." }
37
- format.json { render :show, status: :ok, location: @ticket }
38
- else
39
- format.html { render :edit, status: :unprocessable_entity }
40
- format.json { render json: @ticket.errors, status: :unprocessable_entity }
41
- end
42
- end
43
- end
44
-
45
- # DELETE /tickets/1 or /tickets/1.json
46
- def destroy
47
- @ticket.destroy
48
-
49
- respond_to do |format|
50
- format.html { redirect_to tickets_url, notice: "Ticket was successfully destroyed." }
51
- format.json { head :no_content }
52
- end
53
- end
54
-
55
28
  private
56
29
  def create_ticket
57
30
  CreateTicketWorker.perform_async(current_user.id, current_pool.id, time_ref)
@@ -3,9 +3,8 @@ div id="#{dom_id transaction}"
3
3
  strong Sended by:
4
4
  =< transaction.sender
5
5
  p
6
- strong Receiver By:
6
+ strong Receiver By:
7
7
  =< transaction.receiver
8
- / only show the information below if the Show page is being rendered
9
8
  - if action_name == "show"
10
9
  p
11
10
  strong Amount:
@@ -5,7 +5,7 @@
5
5
  <%= render "users/shared/error_messages", resource: resource %>
6
6
  <div class="field text-black">
7
7
  <%= f.label :username, class: "text-white" %><br />
8
- <em class="text-white">(10 characters minimum)</em>
8
+ <em class="text-white">(10 characters minimum)</em><br />
9
9
  <%= f.text_field :username, autofocus: true, autocomplete: "username",class: "px-4 py-2 rounded text-black border-2 border-purple-300 focus_border-purple-900" %>
10
10
  </div>
11
11
 
data/config/routes/api.rb CHANGED
@@ -3,7 +3,7 @@
3
3
  namespace :api do
4
4
  namespace :v1 do
5
5
  post "confirm_block", to: "block_confirmations#confirm_block"
6
- get "tr_to_mine", to: "block_confirmations#transactions_to_mine"
6
+ # get "tr_to_mine", to: "block_confirmations#transactions_to_mine"
7
7
  get "info_to_mine", to: "block_confirmations#info_to_mine"
8
8
  end
9
9
  end
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "result": {
3
- "line": 70.1
3
+ "line": 80.9
4
4
  }
5
5
  }