Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing 9 changed files with 34 additions and 9 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Changelog
All notable changes to this project will be documented in this file.

## 4.10.31
##### *2020-02-19*

### Added
- Direct redirect to sides when account created `go-to-side=advertiser/publisher` #77

### Fixed
- Email validation on account creation - checking for existing emails before registration attempt
- Hide 'hidden' filters for data export


## 4.10.30
##### *2020-02-19*

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adex-dapp",
"version": "4.10.30",
"version": "4.10.31",
"private": true,
"dependencies": {
"@babel/core": "7.4.3",
3 changes: 3 additions & 0 deletions src/actions/analyticsActions.js
Original file line number Diff line number Diff line change
@@ -72,6 +72,9 @@ function aggrByChannelsSegments({
feeTokens,
withdrawTokens,
}) {
if (!Object.keys(allChannels).length) {
return []
}
// NOTE: No need to sort them again because fillEmptyTime
// is sorting by time after adding the empty time values
const { aggregations, all } = aggr
7 changes: 5 additions & 2 deletions src/actions/uiActions.js
Original file line number Diff line number Diff line change
@@ -254,7 +254,10 @@ export function updateEasterEggsAllowed(search) {
}

export function updatePrivilegesWarningAccepted(accepted) {
return function(dispatch) {
updateUiByIdentity('privilegesWarningAccepted', accepted)(dispatch)
return function(dispatch, getState) {
updateUiByIdentity('privilegesWarningAccepted', accepted)(
dispatch,
getState
)
}
}
6 changes: 5 additions & 1 deletion src/components/dashboard/dashboard/Dashboard.js
Original file line number Diff line number Diff line change
@@ -115,8 +115,12 @@ function Dashboard(props) {
execute(updateSlotsDemandThrottled())
execute(updateNav('side', side))
execute(getAllItems())

// NOTE: await for stats (withBalance.all)
// needed for publisher analytics
await statsLoop.start()
analyticsLoop.start()
statsLoop.start()

//NOTE: await fo campaign analytics first
// because of the campaigns table data update fix
await analyticsCampaignsLoop.start()
6 changes: 4 additions & 2 deletions src/services/smart-contracts/actions/core.js
Original file line number Diff line number Diff line change
@@ -279,14 +279,16 @@ export async function getChannelsWithOutstanding({ identityAddr, wallet }) {
async function getChannelsToSweepFrom({ amountToSweep, withBalance = [] }) {
const { eligible } = withBalance
.sort((c1, c2) => {
return c2.outstandingAvailable.gt(c1.outstandingAvailable)
return bigNumberify(c2.outstandingAvailable).gt(
bigNumberify(c1.outstandingAvailable)
)
})
.reduce(
(data, c) => {
const current = { ...data }
if (current.sum.lt(amountToSweep)) {
current.eligible.push(c)
current.sum = current.sum.add(c.outstandingAvailable)
current.sum = current.sum.add(bigNumberify(c.outstandingAvailable))
}

return current
4 changes: 3 additions & 1 deletion src/services/smart-contracts/actions/stats.js
Original file line number Diff line number Diff line change
@@ -225,7 +225,9 @@ export async function getOutstandingBalance({ withBalance }) {
const { outstanding, outstandingAvailable } = ch
const current = { ...amounts }
current.total = current.total.add(outstanding)
current.available = current.available.add(outstandingAvailable)
current.available = current.available.add(
bigNumberify(outstandingAvailable)
)

return current
}, initial)
2 changes: 1 addition & 1 deletion src/services/store-data/account.js
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ const LOOP_TIMEOUT = 60 * 1000

const accountStatsLoop = new Loop({
timeout: LOOP_TIMEOUT,
syncAction: () => execute(updateAccountStats()),
syncAction: async () => await execute(updateAccountStats()),
loopName: '_ACCOUNTS_STATS',
})

0 comments on commit 00cd4be

Please sign in to comment.