Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jan
kresus
Commits
57cf6c46
Commit
57cf6c46
authored
Aug 05, 2016
by
Benjamin Bouvier
Browse files
Remove easter egg;
parent
1707e7b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
client/store.js
View file @
57cf6c46
...
...
@@ -310,25 +310,6 @@ function operationFromPOD(unknownOperationTypeId) {
return
op
=>
new
Operation
(
op
,
unknownOperationTypeId
);
}
function
normalizeData
(
acc
)
{
var
d
=
new
Date
();
if
(
d
.
getDate
()
===
1
&&
d
.
getMonth
()
===
3
&&
Math
.
random
()
>
0.42
)
{
for
(
let
i
=
0
;
i
<
5
&&
i
<
acc
.
operations
.
length
;
i
++
)
{
let
op
=
acc
.
operations
[
i
];
setTimeout
(()
=>
{
if
(
op
.
amount
<
0
)
{
op
.
amount
=
-
op
.
amount
;
op
.
customLabel
=
`Erreur de la banque en votre faveur :
${
op
.
title
.
length
>
3
?
op
.
title
:
op
.
raw
}
`
;
flux
.
dispatch
({
type
:
Events
.
forward
,
event
:
State
.
operations
});
}
},
Math
.
random
()
*
60
*
1000
);
}
}
}
store
.
setupKresus
=
function
(
cb
)
{
backend
.
init
().
then
(
world
=>
{
...
...
@@ -392,9 +373,6 @@ store.setupKresus = function(cb) {
if
(
defaultAccountId
)
assert
(
data
.
currentAccountId
===
defaultAccountId
);
if
(
data
.
currentAccountId
)
normalizeData
(
store
.
getAccount
(
data
.
currentAccountId
));
has
(
world
,
'
alerts
'
);
data
.
alerts
=
[];
for
(
let
al
of
world
.
alerts
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment