Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
svk31 committed Aug 8, 2018
2 parents 8106892 + a686562 commit 14fba41
Show file tree
Hide file tree
Showing 179 changed files with 25,858 additions and 26,066 deletions.
90 changes: 90 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,93 @@
---------------------------------------------------------------------
Release 2.0.180808
---------------------------------------------------------------------
New features
--------
- #1740: Add pagination to several tables
- #1576: Add target collateral ratio to orderbook calculations
- #1131: Add feed price publishing to Asset page
- #1629: Move burn asset to portfolio, fee claiming to Asset page
- #1596: Add new asset_update_issuer operation
- #1598: Add fee pool claim and cleanup Asset page
- #1550: Make preferred units depend on the network (main/testnet)
- #1521, #1672, #1462: Better Node Management
- #1575: Adding UI for Target CR on Modal
- #1701: Implement an advanced ping strategy

Bug fixes and improvements
--------
- #1521: Add more nodes and improve latency check
- Fix #1760 and AccountStoreBug (#1765)
- Fix #1752: Account with no balances crashes the GUI
- Fix #1748: Disable release notifications in RC builds
- Fix #1745: are_equal_shallow bug
- Fix #1737: Make sure groupedOrder selection is used when switching chart timeframes
- #1521: More node updates
- Fix a bug causing infinite loading in Assets search page
- Fix #1744: Make sure BindToChainState compares null values correctly
- #1521: Update API node details
- #1131: Use ratio instead of percent for mcr and mssr
- #1596: Move Asset fee claiming to Asset page actions tab
- #1706: Update scam accounts list
- Fix #1723: Clean up proxy input field, add tooltips
- #1712: Add OPEN.EOSDAC asset to default lists
- #1712: Improve find market search results
- Fix #1727: Target CR Delimiter
- Fix #1628: Add checker for inputs on withdrawal
- Fix #1688 - Add Trading link to margin table
- Fix #1667 - Dashboard Column Reordering
- Fix #1704: Theme Issues on Asset Explorer
- #1575: Fixes for Target CR
- #1672: Remove API nodes without support for orders API
- Update russian translations (#1709)

---------------------------------------------------------------------
Release 2.0.180808-rc2
---------------------------------------------------------------------
Bug fixes and improvements
--------
- Fix #1752: Account with no balances crashes the GUI
- Fix #1748: Disable release notifications in RC builds
- Fix #1745: are_equal_shallow bug
- Fix #1737: Make sure groupedOrder selection is used when switching chart timeframes

---------------------------------------------------------------------
Release 2.0.180808-rc1
---------------------------------------------------------------------
New features
--------
- #1740: Add pagination to several tables
- #1576: Add target collateral ratio to orderbook calculations
- #1131: Add feed price publishing to Asset page
- #1629: Move burn asset to portfolio, fee claiming to Asset page
- #1596: Add new asset_update_issuer operation
- #1598: Add fee pool claim and cleanup Asset page
- #1550: Make preferred units depend on the network (main/testnet)
- #1521, #1672, #1462: Better Node Management
- #1575: Adding UI for Target CR on Modal
- #1701: Implement an advanced ping strategy

Bug fixes and improvements
--------
- #1521: More node updates
- Fix a bug causing infinite loading in Assets search page
- Fix #1744: Make sure BindToChainState compares null values correctly
- #1521: Update API node details
- #1131: Use ratio instead of percent for mcr and mssr
- #1596: Move Asset fee claiming to Asset page actions tab
- #1706: Update scam accounts list
- Fix #1723: Clean up proxy input field, add tooltips
- #1712: Add OPEN.EOSDAC asset to default lists
- #1712: Improve find market search results
- Fix #1727: Target CR Delimiter
- Fix #1628: Add checker for inputs on withdrawal
- Fix #1688 - Add Trading link to margin table
- Fix #1667 - Dashboard Column Reordering
- Fix #1704: Theme Issues on Asset Explorer
- #1575: Fixes for Target CR
- #1672: Remove API nodes without support for orders API
- Update russian translations (#1709)

---------------------------------------------------------------------
Release 2.0.180720
---------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion app/App.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import {ChainStore} from "bitsharesjs/es";
import {ChainStore} from "bitsharesjs";
import AccountStore from "stores/AccountStore";
import NotificationStore from "stores/NotificationStore";
import {withRouter} from "react-router-dom";
Expand Down
70 changes: 47 additions & 23 deletions app/AppInit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {IntlProvider} from "react-intl";
import willTransitionTo from "./routerTransition";
import LoadingIndicator from "./components/LoadingIndicator";
import InitError from "./components/InitError";
import SyncError from "./components/SyncError";
import counterpart from "counterpart";

/*
Expand Down Expand Up @@ -47,23 +48,31 @@ class AppInit extends React.Component {

this.state = {
apiConnected: false,
apiError: false
apiError: false,
syncError: null,
status: ""
};
}

componentWillMount() {
willTransitionTo()
willTransitionTo(true, this._statusCallback.bind(this))
.then(() => {
this.setState({
apiConnected: true,
apiError: false
apiError: false,
syncError: null
});
})
.catch(err => {
console.log("willTransitionTo err:", err);
this.setState({
apiConnected: false,
apiError: true
apiError: true,
syncError: !err
? null
: (err && err.message).indexOf(
"ChainStore sync error"
) !== -1
});
});
}
Expand All @@ -82,9 +91,13 @@ class AppInit extends React.Component {
}
}

_statusCallback(status) {
this.setState({status});
}

render() {
const {theme, apiServer} = this.props;
const {apiConnected, apiError} = this.state;
const {apiConnected, apiError, syncError, status} = this.state;

if (!apiConnected) {
let server = apiServer;
Expand All @@ -100,11 +113,16 @@ class AppInit extends React.Component {
<div className="grid-frame vertical">
{!apiError ? (
<LoadingIndicator
loadingText={counterpart.translate(
"app_init.connecting",
{server: server}
)}
loadingText={
status ||
counterpart.translate(
"app_init.connecting",
{server: server}
)
}
/>
) : syncError ? (
<SyncError />
) : (
<InitError />
)}
Expand All @@ -117,20 +135,26 @@ class AppInit extends React.Component {
}
}

AppInit = connect(AppInit, {
listenTo() {
return [IntlStore, WalletManagerStore, SettingsStore];
},
getProps() {
return {
locale: IntlStore.getState().currentLocale,
walletMode:
!SettingsStore.getState().settings.get("passwordLogin") ||
!!WalletManagerStore.getState().current_wallet,
theme: SettingsStore.getState().settings.get("themes"),
apiServer: SettingsStore.getState().settings.get("activeNode", "")
};
AppInit = connect(
AppInit,
{
listenTo() {
return [IntlStore, WalletManagerStore, SettingsStore];
},
getProps() {
return {
locale: IntlStore.getState().currentLocale,
walletMode:
!SettingsStore.getState().settings.get("passwordLogin") ||
!!WalletManagerStore.getState().current_wallet,
theme: SettingsStore.getState().settings.get("themes"),
apiServer: SettingsStore.getState().settings.get(
"activeNode",
""
)
};
}
}
});
);
AppInit = supplyFluxContext(alt)(AppInit);
export default hot(module)(AppInit);
122 changes: 99 additions & 23 deletions app/actions/AssetActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,40 @@ import {Apis} from "bitsharesjs-ws";
import utils from "common/utils";
import WalletApi from "api/WalletApi";
import WalletDb from "stores/WalletDb";
import {ChainStore} from "bitsharesjs/es";
import {ChainStore} from "bitsharesjs";
import big from "bignumber.js";

import {gatewayPrefixes} from "common/gateways";
let inProgress = {};

class AssetActions {
publishFeed({publisher, asset_id, mcr, mssr, settlementPrice, cer}) {
let tr = WalletApi.new_transaction();
tr.add_type_operation("asset_publish_feed", {
publisher,
asset_id,
feed: {
settlement_price: settlementPrice.toObject(),
maintenance_collateral_ratio: mcr,
maximum_short_squeeze_ratio: mssr,
core_exchange_rate: cer.toObject()
}
});

return dispatch => {
return WalletDb.process_transaction(tr, null, true)
.then(() => {
dispatch(true);
})
.catch(error => {
console.log(
"[AssetActions.js:150] ----- fundPool error ----->",
error
);
dispatch(false);
});
};
}

fundPool(account_id, core, asset, amount) {
let tr = WalletApi.new_transaction();
let precision = utils.get_asset_precision(core.get("precision"));
Expand Down Expand Up @@ -37,6 +65,58 @@ class AssetActions {
};
}

claimPool(asset, amount) {
let tr = WalletApi.new_transaction();
tr.add_type_operation("asset_claim_pool", {
fee: {
amount: 0,
asset_id: "1.3.0"
},
issuer: asset.get("issuer"),
asset_id: asset.get("id"),
amount_to_claim: amount.toObject()
});
return dispatch => {
return WalletDb.process_transaction(tr, null, true)
.then(() => {
dispatch(true);
})
.catch(error => {
console.log(
"[AssetActions.js:150] ----- claimPool error ----->",
error
);
dispatch(false);
});
};
}

updateOwner(asset, new_issuer_id) {
let tr = WalletApi.new_transaction();
tr.add_type_operation("asset_update_issuer", {
fee: {
amount: 0,
asset_id: "1.3.0"
},
issuer: asset.issuer,
asset_to_update: asset.id,
new_issuer: new_issuer_id
});
return dispatch => {
return WalletDb.process_transaction(tr, null, true)
.then(() => {
dispatch(true);
})
.catch(error => {
console.log(
"[AssetActions.js:150] ----- updateOwner error ----->",
error
);
dispatch(false);
});
};
}

updateFeedProducers(account, asset, producers) {
let tr = WalletApi.new_transaction();
tr.add_type_operation("asset_update_feed_producers", {
Expand Down Expand Up @@ -66,7 +146,6 @@ class AssetActions {

claimPoolFees(account_id, asset, amount) {
let tr = WalletApi.new_transaction();
let precision = utils.get_asset_precision(asset.get("precision"));

tr.add_type_operation("asset_claim_fees", {
fee: {
Expand All @@ -76,12 +155,12 @@ class AssetActions {
issuer: account_id,
amount_to_claim: {
asset_id: asset.get("id"),
amount: amount * precision
amount: amount.getAmount()
}
});
return dispatch => {
return WalletDb.process_transaction(tr, null, true)
.then(result => {
.then(() => {
dispatch(true);
})
.catch(error => {
Expand Down Expand Up @@ -414,13 +493,6 @@ class AssetActions {

// Fetch next 10 assets for each gateAsset on request
if (includeGateways) {
let gatewayPrefixes = [
"BRIDGE",
"GDEX",
"RUDEX",
"OPEN",
"WIN"
];
gatewayPrefixes.forEach(a => {
this.getAssetList(a + "." + start, 10);
});
Expand Down Expand Up @@ -471,17 +543,21 @@ class AssetActions {
payer,
extensions: []
});
return WalletDb.process_transaction(tr, null, true)
.then(result => {
return true;
})
.catch(error => {
console.log(
"[AssetActions.js:150] ----- reserveAsset error ----->",
error
);
return false;
});
return dispatch => {
return WalletDb.process_transaction(tr, null, true)
.then(() => {
dispatch(true);
return true;
})
.catch(error => {
dispatch(false);
console.log(
"[AssetActions.js:150] ----- reserveAsset error ----->",
error
);
return false;
});
};
}
}

Expand Down
Loading

0 comments on commit 14fba41

Please sign in to comment.