1
0
Fork 0
forked from lthn/blockchain

Merge branch 'develop' into release

This commit is contained in:
sowle 2019-05-30 12:43:20 +03:00
commit aa38149779
32 changed files with 562 additions and 469 deletions

View file

@ -160,7 +160,7 @@ if(STATIC)
set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_STATIC_RUNTIME ON)
endif()
find_package(Boost 1.53 REQUIRED COMPONENTS system filesystem thread date_time chrono regex serialization atomic program_options locale)
find_package(Boost 1.53 REQUIRED COMPONENTS system filesystem thread timer date_time chrono regex serialization atomic program_options locale)
if(MSVC AND (${Boost_MAJOR_VERSION} EQUAL 1) AND (${Boost_MINOR_VERSION} EQUAL 54))
message(SEND_ERROR "Boost version 1.54 is unsupported, more details are available here http://goo.gl/RrCFmA")
endif()

View file

@ -7,10 +7,6 @@ Be sure to properly clone the repository:
`$ git clone --recursive https://github.com/hyle-team/zano.git`
or, if already cloned:
`$ cd zano/ && git submodule init && git submodule update`
### Dependencies
| component / version | minimum <br>(not recommended but may work) | recommended | most recent of what we have ever tested |
|--|--|--|--|
@ -66,6 +62,3 @@ To build GUI application:
h. Unfold the certificate in Keychain Access window and double click underlying private key "Zano". Select "Access Control" tab, then select "Allow all applications to access this item". Click "Save Changes".
2. Revise building script, comment out unwanted steps and run it: `utils/build_script_mac_osx.sh`
3. The application should be here: `/buid_mac_osx_64/release/src`
Good luck!

View file

@ -32,7 +32,7 @@
#include <list>
#include <numeric>
#include <boost/timer.hpp>
#include <boost/timer/timer.hpp>
#include <boost/uuid/uuid.hpp>
#include <boost/uuid/random_generator.hpp>

View file

@ -7,9 +7,17 @@
namespace currency
{
#ifndef TESTNET
const genesis_tx_raw_data ggenesis_tx_raw = { {
0xa080801a00000101,0x800326b0b4a0f2fd,0xeebe5a6d44a03ed5,0x0e146a5322076dcf,0x992269ec1e34796e,0x003b14d1fe6c757e,0xb0b4a0f2fda08080,0xfd92adf982e70326,0xd8d4b6458b60e1a4,0xa69adb9475e808ed,0x4c383fcedfb6e20a,0xf2fda08080003458,0x8b177f0326b0b4a0,0xef9769ed70d152cd,0x04097d0daa65d123,0x9cd9f8e708f25bbc,0x8080005dfb23beac,0x0326b0b4a0f2fda0,0x6752077f8e75fc8a,0x437f68e0bf774836,0x5a38b52ff21c01c0,0x2d3727ec82ce1425,0xb4f89aecdce08000,0xa07d9fe35f0326b0,0x6c742533eb3b4261,0xfc2ed631332e5e16,0x3d025449393e538b,0x93dc80800015e433,0x70a20307d0ffc2e0,0xb81808dc5029bd46,0x04129413283e31f1,0x143e631cc81020b0,0x80008519d1377ae3,0x05c6c5bc97b1a080,0xf71887a841a72a03,0x681b659b8d2832d4,0x5677f9b15d11d1e6,0xffb2ad80c02a341c,0xbc97b1a08080003f,0xf9cebe7c0305c6c5,0xee223954dc682820,0x8194d2bac0dff6d6,0x86d8a55a30e30183,0xa08080006775f5f0,0x220305c6c5bc97b1,0x3c36e1ebdcee584a,0x4e9ed1a89532ef46,0xf0cb8b411bf6d579,0x00d0e6392ada64d4,0xc6c5bc97b1a08080,0x2fc2b05779450305,0xc9cf47618cc5283e,0xa9e088224807a77e,0xda854e29d2f49646,0x97b1a08080002e74,0xed35180305c6c5bc,0xa78d5545117b8293,0x5c3f8babc16e7062,0xef9324ecd7f86e39,0x808000231900ee9c,0x0305c6c5bc97b1a0,0x0c5bfd9450e89e30,0x194b86e8316970bc,0x5dd8c2e3c2af6ff1,0x4d2ba46f683df89c,0xc5bc97b1a0808000,0xc7cc22ad390305c6,0x891b500cb0799642,0xf5884473a7c01f07,0xeb88d74972d8e36f,0x91ed808000b5d239,0x535a0302fddecd95,0x791c7275cd15d685,0xc2536511d4132e01,0x0c9ad1ee9196aa77,0x80002d55a4efc7d3,0x018e8df2b7f0a080,0x0848b53f974a6a03,0x96b2572cb6015b7d,0xa71b18d2755de52c,0x075e4ca4bd0e4487,0xef93bf82808000ca,0xe23077bc730308f0,0x266a622b7bd9de26,0x4b80410b36c32203,0xb3026d0a2610916c,0xfe8480800084746d,0x6f34b90311e1dea6,0xeb38aee70a8febba,0x8b45df519f0df12e,0x258f0a71e83385da,0x8080000b85701a76,0xdf0308f0ef93bf82,0xb3170ab580f881a3,0x07f0a33f0756a3f4,0xf0721645b2b2bd7b,0x00b0077e03f43a85,0x08f0ef93bf828080,0xf91c1f6308c00f03,0x901a68f4adcc918b,0xad0346f5b7869662,0xd3ed49961fccd915,0xafeaa69a808000f0,0x2c99a01fe90301e3,0xd28642bcae6728d9,0xa6f38c4c630c2b6c,0x2c8a361de6b9294f,0xa69a8080002191e8,0xe134670301e3afea,0x6cf0798aeae985c8,0x4c9b90e1ff211b81,0xc32a954ce05a738b,0x8080009fd2412c6f,0x790301e3afeaa69a,0xb3b0062d6c27a6bb,0x12e133832172b705,0xf3f7d1dfdf336fb8,0x00922d0a879c6027,0x03c6dfd4ccb48080,0x7aa13f278feecf03,0x464f78f86a3e4553,0xa5a464e65c4cf651,0x18f07e7ed8bdd351,0xef93bf82808000dd,0x70b4e3ebae0308f0,0x74c452ecdce312d9,0xca3fb591982461fc,0x3e01aaf9b53ede69,0xfe84808000a4fa65,0x20e5ba0311e1dea6,0xb3e07ec0aabd06a5,0x7bf14a03bf83ccfd,0x6024154f95fd3220,0x808000c13077fa8b,0x5c580316deb183e9,0xc2c948248ab422c3,0xebd3db36bad27d52,0x5fe30392c1525a4e,0x1e00952287d66a6d,0x163df474d5ba8816,0x86f8892015449a71,0x22c93333d9ecb472,0x64fa5516bddfebb3,0x3234373061401303,0x3934353331623633,0x3063626435643130,0x6334636130633932,0x3831383439633530,0x3330336634336332,0x3963306232336630,0x3261623765656133,0x80c9170015633537,0x4c17fba117829117,0x17624a17d2f21711,0xfec81731f9178ced,0x9c17624117a36017,0x1786df17edda1708,0x9ffa17d6e1171b42,0x8b17aa69177ff417,0x179815170a83170c,0xc7e8171ce317da27 },
{ 0x17,0x86,0xd6,0x0e,0x0a,0x00,0x00 } };
#else
const genesis_tx_raw_data ggenesis_tx_raw = {{
0xd880800500000101,0x0301f2ee9fa8ff8a,0xac88983c159856b0,0x6334c7d1b567f262,0x284f7f961a7b1266,0x8c0c68c45bab62fc,0xe1dea6fe84808000,0x337be98b45240311,0xab6cd1e4c66e5a33,0x70e889d98e70fd57,0xb97de43fb09861d4,0xf9f0cde08000d574,0x0270187703048dba,0xcac58027c0851473,0xaa10d864c4c87b46,0x820d371e2ba469e8,0xfea08000fce35acc,0x357903049598bddf,0x15df9e58bd0002aa,0xc940a97b60484e8d,0xf94f171e77d0b2d9,0x80003602c681487a,0x0304c38fbab1f8e0,0xc2529eba91cf7476,0x0bbee139aab295f9,0xf1cb8c58a828a2ca,0xcac8f5469af83932,0x5c8a1027cc160900,0x50bdcc9348baf32a,0xa7bd03751819d9fd,0xd6acc8dbbb0d9b29,0x3730614013368b02,0x3533316236333234,0x6264356431303934,0x6361306339323063,0x3834396335306334,0x3366343363323831,0x3062323366303330,0x6237656561333963,0x1700156335373261,0xce5017baa917a8f0,0x0a0eefcc17975617},
{0x00,0x00}};
#endif
}

View file

@ -9,11 +9,20 @@
namespace currency
{
#pragma pack(push, 1)
#ifndef TESTNET
struct genesis_tx_raw_data
{
uint64_t const v[161];
uint8_t const r[7];
};
#else
struct genesis_tx_raw_data
{
uint64_t const v[42];
uint8_t const r[2];
};
#endif
#pragma pack(pop)
extern const genesis_tx_raw_data ggenesis_tx_raw;
}

View file

@ -9,6 +9,7 @@
namespace currency
{
#ifndef TESTNET
const std::string ggenesis_tx_pub_key_str = "88bad574f43d16719a44152089f88672b4ecd93333c922b3ebdfbd1655fa6403";
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[26] = {
@ -39,6 +40,19 @@ namespace currency
{ 17146058209502212345ULL,14 },
{ 17472133472787764818ULL,10 }
};
#else
const std::string ggenesis_tx_pub_key_str = "cc27108a5c2af3ba4893ccbd50fdd919187503bda7299b0dbbdbc8acd6028b36";
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[5] = {
{ 4413532107669521528ULL, 2 },
{ 4848259848862559835ULL, 4 },
{ 4891306118630423916ULL, 1 },
{ 6536034028979999929ULL, 0 },
{ 15528122346224653564ULL, 3 }
};
#endif
}

View file

@ -3,48 +3,46 @@
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#pragma once
#pragma once
#include <stdint.h>
#include <algorithm>
#include "currency_format_utils.h"
namespace currency
{
namespace currency {
#pragma pack(push, 1)
struct genesis_tx_dictionary_entry
struct genesis_tx_dictionary_entry {
uint64_t addr_hash;
uint64_t offset;
bool operator<(const genesis_tx_dictionary_entry& s) const
{
uint64_t addr_hash;
uint64_t offset;
bool operator< (const genesis_tx_dictionary_entry& s) const
{
return addr_hash < s.addr_hash;
}
};
#pragma pack(pop)
extern const genesis_tx_dictionary_entry ggenesis_dict[26];
extern const crypto::public_key ggenesis_tx_pub_key;
inline bool get_account_genesis_offset_by_address(const std::string& addr, uint64_t& offset)
{
genesis_tx_dictionary_entry key_entry = AUTO_VAL_INIT(key_entry);
key_entry.addr_hash = get_string_uint64_hash(addr);
const genesis_tx_dictionary_entry* pfirst = &ggenesis_dict[0];
const genesis_tx_dictionary_entry* plast = &ggenesis_dict[sizeof(ggenesis_dict) / sizeof(ggenesis_dict[0])];
const genesis_tx_dictionary_entry* plower = std::lower_bound(pfirst, plast, key_entry);
if (plower == plast)
return false;
if (plower->addr_hash != key_entry.addr_hash)
return false;
offset = plower->offset;
return true;
return addr_hash < s.addr_hash;
}
};
#pragma pack(pop)
#ifndef TESTNET
extern const genesis_tx_dictionary_entry ggenesis_dict[26];
#else
extern const genesis_tx_dictionary_entry ggenesis_dict[5];
#endif
extern const crypto::public_key ggenesis_tx_pub_key;
inline bool get_account_genesis_offset_by_address(const std::string& addr, uint64_t& offset)
{
genesis_tx_dictionary_entry key_entry = AUTO_VAL_INIT(key_entry);
key_entry.addr_hash = get_string_uint64_hash(addr);
const genesis_tx_dictionary_entry* pfirst = &ggenesis_dict[0];
const genesis_tx_dictionary_entry* plast = &ggenesis_dict[sizeof(ggenesis_dict) / sizeof(ggenesis_dict[0])];
const genesis_tx_dictionary_entry* plower = std::lower_bound(pfirst, plast, key_entry);
if(plower == plast)
return false;
if(plower->addr_hash != key_entry.addr_hash)
return false;
offset = plower->offset;
return true;
}
}

View file

@ -7,9 +7,9 @@
"BUTTON_SKIP": "Skip",
"INCORRECT_PASSWORD": "Invalid password",
"FORM_ERRORS": {
"PASS_REQUIRED": "Password is required.",
"CONFIRM_REQUIRED": "Confirmation is required.",
"MISMATCH": "Mismatch."
"PASS_REQUIRED": "Password is required",
"CONFIRM_REQUIRED": "Confirmation is required",
"MISMATCH": "Mismatch"
}
},
"COMMON": {
@ -78,10 +78,10 @@
"ERROR_CANNOT_SAVE_TOP": "Existing wallet files cannot be replaced or overwritten",
"ERROR_CANNOT_SAVE_SYSTEM": "Wallet files cannot be saved to the OS partition",
"FORM_ERRORS": {
"NAME_REQUIRED": "Name is required.",
"NAME_DUPLICATE": "Name is duplicate.",
"MAX_LENGTH": "Maximum name length reached.",
"CONFIRM_NOT_MATCH": "Confirm password not match."
"NAME_REQUIRED": "Name is required",
"NAME_DUPLICATE": "Name is duplicate",
"MAX_LENGTH": "Maximum name length reached",
"CONFIRM_NOT_MATCH": "Confirm password not match"
}
},
"OPEN_WALLET": {
@ -92,9 +92,9 @@
"FILE_NOT_FOUND1": "Wallet file not found",
"FILE_NOT_FOUND2": "<br/><br/> It might have been renamed or moved. <br/> To open it, use the \"Open wallet\" button.",
"FORM_ERRORS": {
"NAME_REQUIRED": "Name is required.",
"NAME_DUPLICATE": "Name is duplicate.",
"MAX_LENGTH": "Maximum name length reached."
"NAME_REQUIRED": "Name is required",
"NAME_DUPLICATE": "Name is duplicate",
"MAX_LENGTH": "Maximum name length reached"
},
"MODAL": {
"TITLE": "Type wallet password",
@ -114,12 +114,12 @@
"NOT_CORRECT_FILE_OR_PASSWORD": "Invalid wallet file or password does not match",
"CHOOSE_PATH": "Please choose a path",
"FORM_ERRORS": {
"NAME_REQUIRED": "Name is required.",
"NAME_DUPLICATE": "Name is duplicate.",
"MAX_LENGTH": "Maximum name length reached.",
"CONFIRM_NOT_MATCH": "Confirm password not match.",
"KEY_REQUIRED": "Key is required.",
"KEY_NOT_VALID": "Key not valid."
"NAME_REQUIRED": "Name is required",
"NAME_DUPLICATE": "Name is duplicate",
"MAX_LENGTH": "Maximum name length reached",
"CONFIRM_NOT_MATCH": "Confirm password not match",
"KEY_REQUIRED": "Key is required",
"KEY_NOT_VALID": "Key not valid"
}
},
"SEED_PHRASE": {
@ -153,9 +153,9 @@
"BUTTON": "Save"
},
"FORM_ERRORS": {
"PASS_REQUIRED": "Password is required.",
"PASS_NOT_MATCH": "Old password not match.",
"CONFIRM_NOT_MATCH": "Confirm password not match."
"PASS_REQUIRED": "Password is required",
"PASS_NOT_MATCH": "Old password not match",
"CONFIRM_NOT_MATCH": "Confirm password not match"
},
"LAST_BUILD": "Current build: {{value}}",
"APP_LOG_TITLE": "Log level:"
@ -184,9 +184,9 @@
"BUTTON_SAVE": "Save",
"BUTTON_REMOVE": "Close wallet",
"FORM_ERRORS": {
"NAME_REQUIRED": "Name is required.",
"NAME_DUPLICATE": "Name is duplicate.",
"MAX_LENGTH": "Maximum name length reached."
"NAME_REQUIRED": "Name is required",
"NAME_DUPLICATE": "Name is duplicate",
"MAX_LENGTH": "Maximum name length reached"
}
},
"ASSIGN_ALIAS": {
@ -261,18 +261,18 @@
"DETAILS": "Additional details",
"MIXIN": "Mixin",
"FEE": "Fee",
"HIDE": "Hide your wallet address from receiver",
"HIDE": "Hide your wallet address from recipient",
"BUTTON": "Send",
"SUCCESS_SENT": "Transaction sent",
"FORM_ERRORS": {
"ADDRESS_REQUIRED": "Address is required.",
"ADDRESS_NOT_VALID": "Address not valid.",
"ALIAS_NOT_VALID": "Alias not valid.",
"AMOUNT_REQUIRED": "Amount is required.",
"AMOUNT_ZERO": "Amount is zero.",
"FEE_REQUIRED": "Fee is required.",
"ADDRESS_REQUIRED": "Address is required",
"ADDRESS_NOT_VALID": "Address not valid",
"ALIAS_NOT_VALID": "Alias not valid",
"AMOUNT_REQUIRED": "Amount is required",
"AMOUNT_ZERO": "Amount is zero",
"FEE_REQUIRED": "Fee is required",
"FEE_MINIMUM": "Minimum fee: {{fee}}",
"MAX_LENGTH": "Maximum comment length reached."
"MAX_LENGTH": "Maximum comment length reached"
}
},
"HISTORY": {
@ -298,21 +298,21 @@
"TYPE_MESSAGES": {
"HIDDEN": "hidden",
"UNDEFINED": "Undefined",
"COMPLETE_BUYER": "Successfully complete contract, return remaining pledge",
"COMPLETE_SELLER": "Successfully complete contract, receive payment on contract, and return pledge",
"COMPLETE_BUYER": "Contract completed",
"COMPLETE_SELLER": "Contract completed",
"CREATE_ALIAS": "Fee for assigning alias",
"UPDATE_ALIAS": "Fee for editing alias",
"POW_REWARD": "POW reward",
"POS_REWARD": "POS reward",
"CREATE_CONTRACT": "Send contract offer",
"PLEDGE_CONTRACT": "Make pledge on offer",
"NULLIFY_CONTRACT": "Nullify pledges for contract",
"PROPOSAL_CANCEL_CONTRACT": "Send proposal to cancel contract",
"CANCEL_CONTRACT": "Cancel contract, return pledges"
"CREATE_CONTRACT": "Contract proposal",
"PLEDGE_CONTRACT": "Contract deposit",
"NULLIFY_CONTRACT": "Burn deposits",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"CANCEL_CONTRACT": "Cancel and return deposits"
}
},
"CONTRACTS": {
"EMPTY": "No active contracts.",
"EMPTY": "No active contracts",
"CONTRACTS": "Contracts",
"PURCHASE": "Purchase",
"SELL": "Sell",
@ -324,52 +324,44 @@
"LISTING_BUTTON": "Create listing",
"TIME_LEFT": {
"REMAINING_LESS_ONE": "Less than an hour to respond",
"REMAINING_ONE": "Remaining {{time}} hour",
"REMAINING_MANY": "Remaining {{time}} hours",
"REMAINING_MANY_ALT": "Remaining {{time}} hours",
"REMAINING_ONE_RESPONSE": "Remaining {{time}} hour for response",
"REMAINING_MANY_RESPONSE": "Remaining {{time}} hours for response",
"REMAINING_MANY_ALT_RESPONSE": "Remaining {{time}} hours for response",
"REMAINING_ONE_WAITING": "Remaining {{time}} hour waiting",
"REMAINING_MANY_WAITING": "Remaining {{time}} hours waiting",
"REMAINING_MANY_ALT_WAITING": "Remaining {{time}} hours waiting"
"REMAINING_ONE": "{{time}} hour remains",
"REMAINING_MANY": "{{time}} hours remain",
"REMAINING_MANY_ALT": "{{time}} hours remain",
"REMAINING_ONE_RESPONSE": "{{time}} hour remains",
"REMAINING_MANY_RESPONSE": "{{time}} hours remain",
"REMAINING_MANY_ALT_RESPONSE": "{{time}} hours remain",
"REMAINING_ONE_WAITING": "Waiting for {{time}} hour",
"REMAINING_MANY_WAITING": "Waiting for {{time}} hours",
"REMAINING_MANY_ALT_WAITING": "Waiting for {{time}} hours"
},
"STATUS_MESSAGES": {
"SELLER": {
"NEW_CONTRACT": "New contract proposal",
"IGNORED": "You ignored the contract proposal",
"ACCEPTED": "You have accepted the contract proposal",
"WAIT": "Please wait for the pledges to be made",
"BUYER_WAIT": "The buyer is waiting for the item to be delivered",
"PLEDGES_MADE": "Pledges made",
"COMPLETED": "Contract completed successfully",
"RECEIVED": "Item received, payment transferred, pledges returned",
"NOT_RECEIVED": "Item not received",
"NULLIFIED": "All pledges nullified",
"PROPOSAL_CANCEL": "New proposal to cancel contract and return pledges",
"BEING_CANCELLED": "The contract is being cancelled. Please wait for the pledge to be returned",
"IGNORED": "You ignored contract proposal",
"ACCEPTED": "Contract started",
"WAIT": "Waiting for contract confirmation",
"WAITING_BUYER": "Waiting for delivery",
"COMPLETED": "Contract completed",
"NOT_RECEIVED": "Delivery failed",
"NULLIFIED": "All deposits burned",
"PROPOSAL_CANCEL": "New proposal to cancel contract and return deposits",
"BEING_CANCELLED": "Cancellation in progress",
"CANCELLED": "Contract canceled",
"PLEDGES_RETURNED": "Pledges returned",
"IGNORED_CANCEL": "You ignored the proposal to cancel the contract",
"EXPIRED": "The contract proposal has expired"
"IGNORED_CANCEL": "You ignored cancellation proposal",
"EXPIRED": "Contract proposal has expired"
},
"BUYER": {
"WAITING": "Waiting for seller respond to contract proposal",
"PLEDGE_RESERVED": "Pledge amount reserved",
"IGNORED": "The seller ignored your contract proposal",
"PLEDGE_UNBLOCKED": "Pledge amount unblocked",
"ACCEPTED": "The seller accepted your contract proposal",
"WAIT": "Please wait for the pledges to be made",
"PLEDGES_MADE": "Pledges made",
"WAITING_SELLER": "Waiting for seller to ship item",
"COMPLETED": "Contract completed successfully",
"RECEIVED": "Item received, payment transferred, pledges returned",
"NOT_RECEIVED": "Item not received",
"NULLIFIED": "All pledges nullified",
"WAITING_CANCEL": "Waiting for seller to respond to proposal to cancel contract and return pledges",
"BEING_CANCELLED": "The contract is being cancelled. Please wait for the pledge to be returned",
"WAITING": "Waiting for response",
"IGNORED": "Seller ignored your contract proposal",
"ACCEPTED": "Seller accepted your contract proposal",
"WAIT": "Waiting for deposits confirmation",
"WAITING_SELLER": "Waiting for delivery",
"COMPLETED": "Contract completed",
"NOT_RECEIVED": "Delivery failed",
"NULLIFIED": "All deposits burned",
"WAITING_CANCEL": "Waiting for contract cancellation",
"BEING_CANCELLED": "Cancellation in progress",
"CANCELLED": "Contract canceled",
"PLEDGES_RETURNED": "Pledges returned",
"IGNORED_CANCEL": "The seller ignored your proposal to cancel the contract",
"EXPIRED": "The contract proposal has expired"
}
@ -387,17 +379,17 @@
"DETAILS": "Additional details",
"SEND_BUTTON": "Send",
"FORM_ERRORS": {
"DESC_REQUIRED": "Description is required.",
"DESC_MAXIMUM": "Maximum field length reached.",
"SELLER_REQUIRED": "Seller is required.",
"SELLER_NOT_VALID": "Seller not valid.",
"ALIAS_NOT_VALID": "Alias not valid.",
"AMOUNT_REQUIRED": "Amount is required.",
"YOUR_DEPOSIT_REQUIRED": "Your deposit is required.",
"YOUR_DEPOSIT_TOO_SMALL": "Your deposit should be equal or greater than amount.",
"SELLER_DEPOSIT_REQUIRED": "Seller deposit is required.",
"SELLER_SAME": "The seller's and buyer's accounts are identical. The seller and buyer must use different wallet for the contract.",
"COMMENT_MAXIMUM": "Maximum field length reached."
"DESC_REQUIRED": "Description required",
"DESC_MAXIMUM": "Maximum field length reached",
"SELLER_REQUIRED": "Address required",
"SELLER_NOT_VALID": "Invalid address",
"ALIAS_NOT_VALID": "Invalid alias",
"AMOUNT_REQUIRED": "Amount required",
"AMOUNT_ZERO": "Amount cannot be zero",
"YOUR_DEPOSIT_REQUIRED": "Deposit required",
"SELLER_DEPOSIT_REQUIRED": "Seller deposit required",
"SELLER_SAME": "Use separate account",
"COMMENT_MAXIMUM": "Maximum field length reached"
},
"PROGRESS_NEW": "New purchase",
"PROGRESS_WAIT": "Awaiting reply",
@ -405,48 +397,46 @@
"PROGRESS_COMPLETE": "Completed",
"FEE": "Fee",
"PAYMENT": "Payment ID",
"ACCEPT_STATE_WAIT_BIG": "You have accepted the contract proposal. Please wait for the deposits to be made",
"IGNORED_ACCEPT": "You have ignored the contract proposal",
"BURN_PROPOSAL": "The deposits have been voided.",
"SUCCESS_FINISH_PROPOSAL": "The contract is complete. The payment has been sent.",
"SEND_CANCEL_PROPOSAL": "Proposal to cancel contract sent to seller",
"IGNORED_CANCEL": "You have ignored the proposal to cancel the contract",
"DEALS_CANCELED_WAIT": "The contract is being cancelled. Please wait for the deposit to be returned",
"WAITING_TIME": "Time until response",
"NEED_MONEY": "There are insufficient funds in the wallet. Add funds to the wallet to continue",
"WAITING_SELLER": "Waiting for seller respond to contract proposal",
"IGNORED_SELLER": "The seller ignored your contract proposal",
"PLEDGE_UNBLOCKED": "Pledge amount unblocked",
"WAITING_SHIP": "Waiting for seller to ship item",
"IGNORED_CANCEL_SELLER": "The seller ignored your proposal to cancel the contract",
"EXPIRED": "The contract proposal has expired",
"WAIT": "Please wait for the pledges to be made",
"COMPLETED": "Contract completed successfully",
"RECEIVED": "Item received, payment transferred, pledges returned",
"NOT_RECEIVED": "Item not received",
"NULLIFIED": "All pledges nullified",
"PROPOSAL_CANCEL_SELLER": "You have made a proposal to cancel the contract",
"BEING_CANCELLED": "The contract is being cancelled. Please wait for the pledge to be returned",
"CANCELLED": "Contract canceled",
"PLEDGES_RETURNED": "Pledges returned",
"WAITING_BUYER": "The buyer is proposing a contract",
"IGNORED_BUYER": "You ignored the contract proposal",
"IGNORED_CANCEL_BUYER": "You ignored the proposal to cancel the contract",
"BUYER_WAIT": "The buyer is waiting for the item to be delivered",
"PLEDGES_MADE": "Pledges made",
"PROPOSAL_CANCEL_BUYER": "The buyer is offering to cancel the contract and return the pledge",
"STATUS_MESSAGES": {
"NEW_PURCHASE": "New purchase",
"WAITING_SELLER": "Waiting for response",
"WAITING_BUYER": "Contract proposal received",
"WAITING_CONFIRMATION": "Waiting for deposits confirmation",
"WAITING_DELIVERY": "Waiting for delivery",
"COMPLETED": "Contract completed",
"IGNORED_BUYER": "Contract proposal ignored",
"IGNORED_SELLER": "The seller ignored your contract proposal",
"PROPOSAL_CANCEL_SELLER": "Cancellation request sent",
"PROPOSAL_CANCEL_BUYER": "Cancellation request received",
"BEING_CANCELLED": "Cancellation in progress",
"IGNORED_CANCEL_SELLER": "The seller ignored your proposal to cancel the contract",
"IGNORED_CANCEL_BUYER": "Contract cancellation proposal ignored",
"CANCELLED": "Contract canceled",
"EXPIRED": "Contract proposal expired",
"NOT_RECEIVED": "Delivery failed",
"NULLIFIED": "All deposits burned"
},
"ACCEPT_STATE_WAIT_BIG": "Contract started",
"IGNORED_ACCEPT": "Contract proposal ignored",
"BURN_PROPOSAL": "Deposits burned",
"SUCCESS_FINISH_PROPOSAL": "Contract completed",
"SEND_CANCEL_PROPOSAL": "Cancellation request sent",
"IGNORED_CANCEL": "Contract cancellation proposal ignored",
"DEALS_CANCELED_WAIT": "Cancellation in progress",
"WAITING_TIME": "Response time",
"NEED_MONEY": "Insufficient funds",
"BUTTON_MAKE_PLEDGE": "Accept and make deposit",
"BUTTON_IGNORE": "Ignore and hide offer",
"BUTTON_NULLIFY": "Terminate and burn deposits",
"BUTTON_RECEIVED": "Complete and release deposits",
"BUTTON_CANCEL_BUYER": "Cancel and return deposits",
"BUTTON_NOT_CANCEL": "Do not cancel (Item shipped)",
"BUTTON_CANCEL_SELLER": "Cancel contract (Return pledge)",
"BUTTON_NOT_CANCEL": "Ignore request",
"BUTTON_CANCEL_SELLER": "Confirm and return deposits",
"HOUR": "hour",
"HOURS": "hours",
"CANCEL": "Cancel",
"NULLIFY_QUESTION": "Are you sure you want to nullify your pledge and the seller's pledge?",
"BUTTON_NULLIFY_SHORT": "Nullify",
"NULLIFY_QUESTION": "Are you sure you want to burn both deposits?",
"BUTTON_NULLIFY_SHORT": "Burn",
"WAITING_TIME_QUESTION": "Are you sure you want to cancel the contract?"
},
"MESSAGES": {
@ -489,7 +479,7 @@
"ERRORS": {
"NO_MONEY": "Not enough money",
"NOT_ENOUGH_MONEY": "Insufficient funds in account",
"CORE_BUSY": "Internal error (core is busy)",
"CORE_BUSY": "Internal error: core is busy",
"DAEMON_BUSY": "Internal error: daemon is busy",
"NO_MONEY_REMOVE_OFFER": "There is no fee for deleting an offer, but in order to protect the network against flood transactions you need to have at least {{fee}} {{currency}} in your wallet",
"NOT_ENOUGH_OUTPUTS_TO_MIX": "Mix-in number is too big for current blockchain state. There are not enough unspent outputs to mix with",

View file

@ -785,7 +785,7 @@ input[type='checkbox'].style-checkbox {
.ng-select {
&.lock-selection-select {
&.custom-select {
width: 100%;
.ng-select-container {
@ -845,6 +845,28 @@ input[type='checkbox'].style-checkbox {
}
}
}
&::-webkit-scrollbar {
background-color: transparent;
cursor: default;
width: 1rem;
height: 1rem;
}
&::-webkit-scrollbar-track {
background: transparent;
}
&::-webkit-scrollbar-thumb {
background-color: #556576;
background-clip: padding-box;
border: 0.25rem solid transparent;
border-radius: 0.5rem;
}
&::-webkit-scrollbar-thumb:hover {
background-color: #556576;
}
}
}
}

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

View file

@ -214,8 +214,6 @@ export class Wallet {
const searchResult = viewedContracts.some(elem => elem.state === contract.state && elem.is_a === contract.is_a && elem.contract_id === contract.contract_id);
contract.is_new = !searchResult;
contract['private_detailes'].a_pledge = contract['private_detailes'].a_pledge.plus(contract['private_detailes'].to_pay);
wallet.contracts.push(contract);
}
this.recountNewContracts();

View file

@ -22,12 +22,10 @@ export class ContractStatusMessagesPipe implements PipeTransform {
state.part2 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.SELLER.WAIT');
break;
case 2:
state.part1 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.SELLER.BUYER_WAIT');
state.part2 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.SELLER.PLEDGES_MADE');
state.part1 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.SELLER.WAITING_BUYER');
break;
case 3:
state.part1 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.SELLER.COMPLETED');
state.part2 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.SELLER.RECEIVED');
break;
case 4:
state.part1 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.SELLER.NOT_RECEIVED');
@ -41,7 +39,6 @@ export class ContractStatusMessagesPipe implements PipeTransform {
break;
case 6:
state.part1 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.SELLER.CANCELLED');
state.part2 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.SELLER.PLEDGES_RETURNED');
break;
case 130:
state.part1 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.SELLER.IGNORED_CANCEL');
@ -58,11 +55,9 @@ export class ContractStatusMessagesPipe implements PipeTransform {
switch (stateNum) {
case 1:
state.part1 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.BUYER.WAITING');
state.part2 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.BUYER.PLEDGE_RESERVED');
break;
case 110:
state.part1 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.BUYER.IGNORED');
state.part2 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.BUYER.PLEDGE_UNBLOCKED');
break;
case 201:
state.part1 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.BUYER.ACCEPTED');
@ -70,15 +65,12 @@ export class ContractStatusMessagesPipe implements PipeTransform {
break;
case 2:
state.part1 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.BUYER.ACCEPTED');
state.part2 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.BUYER.PLEDGES_MADE');
break;
case 120:
state.part1 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.BUYER.WAITING_SELLER');
state.part2 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.BUYER.PLEDGES_MADE');
break;
case 3:
state.part1 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.BUYER.COMPLETED');
state.part2 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.BUYER.RECEIVED');
break;
case 4:
state.part1 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.BUYER.NOT_RECEIVED');
@ -92,7 +84,6 @@ export class ContractStatusMessagesPipe implements PipeTransform {
break;
case 6:
state.part1 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.BUYER.CANCELLED');
state.part2 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.BUYER.PLEDGES_RETURNED');
break;
case 130:
state.part1 = this.translate.instant('CONTRACTS.STATUS_MESSAGES.BUYER.IGNORED_CANCEL');

View file

@ -308,7 +308,7 @@ export class BackendService {
storeSecureAppData(callback?) {
const wallets = [];
this.variablesService.wallets.forEach((wallet) => {
wallets.push({name: wallet.name, pass: wallet.pass, path: wallet.path});
wallets.push({name: wallet.name, pass: wallet.pass, path: wallet.path, staking: wallet.staking});
});
this.backendObject['store_secure_app_data'](JSON.stringify(wallets), this.variablesService.appPass, (dataStore) => {
this.backendCallback(dataStore, {}, callback, 'store_secure_app_data');
@ -426,7 +426,7 @@ export class BackendService {
a_addr: a_addr,
b_addr: b_addr,
to_pay: this.moneyToIntPipe.transform(to_pay),
a_pledge: this.moneyToIntPipe.transform((new BigNumber(a_pledge)).minus(to_pay).toString()),
a_pledge: this.moneyToIntPipe.transform(a_pledge),
b_pledge: this.moneyToIntPipe.transform(b_pledge)
},
payment_id: payment_id,

View file

@ -317,8 +317,6 @@ export class AppComponent implements OnInit, OnDestroy {
const searchResult = this.variablesService.settings.viewedContracts.some(elem => elem.state === contract.state && elem.is_a === contract.is_a && elem.contract_id === contract.contract_id);
contract.is_new = !searchResult;
contract['private_detailes'].a_pledge = contract['private_detailes'].a_pledge.plus(contract['private_detailes'].to_pay);
let findContract = false;
for (let i = 0; i < wallet.contracts.length; i++) {
if (wallet.contracts[i].contract_id === contract.contract_id && wallet.contracts[i].is_a === contract.is_a) {

View file

@ -104,6 +104,12 @@ export class LoginComponent implements OnInit, OnDestroy {
open_data['wi'].tracking_hey
);
new_wallet.alias = this.backend.getWalletAlias(new_wallet.address);
if (wallet.staking) {
new_wallet.staking = true;
this.backend.startPosMining(new_wallet.wallet_id);
} else {
new_wallet.staking = false;
}
if (open_data.recent_history && open_data.recent_history.history) {
new_wallet.prepareHistory(open_data.recent_history.history);
}

View file

@ -57,6 +57,9 @@
<div *ngIf="purchaseForm.controls['amount'].errors['required']">
{{ 'PURCHASE.FORM_ERRORS.AMOUNT_REQUIRED' | translate }}
</div>
<div *ngIf="purchaseForm.controls['amount'].errors['amount_zero']">
{{ 'PURCHASE.FORM_ERRORS.AMOUNT_ZERO' | translate }}
</div>
</div>
</div>
</div>
@ -70,9 +73,6 @@
{{ 'PURCHASE.FORM_ERRORS.YOUR_DEPOSIT_REQUIRED' | translate }}
</div>
</div>
<div class="error-block" *ngIf="purchaseForm.invalid && (purchaseForm.controls['yourDeposit'].dirty || purchaseForm.controls['amount'].touched) && purchaseForm.errors && purchaseForm.errors['your_deposit_too_small']">
{{ 'PURCHASE.FORM_ERRORS.YOUR_DEPOSIT_TOO_SMALL' | translate }}
</div>
</div>
<div class="input-block">
@ -103,8 +103,6 @@
</div>
</div>
<button type="button" class="purchase-select" (click)="toggleOptions()">
<span>{{ 'PURCHASE.DETAILS' | translate }}</span><i class="icon arrow" [class.down]="!additionalOptions" [class.up]="additionalOptions"></i>
</button>
@ -116,7 +114,7 @@
</div>
<div class="input-block" *ngIf="newPurchase">
<label for="purchase-time">{{ 'PURCHASE.WAITING_TIME' | translate }}</label>
<ng-select id="purchase-time" class="lock-selection-select"
<ng-select id="purchase-time" class="custom-select"
[clearable]="false"
[searchable]="false"
formControlName="time">
@ -135,79 +133,9 @@
<button type="button" class="blue-button send-button" *ngIf="newPurchase" [disabled]="!purchaseForm.valid" (click)="createPurchase()">{{ 'PURCHASE.SEND_BUTTON' | translate }}</button>
<div class="purchase-states" *ngIf="!newPurchase">
<ng-container *ngIf="currentContract.state == 1 && !currentContract.is_a && currentContract.private_detailes.b_pledge.plus(variablesService.default_fee_big).plus(variablesService.default_fee_big).isGreaterThan(variablesService.currentWallet.unlocked_balance)">
<span>{{ 'PURCHASE.NEED_MONEY' | translate }}</span>
</ng-container>
<ng-container *ngIf="currentContract.is_a">
<span *ngIf="currentContract.state == 1">{{ 'PURCHASE.WAITING_SELLER' | translate }}</span>
<!--<span *ngIf="currentContract.state == 1" ng-bind="'(' + (currentContract.expiration_time | buyingTime : 0) + ')'"></span>-->
<span *ngIf="currentContract.state == 110">{{ 'PURCHASE.IGNORED_SELLER' | translate }}</span>
<span *ngIf="currentContract.state == 110">{{ 'PURCHASE.PLEDGE_UNBLOCKED' | translate }}</span>
<span *ngIf="currentContract.state == 120">{{ 'PURCHASE.WAITING_SHIP' | translate }}</span>
<span *ngIf="currentContract.state == 130">{{ 'PURCHASE.IGNORED_CANCEL_SELLER' | translate }}</span>
<span *ngIf="currentContract.state == 140">{{ 'PURCHASE.EXPIRED' | translate }}</span>
<span *ngIf="currentContract.state == 201">{{ 'PURCHASE.WAIT' | translate }}</span>
<span *ngIf="currentContract.state == 2">{{ 'PURCHASE.WAITING_SELLER' | translate }}</span>
<span *ngIf="currentContract.state == 3">{{ 'PURCHASE.COMPLETED' | translate }}</span>
<span *ngIf="currentContract.state == 3">{{ 'PURCHASE.RECEIVED' | translate }}</span>
<span *ngIf="currentContract.state == 4">{{ 'PURCHASE.NOT_RECEIVED' | translate }}</span>
<span *ngIf="currentContract.state == 4" class="error-text">{{ 'PURCHASE.NULLIFIED' | translate }}</span>
<span *ngIf="currentContract.state == 5">{{ 'PURCHASE.PROPOSAL_CANCEL_SELLER' | translate }}</span>
<!--<span *ngIf="currentContract.state == 5" ng-bind="'(' + (contract.cancel_expiration_time | buyingTime : 2) + ')'"></span>-->
<span *ngIf="currentContract.state == 601">{{ 'PURCHASE.BEING_CANCELLED' | translate }}</span>
<span *ngIf="currentContract.state == 6">{{ 'PURCHASE.CANCELLED' | translate }}</span>
<span *ngIf="currentContract.state == 6">{{ 'PURCHASE.PLEDGES_RETURNED' | translate }}</span>
</ng-container>
<ng-container *ngIf="!currentContract.is_a">
<span *ngIf="currentContract.state == 1">{{ 'PURCHASE.WAITING_BUYER' | translate }}</span>
<!--<span *ngIf="currentContract.state == 1" ng-bind="'(' + (contract.expiration_time | buyingTime : 1) + ')'"></span>-->
<span *ngIf="currentContract.state == 110">{{ 'PURCHASE.IGNORED_BUYER' | translate }}</span>
<span *ngIf="currentContract.state == 130">{{ 'PURCHASE.IGNORED_CANCEL_BUYER' | translate }}</span>
<span *ngIf="currentContract.state == 140">{{ 'PURCHASE.EXPIRED' | translate }}</span>
<span *ngIf="currentContract.state == 201">{{ 'PURCHASE.WAIT' | translate }}</span>
<span *ngIf="currentContract.state == 2">{{ 'PURCHASE.BUYER_WAIT' | translate }}</span>
<span *ngIf="currentContract.state == 2">{{ 'PURCHASE.PLEDGES_MADE' | translate }}</span>
<span *ngIf="currentContract.state == 3">{{ 'PURCHASE.COMPLETED' | translate }}</span>
<span *ngIf="currentContract.state == 3">{{ 'PURCHASE.RECEIVED' | translate }}</span>
<span *ngIf="currentContract.state == 4">{{ 'PURCHASE.NOT_RECEIVED' | translate }}</span>
<span *ngIf="currentContract.state == 4" class="error-text">{{ 'PURCHASE.NULLIFIED' | translate }}</span>
<span *ngIf="currentContract.state == 5">{{ 'PURCHASE.PROPOSAL_CANCEL_BUYER' | translate }}</span>
<!--<span *ngIf="currentContract.state == 5" ng-bind="'(' + (contract.cancel_expiration_time | buyingTime : 1) + ')'"></span>-->
<span *ngIf="currentContract.state == 601">{{ 'PURCHASE.BEING_CANCELLED' | translate }}</span>
<span *ngIf="currentContract.state == 6">{{ 'PURCHASE.CANCELLED' | translate }}</span>
<span *ngIf="currentContract.state == 6">{{ 'PURCHASE.PLEDGES_RETURNED' | translate }}</span>
</ng-container>
<ng-container *ngIf="currentContract.state == 201 || currentContract.state == 601">
<span *ngIf="currentContract.height === 0">0/10</span>
<span *ngIf="currentContract.height !== 0 && (variablesService.height_app - currentContract.height) < 10">{{variablesService.height_app - currentContract.height}}/10</span>
<span *ngIf="historyBlock && historyBlock.sortAmount && historyBlock.sortAmount.toString() !== '0'">{{(historyBlock.is_income ? '+' : '') + (historyBlock.sortAmount | intToMoney)}} {{variablesService.defaultCurrency}}</span>
</ng-container>
</div>
<div class="purchase-buttons" *ngIf="!newPurchase">
@ -248,8 +176,9 @@
<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>
<label for="purchase-timeCancel">{{ 'PURCHASE.WAITING_TIME' | translate }}</label>
<div class="input-block">
<ng-select id="purchase-timeCancel" class="lock-selection-select"
<ng-select id="purchase-timeCancel" class="custom-select"
[clearable]="false"
[searchable]="false"
formControlName="timeCancel">
@ -259,7 +188,6 @@
</ng-option>
</ng-select>
</div>
<label for="purchase-timeCancel">{{ 'PURCHASE.WAITING_TIME' | translate }}</label>
<div class="time-cancel-block-buttons">
<button type="button" class="blue-button" (click)="showTimeSelect = false;">{{ 'PURCHASE.CANCEL' | translate }}</button>
<button type="button" class="blue-button" (click)="dealsDetailsCancel();">{{ 'PURCHASE.BUTTON_CANCEL_BUYER' | translate }}</button>
@ -273,9 +201,81 @@
<div class="progress-bar-full" [style.width]="getProgressBarWidth()"></div>
</div>
<div class="progress-labels">
<span>{{ 'PURCHASE.PROGRESS_NEW' | translate }}</span>
<span>{{ 'PURCHASE.PROGRESS_WAIT' | translate }}</span>
<span>{{ 'PURCHASE.PROGRESS_COMPLETE' | translate }}</span>
<ng-container *ngIf="newPurchase">
<span>{{ 'PURCHASE.STATUS_MESSAGES.NEW_PURCHASE' | translate }}</span>
</ng-container>
<ng-container *ngIf="!newPurchase && currentContract.is_a">
<span *ngIf="currentContract.state == 1">{{ 'PURCHASE.STATUS_MESSAGES.WAITING_SELLER' | translate }}</span>
<span *ngIf="currentContract.state == 110">{{ 'PURCHASE.STATUS_MESSAGES.IGNORED_SELLER' | translate }}</span>
<span *ngIf="currentContract.state == 120">{{ 'PURCHASE.STATUS_MESSAGES.WAITING_DELIVERY' | translate }}</span>
<span *ngIf="currentContract.state == 130">{{ 'PURCHASE.STATUS_MESSAGES.IGNORED_CANCEL_SELLER' | translate }}</span>
<span *ngIf="currentContract.state == 140">{{ 'PURCHASE.STATUS_MESSAGES.EXPIRED' | translate }}</span>
<span *ngIf="currentContract.state == 2">{{ 'PURCHASE.STATUS_MESSAGES.WAITING_SELLER' | translate }}</span>
<span *ngIf="currentContract.state == 201">
{{ 'PURCHASE.STATUS_MESSAGES.WAITING_CONFIRMATION' | translate }}
<ng-container *ngIf="currentContract.height === 0">(0/10)</ng-container>
<ng-container *ngIf="currentContract.height !== 0 && (variablesService.height_app - currentContract.height) < 10">({{variablesService.height_app - currentContract.height}}/10)</ng-container>
</span>
<span *ngIf="currentContract.state == 3">{{ 'PURCHASE.STATUS_MESSAGES.COMPLETED' | translate }}</span>
<span *ngIf="currentContract.state == 4" class="error-text">
{{ 'PURCHASE.STATUS_MESSAGES.NOT_RECEIVED' | translate }}. {{ 'PURCHASE.STATUS_MESSAGES.NULLIFIED' | translate }}
</span>
<span *ngIf="currentContract.state == 5">{{ 'PURCHASE.STATUS_MESSAGES.PROPOSAL_CANCEL_SELLER' | translate }}</span>
<span *ngIf="currentContract.state == 6">{{ 'PURCHASE.STATUS_MESSAGES.CANCELLED' | translate }}</span>
<span *ngIf="currentContract.state == 601">
{{ 'PURCHASE.STATUS_MESSAGES.BEING_CANCELLED' | translate }}
<ng-container *ngIf="currentContract.height === 0">(0/10)</ng-container>
<ng-container *ngIf="currentContract.height !== 0 && (variablesService.height_app - currentContract.height) < 10">({{variablesService.height_app - currentContract.height}}/10)</ng-container>
</span>
</ng-container>
<ng-container *ngIf="!newPurchase && !currentContract.is_a">
<span *ngIf="currentContract.state == 1">{{ 'PURCHASE.STATUS_MESSAGES.WAITING_BUYER' | translate }}</span>
<span *ngIf="currentContract.state == 110">{{ 'PURCHASE.STATUS_MESSAGES.IGNORED_BUYER' | translate }}</span>
<span *ngIf="currentContract.state == 130">{{ 'PURCHASE.STATUS_MESSAGES.IGNORED_CANCEL_BUYER' | translate }}</span>
<span *ngIf="currentContract.state == 140">{{ 'PURCHASE.STATUS_MESSAGES.EXPIRED' | translate }}</span>
<span *ngIf="currentContract.state == 2">{{ 'PURCHASE.STATUS_MESSAGES.WAITING_DELIVERY' | translate }}</span>
<span *ngIf="currentContract.state == 201">
{{ 'PURCHASE.STATUS_MESSAGES.WAITING_CONFIRMATION' | translate }}
<ng-container *ngIf="currentContract.height === 0">(0/10)</ng-container>
<ng-container *ngIf="currentContract.height !== 0 && (variablesService.height_app - currentContract.height) < 10">({{variablesService.height_app - currentContract.height}}/10)</ng-container>
</span>
<span *ngIf="currentContract.state == 3">{{ 'PURCHASE.STATUS_MESSAGES.COMPLETED' | translate }}</span>
<span *ngIf="currentContract.state == 4" class="error-text">
{{ 'PURCHASE.STATUS_MESSAGES.NOT_RECEIVED' | translate }}. {{ 'PURCHASE.STATUS_MESSAGES.NULLIFIED' | translate }}
</span>
<span *ngIf="currentContract.state == 5">{{ 'PURCHASE.STATUS_MESSAGES.PROPOSAL_CANCEL_BUYER' | translate }}</span>
<span *ngIf="currentContract.state == 6">{{ 'PURCHASE.STATUS_MESSAGES.CANCELLED' | translate }}</span>
<span *ngIf="currentContract.state == 601">
{{ 'PURCHASE.STATUS_MESSAGES.BEING_CANCELLED' | translate }}
<ng-container *ngIf="currentContract.height === 0">(0/10)</ng-container>
<ng-container *ngIf="currentContract.height !== 0 && (variablesService.height_app - currentContract.height) < 10">({{variablesService.height_app - currentContract.height}}/10)</ng-container>
</span>
</ng-container>
</div>
<div class="progress-time" *ngIf="!newPurchase">
<span *ngIf="currentContract.is_a && currentContract.state == 1">{{currentContract.expiration_time | contractTimeLeft: 0}}</span>

View file

@ -188,22 +188,9 @@
.progress-labels {
display: flex;
align-items: center;
justify-content: space-between;
justify-content: center;
font-size: 1.2rem;
height: 100%;
span {
flex: 1 0 0;
text-align: center;
&:first-child {
text-align: left;
}
&:last-child {
text-align: right;
}
}
}
.progress-time {

View file

@ -82,7 +82,12 @@ export class PurchaseComponent implements OnInit, OnDestroy {
}
return null;
}]),
amount: new FormControl(null, Validators.required),
amount: new FormControl(null, [Validators.required, (g: FormControl) => {
if (parseFloat(g.value) === 0) {
return {'amount_zero': true};
}
return null;
}]),
yourDeposit: new FormControl(null, Validators.required),
sellerDeposit: new FormControl(null, Validators.required),
sameAmount: new FormControl({value: false, disabled: false}),
@ -91,8 +96,6 @@ export class PurchaseComponent implements OnInit, OnDestroy {
time: new FormControl({value: 12, disabled: false}),
timeCancel: new FormControl({value: 12, disabled: false}),
payment: new FormControl('')
}, function (g: FormGroup) {
return (new BigNumber(g.get('yourDeposit').value)).isLessThan(g.get('amount').value) ? {'your_deposit_too_small': true} : null;
});
additionalOptions = false;
@ -213,14 +216,24 @@ export class PurchaseComponent implements OnInit, OnDestroy {
}
getProgressBarWidth() {
let progress = '9rem';
let progress = '0';
if (!this.newPurchase) {
if (this.currentContract) {
if ([110, 3, 4, 6, 140].indexOf(this.currentContract.state) !== -1) {
progress = '100%';
} else {
if (this.currentContract.state === 1) {
progress = '10%';
}
if (this.currentContract.state === 201) {
progress = '25%';
}
if ([120, 2].indexOf(this.currentContract.state) !== -1) {
progress = '50%';
}
if ([5, 601].indexOf(this.currentContract.state) !== -1) {
progress = '75%';
}
if ([110, 130, 140, 3, 4, 6].indexOf(this.currentContract.state) !== -1) {
progress = '100%';
}
}
}
return progress;
@ -238,10 +251,8 @@ export class PurchaseComponent implements OnInit, OnDestroy {
createPurchase() {
if (this.purchaseForm.valid) {
const sellerDeposit = this.purchaseForm.get('sameAmount').value ? this.purchaseForm.get('amount').value : this.purchaseForm.get('sellerDeposit').value;
if (this.purchaseForm.get('seller').value.indexOf('@') !== 0) {
if (this.purchaseForm.get('sameAmount').value) {
this.purchaseForm.get('sellerDeposit').setValue(this.purchaseForm.get('amount').value);
}
this.backend.createProposal(
this.variablesService.currentWallet.wallet_id,
this.purchaseForm.get('description').value,
@ -250,7 +261,7 @@ export class PurchaseComponent implements OnInit, OnDestroy {
this.purchaseForm.get('seller').value,
this.purchaseForm.get('amount').value,
this.purchaseForm.get('yourDeposit').value,
this.purchaseForm.get('sellerDeposit').value,
sellerDeposit,
this.purchaseForm.get('time').value,
this.purchaseForm.get('payment').value,
(create_status) => {
@ -274,7 +285,7 @@ export class PurchaseComponent implements OnInit, OnDestroy {
alias_data.address,
this.purchaseForm.get('amount').value,
this.purchaseForm.get('yourDeposit').value,
this.purchaseForm.get('sellerDeposit').value,
sellerDeposit,
this.purchaseForm.get('time').value,
this.purchaseForm.get('payment').value,
(create_status) => {
@ -330,7 +341,6 @@ export class PurchaseComponent implements OnInit, OnDestroy {
this.back();
}
productNotGot() {
this.backend.releaseProposal(this.currentWalletId, this.currentContract.contract_id, 'REL_B', (release_status) => {
if (release_status) {

View file

@ -33,7 +33,7 @@
<div class="lock-selection">
<label class="lock-selection-title">{{ 'SETTINGS.APP_LOCK.TITLE' | translate }}</label>
<ng-select class="lock-selection-select"
<ng-select class="custom-select"
[items]="appLockOptions"
bindValue="id"
bindLabel="name"
@ -52,7 +52,7 @@
<div class="lock-selection">
<label class="lock-selection-title">{{ 'SETTINGS.APP_LOG_TITLE' | translate }}</label>
<ng-select class="lock-selection-select"
<ng-select class="custom-select"
[items]="appLogOptions"
bindValue="id"
bindLabel="id"

View file

@ -7,9 +7,9 @@
"BUTTON_SKIP": "Skip",
"INCORRECT_PASSWORD": "Invalid password",
"FORM_ERRORS": {
"PASS_REQUIRED": "Password is required.",
"CONFIRM_REQUIRED": "Confirmation is required.",
"MISMATCH": "Mismatch."
"PASS_REQUIRED": "Password is required",
"CONFIRM_REQUIRED": "Confirmation is required",
"MISMATCH": "Mismatch"
}
},
"COMMON": {
@ -78,10 +78,10 @@
"ERROR_CANNOT_SAVE_TOP": "Existing wallet files cannot be replaced or overwritten",
"ERROR_CANNOT_SAVE_SYSTEM": "Wallet files cannot be saved to the OS partition",
"FORM_ERRORS": {
"NAME_REQUIRED": "Name is required.",
"NAME_DUPLICATE": "Name is duplicate.",
"MAX_LENGTH": "Maximum name length reached.",
"CONFIRM_NOT_MATCH": "Confirm password not match."
"NAME_REQUIRED": "Name is required",
"NAME_DUPLICATE": "Name is duplicate",
"MAX_LENGTH": "Maximum name length reached",
"CONFIRM_NOT_MATCH": "Confirm password not match"
}
},
"OPEN_WALLET": {
@ -92,9 +92,9 @@
"FILE_NOT_FOUND1": "Wallet file not found",
"FILE_NOT_FOUND2": "<br/><br/> It might have been renamed or moved. <br/> To open it, use the \"Open wallet\" button.",
"FORM_ERRORS": {
"NAME_REQUIRED": "Name is required.",
"NAME_DUPLICATE": "Name is duplicate.",
"MAX_LENGTH": "Maximum name length reached."
"NAME_REQUIRED": "Name is required",
"NAME_DUPLICATE": "Name is duplicate",
"MAX_LENGTH": "Maximum name length reached"
},
"MODAL": {
"TITLE": "Type wallet password",
@ -114,12 +114,12 @@
"NOT_CORRECT_FILE_OR_PASSWORD": "Invalid wallet file or password does not match",
"CHOOSE_PATH": "Please choose a path",
"FORM_ERRORS": {
"NAME_REQUIRED": "Name is required.",
"NAME_DUPLICATE": "Name is duplicate.",
"MAX_LENGTH": "Maximum name length reached.",
"CONFIRM_NOT_MATCH": "Confirm password not match.",
"KEY_REQUIRED": "Key is required.",
"KEY_NOT_VALID": "Key not valid."
"NAME_REQUIRED": "Name is required",
"NAME_DUPLICATE": "Name is duplicate",
"MAX_LENGTH": "Maximum name length reached",
"CONFIRM_NOT_MATCH": "Confirm password not match",
"KEY_REQUIRED": "Key is required",
"KEY_NOT_VALID": "Key not valid"
}
},
"SEED_PHRASE": {
@ -153,9 +153,9 @@
"BUTTON": "Save"
},
"FORM_ERRORS": {
"PASS_REQUIRED": "Password is required.",
"PASS_NOT_MATCH": "Old password not match.",
"CONFIRM_NOT_MATCH": "Confirm password not match."
"PASS_REQUIRED": "Password is required",
"PASS_NOT_MATCH": "Old password not match",
"CONFIRM_NOT_MATCH": "Confirm password not match"
},
"LAST_BUILD": "Current build: {{value}}",
"APP_LOG_TITLE": "Log level:"
@ -184,9 +184,9 @@
"BUTTON_SAVE": "Save",
"BUTTON_REMOVE": "Close wallet",
"FORM_ERRORS": {
"NAME_REQUIRED": "Name is required.",
"NAME_DUPLICATE": "Name is duplicate.",
"MAX_LENGTH": "Maximum name length reached."
"NAME_REQUIRED": "Name is required",
"NAME_DUPLICATE": "Name is duplicate",
"MAX_LENGTH": "Maximum name length reached"
}
},
"ASSIGN_ALIAS": {
@ -261,18 +261,18 @@
"DETAILS": "Additional details",
"MIXIN": "Mixin",
"FEE": "Fee",
"HIDE": "Hide your wallet address from receiver",
"HIDE": "Hide your wallet address from recipient",
"BUTTON": "Send",
"SUCCESS_SENT": "Transaction sent",
"FORM_ERRORS": {
"ADDRESS_REQUIRED": "Address is required.",
"ADDRESS_NOT_VALID": "Address not valid.",
"ALIAS_NOT_VALID": "Alias not valid.",
"AMOUNT_REQUIRED": "Amount is required.",
"AMOUNT_ZERO": "Amount is zero.",
"FEE_REQUIRED": "Fee is required.",
"ADDRESS_REQUIRED": "Address is required",
"ADDRESS_NOT_VALID": "Address not valid",
"ALIAS_NOT_VALID": "Alias not valid",
"AMOUNT_REQUIRED": "Amount is required",
"AMOUNT_ZERO": "Amount is zero",
"FEE_REQUIRED": "Fee is required",
"FEE_MINIMUM": "Minimum fee: {{fee}}",
"MAX_LENGTH": "Maximum comment length reached."
"MAX_LENGTH": "Maximum comment length reached"
}
},
"HISTORY": {
@ -298,21 +298,21 @@
"TYPE_MESSAGES": {
"HIDDEN": "hidden",
"UNDEFINED": "Undefined",
"COMPLETE_BUYER": "Successfully complete contract, return remaining pledge",
"COMPLETE_SELLER": "Successfully complete contract, receive payment on contract, and return pledge",
"COMPLETE_BUYER": "Contract completed",
"COMPLETE_SELLER": "Contract completed",
"CREATE_ALIAS": "Fee for assigning alias",
"UPDATE_ALIAS": "Fee for editing alias",
"POW_REWARD": "POW reward",
"POS_REWARD": "POS reward",
"CREATE_CONTRACT": "Send contract offer",
"PLEDGE_CONTRACT": "Make pledge on offer",
"NULLIFY_CONTRACT": "Nullify pledges for contract",
"PROPOSAL_CANCEL_CONTRACT": "Send proposal to cancel contract",
"CANCEL_CONTRACT": "Cancel contract, return pledges"
"CREATE_CONTRACT": "Contract proposal",
"PLEDGE_CONTRACT": "Contract deposit",
"NULLIFY_CONTRACT": "Burn deposits",
"PROPOSAL_CANCEL_CONTRACT": "Cancellation request",
"CANCEL_CONTRACT": "Cancel and return deposits"
}
},
"CONTRACTS": {
"EMPTY": "No active contracts.",
"EMPTY": "No active contracts",
"CONTRACTS": "Contracts",
"PURCHASE": "Purchase",
"SELL": "Sell",
@ -324,52 +324,44 @@
"LISTING_BUTTON": "Create listing",
"TIME_LEFT": {
"REMAINING_LESS_ONE": "Less than an hour to respond",
"REMAINING_ONE": "Remaining {{time}} hour",
"REMAINING_MANY": "Remaining {{time}} hours",
"REMAINING_MANY_ALT": "Remaining {{time}} hours",
"REMAINING_ONE_RESPONSE": "Remaining {{time}} hour for response",
"REMAINING_MANY_RESPONSE": "Remaining {{time}} hours for response",
"REMAINING_MANY_ALT_RESPONSE": "Remaining {{time}} hours for response",
"REMAINING_ONE_WAITING": "Remaining {{time}} hour waiting",
"REMAINING_MANY_WAITING": "Remaining {{time}} hours waiting",
"REMAINING_MANY_ALT_WAITING": "Remaining {{time}} hours waiting"
"REMAINING_ONE": "{{time}} hour remains",
"REMAINING_MANY": "{{time}} hours remain",
"REMAINING_MANY_ALT": "{{time}} hours remain",
"REMAINING_ONE_RESPONSE": "{{time}} hour remains",
"REMAINING_MANY_RESPONSE": "{{time}} hours remain",
"REMAINING_MANY_ALT_RESPONSE": "{{time}} hours remain",
"REMAINING_ONE_WAITING": "Waiting for {{time}} hour",
"REMAINING_MANY_WAITING": "Waiting for {{time}} hours",
"REMAINING_MANY_ALT_WAITING": "Waiting for {{time}} hours"
},
"STATUS_MESSAGES": {
"SELLER": {
"NEW_CONTRACT": "New contract proposal",
"IGNORED": "You ignored the contract proposal",
"ACCEPTED": "You have accepted the contract proposal",
"WAIT": "Please wait for the pledges to be made",
"BUYER_WAIT": "The buyer is waiting for the item to be delivered",
"PLEDGES_MADE": "Pledges made",
"COMPLETED": "Contract completed successfully",
"RECEIVED": "Item received, payment transferred, pledges returned",
"NOT_RECEIVED": "Item not received",
"NULLIFIED": "All pledges nullified",
"PROPOSAL_CANCEL": "New proposal to cancel contract and return pledges",
"BEING_CANCELLED": "The contract is being cancelled. Please wait for the pledge to be returned",
"IGNORED": "You ignored contract proposal",
"ACCEPTED": "Contract started",
"WAIT": "Waiting for contract confirmation",
"WAITING_BUYER": "Waiting for delivery",
"COMPLETED": "Contract completed",
"NOT_RECEIVED": "Delivery failed",
"NULLIFIED": "All deposits burned",
"PROPOSAL_CANCEL": "New proposal to cancel contract and return deposits",
"BEING_CANCELLED": "Cancellation in progress",
"CANCELLED": "Contract canceled",
"PLEDGES_RETURNED": "Pledges returned",
"IGNORED_CANCEL": "You ignored the proposal to cancel the contract",
"EXPIRED": "The contract proposal has expired"
"IGNORED_CANCEL": "You ignored cancellation proposal",
"EXPIRED": "Contract proposal has expired"
},
"BUYER": {
"WAITING": "Waiting for seller respond to contract proposal",
"PLEDGE_RESERVED": "Pledge amount reserved",
"IGNORED": "The seller ignored your contract proposal",
"PLEDGE_UNBLOCKED": "Pledge amount unblocked",
"ACCEPTED": "The seller accepted your contract proposal",
"WAIT": "Please wait for the pledges to be made",
"PLEDGES_MADE": "Pledges made",
"WAITING_SELLER": "Waiting for seller to ship item",
"COMPLETED": "Contract completed successfully",
"RECEIVED": "Item received, payment transferred, pledges returned",
"NOT_RECEIVED": "Item not received",
"NULLIFIED": "All pledges nullified",
"WAITING_CANCEL": "Waiting for seller to respond to proposal to cancel contract and return pledges",
"BEING_CANCELLED": "The contract is being cancelled. Please wait for the pledge to be returned",
"WAITING": "Waiting for response",
"IGNORED": "Seller ignored your contract proposal",
"ACCEPTED": "Seller accepted your contract proposal",
"WAIT": "Waiting for deposits confirmation",
"WAITING_SELLER": "Waiting for delivery",
"COMPLETED": "Contract completed",
"NOT_RECEIVED": "Delivery failed",
"NULLIFIED": "All deposits burned",
"WAITING_CANCEL": "Waiting for contract cancellation",
"BEING_CANCELLED": "Cancellation in progress",
"CANCELLED": "Contract canceled",
"PLEDGES_RETURNED": "Pledges returned",
"IGNORED_CANCEL": "The seller ignored your proposal to cancel the contract",
"EXPIRED": "The contract proposal has expired"
}
@ -387,17 +379,17 @@
"DETAILS": "Additional details",
"SEND_BUTTON": "Send",
"FORM_ERRORS": {
"DESC_REQUIRED": "Description is required.",
"DESC_MAXIMUM": "Maximum field length reached.",
"SELLER_REQUIRED": "Seller is required.",
"SELLER_NOT_VALID": "Seller not valid.",
"ALIAS_NOT_VALID": "Alias not valid.",
"AMOUNT_REQUIRED": "Amount is required.",
"YOUR_DEPOSIT_REQUIRED": "Your deposit is required.",
"YOUR_DEPOSIT_TOO_SMALL": "Your deposit should be equal or greater than amount.",
"SELLER_DEPOSIT_REQUIRED": "Seller deposit is required.",
"SELLER_SAME": "The seller's and buyer's accounts are identical. The seller and buyer must use different wallet for the contract.",
"COMMENT_MAXIMUM": "Maximum field length reached."
"DESC_REQUIRED": "Description required",
"DESC_MAXIMUM": "Maximum field length reached",
"SELLER_REQUIRED": "Address required",
"SELLER_NOT_VALID": "Invalid address",
"ALIAS_NOT_VALID": "Invalid alias",
"AMOUNT_REQUIRED": "Amount required",
"AMOUNT_ZERO": "Amount cannot be zero",
"YOUR_DEPOSIT_REQUIRED": "Deposit required",
"SELLER_DEPOSIT_REQUIRED": "Seller deposit required",
"SELLER_SAME": "Use separate account",
"COMMENT_MAXIMUM": "Maximum field length reached"
},
"PROGRESS_NEW": "New purchase",
"PROGRESS_WAIT": "Awaiting reply",
@ -405,48 +397,46 @@
"PROGRESS_COMPLETE": "Completed",
"FEE": "Fee",
"PAYMENT": "Payment ID",
"ACCEPT_STATE_WAIT_BIG": "You have accepted the contract proposal. Please wait for the deposits to be made",
"IGNORED_ACCEPT": "You have ignored the contract proposal",
"BURN_PROPOSAL": "The deposits have been voided.",
"SUCCESS_FINISH_PROPOSAL": "The contract is complete. The payment has been sent.",
"SEND_CANCEL_PROPOSAL": "Proposal to cancel contract sent to seller",
"IGNORED_CANCEL": "You have ignored the proposal to cancel the contract",
"DEALS_CANCELED_WAIT": "The contract is being cancelled. Please wait for the deposit to be returned",
"WAITING_TIME": "Time until response",
"NEED_MONEY": "There are insufficient funds in the wallet. Add funds to the wallet to continue",
"WAITING_SELLER": "Waiting for seller respond to contract proposal",
"IGNORED_SELLER": "The seller ignored your contract proposal",
"PLEDGE_UNBLOCKED": "Pledge amount unblocked",
"WAITING_SHIP": "Waiting for seller to ship item",
"IGNORED_CANCEL_SELLER": "The seller ignored your proposal to cancel the contract",
"EXPIRED": "The contract proposal has expired",
"WAIT": "Please wait for the pledges to be made",
"COMPLETED": "Contract completed successfully",
"RECEIVED": "Item received, payment transferred, pledges returned",
"NOT_RECEIVED": "Item not received",
"NULLIFIED": "All pledges nullified",
"PROPOSAL_CANCEL_SELLER": "You have made a proposal to cancel the contract",
"BEING_CANCELLED": "The contract is being cancelled. Please wait for the pledge to be returned",
"CANCELLED": "Contract canceled",
"PLEDGES_RETURNED": "Pledges returned",
"WAITING_BUYER": "The buyer is proposing a contract",
"IGNORED_BUYER": "You ignored the contract proposal",
"IGNORED_CANCEL_BUYER": "You ignored the proposal to cancel the contract",
"BUYER_WAIT": "The buyer is waiting for the item to be delivered",
"PLEDGES_MADE": "Pledges made",
"PROPOSAL_CANCEL_BUYER": "The buyer is offering to cancel the contract and return the pledge",
"STATUS_MESSAGES": {
"NEW_PURCHASE": "New purchase",
"WAITING_SELLER": "Waiting for response",
"WAITING_BUYER": "Contract proposal received",
"WAITING_CONFIRMATION": "Waiting for deposits confirmation",
"WAITING_DELIVERY": "Waiting for delivery",
"COMPLETED": "Contract completed",
"IGNORED_BUYER": "Contract proposal ignored",
"IGNORED_SELLER": "The seller ignored your contract proposal",
"PROPOSAL_CANCEL_SELLER": "Cancellation request sent",
"PROPOSAL_CANCEL_BUYER": "Cancellation request received",
"BEING_CANCELLED": "Cancellation in progress",
"IGNORED_CANCEL_SELLER": "The seller ignored your proposal to cancel the contract",
"IGNORED_CANCEL_BUYER": "Contract cancellation proposal ignored",
"CANCELLED": "Contract canceled",
"EXPIRED": "Contract proposal expired",
"NOT_RECEIVED": "Delivery failed",
"NULLIFIED": "All deposits burned"
},
"ACCEPT_STATE_WAIT_BIG": "Contract started",
"IGNORED_ACCEPT": "Contract proposal ignored",
"BURN_PROPOSAL": "Deposits burned",
"SUCCESS_FINISH_PROPOSAL": "Contract completed",
"SEND_CANCEL_PROPOSAL": "Cancellation request sent",
"IGNORED_CANCEL": "Contract cancellation proposal ignored",
"DEALS_CANCELED_WAIT": "Cancellation in progress",
"WAITING_TIME": "Response time",
"NEED_MONEY": "Insufficient funds",
"BUTTON_MAKE_PLEDGE": "Accept and make deposit",
"BUTTON_IGNORE": "Ignore and hide offer",
"BUTTON_NULLIFY": "Terminate and burn deposits",
"BUTTON_RECEIVED": "Complete and release deposits",
"BUTTON_CANCEL_BUYER": "Cancel and return deposits",
"BUTTON_NOT_CANCEL": "Do not cancel (Item shipped)",
"BUTTON_CANCEL_SELLER": "Cancel contract (Return pledge)",
"BUTTON_NOT_CANCEL": "Ignore request",
"BUTTON_CANCEL_SELLER": "Confirm and return deposits",
"HOUR": "hour",
"HOURS": "hours",
"CANCEL": "Cancel",
"NULLIFY_QUESTION": "Are you sure you want to nullify your pledge and the seller's pledge?",
"BUTTON_NULLIFY_SHORT": "Nullify",
"NULLIFY_QUESTION": "Are you sure you want to burn both deposits?",
"BUTTON_NULLIFY_SHORT": "Burn",
"WAITING_TIME_QUESTION": "Are you sure you want to cancel the contract?"
},
"MESSAGES": {
@ -489,7 +479,7 @@
"ERRORS": {
"NO_MONEY": "Not enough money",
"NOT_ENOUGH_MONEY": "Insufficient funds in account",
"CORE_BUSY": "Internal error (core is busy)",
"CORE_BUSY": "Internal error: core is busy",
"DAEMON_BUSY": "Internal error: daemon is busy",
"NO_MONEY_REMOVE_OFFER": "There is no fee for deleting an offer, but in order to protect the network against flood transactions you need to have at least {{fee}} {{currency}} in your wallet",
"NOT_ENOUGH_OUTPUTS_TO_MIX": "Mix-in number is too big for current blockchain state. There are not enough unspent outputs to mix with",

View file

@ -785,7 +785,7 @@ input[type='checkbox'].style-checkbox {
.ng-select {
&.lock-selection-select {
&.custom-select {
width: 100%;
.ng-select-container {
@ -845,6 +845,28 @@ input[type='checkbox'].style-checkbox {
}
}
}
&::-webkit-scrollbar {
background-color: transparent;
cursor: default;
width: 1rem;
height: 1rem;
}
&::-webkit-scrollbar-track {
background: transparent;
}
&::-webkit-scrollbar-thumb {
background-color: #556576;
background-clip: padding-box;
border: 0.25rem solid transparent;
border-radius: 0.5rem;
}
&::-webkit-scrollbar-thumb:hover {
background-color: #556576;
}
}
}
}

View file

@ -283,7 +283,10 @@ namespace nodetool
ADD_HARDCODED_SEED_NODE("207.154.228.141", P2P_DEFAULT_PORT);
#else
//TODO:
//ADD_HARDCODED_SEED_NODE(std::string("0.0.0.0:") + std::to_string(P2P_DEFAULT_PORT));
ADD_HARDCODED_SEED_NODE("95.217.43.225", P2P_DEFAULT_PORT);
ADD_HARDCODED_SEED_NODE("94.130.137.230", P2P_DEFAULT_PORT);
ADD_HARDCODED_SEED_NODE("95.217.42.247", P2P_DEFAULT_PORT);
ADD_HARDCODED_SEED_NODE("94.130.160.115", P2P_DEFAULT_PORT);
#endif
bool res = handle_command_line(vm);

View file

@ -68,7 +68,7 @@ POP_WARNINGS
#include <boost/spirit/home/support/detail/endian/endian.hpp>
#include <boost/spirit/home/support/detail/math/fpclassify.hpp>
#include <boost/thread.hpp>
#include <boost/timer.hpp>
#include <boost/timer/timer.hpp>
#include <boost/type_traits/is_arithmetic.hpp>
#include <boost/type_traits/is_floating_point.hpp>
#include <boost/type_traits/is_integral.hpp>

View file

@ -153,6 +153,11 @@ namespace
return message_writer(color ? epee::log_space::console_color_green : epee::log_space::console_color_default, false, std::string(), LOG_LEVEL_2);
}
message_writer success_msg_writer(epee::log_space::console_colors color)
{
return message_writer(color, true, std::string(), LOG_LEVEL_2);
}
message_writer fail_msg_writer()
{
return message_writer(epee::log_space::console_color_red, true, "Error: ", LOG_LEVEL_0);
@ -1576,6 +1581,12 @@ int main(int argc, char* argv[])
wal.init(daemon_address);
if (command_line::get_arg(vm, arg_generate_new_wallet).size())
return EXIT_FAILURE;
if (command_line::get_arg(vm, arg_do_pos_mining))
{
message_writer(epee::log_space::console_color_magenta, true, "", 4) << "IMORTANT NOTICE! Instance started with \"do-pos-mining\" parameter, running copy of this wallet on other host at the same time may cause key image conflicts";
}
if (!offline_mode)
wal.refresh();
LOG_PRINT_GREEN("Loaded ok", LOG_LEVEL_0);

View file

@ -2,6 +2,6 @@
#define BUILD_COMMIT_ID "@VERSION@"
#define PROJECT_VERSION "1.0"
#define PROJECT_VERSION_BUILD_NO 33
#define PROJECT_VERSION_BUILD_NO 34
#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 "]"

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash -x
# Environment prerequisites:
# 1) QT_PREFIX_PATH should be set to Qt libs folder
@ -9,24 +9,30 @@
# export BOOST_ROOT=/home/user/boost_1_66_0
# export QT_PREFIX_PATH=/home/user/Qt5.10.1/5.10.1/gcc_64
ARCHIVE_NAME_PREFIX=zano-linux-x64-
: "${BOOST_ROOT:?BOOST_ROOT should be set to the root of Boost, ex.: /home/user/boost_1_66_0}"
: "${QT_PREFIX_PATH:?QT_PREFIX_PATH should be set to Qt libs folder, ex.: /home/user/Qt5.10.1/5.10.1/gcc_64}"
prj_root=$(pwd)
git pull
if [ $? -ne 0 ]; then
echo "Failed to pull"
exit $?
if [ -n "$build_prefix" ]; then
ARCHIVE_NAME_PREFIX=${ARCHIVE_NAME_PREFIX}${build_prefix}-
fi
if [ -n "$testnet" ]; then
testnet_def="-D TESTNET=TRUE"
ARCHIVE_NAME_PREFIX=${ARCHIVE_NAME_PREFIX}testnet-
fi
prj_root=$(pwd)
echo "---------------- BUILDING PROJECT ----------------"
echo "--------------------------------------------------"
echo "Building...."
rm -rf build; mkdir -p build/release; cd build/release;
cmake -D STATIC=true -D ARCH=x86-64 -D BUILD_GUI=TRUE -D CMAKE_PREFIX_PATH="$QT_PREFIX_PATH" -D CMAKE_BUILD_TYPE=Release ../..
cmake $testnet_def -D STATIC=true -D ARCH=x86-64 -D BUILD_GUI=TRUE -D CMAKE_PREFIX_PATH="$QT_PREFIX_PATH" -D CMAKE_BUILD_TYPE=Release ../..
if [ $? -ne 0 ]; then
echo "Failed to run cmake"
exit 1
@ -52,7 +58,7 @@ fi
read version_str <<< $(./src/zanod --version | awk '/^Zano / { print $2 }')
read version_str <<< $(./src/zanod --version | awk '/^Zano/ { print $2 }')
version_str=${version_str}
echo $version_str
@ -98,7 +104,7 @@ cp $QT_PREFIX_PATH/plugins/xcbglintegrations/libqxcb-glx-integration.so ./Zano/x
cp -Rv src/zanod src/Zano src/simplewallet src/connectivity_tool ./Zano
package_filename=zano-linux-x64-$version_str.tar.bz2
package_filename=${ARCHIVE_NAME_PREFIX}${version_str}.tar.bz2
rm -f ./$package_filename
tar -cjvf $package_filename Zano

View file

@ -8,9 +8,21 @@ curr_path=${BASH_SOURCE%/*}
: "${ZANO_BUILD_DIR:?variable not set, see also macosx_build_config.command}"
: "${CMAKE_OSX_SYSROOT:?CMAKE_OSX_SYSROOT should be set to macOS SDK path, e.g.: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk}"
ARCHIVE_NAME_PREFIX=zano-macos-x64-
if [ -n "$build_prefix" ]; then
ARCHIVE_NAME_PREFIX=${ARCHIVE_NAME_PREFIX}${build_prefix}-
fi
if [ -n "$testnet" ]; then
testnet_def="-D TESTNET=TRUE"
ARCHIVE_NAME_PREFIX=${ARCHIVE_NAME_PREFIX}testnet-
fi
rm -rf $ZANO_BUILD_DIR; mkdir -p "$ZANO_BUILD_DIR/release"; cd "$ZANO_BUILD_DIR/release"
cmake -D CMAKE_OSX_SYSROOT=$CMAKE_OSX_SYSROOT -D BUILD_GUI=TRUE -D CMAKE_PREFIX_PATH="$ZANO_QT_PATH/clang_64" -D CMAKE_BUILD_TYPE=Release -D BOOST_ROOT="$ZANO_BOOST_ROOT" -D BOOST_LIBRARYDIR="$ZANO_BOOST_LIBS_PATH" ../..
cmake $testnet_def -D CMAKE_OSX_SYSROOT=$CMAKE_OSX_SYSROOT -D BUILD_GUI=TRUE -D CMAKE_PREFIX_PATH="$ZANO_QT_PATH/clang_64" -D CMAKE_BUILD_TYPE=Release -D BOOST_ROOT="$ZANO_BOOST_ROOT" -D BOOST_LIBRARYDIR="$ZANO_BOOST_LIBS_PATH" ../..
if [ $? -ne 0 ]; then
echo "Failed to cmake"
exit 1
@ -87,7 +99,7 @@ if [ $? -ne 0 ]; then
exit 1
fi
read version_str <<< $(DYLD_LIBRARY_PATH=$ZANO_BOOST_LIBS_PATH ./connectivity_tool --version | awk '/^Zano / { print $2 }')
read version_str <<< $(DYLD_LIBRARY_PATH=$ZANO_BOOST_LIBS_PATH ./connectivity_tool --version | awk '/^Zano/ { print $2 }')
version_str=${version_str}
echo $version_str
@ -105,7 +117,7 @@ if [ $? -ne 0 ]; then
exit 1
fi
package_filename="zano-macos-x64-$version_str.dmg"
package_filename=${ARCHIVE_NAME_PREFIX}${version_str}.dmg
source ../../../utils/macosx_dmg_builder.sh
build_fancy_dmg package_folder $package_filename

View file

@ -8,6 +8,15 @@ SET LOCAL_BOOST_LIB_PATH=C:\dev\_sdk\boost_1_68_0\lib64-msvc-14.1
SET MY_PATH=%~dp0
SET SOURCES_PATH=%MY_PATH:~0,-7%
IF NOT [%build_prefix%] == [] (
SET ACHIVE_NAME_PREFIX=%ACHIVE_NAME_PREFIX%%build_prefix%-
)
IF NOT [%testnet%] == [] (
SET TESTNET_DEF=-D TESTNET=TRUE
SET ACHIVE_NAME_PREFIX=%ACHIVE_NAME_PREFIX%testnet-
)
SET PARAM=%~1
IF "%PARAM%"=="--skip-build" ( GOTO skip_build )
@ -39,7 +48,7 @@ IF %ERRORLEVEL% NEQ 0 (
rmdir build /s /q
mkdir build
cd build
cmake -D CMAKE_PREFIX_PATH="%QT_PREFIX_PATH%" -D BUILD_GUI=TRUE -D STATIC=FALSE -G "Visual Studio 15 2017 Win64" -T host=x64 ..
cmake %TESTNET_DEF% -D CMAKE_PREFIX_PATH="%QT_PREFIX_PATH%" -D BUILD_GUI=TRUE -D STATIC=FALSE -G "Visual Studio 15 2017 Win64" -T host=x64 ..
IF %ERRORLEVEL% NEQ 0 (
goto error
)

View file

@ -0,0 +1,13 @@
{
"jsonrpc": "2.0",
"id": "0",
"method": "getblocktemplate",
"params": {
"extra_text": "Some text info about miner",
"wallet_address": "ZxBvJDuQjMG9R2j4WnYUhBYNrwZPwuyXrC7FHdVmWqaESgowDvgfWtiXeNGu8Px9B24pkmjsA39fzSSiEQG1ekB225ZnrMTBp",
"stakeholder_address": "ZxBvJDuQjMG9R2j4WnYUhBYNrwZPwuyXrC7FHdVmWqaESgowDvgfWtiXeNGu8Px9B24pkmjsA39fzSSiEQG1ekB225ZnrMTBp",
"pos_block": false,
"pos_amount": 0,
"pos_index": 0
}
}