From af16b8542fa751696b604a70d664fe397635b759 Mon Sep 17 00:00:00 2001 From: Miles Zhang Date: Mon, 5 Feb 2024 11:52:48 +0800 Subject: [PATCH] fix: no need to update total_amount of udt (#1615) Signed-off-by: Miles Zhang --- app/controllers/api/v1/udts_controller.rb | 1 - test/controllers/api/v1/udts_controller_test.rb | 7 ------- 2 files changed, 8 deletions(-) diff --git a/app/controllers/api/v1/udts_controller.rb b/app/controllers/api/v1/udts_controller.rb index 9977ffaaa..12f028f73 100644 --- a/app/controllers/api/v1/udts_controller.rb +++ b/app/controllers/api/v1/udts_controller.rb @@ -28,7 +28,6 @@ def update symbol: params[:symbol], full_name: params[:full_name], decimal: params[:decimal], - total_amount: params[:total_amount], description: params[:description], operator_website: params[:operator_website], icon_file: params[:icon_file], diff --git a/test/controllers/api/v1/udts_controller_test.rb b/test/controllers/api/v1/udts_controller_test.rb index d5ec1df77..ea1cd2b99 100644 --- a/test/controllers/api/v1/udts_controller_test.rb +++ b/test/controllers/api/v1/udts_controller_test.rb @@ -449,7 +449,6 @@ class UdtsControllerTest < ActionDispatch::IntegrationTest symbol: "GWK", full_name: "GodwokenToken on testnet_v1", decimal: "8", - total_amount: "100000000000", description: "The sUDT_ERC20_Proxy of Godwoken Test Token.", operator_website: "https://udt.coin", icon_file: "https://img.udt.img", @@ -463,7 +462,6 @@ class UdtsControllerTest < ActionDispatch::IntegrationTest assert_equal udt.symbol, "GWK" assert_equal udt.full_name, "GodwokenToken on testnet_v1" assert_equal udt.decimal, 8 - assert_equal udt.total_amount, 100000000000 assert_equal udt.description, "The sUDT_ERC20_Proxy of Godwoken Test Token." assert_equal udt.operator_website, "https://udt.coin" @@ -500,7 +498,6 @@ class UdtsControllerTest < ActionDispatch::IntegrationTest symbol: "GWK", full_name: "GodwokenToken on testnet_v1", decimal: "8", - total_amount: "100000000000", description: "The sUDT_ERC20_Proxy of Godwoken Test Token.", operator_website: "https://udt.coin", icon_file: "https://img.udt.img", @@ -521,7 +518,6 @@ class UdtsControllerTest < ActionDispatch::IntegrationTest symbol: "GWK", full_name: "GodwokenToken on testnet_v1", decimal: "8", - total_amount: "100000000", description: "The sUDT_ERC20_Proxy of Godwoken Test Token.", operator_website: "https://udt.coin", icon_file: "https://img.udt.img", @@ -553,7 +549,6 @@ class UdtsControllerTest < ActionDispatch::IntegrationTest valid_put api_v1_udt_url("#{udt.type_hash}"), params: { symbol: "GWK", full_name: "GodwokenToken on testnet_v1", - total_amount: "100000000", token: "123456", } @@ -568,7 +563,6 @@ class UdtsControllerTest < ActionDispatch::IntegrationTest valid_put api_v1_udt_url("#{udt.type_hash}"), params: { symbol: "GWK", full_name: "GodwokenToken on testnet_v1", - total_amount: "100000000", token: "123", } @@ -583,7 +577,6 @@ class UdtsControllerTest < ActionDispatch::IntegrationTest valid_put api_v1_udt_url("#{udt.type_hash}"), params: { symbol: "GWK", full_name: "GodwokenToken on testnet_v1", - total_amount: "100000000", token: "123456", email: "abcd@sudt.com", }