From 6099c911d7391ed9b7c9614f2639148b5e3e7c55 Mon Sep 17 00:00:00 2001 From: Valentin Atanasov Date: Fri, 16 Aug 2024 10:02:07 +0300 Subject: [PATCH] fix: inconsistent micro time naming --- docs/swagger_v3/dex.spec.yaml | 4 ++-- lib/ae_mdw/dex.ex | 2 +- test/ae_mdw_web/controllers/dex_controller_test.exs | 10 +++++++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/docs/swagger_v3/dex.spec.yaml b/docs/swagger_v3/dex.spec.yaml index 42be4bc9f..4a155c4df 100644 --- a/docs/swagger_v3/dex.spec.yaml +++ b/docs/swagger_v3/dex.spec.yaml @@ -66,7 +66,7 @@ schemas: to_decimals: type: integer example: 18 - microtime: + micro_time: type: integer example: 1629820800000 height: @@ -87,7 +87,7 @@ schemas: - to_amount - from_decimals - to_decimals - - microtime + - micro_time - height paths: /dex/swaps: diff --git a/lib/ae_mdw/dex.ex b/lib/ae_mdw/dex.ex index bf73de8f8..d0a0d3f39 100644 --- a/lib/ae_mdw/dex.ex +++ b/lib/ae_mdw/dex.ex @@ -257,7 +257,7 @@ defmodule AeMdw.Dex do tx_hash: Encoding.encode(:tx_hash, Txs.txi_to_hash(state, txi)), log_idx: log_idx, amounts: rendered_amounts, - microtime: time, + micro_time: time, height: height } end diff --git a/test/ae_mdw_web/controllers/dex_controller_test.exs b/test/ae_mdw_web/controllers/dex_controller_test.exs index 4ffc3bdd0..aa5132d42 100644 --- a/test/ae_mdw_web/controllers/dex_controller_test.exs +++ b/test/ae_mdw_web/controllers/dex_controller_test.exs @@ -808,7 +808,15 @@ defmodule AeMdwWeb.DexControllerTest do "tx_hash" => tx_hash, "log_idx" => log_idx, "amounts" => amounts, - "action" => action + "action" => action, + "micro_time" => _micro_time, + "from_contract" => _from_contract, + "to_contract" => _to_contract, + "from_amount" => _from_amount, + "to_amount" => _to_amount, + "from_decimals" => _from_decimals, + "to_decimals" => _to_decimals, + "height" => _height }, exp_token1, exp_token2