From 501ea7c58418123c5bc1bc453c4b56d612c93862 Mon Sep 17 00:00:00 2001 From: "progr76@gmail.com" Date: Mon, 18 Feb 2019 17:03:36 +0300 Subject: [PATCH] 0.897 --- Bin/Light/Tera-light.zip | Bin 120105 -> 120105 bytes Bin/Light/tera_light_setup.exe | Bin 705307 -> 705303 bytes Doc/Eng/API2.md | 3 ++- Doc/Rus/API2.md | 3 ++- Source/core/constant.js | 2 +- Source/process/api-exchange.js | 15 +++++++++++++-- 6 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Bin/Light/Tera-light.zip b/Bin/Light/Tera-light.zip index 53011af2e556268fe78866b2e3e2edc4ed83e7ba..6ec1b3e7cbfce2f925b5ef19a3667319a8f11ba1 100644 GIT binary patch delta 1055 zcmZ3vihboOcAfxlW)=|!1_lm>ppK0^9^y>F9h<|%CFPh3J0=&JDli3gY@Td-h8@IB zw3P>On`}2Tf@pL5DQY14Z0a>85WO_Rfg40WFE$6$3iV20+NG-(EPuI&l@%m^YvOKx z5IudNC)oH$2j8oJ_?Mq$34?66|5ZO1NN+zdospXx#5lW%@vI<-F=q?o2e3%r0mdG7 zpq}kACm7#=44=+*n$enfapvurla60uOif>2P z3*IcdyI@aEoCWd}Oqc&TMoYD-REX4~gAmJ2?~6)$tcQ6D?$CAT812>8+=8gx^a7&R zl}!wrTH*7IHfm=z?t!g5%)b}xU>s^o&of%`{-2AacDmvPh^MZcXLR6we&7Mvm@8&L zW8hL&7Z~l-l$JjROFfB&*ic@L)iv`j0HZF-j%OAqI=;5xRr~(}qq*AuBfMa>tZN`@ zI~HLzH|8QRU?U!QgVl;%203rxMaFVabVyxdG~?ZLv;-`r_6sTn$`;ehE-~8iD(u+- zPDtj8`+&L*UIO|TD0S-+qpey}#7?kOL_Sao=-`zfFf9kFwY>}s;-z08YAg3b)b11) z$A}J~+WD7(=3dL(1vaFwF(}GUW;|>I%Qy0!IQQ(XG0| P7|EJB4dg41tBi^O8=|62 delta 1055 zcmZ3vihboOcAfxlW)=|!1_lm>P0bs5Jj9u{G;a4m*`=$O2}ED+VPyr; zw#LDyO5Iv}B;pUp2Wz^@raYF%YH<+GYc$QHdGw| zo@KP)Wx8_)?5Pi1L7sx?@;}FDsV2mH7A(bZ7h<{TeNjn|^)OGt9lGuuqrF<{F^F10 z7J0BET-n61sTDrYXrngW`W)C?C2hQFOV2Y}@}Ag$q;|UE1)!%kH&4HEp3#B#k;g@_ zF-Ac^W8hL&7Z~l->}s!orJO4vHk4Omx&~;>ybHjnE0kpU4~o^`1$fo|zrbj&CbobT zMQz6-tmejC1P1KUFTP;4DaS$1TX>PN9OQDTON?f`lV6vErAppGr9jzYdf6pLJKk4c zuY(g(t0*usryslo^e<5A)+I(;HQSvxz*5VSA@RKO1E%FbwYHamLEI2}6RdW77ewt& zadC|30IHpT8EEdtQxLVsH{w;xbOmVcC5c;Lb75)ilpUtIz(kjF1sHW&4^Dw20g~ue QU15x51v_Ut$5lo}0Bg&jhX4Qo diff --git a/Bin/Light/tera_light_setup.exe b/Bin/Light/tera_light_setup.exe index d57a5669b4878b68a65e056a2f5b0f6ebab115bc..f65ed8af22f79ee71c37cbfd49b88e551a4d336b 100644 GIT binary patch delta 823 zcmV-71IYZFhAWqbD}b~C_}?5C!wLYq^8^3@FcJVbc;>?-O#=V`>;VAQN+C&y6yO1e z6yO4f6yO856yOA?5DopRSlspk00061v+2s0$?yaye>2@Uv7Dpcbf+L9aeoP{{93yQ z4#=Bo+B+C#>yJcAKi37*)#lZ#y9x2Vuky9-P^l|9ZqsM%0^yuW8jPSLk#uJGpYp&0 zVkN3>)QzKtqobx1)O;;Wl?>m>Px|0^Ik)=UZP0=pj?(N|pD82&T{W_tTR^8LZKg~J znYDm?e~rDG*R0Lz#p(g=k?GI#wPL{m{6l& zffhhyD%`!D9n6zce7@>gDJn#&V$t|j(Me33WfC~%;PgjUQPEQ|~jZy+hKJQ*J8 ziTTv#y`Nu;r4fIteqQmHrmvx!*gEcZ$sfYG_pUT--(A(lm=8Ze7g=&uNPbG$`C&{B zcp}`_Ku!#v7NC4WeSXw4qB1sKxUQ2Pe=EB?q?I^^??Wma(i}swB&Mf0qP||)J+{&f zxAGx2E;(~3oIHdGytgnju$4E?jLB)$IGPX1k;mTd%N1`RST!k|!nM2O)i@^K*)BMI zpOoC)0S}GSq)2Fj39I$LzHCT34f_E?-O#=V`>;V971IN6F6yO1e z6yO4f6yO856yOA?5DolCs2TbK0004c0#@^v$?yaye>BzNk9z|cBKg5{kJi)=lHD% zRtOTg4rEYFCsc}VjSnfVqNN9IdA547NAnM-V{xYEFQ06FaK~m&9i$!<19TFIVy$4* zh~EWpf1DH585@6)1yPMyRfP`hqvag=3Oi#n4*5!OXv zuW0>RzV(y0+Eal&en=vqQ*drYZQA9OGuj|QN>pujWFfOK&DJP69B)REw+B4j6X*I_ zaA5GOdsGHy-yXR%&Qd30AsN*3csct=5domnV)l}Wz-iWj#Yi4v5#&~R##m#9uACSlm&n6A9jLq=Jqv@CK zlMK;=krrSRxRQ-!oOX5OZ^ACyM|0guf2=2w@(Bq$-&%r-6JhIb0BSje8+ButcN+VS zLdWCO4?oP`F9yHd{2M*%bGwFlmEXo=>X!P+uS14|VIpBFn$43EiIsI(`Q^eNE?dVE zXbJ4vqa`Zv5nK*uPlAM?{@4Hx+(Rv{%PV@(tzkawfzR#J84`2j{>4_zhQuhr9Cxhr9Cyhr9Czhr9C!hr9C#x4ZKR FT+iS)kJbPH diff --git a/Doc/Eng/API2.md b/Doc/Eng/API2.md index 492aa00..05d0dfc 100644 --- a/Doc/Eng/API2.md +++ b/Doc/Eng/API2.md @@ -1,5 +1,5 @@ # API v2 (for exchanges) -Works with update version 0.895 +Works with update version 0.897 The API is designed to make it easier to write third-party applications. Server-side cryptography and POW operations are performed. Therefore, it is not recommended for public access, because it is not protected from DDOS attacks. Use it if applications such as the exchange server are on the same private network. @@ -233,6 +233,7 @@ option to set parameters for organizing page navigation: Advanced setting: * GetTxID - if set to 1, the transaction ID in hex-format is returned in the TxID field +* GetDescription - if set to 1, the transaction description is returned example1: diff --git a/Doc/Rus/API2.md b/Doc/Rus/API2.md index 7df051b..b77d73d 100644 --- a/Doc/Rus/API2.md +++ b/Doc/Rus/API2.md @@ -1,5 +1,5 @@ # API v2 (для бирж и обменников) -Работает с версии обновления 0.895 +Работает с версии обновления 0.897 API предназначено для облегчения написания сторонних приложений. На стороне сервера выполняется криптография и операции POW. Поэтому оно не рекомендуется для публичного доступа, т.к. нет защиты от DDOS атак. Используйте его, если приложения такие как сервер биржи находятся в одной приватной сети. @@ -244,6 +244,7 @@ return: Дополнительные параметры: * GetTxID - если стоит 1 - то возвращается в поле TxID возвращается ID транзакции в 16 формате +* GetDescription - если стоит 1 - то возвращается описание транзакции в поле Description (если это описание доступно) example1: diff --git a/Source/core/constant.js b/Source/core/constant.js index ae424f4..d747adc 100644 --- a/Source/core/constant.js +++ b/Source/core/constant.js @@ -8,7 +8,7 @@ * Telegram: https://web.telegram.org/#/im?p=@terafoundation */ -global.UPDATE_CODE_VERSION_NUM = 895; +global.UPDATE_CODE_VERSION_NUM = 897; global.MIN_CODE_VERSION_NUM = 884; global.MINING_VERSION_NUM = 3; global.InitParamsArg = InitParamsArg; diff --git a/Source/process/api-exchange.js b/Source/process/api-exchange.js index b6e332d..20ccc81 100644 --- a/Source/process/api-exchange.js +++ b/Source/process/api-exchange.js @@ -156,7 +156,7 @@ WebApi2.GetHistoryTransactions = function (Params) if(!Params.Count) Params.Count = 100; var arr = DApps.Accounts.GetHistory(Params.AccountID, Params.Count, Params.NextPos); - if(Params.GetTxID) + if(Params.GetTxID || Params.GetDescription) { for(var i = 0; i < arr.length; i++) { @@ -167,7 +167,18 @@ WebApi2.GetHistoryTransactions = function (Params) var Body = Block.arrContent[Item.TrNum]; if(!Body) continue; - Item.TxID = GetHexFromArr(GetTxID(Item.BlockNum, Body)); + if(Params.GetTxID) + { + Item.TxID = GetHexFromArr(GetTxID(Item.BlockNum, Body)); + } + if(Params.GetDescription) + { + var TR = DApps.Accounts.GetObjectTransaction(Body); + if(TR) + { + Item.Description = TR.Description; + } + } } } var Result = {result:arr.length > 0 ? 1 : 0, History:arr, Tail:DApps.Accounts.DBStateHistory.Read(Params.AccountID), Meta:Params ? Params.Meta : undefined};