forked from lthn/blockchain
Merge remote-tracking branch 'origin/frontend'
This commit is contained in:
commit
4e2885faf3
30 changed files with 182 additions and 109 deletions
|
|
@ -304,7 +304,7 @@ bool blockchain_storage::init(const std::string& config_folder, const boost::pro
|
|||
<< "last block: " << m_db_blocks.size() - 1 << ", " << misc_utils::get_time_interval_string(timestamp_diff) << " time ago" << ENDL
|
||||
<< "current pos difficulty: " << get_next_diff_conditional(true) << ENDL
|
||||
<< "current pow difficulty: " << get_next_diff_conditional(false) << ENDL
|
||||
<< "total tansactions: " << m_db_transactions.size(),
|
||||
<< "total transactions: " << m_db_transactions.size(),
|
||||
LOG_LEVEL_0);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#pragma once
|
||||
|
||||
|
||||
#define CURRENCY_FORMATION_VERSION 81
|
||||
#define CURRENCY_FORMATION_VERSION 83
|
||||
|
||||
|
||||
#define CURRENCY_MAX_BLOCK_NUMBER 500000000
|
||||
|
|
@ -53,7 +53,7 @@
|
|||
// #define CURRENCY_FIXED_REWARD_ZONE_REWARD_AMOUNT ((uint64_t)100000000) // should be TX_MINIMUM_FEE * CURRENCY_FIXED_REWARD_ZONE_FEE_MULTIPLIER
|
||||
// #define CURRENCY_FIXED_REWARD_ZONE_FEE_MULTIPLIER 1000 // reward in minimum fees for a block in the zone
|
||||
|
||||
#define CURRENCY_BLOCK_REWARD 1000000000000 // 1.0 coin
|
||||
#define CURRENCY_BLOCK_REWARD 1000000000000 // 1.0 coin
|
||||
|
||||
|
||||
#define WALLET_MAX_ALLOWED_OUTPUT_AMOUNT ((uint64_t)0xffffffffffffffffLL)
|
||||
|
|
@ -126,7 +126,7 @@
|
|||
#define P2P_DEFAULT_PING_CONNECTION_TIMEOUT 2000 //2 seconds
|
||||
#define P2P_DEFAULT_INVOKE_TIMEOUT 60*2*1000 //2 minutes
|
||||
#define P2P_DEFAULT_HANDSHAKE_INVOKE_TIMEOUT 10000 //10 seconds
|
||||
#define P2P_MAINTAINERS_PUB_KEY "888db12b7e0cd325880c815ea13d7062f4c4a89dafc355f4d7b93a7f18342df3"
|
||||
#define P2P_MAINTAINERS_PUB_KEY "8f138bb73f6d663a3746a542770781a09579a7b84cb4125249e95530824ee607"
|
||||
#define P2P_DEFAULT_WHITELIST_CONNECTIONS_PERCENT 70
|
||||
#define P2P_FAILED_ADDR_FORGET_SECONDS (60*5) //5 minutes
|
||||
|
||||
|
|
@ -162,7 +162,7 @@
|
|||
|
||||
|
||||
|
||||
#define CURRENCY_NAME_ABR "ZAN"
|
||||
#define CURRENCY_NAME_ABR "ZANO"
|
||||
#define CURRENCY_NAME_BASE "Zano"
|
||||
#define CURRENCY_NAME_SHORT_BASE "Zano"
|
||||
#ifndef TESTNET
|
||||
|
|
@ -182,7 +182,7 @@
|
|||
#define ALIAS_REWARDS_ACCOUNT_VIEW_SEC_KEY "0000000000000000000000000000000000000000000000000000000000000000" //burn alias money
|
||||
|
||||
#define ALIAS_MINIMUM_PUBLIC_SHORT_NAME_ALLOWED 6
|
||||
#define ALIAS_SHORT_NAMES_VALIDATION_PUB_KEY "3b63cb2f3d425053f4120b10bced73d87e98c27b6e4bcfd123a5cfac688c551f"
|
||||
#define ALIAS_SHORT_NAMES_VALIDATION_PUB_KEY "37947f7b6a5268c5d0a48bde73d7a426f0b5f24648f74024279540207dc70031"
|
||||
|
||||
|
||||
#define ALIAS_NAME_MAX_LEN 255
|
||||
|
|
@ -212,7 +212,7 @@
|
|||
#define BC_OFFERS_CURRENCY_MARKET_FILENAME "market.bin"
|
||||
|
||||
|
||||
#define WALLET_FILE_SERIALIZATION_VERSION (CURRENCY_FORMATION_VERSION+63)
|
||||
#define WALLET_FILE_SERIALIZATION_VERSION (CURRENCY_FORMATION_VERSION+64)
|
||||
|
||||
#define CURRENT_MEMPOOL_ARCHIVE_VER (CURRENCY_FORMATION_VERSION+31)
|
||||
|
||||
|
|
@ -221,4 +221,4 @@
|
|||
|
||||
static_assert(CURRENCY_MINER_TX_MAX_OUTS <= CURRENCY_TX_MAX_ALLOWED_OUTS, "Miner tx must obey normal tx max outs limit");
|
||||
static_assert(PREMINE_AMOUNT / WALLET_MAX_ALLOWED_OUTPUT_AMOUNT < CURRENCY_MINER_TX_MAX_OUTS, "Premine can't be divided into reasonable number of outs");
|
||||
//static_assert(CURRENCY_FIXED_REWARD_ZONE_REWARD_AMOUNT == TX_MINIMUM_FEE * CURRENCY_FIXED_REWARD_ZONE_FEE_MULTIPLIER, "CURRENCY_FIXED_REWARD_ZONE_REWARD_AMOUNT is incorrect with regard to TX_MINIMUM_FEE");
|
||||
|
||||
|
|
|
|||
|
|
@ -1873,11 +1873,9 @@ namespace currency
|
|||
bl.minor_version = CURRENT_BLOCK_MINOR_VERSION;
|
||||
bl.timestamp = 0;
|
||||
bl.nonce = 101010121 + CURRENCY_FORMATION_VERSION; //bender's nightmare
|
||||
//miner::find_nonce_for_given_block(bl, 1, 0,);
|
||||
LOG_PRINT_GREEN("Generated genesis: " << get_block_hash(bl), LOG_LEVEL_0);
|
||||
return true;
|
||||
}
|
||||
//---------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
const crypto::hash& get_genesis_hash(bool need_to_set, const crypto::hash& h)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
namespace currency
|
||||
{
|
||||
const genesis_tx_raw_data ggenesis_tx_raw = { {
|
||||
0xa080801700000101,0xf30326b0b4a0f2fd,0x46fe96860beb01ea,0x01323293f642c7c6,0x80e8a7730e20c142,0x00cb08b2016bbccc,0xb0b4a0f2fda08080,0xb67d52cae50e0326,0x71bb6e75bf256319,0x76dd703cec5e8f40,0xfca18c41540510b9,0xf2fda080800070f3,0xeea9320326b0b4a0,0xb5d90ea5fe49c4cb,0x3f1e5ca079fe6ebb,0x2f73ac1012e243d0,0x808000887086f29b,0x0326b0b4a0f2fda0,0x44f1a1dfe16379f9,0x50d93954cca94108,0x9ac47bb379e6f074,0xb44bdb69a986211e,0xb4f89aecdce08000,0x88b82d0dc60326b0,0x4e995861a27c03ae,0xdf48c9c97c449f1d,0xdd2ea49c4ecdcbdf,0x93dc80800046f5dc,0xedff0307d0ffc2e0,0x4a8442409d3719b1,0x2e385d03544c8122,0x0c592cfad6e8e900,0x8000ed0b32aa07c6,0x05c6c5bc97b1a080,0xa5d7620e38d8ef03,0x1c68e9cfd35cc1e5,0xbdba8ea5fb49f375,0x7fb77cff80f31c9e,0xbc97b1a080800040,0xd15b16b60305c6c5,0x7af40193ad86f123,0x5ba33fd12279af67,0x0db572d11ea1ad96,0xa080800024fc1fde,0x460305c6c5bc97b1,0x444d02aa28a539b9,0x9846386a58c71f35,0x27fd9af12bd3710a,0x0004b2acf589ce8d,0xc6c5bc97b1a08080,0x610c62c125e80305,0x44217ee86d4ed16f,0x5f27600912875c5f,0x51f2fbfd2b30ff54,0x97b1a08080002698,0x8180fc0305c6c5bc,0xaeb4bfd37d282432,0x10a11a1c799b6165,0x9c69b9b6aac75596,0x8080009c5a6d5e15,0x0305c6c5bc97b1a0,0xbf9f36e03f56393a,0x0a74acb0775f0e02,0x97665a42cb477844,0xff01a0c03c43df12,0xc5bc97b1a0808000,0xd5066341560305c6,0x5aa8c1962a148222,0xf83737ab96d43653,0x4b5007cf8fd4a1e2,0xd2dc808000565d84,0xa6a8030398c7f980,0x32c08d3989aa7f91,0xe4b5de74db34eb45,0xf2bd313bdefdfcba,0x80007e3bb1b21fd2,0x018e8df2b7f0a080,0xb2fe8efdeb17a903,0xe7f89d45d4b05be9,0x96f5300e672fd804,0xbd82737c2ce8c3cf,0xef93bf82808000c2,0x816c799a1f0308f0,0x98bd1487b0e05122,0x044d8ffd583693ba,0x1c954a13f5425015,0xfe848080007c6407,0xcde2510311e1dea6,0x3c62da3d50c8a8ee,0xa3acc1ed75d470b1,0xa479c78eecc2f96c,0x8080005f7388cbcb,0xbd0308f0ef93bf82,0xb5a5cca060105de4,0x92cf66a16d3b4d6b,0x5ca92a654f5a8400,0x00df465ad6e8d895,0x08f0ef93bf828080,0x2ce3338452319303,0xecc7b1c056651998,0xc3696cf2fb2fe9b9,0x69b4edf21f2bdaae,0xafeaa69a808000b8,0x1052e2e6de0301e3,0xa06855ba0d7eaab2,0x344998a33e968f15,0xa8a00006653f7005,0xa69a808000a95440,0x58e0580301e3afea,0xc0524c1a0a1d4b5f,0xad37550b686c838b,0x0eb1ef4a20771a79,0x80800080516862ab,0xa30301e3afeaa69a,0xda2b32dbac7f88cc,0x965536648651d1a2,0xbbe22f6bdc320069,0x00a8ea3fddccf16d,0x03c6dfd4ccb48080,0x9921a91a97490603,0x57ceadcb0611b6de,0xa53cee6b71e61ecb,0x0e56262c5e13302f,0x04ee9ff0161a000a,0xa43f85172baeb3d9,0x782309f5ee0a02f0,0x5d187fedafdfae4f,0x971700150f26e04b,0x17482917b0a717cb,0x1fe617c89e1725b4,0x4017c6e317a97217,0x17a7ca178e6117c1,0xd24717fd3917aa53,0xd217b83c178b9b17,0x17d92517d51c17d4,0xda9d17154f17f6fc },
|
||||
{ 0x17,0x41,0x0a,0x0e,0x0a,0x00,0x00 } };
|
||||
0xa080801a00000101,0xd50326b0b4a0f2fd,0x7d16a80675acfb5a,0xf592242f4ad937f9,0x16ad3b88a33ff3c5,0x006bc461ea5d73b6,0xb0b4a0f2fda08080,0x1d62b0f92f9d0326,0xf0bdfd2fd953036b,0xa04870d52251207b,0xc16b093788debb9f,0xf2fda0808000dfc9,0x61692d0326b0b4a0,0xa78954d8053cc36f,0xa2d3cf743dd66a76,0x9929498608bd6585,0x808000ad2dc1cc80,0x0326b0b4a0f2fda0,0xac89549151f0df13,0x9aab134ff7160382,0x3e1f57c803d0f51f,0xc917602de04ffd3b,0xb4f89aecdce08000,0x9aa7bd88b20326b0,0xe28ba6b82529e609,0xf98f6bd94e7d7975,0xb2b47bc1d5d01406,0x93dc808000bd88fa,0x6afe0307d0ffc2e0,0x0b330ff74db36102,0x2e375745f4caa60e,0x69e8c788ef0e9930,0x80001bc58881b025,0x05c6c5bc97b1a080,0xf6c4f2fd3bca5b03,0x55111b42f948ffcc,0xaca8c4d2d05a1ea8,0xe4a08ebc250e29b0,0xbc97b1a080800051,0x7aa6f4600305c6c5,0x4ee697a11ef2c528,0xbee2240a1c186889,0xb0dcd263f75c2887,0xa0808000fb1f6875,0xde0305c6c5bc97b1,0x0c800521c3b1e76a,0x30a319a67f5ce215,0xd704a1d1df7fbd2f,0x00834168cc757223,0xc6c5bc97b1a08080,0x7509800603930305,0xa26dcb6d5a45eb9d,0x884789982d18c79f,0x2ca00f702c6fdc75,0x97b1a08080000071,0xe2309f0305c6c5bc,0xf04a62f7cece31d5,0x6aeaaa970a9ed503,0x65e413ec2817ef63,0x808000e32b0106d0,0x0305c6c5bc97b1a0,0x725e78a74c80b415,0x5509cc5e74bf2a81,0x1d9e09d649e619c5,0xb25188991328f37f,0xc5bc97b1a0808000,0xe9ab618ed20305c6,0x84bb5ebccb88a771,0x9452583c808015c7,0x393fef6d49b84b50,0x91ed808000560c52,0x07780302fddecd95,0xc35f609cb2559776,0x23b1166c909f383e,0xa4c8838cb06bc120,0x8000699481edeb01,0x018e8df2b7f0a080,0x03ee066e7ddb6d03,0xc0ed9d9e0bb00cfc,0xdb21f5df9bdd8026,0x4dc57f4580961a87,0xef93bf82808000a3,0xc69f370c7b0308f0,0xe48d5e545ff067e1,0xf0eec465d851f4c8,0x4bfc90ac1c4930be,0xfe848080003f8ba0,0x9ebc240311e1dea6,0xecce2944ed57c2a9,0xfc0d1e7652958c28,0x97757213dc6a85aa,0x808000a06621c9f0,0x360308f0ef93bf82,0x2017455bc3e98972,0x41466d3334a12a4b,0xd129a60f318f6d9a,0x0088b8f782920cf4,0x08f0ef93bf828080,0x603c3e1cb8e0eb03,0xf0db025a68a21875,0x0da46957155b518a,0x7a89e3a24618c183,0xafeaa69a808000e1,0x0192d897020301e3,0x6fe8c2802f9a3190,0x01640bd74e548b32,0x89eef1cfcc75e093,0xa69a808000dabf0b,0xcb4b850301e3afea,0x514bb4df0aa291f3,0x96128c6dc5d67c3d,0xe5ff65facc796b0f,0x808000ac82de800d,0x020301e3afeaa69a,0xa6e22e789cc0f093,0xce8ef06fbc5d0574,0x400c748e46848f3f,0x00ebe1302cfc426e,0x03c6dfd4ccb48080,0x9954c0e09e5c6503,0xee6c213f457b816f,0x29f25474077177b3,0xfeb092a370663e3d,0xef93bf8280800082,0x12235db0310308f0,0xebf0d7c54fc7d645,0x02c610b69e021994,0xadbe8e0ec619e249,0xfe84808000f63526,0x8bd44f0311e1dea6,0x54fda8db81019365,0x0f9c06688ae81e2d,0x6c4383f8260a2255,0x808000b0b7bf8fed,0xc1fb0316deb183e9,0x4d4d13cdf0da53c6,0x0c4b89278c162692,0xf396d71f12100e0c,0x1e009b56fc359a60,0x444d959d8c6cee16,0x3dffec12613f8082,0xb022e4dfcb6424b0,0x61cf9a1401bf2971,0x666f6f72701113f3,0x20676e6972747320,0x5a17001565726568,0x17c00a17694817ee,0xa2c417593617945b,0x0217a97617c8ef17,0x17133217ef461700,0x8d401726fd17adc8,0x3717070e17700a17,0x1775751762b0175e,0x5a0617c4331786f7,0xdf1723ee17c7d117,0x00000a0e23a11738 },
|
||||
{} };
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,12 +8,11 @@
|
|||
#include <string>
|
||||
namespace currency
|
||||
{
|
||||
#pragma pack(push, 1)
|
||||
#pragma pack(push, 1)
|
||||
struct genesis_tx_raw_data
|
||||
{
|
||||
uint64_t const v[136];
|
||||
uint8_t const r[7];
|
||||
uint64_t const v[156];
|
||||
uint8_t const r[0];
|
||||
};
|
||||
#pragma pack(pop)
|
||||
extern const genesis_tx_raw_data ggenesis_tx_raw;
|
||||
|
|
|
|||
|
|
@ -9,10 +9,10 @@
|
|||
|
||||
namespace currency
|
||||
{
|
||||
const std::string ggenesis_tx_pub_key_str = "f09fee04d9b3ae2b17853fa4f0020aeef50923784faedfafed7f185d4be0260f";
|
||||
const std::string ggenesis_tx_pub_key_str = "ee6c8c9d954d4482803f6112ecff3db02464cbdfe422b07129bf01149acf61f3";
|
||||
const crypto::public_key ggenesis_tx_pub_key = epee::string_tools::parse_tpod_from_hex_string<crypto::public_key>(ggenesis_tx_pub_key_str);
|
||||
|
||||
const genesis_tx_dictionary_entry ggenesis_dict[23] = {
|
||||
|
||||
const genesis_tx_dictionary_entry ggenesis_dict[26] = {
|
||||
{ 898363347618325980ULL,7 },
|
||||
{ 1234271292339965434ULL,1 },
|
||||
{ 2785329203593578547ULL,12 },
|
||||
|
|
@ -20,7 +20,7 @@ namespace currency
|
|||
{ 3515932779881697835ULL,17 },
|
||||
{ 4955366495399988463ULL,11 },
|
||||
{ 5233257582118330150ULL,5 },
|
||||
{ 5511617689742669301ULL,22 },
|
||||
{ 5931539148443336682ULL,24 },
|
||||
{ 6436517662239927298ULL,19 },
|
||||
{ 6604452700210763953ULL,13 },
|
||||
{ 7200550178847042641ULL,15 },
|
||||
|
|
@ -30,7 +30,10 @@ namespace currency
|
|||
{ 9527474759752332295ULL,2 },
|
||||
{ 9647541513390373765ULL,20 },
|
||||
{ 9921730437908704447ULL,8 },
|
||||
{ 10751885755236960099ULL,25 },
|
||||
{ 11032572278436047420ULL,22 },
|
||||
{ 11109691972771859220ULL,0 },
|
||||
{ 13554174209305230569ULL,23 },
|
||||
{ 14297297752337562678ULL,3 },
|
||||
{ 15636081871140663679ULL,21 },
|
||||
{ 15951161519112687845ULL,6 },
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ namespace currency
|
|||
}
|
||||
};
|
||||
#pragma pack(pop)
|
||||
extern const genesis_tx_dictionary_entry ggenesis_dict[23];
|
||||
extern const genesis_tx_dictionary_entry ggenesis_dict[26];
|
||||
|
||||
extern const crypto::public_key ggenesis_tx_pub_key;
|
||||
|
||||
|
|
|
|||
|
|
@ -513,7 +513,7 @@
|
|||
"MINED": "Mined",
|
||||
"LOCKED": "Blocked",
|
||||
"IS_MINIMIZE": "Zano application is minimized to the system tray",
|
||||
"RESTORE": "You can recover it by double-clicking or using the context menu",
|
||||
"RESTORE": "You can recover it by clicking or using the context menu",
|
||||
"TRAY_MENU_SHOW": "Resize",
|
||||
"TRAY_MENU_MINIMIZE": "Minimize"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
$themes: (
|
||||
dark: (
|
||||
bodyBackgroundColor: #131921,
|
||||
sidebarBackgroundColor: rgba(23, 31, 39, 0.5),
|
||||
sidebarBackgroundColor: rgba(23, 31, 39, 1),
|
||||
sidebarBorderColor: #1f2833,
|
||||
onlineColor: #5cda9d,
|
||||
offlineColor: #ff5252,
|
||||
|
|
@ -52,7 +52,7 @@ $themes: (
|
|||
),
|
||||
gray: (
|
||||
bodyBackgroundColor: #101417,
|
||||
sidebarBackgroundColor: rgba(28, 30, 33, 0.5),
|
||||
sidebarBackgroundColor: rgba(28, 30, 33, 1),
|
||||
sidebarBorderColor: #2e3337,
|
||||
onlineColor: #47cf8d,
|
||||
offlineColor: #ff5252,
|
||||
|
|
@ -103,7 +103,7 @@ $themes: (
|
|||
),
|
||||
white: (
|
||||
bodyBackgroundColor: #eeeeee,
|
||||
sidebarBackgroundColor: rgba(255, 255, 255, 0.5),
|
||||
sidebarBackgroundColor: rgba(255, 255, 255, 1),
|
||||
sidebarBorderColor: #ebebeb,
|
||||
onlineColor: #46c172,
|
||||
offlineColor: #ff5252,
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ app-sidebar {
|
|||
.fill {
|
||||
|
||||
@include themify($themes) {
|
||||
background-color: themed(progressBarFullBackgroundColor);
|
||||
background-color: themed(blueTextColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -130,6 +130,13 @@ app-sidebar {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:after {
|
||||
|
||||
@include themify($themes) {
|
||||
background: linear-gradient(to bottom, transparent 0%, themed(sidebarBackgroundColor) 100%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-settings {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -16,7 +16,7 @@ export class VariablesService {
|
|||
public appLogin = false;
|
||||
public moneyEquivalent = 0;
|
||||
public defaultTheme = 'dark';
|
||||
public defaultCurrency = 'ZAN';
|
||||
public defaultCurrency = 'ZANO';
|
||||
public opening_wallet: Wallet;
|
||||
public exp_med_ts = 0;
|
||||
public height_app = 0;
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
expMedTsEvent;
|
||||
onQuitRequest = false;
|
||||
firstOnlineState = false;
|
||||
translateUsed = false;
|
||||
|
||||
needOpenWallets = [];
|
||||
|
||||
|
|
@ -42,25 +43,32 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
// const browserLang = translate.getBrowserLang();
|
||||
// translate.use(browserLang.match(/en|fr/) ? browserLang : 'en');
|
||||
translate.use('en').subscribe(() => {
|
||||
console.warn('use');
|
||||
this.translateUsed = true;
|
||||
});
|
||||
}
|
||||
|
||||
setBackendLocalization() {
|
||||
const stringsArray = [
|
||||
this.translate.instant('BACKEND_LOCALIZATION.QUIT'),
|
||||
this.translate.instant('BACKEND_LOCALIZATION.IS_RECEIVED'),
|
||||
this.translate.instant('BACKEND_LOCALIZATION.IS_CONFIRMED'),
|
||||
this.translate.instant('BACKEND_LOCALIZATION.INCOME_TRANSFER_UNCONFIRMED'),
|
||||
this.translate.instant('BACKEND_LOCALIZATION.INCOME_TRANSFER_CONFIRMED'),
|
||||
this.translate.instant('BACKEND_LOCALIZATION.MINED'),
|
||||
this.translate.instant('BACKEND_LOCALIZATION.LOCKED'),
|
||||
this.translate.instant('BACKEND_LOCALIZATION.IS_MINIMIZE'),
|
||||
this.translate.instant('BACKEND_LOCALIZATION.RESTORE'),
|
||||
this.translate.instant('BACKEND_LOCALIZATION.TRAY_MENU_SHOW'),
|
||||
this.translate.instant('BACKEND_LOCALIZATION.TRAY_MENU_MINIMIZE')
|
||||
];
|
||||
this.backend.setBackendLocalization(stringsArray, 'en');
|
||||
if (this.translateUsed) {
|
||||
const stringsArray = [
|
||||
this.translate.instant('BACKEND_LOCALIZATION.QUIT'),
|
||||
this.translate.instant('BACKEND_LOCALIZATION.IS_RECEIVED'),
|
||||
this.translate.instant('BACKEND_LOCALIZATION.IS_CONFIRMED'),
|
||||
this.translate.instant('BACKEND_LOCALIZATION.INCOME_TRANSFER_UNCONFIRMED'),
|
||||
this.translate.instant('BACKEND_LOCALIZATION.INCOME_TRANSFER_CONFIRMED'),
|
||||
this.translate.instant('BACKEND_LOCALIZATION.MINED'),
|
||||
this.translate.instant('BACKEND_LOCALIZATION.LOCKED'),
|
||||
this.translate.instant('BACKEND_LOCALIZATION.IS_MINIMIZE'),
|
||||
this.translate.instant('BACKEND_LOCALIZATION.RESTORE'),
|
||||
this.translate.instant('BACKEND_LOCALIZATION.TRAY_MENU_SHOW'),
|
||||
this.translate.instant('BACKEND_LOCALIZATION.TRAY_MENU_MINIMIZE')
|
||||
];
|
||||
this.backend.setBackendLocalization(stringsArray, 'en');
|
||||
} else {
|
||||
console.warn('wait translate use');
|
||||
setTimeout(() => {
|
||||
this.setBackendLocalization();
|
||||
}, 10000);
|
||||
}
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
|
@ -144,7 +152,7 @@ export class AppComponent implements OnInit, OnDestroy {
|
|||
const wallet = this.variablesService.getWallet(data.wallet_id);
|
||||
if (wallet) {
|
||||
this.ngZone.run(() => {
|
||||
wallet.progress = data.progress;
|
||||
wallet.progress = (data.progress < 0) ? 0 : ((data.progress > 100) ? 100 : data.progress);
|
||||
if (wallet.progress === 0) {
|
||||
wallet.loaded = false;
|
||||
} else if (wallet.progress === 100) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import {Component, NgZone, OnInit, OnDestroy} from '@angular/core';
|
||||
import {FormGroup, FormControl, Validators} from '@angular/forms';
|
||||
import {FormGroup, FormControl} from '@angular/forms';
|
||||
import {ActivatedRoute, Router} from '@angular/router';
|
||||
import {BackendService} from '../_helpers/services/backend.service';
|
||||
import {VariablesService} from '../_helpers/services/variables.service';
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import {Component, NgZone, OnInit} from '@angular/core';
|
||||
import {Location} from "@angular/common";
|
||||
import {Location} from '@angular/common';
|
||||
import {BackendService} from '../_helpers/services/backend.service';
|
||||
import {VariablesService} from '../_helpers/services/variables.service';
|
||||
import {Router} from '@angular/router';
|
||||
|
|
@ -19,9 +19,11 @@ export class MainComponent implements OnInit {
|
|||
private variablesService: VariablesService,
|
||||
private ngZone: NgZone,
|
||||
private translate: TranslateService
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
ngOnInit() {}
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
openWallet() {
|
||||
this.backend.openFileDialog(this.translate.instant('MAIN.CHOOSE_PATH'), '*', this.variablesService.settings.default_path, (file_status, file_data) => {
|
||||
|
|
@ -41,7 +43,7 @@ export class MainComponent implements OnInit {
|
|||
}
|
||||
|
||||
back() {
|
||||
this.location.back()
|
||||
this.location.back();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ export class OpenWalletComponent implements OnInit, OnDestroy {
|
|||
|
||||
if (exists) {
|
||||
this.modalService.prepareModal('error', 'OPEN_WALLET.WITH_ADDRESS_ALREADY_OPEN');
|
||||
this.backend.closeWallet(open_data.wallet_id, (close_status, close_data) => {
|
||||
this.backend.closeWallet(open_data.wallet_id, () => {
|
||||
this.ngZone.run(() => {
|
||||
this.router.navigate(['/']);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="time-cancel-block-row" *ngIf="'showTimeSelect && !newPurchase && currentContract.is_a && (currentContract.state == 201 || currentContract.state == 2 || currentContract.state == 120 || currentContract.state == 130)'">
|
||||
<div class="time-cancel-block-row" *ngIf="showTimeSelect && !newPurchase && currentContract.is_a && (currentContract.state == 201 || currentContract.state == 2 || currentContract.state == 120 || currentContract.state == 130)">
|
||||
<div class="time-cancel-block-question">{{ 'PURCHASE.WAITING_TIME_QUESTION' | translate }}</div>
|
||||
<div class="input-block">
|
||||
<ng-select id="purchase-timeCancel" class="lock-selection-select"
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import {VariablesService} from '../_helpers/services/variables.service';
|
|||
import {ModalService} from '../_helpers/services/modal.service';
|
||||
import {Location} from '@angular/common';
|
||||
import {IntToMoneyPipe} from '../_helpers/pipes/int-to-money.pipe';
|
||||
import {TranslateService} from '@ngx-translate/core';
|
||||
import {BigNumber} from 'bignumber.js';
|
||||
|
||||
@Component({
|
||||
|
|
@ -60,9 +59,12 @@ export class PurchaseComponent implements OnInit, OnDestroy {
|
|||
if (!(/^@?[a-z0-9\.\-]{6,25}$/.test(g.value))) {
|
||||
g.setErrors(Object.assign({'alias_not_valid': true}, g.errors));
|
||||
} else {
|
||||
this.backend.getAliasByName(g.value.replace('@', ''), (alias_status) => {
|
||||
this.backend.getAliasByName(g.value.replace('@', ''), (alias_status, alias_data) => {
|
||||
this.ngZone.run(() => {
|
||||
if (alias_status) {
|
||||
if (alias_data.address === this.variablesService.currentWallet.address) {
|
||||
g.setErrors(Object.assign({'address_same': true}, g.errors));
|
||||
}
|
||||
if (g.hasError('alias_not_valid')) {
|
||||
delete g.errors['alias_not_valid'];
|
||||
if (Object.keys(g.errors).length === 0) {
|
||||
|
|
@ -107,7 +109,8 @@ export class PurchaseComponent implements OnInit, OnDestroy {
|
|||
private ngZone: NgZone,
|
||||
private location: Location,
|
||||
private intToMoneyPipe: IntToMoneyPipe
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
checkAndChangeHistory() {
|
||||
if (this.currentContract.state === 201) {
|
||||
|
|
@ -166,7 +169,6 @@ export class PurchaseComponent implements OnInit, OnDestroy {
|
|||
if (this.currentContract.state === 130 && this.currentContract.cancel_expiration_time !== 0 && this.currentContract.cancel_expiration_time < this.variablesService.exp_med_ts) {
|
||||
this.currentContract.state = 2;
|
||||
}
|
||||
|
||||
this.variablesService.settings.viewedContracts = (this.variablesService.settings.viewedContracts) ? this.variablesService.settings.viewedContracts : [];
|
||||
let findViewedCont = false;
|
||||
for (let j = 0; j < this.variablesService.settings.viewedContracts.length; j++) {
|
||||
|
|
@ -184,13 +186,11 @@ export class PurchaseComponent implements OnInit, OnDestroy {
|
|||
});
|
||||
}
|
||||
this.currentContract.is_new = false;
|
||||
|
||||
setTimeout(() => {
|
||||
this.variablesService.currentWallet.recountNewContracts();
|
||||
}, 0);
|
||||
}
|
||||
this.checkAndChangeHistory();
|
||||
|
||||
} else {
|
||||
this.newPurchase = true;
|
||||
}
|
||||
|
|
@ -205,7 +205,6 @@ export class PurchaseComponent implements OnInit, OnDestroy {
|
|||
this.currentContract.is_new = true;
|
||||
this.variablesService.currentWallet.recountNewContracts();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -381,7 +380,6 @@ export class PurchaseComponent implements OnInit, OnDestroy {
|
|||
this.currentContract.is_new = true;
|
||||
this.currentContract.state = 130;
|
||||
this.currentContract.time = this.currentContract.cancel_expiration_time;
|
||||
|
||||
this.variablesService.currentWallet.recountNewContracts();
|
||||
this.modalService.prepareModal('info', 'PURCHASE.IGNORED_CANCEL');
|
||||
this.back();
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
}
|
||||
|
||||
.sidebar-accounts {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1 1 auto;
|
||||
|
|
@ -168,6 +169,15 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: -3rem;
|
||||
width: calc(100% + 6rem);
|
||||
height: 5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-settings {
|
||||
|
|
|
|||
|
|
@ -45,12 +45,14 @@
|
|||
}
|
||||
|
||||
.chart {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex: 1 1 auto;
|
||||
min-height: 40rem;
|
||||
|
||||
> div {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -513,7 +513,7 @@
|
|||
"MINED": "Mined",
|
||||
"LOCKED": "Blocked",
|
||||
"IS_MINIMIZE": "Zano application is minimized to the system tray",
|
||||
"RESTORE": "You can recover it by double-clicking or using the context menu",
|
||||
"RESTORE": "You can recover it by clicking or using the context menu",
|
||||
"TRAY_MENU_SHOW": "Resize",
|
||||
"TRAY_MENU_MINIMIZE": "Minimize"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
$themes: (
|
||||
dark: (
|
||||
bodyBackgroundColor: #131921,
|
||||
sidebarBackgroundColor: rgba(23, 31, 39, 0.5),
|
||||
sidebarBackgroundColor: rgba(23, 31, 39, 1),
|
||||
sidebarBorderColor: #1f2833,
|
||||
onlineColor: #5cda9d,
|
||||
offlineColor: #ff5252,
|
||||
|
|
@ -52,7 +52,7 @@ $themes: (
|
|||
),
|
||||
gray: (
|
||||
bodyBackgroundColor: #101417,
|
||||
sidebarBackgroundColor: rgba(28, 30, 33, 0.5),
|
||||
sidebarBackgroundColor: rgba(28, 30, 33, 1),
|
||||
sidebarBorderColor: #2e3337,
|
||||
onlineColor: #47cf8d,
|
||||
offlineColor: #ff5252,
|
||||
|
|
@ -103,7 +103,7 @@ $themes: (
|
|||
),
|
||||
white: (
|
||||
bodyBackgroundColor: #eeeeee,
|
||||
sidebarBackgroundColor: rgba(255, 255, 255, 0.5),
|
||||
sidebarBackgroundColor: rgba(255, 255, 255, 1),
|
||||
sidebarBorderColor: #ebebeb,
|
||||
onlineColor: #46c172,
|
||||
offlineColor: #ff5252,
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ app-sidebar {
|
|||
.fill {
|
||||
|
||||
@include themify($themes) {
|
||||
background-color: themed(progressBarFullBackgroundColor);
|
||||
background-color: themed(blueTextColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -130,6 +130,13 @@ app-sidebar {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:after {
|
||||
|
||||
@include themify($themes) {
|
||||
background: linear-gradient(to bottom, transparent 0%, themed(sidebarBackgroundColor) 100%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-settings {
|
||||
|
|
|
|||
|
|
@ -821,7 +821,7 @@ namespace
|
|||
}
|
||||
|
||||
m_json_helper.feed(str, data_size);
|
||||
LP_CC_WORKER(m_context, "DATA received <<<<<<<<<<<<< " << data_size << " bytes:" << ENDL << std::string(str, data_size), LOG_LEVEL_0);
|
||||
LP_CC_WORKER(m_context, "DATA received <<<<<<<<<<<<< " << data_size << " bytes:" << ENDL << std::string(str, data_size), LOG_LEVEL_4);
|
||||
|
||||
if (m_json_helper.has_objects())
|
||||
{
|
||||
|
|
@ -975,7 +975,7 @@ namespace
|
|||
void send(const std::string& data)
|
||||
{
|
||||
static_cast<epee::net_utils::i_service_endpoint*>(m_p_connection)->do_send(data.c_str(), data.size());
|
||||
LOG_PRINT_CC(m_context, "DATA sent >>>>>>>>>>>>> " << ENDL << data, LOG_LEVEL_0);
|
||||
LOG_PRINT_CC(m_context, "DATA sent >>>>>>>>>>>>> " << ENDL << data, LOG_LEVEL_4);
|
||||
}
|
||||
|
||||
void send_notification(const std::string& json)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
#define BUILD_COMMIT_ID "@VERSION@"
|
||||
#define PROJECT_VERSION "1.0"
|
||||
#define PROJECT_VERSION_BUILD_NO 20
|
||||
#define PROJECT_VERSION_BUILD_NO 24
|
||||
#define PROJECT_VERSION_BUILD_NO_STR STRINGIFY_EXPAND(PROJECT_VERSION_BUILD_NO)
|
||||
#define PROJECT_VERSION_LONG PROJECT_VERSION "." PROJECT_VERSION_BUILD_NO_STR "[" BUILD_COMMIT_ID "]"
|
||||
|
|
|
|||
|
|
@ -4082,16 +4082,24 @@ void wallet2::transfer(const std::vector<currency::tx_destination_entry>& dsts,
|
|||
return;
|
||||
}
|
||||
|
||||
TIME_MEASURE_START(finalize_transaction_time);
|
||||
crypto::secret_key sk = AUTO_VAL_INIT(sk);
|
||||
finalize_transaction(ftp, tx, sk, send_to_network);
|
||||
TIME_MEASURE_FINISH(finalize_transaction_time);
|
||||
|
||||
// unlock transfers at the very end
|
||||
TIME_MEASURE_START(mark_transfers_as_spent_time);
|
||||
mark_transfers_as_spent(ftp.selected_transfers, std::string("money transfer, tx: ") + epee::string_tools::pod_to_hex(get_transaction_hash(tx)));
|
||||
TIME_MEASURE_FINISH(mark_transfers_as_spent_time);
|
||||
|
||||
TIME_MEASURE_START(finalize_transaction_time);
|
||||
try
|
||||
{
|
||||
crypto::secret_key sk = AUTO_VAL_INIT(sk);
|
||||
finalize_transaction(ftp, tx, sk, send_to_network);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
clear_transfers_from_flag(ftp.selected_transfers, WALLET_TRANSFER_DETAIL_FLAG_SPENT, std::string("exception on money transfer, tx: ") + epee::string_tools::pod_to_hex(get_transaction_hash(tx)));
|
||||
throw;
|
||||
}
|
||||
TIME_MEASURE_FINISH(finalize_transaction_time);
|
||||
|
||||
|
||||
WLT_LOG_GREEN("[wallet::transfer]"
|
||||
<< " precalculation_time: " << print_fixed_decimal_point(precalculation_time, 3)
|
||||
<< ", prepare_transaction_time: " << print_fixed_decimal_point(prepare_transaction_time, 3)
|
||||
|
|
|
|||
|
|
@ -610,30 +610,46 @@ namespace tools
|
|||
{
|
||||
// do not load wallet if data version is greather than the code version
|
||||
if (ver > WALLET_FILE_SERIALIZATION_VERSION)
|
||||
{
|
||||
LOG_PRINT_MAGENTA("Wallet file truncated due to WALLET_FILE_SERIALIZATION_VERSION is more then curren build", LOG_LEVEL_0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (ver < 147)
|
||||
{
|
||||
LOG_PRINT_MAGENTA("Wallet file truncated due to old version", LOG_LEVEL_0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (t_archive::is_saving::value)
|
||||
{
|
||||
uint64_t formation_ver = CURRENCY_FORMATION_VERSION;
|
||||
a & formation_ver;
|
||||
}
|
||||
else
|
||||
{
|
||||
uint64_t formation_ver = 0;
|
||||
a & formation_ver;
|
||||
if (formation_ver != CURRENCY_FORMATION_VERSION)
|
||||
{
|
||||
LOG_PRINT_MAGENTA("Wallet file truncated due to mismatch CURRENCY_FORMATION_VERSION", LOG_LEVEL_0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
a & m_blockchain;
|
||||
a & m_transfers;
|
||||
a & m_multisig_transfers;
|
||||
a & m_key_images;
|
||||
|
||||
a & m_key_images;
|
||||
a & m_unconfirmed_txs;
|
||||
if (ver < 144) //reset unconfirmed due to "coinbase relay bug"
|
||||
{
|
||||
m_unconfirmed_txs.clear();
|
||||
}
|
||||
|
||||
a & m_unconfirmed_multisig_transfers;
|
||||
a & m_payments;
|
||||
a & m_transfer_history;
|
||||
a & m_unconfirmed_in_transfers;
|
||||
a & m_contracts;
|
||||
a & m_money_expirations;
|
||||
if (ver >= 144)
|
||||
{
|
||||
a & m_pending_key_images;
|
||||
a & m_tx_keys;
|
||||
}
|
||||
a & m_pending_key_images;
|
||||
a & m_tx_keys;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue