Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
1bd5756
CLIENT-1618: add warning seed
pakrulin Mar 20, 2019
24c9784
CLIENT-1618: fix warning-plate
pakrulin Mar 20, 2019
d844ae2
Merge branch 'dev' of github.com:wavesplatform/WavesGUI into client-1…
pakrulin Mar 20, 2019
807db42
CLIENT-1618: fix margin
pakrulin Mar 20, 2019
d49d49f
CLIENT-1785: change asset info
ekomarovskaya Apr 9, 2019
f5f3743
CLIENT-1385: lock gateways from config
Apr 12, 2019
1f0e778
CLIENT-1385: remove lira
Apr 12, 2019
c4cec85
CLIENT-1385: edit layout
Apr 12, 2019
f19ecca
CLIENT-1785: change asset info
ekomarovskaya Apr 25, 2019
fa29e5a
Merge branch 'dev' of github.com:wavesplatform/WavesGUI into client-1…
ekomarovskaya Apr 25, 2019
3c983f9
Merge branch 'client-1808-transaction-refactoring' into client-1822-h…
Apr 26, 2019
9a2f5a0
CLIENT-1822: hide usd save
Apr 26, 2019
be5aca5
CLIENT-1385: merge dev
Apr 26, 2019
ff07eb2
CLIENT-1822: save
Apr 29, 2019
b45faaa
CLIENT-1822: delele value, price and 24hChange for spam
Apr 29, 2019
8abb7ff
Merge branch 'master' of github.com:wavesplatform/WavesGUI into clien…
pakrulin Apr 29, 2019
f2a9222
CLIENT-1822: save
Apr 29, 2019
46f5236
CLIENT-1822: delete usd value from transaction transfer and mass-tran…
Apr 29, 2019
9caf4c8
Merge branch 'dev' of github.com:wavesplatform/WavesGUI into client-1…
pakrulin Apr 29, 2019
9f435a4
CLIENT-1618: fix border
pakrulin Apr 29, 2019
31fbe44
CLIENT-1385: replace names of assets to ids in config
Apr 29, 2019
5253860
CLIENT-1385: check connection exist
Apr 29, 2019
3e5a158
Merge branch 'dev' into client-1385-coinomat-access-in-config
Apr 29, 2019
ed5bb20
CLIENT-1822: bad fix
Apr 29, 2019
ee39432
CLIENT-1810: set default checkbox value true
Apr 30, 2019
2af0ca6
CLIENT-1810: add dontShowSpam flag
May 6, 2019
74baf16
CLIENT-1810: delete spam from transaction list
May 6, 2019
3c4c88a
CLIENT-1810: disable spam view in portfolio
May 6, 2019
328d4a8
CLIENT-1810: save
May 6, 2019
541f899
CLIENT-1810: fix help icon content
May 6, 2019
7936e52
CLIENT-1810: add scamListUrl observe
May 7, 2019
7a02892
CLIENT-1842: add-class-active-button
ekomarovskaya May 7, 2019
e3e3bb4
CLIENT-1810: save
May 7, 2019
31033d5
CLIENT-1810: merge CLIENT-1808
May 7, 2019
635e254
CLIENT-1810: transaction observe user scam
May 7, 2019
d031ea5
CLIENT-1810: save
May 7, 2019
d4f962a
CLIENT-1842: added logic to scroll to spread btn
May 7, 2019
21b8425
CLIENT-1810: add updating scam in balance
May 8, 2019
916da97
CLIENT-1810: add TODO
May 13, 2019
6a698a4
Merge branch 'dev' into client-1810-delete-spam
OlyaKanishcheva May 13, 2019
f1f784d
CLIENT-1810: refactoring setScam
May 13, 2019
fe68358
CLIENT-1810: save
May 13, 2019
64d4ff7
CLIENT-1851: align price with zeros
May 14, 2019
ad10765
CLIENT-1851: revert and add color
May 14, 2019
a45a5f9
Merge branch 'dev' of github.com:wavesplatform/WavesGUI into client-1…
tsigel May 14, 2019
92831de
Merge branch 'dev' of github.com:wavesplatform/WavesGUI into client-1…
tsigel May 14, 2019
3dc72b2
CLIENT-1822: fix transaction
tsigel May 15, 2019
24514f8
CLIENT-1497: fix
May 15, 2019
e46def2
CLIENT-1497: remove useless interface
May 16, 2019
5dc106e
Merge pull request #1315 from wavesplatform/client-1860-release-1.2.7
vba2000 May 17, 2019
faae4a5
CLIENT-1861: fix assetHash for script invocation
May 20, 2019
b6618f9
Merge pull request #1317 from wavesplatform/client-1861-fix-parse-scr…
GIvanovWaves May 21, 2019
0224955
CLIENT-1385: fix connection lack
May 21, 2019
0d1093e
CLIENT-1385: refactor connection
May 21, 2019
fe82424
CLIENT-1385: remove whitespace
May 21, 2019
bf3ca98
CLIENT-1385: rename cookie
May 21, 2019
7f37b4a
CLIENT-1536: save
May 21, 2019
b34d157
Merge pull request #1301 from wavesplatform/client-1822-hide-usd-value
Jahsus May 21, 2019
2c1238a
Merge pull request #1307 from wavesplatform/client-1851-dex-fix-trimm…
Jahsus May 21, 2019
0d927a5
Merge pull request #1306 from wavesplatform/client-1842-add-class-act…
Jahsus May 21, 2019
c664986
Merge pull request #1226 from wavesplatform/client-1618-add-warning-s…
Jahsus May 21, 2019
51f214a
Merge pull request #1312 from wavesplatform/client-1497-fix-data-tran…
GIvanovWaves May 22, 2019
a92bb89
Merge pull request #1268 from wavesplatform/client-1385-coinomat-acce…
Jahsus May 22, 2019
7e04232
Merge pull request #1319 from wavesplatform/client-1536-cherry-pick
Jahsus May 22, 2019
784e1e3
CLIENT-1810: fix csv export with scam
May 22, 2019
e7486a5
Merge branch 'dev' into client-1810-delete-spam
OlyaKanishcheva May 22, 2019
467f11a
Merge branch 'dev' into client-1810-delete-spam
May 22, 2019
be21b76
Merge branch 'client-1810-delete-spam' of github.com:wavesplatform/Wa…
May 22, 2019
983a5d6
CLIENT-1785: merge conflict
ekomarovskaya May 22, 2019
cb56c30
CLIENT-1810: delete s
May 22, 2019
bb950fe
Merge pull request #1303 from wavesplatform/client-1810-delete-spam
Jahsus May 22, 2019
b2e5ac9
Merge pull request #1257 from wavesplatform/client-1785-change-asset-…
Jahsus May 23, 2019
45840df
CLIENT-1874: update version and whatsnew
Jahsus May 23, 2019
06a26eb
CLIENT-1874: Fixed release version in whats new
GIvanovWaves May 23, 2019
d18b18f
Merge pull request #1320 from wavesplatform/client-1874-release-1.2.8
GIvanovWaves May 23, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data-service/api/transactions/interface.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ export type TDataEntry = TDataEntryInteger | TDataEntryBoolean | TDataEntryBinar
export interface TDataEntryInteger {
type: 'integer';
key: string;
value: number;
value: number | BigNumber;
}

export interface TDataEntryBoolean {
Expand Down
20 changes: 17 additions & 3 deletions data-service/api/transactions/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { factory, IFactory } from '../matcher/getOrders';
import { getSignatureApi } from '../../sign';
import { pipe } from 'ramda';

const SCRIPT_INVOCATION_NUMBER = 16;

const parseAttachment: (data: string | number) => Uint8Array = pipe(
String,
Expand Down Expand Up @@ -101,7 +102,7 @@ export function parseTx(transactions: Array<T_API_TX>, isUTX: boolean, isTokens?
return parseScriptTx(transaction, hash, isUTX);
case TRANSACTION_TYPE_NUMBER.SET_ASSET_SCRIPT:
return parseAssetScript(transaction, hash, isUTX);
case 16:
case SCRIPT_INVOCATION_NUMBER:
return parseInvocationTx(transaction, hash, isUTX);
default:
return transaction;
Expand All @@ -127,6 +128,11 @@ export function getAssetsHashFromTx(transaction: T_API_TX, hash = Object.create(
hash[normalizeAssetId(transaction.order1.assetPair.amountAsset)] = true;
hash[normalizeAssetId(transaction.order1.assetPair.priceAsset)] = true;
break;
case SCRIPT_INVOCATION_NUMBER:
transaction.payment.forEach(payment => {
hash[normalizeAssetId(payment.assetId)] = true;
});
break;
}
return hash;
}
Expand Down Expand Up @@ -264,8 +270,16 @@ export function parseExchangeOrder(factory: IFactory, order: txApi.IExchangeOrde

export function parseDataTx(tx: txApi.IData, assetsHash: IHash<Asset>, isUTX: boolean): IData {
const fee = new Money(tx.fee, assetsHash[WAVES_ID]);
const stringifiedData = JSON.stringify(tx.data, null, 4);
return { ...tx, stringifiedData, fee, isUTX };
const data = tx.data.map((dataItem) => {
if (dataItem.type === 'integer') {
return { ...dataItem, value: new BigNumber(dataItem.value) };
} else {
return dataItem;
}
});
const txWithBigNumber = { ...tx, data };
const stringifiedData = JSON.stringify(txWithBigNumber.data, null, 4);
return { ...txWithBigNumber, stringifiedData, fee, isUTX };
}

export function parseInvocationTx(tx: txApi.IScriptInvocation, assetsHash: IHash<Asset>, isUTX: boolean): IScriptInvocation {
Expand Down
18 changes: 10 additions & 8 deletions mocks/waves-client-config/master/config.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
{
"PERMISSIONS": {
"CAN_TRANSFER_COINOMAT": [
"BTC",
"ETH",
"LTC",
"ZEC",
"BCH",
"DASH",
"XMR"
"8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS",
"474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu",
"HZk1mbfuJpmxU1Fs4AX5MWLVYtctsNcg6e2C6VKqK8zk",
"BrjUWjndUanm5VsJkbUip8VRYy6LWJePtxya3FNv4TQa",
"zMFqXuoyrn5w17PFurTqxB7GsS71fp9dfk6XFwxbPCy",
"B3uGHFRpSUuGEDWjqB9LWWxafQj8VTvpMucEyoxzws5H",
"5WvPKSJXzVE2orvbkJ8wsQmmQKqTv9sGBPksV4adViw3",
"Ft8X1v1LTa1ABafufpaCWyVj8KkaxUWE6xBhW6sNFJck",
"Gtb1WRznfchDnTh37ezoDTJ4wcoKaRsKqKjJjy7nm2zU"
],
"CAN_TRANSFER_TRANSACTION": true,
"CAN_SET_ASSET_SCRIPT_TRANSACTION": true,
Expand Down Expand Up @@ -57,5 +59,5 @@
]
}
},
"SERVICE_TEMPORARILY_UNAVAILABLE": true
"SERVICE_TEMPORARILY_UNAVAILABLE": false
}
53 changes: 53 additions & 0 deletions mocks/waves-client-config/master/testnet.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"PERMISSIONS": {
"CAN_TRANSFER_COINOMAT": [
"DWgwcZTMhSvnyYCoWLRUXXSH1RSkzThXLJhww9gwkqdn",
"BrmjyAWT5jjr3Wpsiyivyvg5vDuzoX2s93WgiexXetB3",
"BNdAstuFogzSyN2rY3beJbnBYwYcu7RzTHFjW88g8roK",
"CFg2KQfkUgUVM2jFCMC5Xh8T8zrebvPc4HjHPfAugU1S",
"8HT8tXwrXAYqwm8XrZ2hywWWTUAXxobHB5DakVC1y6jn",
"DGgBtwVoXKAKKvV2ayUpSoPzTJxt7jo9KiXMJRzTH2ET",
"8oPbSCKFHkXBy1hCGSg9pJkSARE7zhTQTLpc8KZwdtr7",
"D6N2rAqWN6ZCWnCeNFWLGqqjS6nJLeK4m19XiuhdDenr",
"AsuWyM9MUUsMmWkK7jS48L3ky6gA1pxx7QtEYPbfLjAJ"
],
"CAN_TRANSFER_TRANSACTION": true,
"CAN_SET_ASSET_SCRIPT_TRANSACTION": true,
"CAN_MASS_TRANSFER_TRANSACTION": true,
"CAN_CREATE_ALIAS_TRANSACTION": true,
"CAN_ISSUE_TRANSACTION": true,
"CAN_REISSUE_TRANSACTION": true,
"CAN_SET_SCRIPT_TRANSACTION": true,
"CAN_LEASE_TRANSACTION": true,
"CAN_CANCEL_LEASE_TRANSACTION": true,
"CAN_BURN_TRANSACTION": true,
"CAN_SPONSORSHIP_TRANSACTION": true,
"CAN_DATA_TRANSACTION": true,
"CAN_CREATE_ORDER": true,
"CAN_CANCEL_ORDER": true,
"CAN_PAIRING_WITH_MOBILE": true,
"CAN_ANY_TRANSACTION": true
},
"NOTIFICATIONS": [],
"SETTINGS": {
"DEX": {
"WATCH_LIST_PAIRS": [
"WAVES",
"AsuWyM9MUUsMmWkK7jS48L3ky6gA1pxx7QtEYPbfLjAJ",
"D6N2rAqWN6ZCWnCeNFWLGqqjS6nJLeK4m19XiuhdDenr",
"DWgwcZTMhSvnyYCoWLRUXXSH1RSkzThXLJhww9gwkqdn",
"BrmjyAWT5jjr3Wpsiyivyvg5vDuzoX2s93WgiexXetB3",
"BNdAstuFogzSyN2rY3beJbnBYwYcu7RzTHFjW88g8roK",
"CFg2KQfkUgUVM2jFCMC5Xh8T8zrebvPc4HjHPfAugU1S",
"8HT8tXwrXAYqwm8XrZ2hywWWTUAXxobHB5DakVC1y6jn",
"7itsmgdmomeTXvZzaaxqF3346h4FhciRoWceEw9asNV3",
"DGgBtwVoXKAKKvV2ayUpSoPzTJxt7jo9KiXMJRzTH2ET",
"FvKx3cerSVYGfXKFvUgp7koNuTAcLs8DmtmwRrFVCqJv",
"3P8gkhcLhFQvBkDzMnWeqqwvq3qxkpTNQPs4LUQ95tKD",
"8oPbSCKFHkXBy1hCGSg9pJkSARE7zhTQTLpc8KZwdtr7",
"6KSUNALdYEd1EVTE4dTcSHzNw1dA3Q6ieokSRVuEcALV"
]
}
},
"SERVICE_TEMPORARILY_UNAVAILABLE": false
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "waves-client",
"version": "1.2.7",
"version": "1.2.8",
"description": "The official client application for the Waves platform",
"private": true,
"repository": {
Expand Down
15 changes: 11 additions & 4 deletions server.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createSecureServer } from 'http2';
import { createServer } from 'https';
import { route, parseArguments, stat, loadLocales } from './ts-scripts/utils';
import { readFileSync, existsSync,mkdirSync } from 'fs';
import { readFileSync, existsSync, mkdirSync } from 'fs';
import { serialize, parse as parserCookie } from 'cookie';
import { compile } from 'handlebars';
import { parse } from 'url';
Expand Down Expand Up @@ -73,7 +73,7 @@ function createMyServer(port) {
console.log('Available urls:');
console.log(url);
const cachePath = join(process.cwd(), '.cache-download');
if (!existsSync(cachePath)){
if (!existsSync(cachePath)) {
mkdirSync(cachePath);
}
loadLocales(cachePath);
Expand Down Expand Up @@ -141,13 +141,20 @@ function request(req, res) {
}

function wavesClientConfig(req, res, next) {
if (!req.url.includes('waves-client-config')) {
const parsedCookie = parseCookie(req.headers.cookie);
const connection: string | null = parsedCookie ? parsedCookie.connection : null;

if (!req.url.includes('waves-client-config') || !connection) {
next();
return null;
}
let response_json = { error: 'oops' };

const path = join(__dirname, 'mocks/waves-client-config/master/config.json');
const path = join(
__dirname,
`mocks/waves-client-config/master/${connection === 'mainnet' ? '' : 'testnet.'}config.json`
);

if (fs.existsSync(path)) {
response_json = JSON.parse(fs.readFileSync(path, 'utf8')) || '';
}
Expand Down
3 changes: 3 additions & 0 deletions src/img/icons/orderbook-to-spread-active.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/modules/app/less/app-icons.less
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,13 @@
background-position: center center;
}

.icon-dex-tospread-active {
display: inline-block;
background-repeat: no-repeat;
background-position: center center;
background-image: @orderbook-to-spread-icon-active;
}

.apple-store-btn,
.google-play-btn {
width: 135px;
Expand Down
1 change: 1 addition & 0 deletions src/modules/app/services/DefaultSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
lastOpenVersion: '',
whatsNewList: [],
closedNotification: [],
dontShowSpam: true,
withScam: false,
scamListUrl: WavesApp.network.scamListUrl,
logoutAfterMin: 5,
Expand Down
19 changes: 18 additions & 1 deletion src/modules/app/services/User.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
(function () {
'use strict';

const { equals } = require('ramda');

/* global
Mousetrap
*/
Expand All @@ -11,6 +13,7 @@
'extraFee',
'networkError',
'changeScript',
'setScamSignal',
'scam'
];

Expand Down Expand Up @@ -104,6 +107,10 @@
* @type {Signal<void>}
*/
changeScript = new tsUtils.Signal();
/**
* @type {Signal<void>}
*/
setScamSignal = new tsUtils.Signal();
/**
* @type {Record<string, boolean>}
*/
Expand Down Expand Up @@ -174,7 +181,16 @@
setTimeout(() => {
this._scriptInfoPoll = new Poll(() => this.updateScriptAccountData(), () => null, 10000);
}, 30000);

});

}

setScam(hash) {
if (!equals(hash, this.scam)) {
this.scam = hash;
this.setScamSignal.dispatch();
}
}

/**
Expand Down Expand Up @@ -341,7 +357,8 @@
hasBackup,
lng: i18next.language,
theme: themes.getDefaultTheme(),
candle: 'blue'
candle: 'blue',
dontShowSpam: true
}
}).then(() => {
if (restore) {
Expand Down
19 changes: 9 additions & 10 deletions src/modules/app/services/waves/node/content/Assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
'use strict';

const entities = require('@waves/data-entities');
const { equals } = require('ramda');

/**
* @param {BaseNodeComponent} BaseNodeComponent
Expand All @@ -21,9 +20,10 @@
constructor() {
super();
user.onLogin().then(() => {

if (!user.getSetting('withScam')) {
if (user.getSetting('scamListUrl')) {
this.stopScam();
} else {
this.giveMyScamBack();
}
});
}
Expand Down Expand Up @@ -133,9 +133,9 @@
}

stopScam() {
if (this._pollScam) {
return null;
}
// if (this._pollScam) {
// return null;
// }
/**
* @type {Poll}
* @private
Expand All @@ -158,17 +158,16 @@
}
});
return hash;
});
})
.catch(() => Object.create(null));
}

/**
* @param hash
* @private
*/
_setScamAssetList(hash) {
if (!equals(hash, user.scam)) {
user.scam = hash;
}
user.setScam(hash);
}

/**
Expand Down
3 changes: 2 additions & 1 deletion src/modules/dex/directives/dexBlock/DexBlock.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@
block: '@',
hasSearch: '@',
canCollapse: '@',
analyticsText: '<'
analyticsText: '<',
isActiveScroll: '<'
},
templateUrl: 'modules/dex/directives/dexBlock/dexBlock.html',
transclude: true,
Expand Down
6 changes: 5 additions & 1 deletion src/modules/dex/directives/dexBlock/dexBlock.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@
<div ng-if="$ctrl.canCollapse"
ng-click="$ctrl.toggleCollapse()"
class="dex-block-top-btn"><i class="collapse"></i></div>
<div ng-click="$ctrl.scrollToSpread()" class="dex-block-top-btn"><i class="tospread"></i></div>
<div ng-click="$ctrl.scrollToSpread()"
ng-class="{'active': $ctrl.isActiveScroll}"
class="dex-block-top-btn">
<i class="tospread"></i>
</div>
</div>
<div ng-if="!$ctrl.collapsed" class="dex-block-content" ng-transclude></div>
</div>
8 changes: 8 additions & 0 deletions src/modules/dex/directives/dexBlock/dexBlock.less
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ w-dex-block {
i.tospread:hover {
background-color: @color-basic-100;
}

&.active {
cursor: default;
i.tospread {
background: @color-submit-400;
.icon-dex-tospread-active();
}
}
}

.dex-block-content {
Expand Down
13 changes: 13 additions & 0 deletions src/modules/dex/directives/orderBook/OrderBook.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@
* @private
*/
this._dom = null;
/**
* @type {boolean}
* @public
*/
this.isScrolled = false;

this.receive(dexDataService.showSpread, () => {
this._dom.$box.stop().animate({ scrollTop: this._getSpreadScrollPosition() }, 300);
Expand Down Expand Up @@ -176,6 +181,11 @@
$lastPrice: { get: () => this._dom.$info.find(SECTIONS.LAST_PRICE) },
$spread: { get: () => this._dom.$info.find(SECTIONS.SPREAD) }
});
this._dom.$box.on('scroll', () => {
const scrollPos = this._dom.$box[0].scrollTop;
const spreadPos = this._getSpreadScrollPosition();
this.isScrolled = Math.abs(scrollPos - spreadPos) >= 2;
});
}

nothingFound() {
Expand Down Expand Up @@ -470,6 +480,9 @@

angular.module('app.dex').component('wDexOrderBook', {
templateUrl: 'modules/dex/directives/orderBook/orderBook.html',
bindings: {
isScrolled: '='
},
controller
});
})();
Expand Down
Loading