25417 lines
830 KiB
JavaScript
25417 lines
830 KiB
JavaScript
(window.webpackJsonp = window.webpackJsonp || []).push([
|
|
[0], {
|
|
253: function(e, t, a) {
|
|
e.exports = a.p + "static/media/selectIcon.14afd494.svg"
|
|
},
|
|
319: function(e, t, a) {
|
|
e.exports = a(547)
|
|
},
|
|
364: function(e, t, a) {
|
|
e.exports = a.p + "static/media/logoSmall.b750c2ad.svg"
|
|
},
|
|
542: function(e, t, a) {
|
|
e.exports = a.p + "static/media/background.1b64ec82.svg"
|
|
},
|
|
547: function(e, t, a) {
|
|
"use strict";
|
|
a.r(t);
|
|
var n = a(45),
|
|
r = a(0),
|
|
i = a(28),
|
|
o = a(14),
|
|
s = a(34),
|
|
c = a(51),
|
|
l = a(100),
|
|
u = (a(330), a(331), a(6)),
|
|
d = a(7),
|
|
p = a(9),
|
|
h = a(8),
|
|
g = a(272),
|
|
m = a(629),
|
|
f = a(39),
|
|
b = a(3),
|
|
y = {
|
|
applogicUrl: "",
|
|
authUrl: "",
|
|
peatioUrl: "",
|
|
finexUrl: "",
|
|
msAlertDisplayTime: "5000",
|
|
tablePageLimit: 100,
|
|
minutesUntilAutoLogout: "5",
|
|
finex: !1,
|
|
captcha: {
|
|
captchaType: "none",
|
|
siteKey: ""
|
|
},
|
|
labelSwitcher: [{
|
|
name: "email",
|
|
label: [{
|
|
email: "verified"
|
|
}]
|
|
}, {
|
|
name: "phone",
|
|
label: [{
|
|
phone: "verified"
|
|
}]
|
|
}, {
|
|
name: "profile",
|
|
label: [{
|
|
profile: "verified"
|
|
}]
|
|
}, {
|
|
name: "document",
|
|
label: [{
|
|
document: "verified"
|
|
}]
|
|
}],
|
|
plugins: [],
|
|
roleTypes: [{
|
|
value: "Admin",
|
|
key: "admin"
|
|
}, {
|
|
value: "Member",
|
|
key: "member"
|
|
}, {
|
|
value: "Super Admin",
|
|
key: "superadmin"
|
|
}, {
|
|
value: "Accountant",
|
|
key: "accountant"
|
|
}, {
|
|
value: "Compliance",
|
|
key: "compliance"
|
|
}, {
|
|
value: "Technical",
|
|
key: "technical"
|
|
}, {
|
|
value: "Support",
|
|
key: "support"
|
|
}, {
|
|
value: "Trader",
|
|
key: "trader"
|
|
}, {
|
|
value: "Broker",
|
|
key: "broker"
|
|
}],
|
|
withCredentials: !1
|
|
},
|
|
v = {
|
|
config: y
|
|
};
|
|
window.env = window.env || y, v.config = Object(b.a)({}, window.env);
|
|
var w = function(e) {
|
|
return window.console.log("Config for ".concat(e, " is missing")), ""
|
|
},
|
|
E = function() {
|
|
return v.config.peatioUrl || w("peatioUrl")
|
|
},
|
|
C = function() {
|
|
return v.config.msAlertDisplayTime || y.msAlertDisplayTime
|
|
},
|
|
O = function() {
|
|
return v.config.tablePageLimit || y.tablePageLimit
|
|
},
|
|
k = function() {
|
|
return v.config.minutesUntilAutoLogout || y.minutesUntilAutoLogout
|
|
},
|
|
x = function() {
|
|
return v.config.finex || !1
|
|
},
|
|
j = function() {
|
|
return v.config.labelSwitcher || y.labelSwitcher
|
|
},
|
|
_ = function() {
|
|
return v.config.plugins || y.plugins
|
|
},
|
|
R = function() {
|
|
return v.config.roleTypes || y.roleTypes
|
|
},
|
|
S = a(4),
|
|
T = a.n(S),
|
|
P = a(2),
|
|
A = a(637),
|
|
L = a(581),
|
|
D = a(186),
|
|
I = a(585),
|
|
N = a(639),
|
|
F = a(125),
|
|
U = a(13),
|
|
M = a(52),
|
|
B = a.n(M),
|
|
W = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).getUid = function(e) {
|
|
return e && (e.liability && e.liability.uid || e.revenue && e.revenue.uid)
|
|
}, e.getColor = function(t) {
|
|
var a = e.props.classes;
|
|
switch (t) {
|
|
case "pending":
|
|
return a.textYellow;
|
|
case "verified":
|
|
return a.textGreen;
|
|
case "rejected":
|
|
return a.textRed;
|
|
default:
|
|
return a.textTypography
|
|
}
|
|
}, e.getButtons = function() {
|
|
var t = e.props,
|
|
a = t.adjustment,
|
|
n = t.classes;
|
|
return a && "pending" === a.state ? r.createElement("div", {
|
|
className: n.buttons
|
|
}, r.createElement(L.a, {
|
|
variant: "contained",
|
|
className: n.red,
|
|
onClick: e.props.handleReject
|
|
}, "Reject"), r.createElement(L.a, {
|
|
variant: "contained",
|
|
className: n.blue,
|
|
onClick: e.props.handleAccept
|
|
}, "Accept")) : null
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.adjustment,
|
|
a = e.classes;
|
|
return t ? r.createElement(D.a, {
|
|
className: a.paper
|
|
}, r.createElement(I.a, {
|
|
container: !0
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 12,
|
|
sm: 6
|
|
}, r.createElement("div", {
|
|
className: a.receivingNumber
|
|
}, r.createElement(N.a, {
|
|
id: "reason",
|
|
value: t.reason,
|
|
margin: "normal",
|
|
fullWidth: !1,
|
|
type: "text"
|
|
}), r.createElement("div", {
|
|
className: a.divState
|
|
}, r.createElement(F.a, {
|
|
variant: "subtitle1",
|
|
align: "left",
|
|
className: a.subtitle
|
|
}, "State"), r.createElement(F.a, {
|
|
paragraph: !0,
|
|
align: "left",
|
|
className: this.getColor(t.state)
|
|
}, t && t.state))), r.createElement(N.a, {
|
|
id: "currency",
|
|
label: "Currency ID",
|
|
value: t.currency,
|
|
fullWidth: !0,
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
},
|
|
margin: "normal",
|
|
type: "text"
|
|
}), r.createElement(N.a, {
|
|
id: "category",
|
|
label: "Category",
|
|
value: t.category,
|
|
fullWidth: !0,
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
},
|
|
margin: "normal",
|
|
type: "text"
|
|
}), r.createElement(N.a, {
|
|
id: "amount",
|
|
label: "Amount",
|
|
value: t.amount,
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
},
|
|
type: "text"
|
|
}), r.createElement(N.a, {
|
|
id: "assetCode",
|
|
label: "Asset code",
|
|
value: t.asset_account_code,
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
type: "number",
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
}), r.createElement(F.a, {
|
|
className: a.text
|
|
}, "Counterpart code"), r.createElement("div", {
|
|
className: a.receivingNumber
|
|
}, r.createElement(N.a, {
|
|
id: "receiving_account_code",
|
|
value: t.receiving_account_code,
|
|
margin: "dense",
|
|
variant: "outlined",
|
|
fullWidth: !1,
|
|
type: "number"
|
|
}), r.createElement("div", {
|
|
className: a.pipe
|
|
}), r.createElement(N.a, {
|
|
id: "accountUID",
|
|
value: this.getUid(t),
|
|
fullWidth: !1,
|
|
placeholder: "UID",
|
|
margin: "dense",
|
|
variant: "outlined"
|
|
})), r.createElement(N.a, {
|
|
id: "creator_uid",
|
|
label: "Creator ID",
|
|
value: t.creator_uid,
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
type: "text",
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
}), r.createElement(N.a, {
|
|
id: "validator_uid",
|
|
label: "Validator ID",
|
|
value: t.validator_uid ? t.validator_uid : "unvalidated",
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
type: "text",
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
})), r.createElement("div", {
|
|
className: a.separateBlocks
|
|
}, r.createElement("div", {
|
|
className: a.receivingNumber
|
|
}, r.createElement("div", null, r.createElement(F.a, {
|
|
variant: "subtitle1",
|
|
align: "left",
|
|
className: a.subtitle
|
|
}, "Created"), r.createElement(F.a, {
|
|
paragraph: !0,
|
|
align: "left",
|
|
className: a.textTypography
|
|
}, t && B()(t.created_at).format("DD/MM/YYYY"))), r.createElement("div", {
|
|
className: a.typography
|
|
}, r.createElement(F.a, {
|
|
variant: "subtitle1",
|
|
align: "left",
|
|
className: a.subtitle
|
|
}, "Updated"), r.createElement(F.a, {
|
|
paragraph: !0,
|
|
align: "right",
|
|
className: a.textTypography
|
|
}, t && B()(t.updated_at).format("DD/MM/YYYY")))), r.createElement(N.a, {
|
|
id: "description",
|
|
label: "Adjustment description",
|
|
multiline: !0,
|
|
value: t.description,
|
|
rows: "16",
|
|
className: a.textField,
|
|
margin: "normal",
|
|
variant: "outlined",
|
|
fullWidth: !0
|
|
}), this.getButtons()))) : r.createElement("div", null, "No data")
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
H = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
paper: {
|
|
padding: "15px 20px"
|
|
},
|
|
topic: {
|
|
fontStyle: "normal",
|
|
fontWeight: 500,
|
|
fontSize: "20px",
|
|
lineHeight: "28px",
|
|
color: "rgba(0, 0, 0, 0.87)"
|
|
},
|
|
subtitle: {
|
|
fontStyle: "normal",
|
|
fontWeight: "normal",
|
|
fontSize: "12px",
|
|
lineHeight: "10px",
|
|
letterSpacing: "0.4px",
|
|
color: "rgba(0, 0, 0, 0.54)"
|
|
},
|
|
textTypography: {
|
|
fontStyle: "normal",
|
|
fontWeight: "normal",
|
|
fontSize: "14px",
|
|
lineHeight: "20px",
|
|
letterSpacing: "0.25px",
|
|
paddingTop: "4px",
|
|
color: "rgba(0, 0, 0, 0.87)"
|
|
},
|
|
textRed: {
|
|
fontStyle: "normal",
|
|
fontWeight: "bold",
|
|
textTransform: "uppercase",
|
|
fontSize: "12px",
|
|
lineHeight: "18px",
|
|
letterSpacing: "1.25px",
|
|
paddingTop: "4px",
|
|
color: "#E23328"
|
|
},
|
|
textYellow: {
|
|
fontStyle: "normal",
|
|
fontWeight: "bold",
|
|
textTransform: "uppercase",
|
|
fontSize: "12px",
|
|
lineHeight: "18px",
|
|
letterSpacing: "1.25px",
|
|
paddingTop: "4px",
|
|
color: "#E3B930"
|
|
},
|
|
textGreen: {
|
|
fontStyle: "normal",
|
|
fontWeight: "bold",
|
|
textTransform: "uppercase",
|
|
fontSize: "12px",
|
|
lineHeight: "18px",
|
|
letterSpacing: "1.25px",
|
|
paddingTop: "4px",
|
|
color: "#00A41A"
|
|
},
|
|
description: {
|
|
fontStyle: "normal",
|
|
fontWeight: "normal",
|
|
fontSize: "12px",
|
|
lineHeight: "15px",
|
|
letterSpacing: "0.4px",
|
|
paddingTop: "4px",
|
|
color: "rgba(0, 0, 0, 0.7)"
|
|
},
|
|
buttons: {
|
|
marginTop: "100px",
|
|
display: "flex",
|
|
justifyContent: "flex-end"
|
|
},
|
|
red: {
|
|
background: "#E23328",
|
|
color: "#fff",
|
|
margin: "0 12px"
|
|
},
|
|
blue: {
|
|
background: "#0030AE",
|
|
color: "#fff",
|
|
margin: "0 10px"
|
|
},
|
|
textField: {
|
|
marginLeft: e.spacing(1),
|
|
marginRight: e.spacing(1)
|
|
},
|
|
text: {
|
|
color: "#898989"
|
|
},
|
|
separateBlocks: {
|
|
padding: "10px 20px 50px",
|
|
width: "50%",
|
|
"&:first-child": {
|
|
borderRight: "1px solid #e6e6e6"
|
|
},
|
|
"&:last-child": {
|
|
position: "relative"
|
|
}
|
|
},
|
|
pipe: {
|
|
alignSelf: "center",
|
|
display: "flex",
|
|
width: "15px",
|
|
marginLeft: e.spacing(1),
|
|
marginRight: e.spacing(1),
|
|
top: "10px",
|
|
borderTop: "1px solid #bbbbbb"
|
|
},
|
|
receivingNumber: {
|
|
display: "flex"
|
|
},
|
|
typography: {
|
|
marginLeft: "50%"
|
|
},
|
|
divState: {
|
|
marginLeft: "50%",
|
|
marginTop: "10px"
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(W),
|
|
V = a(635),
|
|
G = a(593),
|
|
z = a(595),
|
|
K = a(594),
|
|
Z = Object(U.a)(function(e) {
|
|
return {
|
|
tooltip: {
|
|
backgroundColor: "#ffffff",
|
|
boxShadow: "0px 4px 4px rgba(0, 0, 0, 0.25)",
|
|
color: "#666666",
|
|
fontFamily: "Roboto",
|
|
fontSize: "14px",
|
|
fontWeight: "normal",
|
|
letterSpacing: "0.25px",
|
|
lineHeight: "21px",
|
|
maxWidth: 220,
|
|
paddingBottom: "11px",
|
|
paddingLeft: "12px",
|
|
paddingRight: "9px",
|
|
paddingTop: "14px"
|
|
}
|
|
}
|
|
})(V.a),
|
|
Y = [{
|
|
key: 1,
|
|
value: "asset_registration"
|
|
}, {
|
|
key: 2,
|
|
value: "investment"
|
|
}, {
|
|
key: 3,
|
|
value: "minting_token"
|
|
}, {
|
|
key: 4,
|
|
value: "balance_anomaly"
|
|
}, {
|
|
key: 5,
|
|
value: "misc"
|
|
}, {
|
|
key: 6,
|
|
value: "refund"
|
|
}, {
|
|
key: 7,
|
|
value: "compensation"
|
|
}, {
|
|
key: 8,
|
|
value: "incentive"
|
|
}, {
|
|
key: 9,
|
|
value: "bank_fees"
|
|
}, {
|
|
key: 10,
|
|
value: "bank_fees"
|
|
}, {
|
|
key: 11,
|
|
value: "bank_interest"
|
|
}, {
|
|
key: 12,
|
|
value: "minor"
|
|
}],
|
|
q = [{
|
|
key: 1,
|
|
value: 201,
|
|
tip: "201 - represents Liabilities table of FIAT currencies."
|
|
}, {
|
|
key: 3,
|
|
value: 301,
|
|
tip: "301 - represents Revenue table of FIAT currencies."
|
|
}, {
|
|
key: 5,
|
|
value: 401,
|
|
tip: "401 - represents Expenses table of FIAT currencies."
|
|
}],
|
|
J = [{
|
|
key: 2,
|
|
value: 202,
|
|
tip: "202 - represents Liabilities table of crypto currencies"
|
|
}, {
|
|
key: 4,
|
|
value: 302,
|
|
tip: "302 - represents Revenue table of crypto currencies"
|
|
}, {
|
|
key: 6,
|
|
value: 402,
|
|
tip: "402 - represents Expenses table of crypto currencies"
|
|
}],
|
|
Q = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).renderSelect = function(t) {
|
|
var a = e.props.classes;
|
|
return t.map(function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e.key,
|
|
value: e.value
|
|
}, r.createElement("div", {
|
|
className: "".concat(a.menuItemFull)
|
|
}, e.value, r.createElement(Z, {
|
|
title: e.tip,
|
|
placement: "right-start"
|
|
}, r.createElement(K.a, {
|
|
className: "".concat(a.infoIcon, " ").concat(a.infoIconSelect)
|
|
}))))
|
|
})
|
|
}, e.handleChangeValue = function(t, a) {
|
|
return e.props.handleChangeValue(t, a)
|
|
}, e.handleSetCurrency = function(t, a) {
|
|
return e.props.handleSetCurrency(t, a)
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this,
|
|
t = this.props,
|
|
a = t.reason,
|
|
n = t.currency,
|
|
i = t.amount,
|
|
o = t.assetCode,
|
|
s = t.receivingAccountNumberCode,
|
|
c = t.accountUID,
|
|
l = t.description,
|
|
u = t.category,
|
|
d = t.classes,
|
|
p = t.currencies;
|
|
return r.createElement(D.a, {
|
|
className: d.paper
|
|
}, r.createElement(I.a, {
|
|
container: !0
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 12,
|
|
sm: 6
|
|
}, r.createElement(N.a, {
|
|
id: "reason",
|
|
label: "Reason",
|
|
value: a,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "reason")
|
|
},
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
type: "text"
|
|
}), r.createElement(N.a, {
|
|
id: "currency",
|
|
select: !0,
|
|
label: "Currency",
|
|
value: n,
|
|
onChange: function(t) {
|
|
return e.handleSetCurrency(t.target.value, "currency")
|
|
},
|
|
fullWidth: !0,
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
},
|
|
margin: "normal",
|
|
type: "text",
|
|
placeholder: "Select"
|
|
}, p.map(function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e.code,
|
|
value: e.code
|
|
}, e.code)
|
|
})), r.createElement(N.a, {
|
|
id: "category",
|
|
select: !0,
|
|
label: "Category",
|
|
value: u,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "category")
|
|
},
|
|
fullWidth: !0,
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
},
|
|
margin: "normal",
|
|
type: "text",
|
|
placeholder: "Select category"
|
|
}, Y.map(function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e.key,
|
|
value: e.value
|
|
}, e.value)
|
|
})), r.createElement(N.a, {
|
|
id: "amount",
|
|
label: "Amount",
|
|
value: i,
|
|
margin: "normal",
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "amount")
|
|
},
|
|
fullWidth: !0,
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
},
|
|
placeholder: "Enter an amount",
|
|
type: "number"
|
|
}), r.createElement(N.a, {
|
|
id: "assetCode",
|
|
label: "Asset code",
|
|
value: o,
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
type: "number",
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
},
|
|
InputProps: {
|
|
startAdornment: r.createElement(z.a, {
|
|
position: "start"
|
|
}, r.createElement(Z, {
|
|
title: "Asset code is a drop-down menu with a list of asset codes. This field autofill if a currency is chosen.",
|
|
placement: "right-start"
|
|
}, r.createElement(K.a, {
|
|
className: d.infoIcon
|
|
})))
|
|
}
|
|
}), r.createElement(F.a, {
|
|
className: d.text
|
|
}, "Receiving Account Number "), r.createElement("div", {
|
|
className: d.receivingNumber
|
|
}, r.createElement(N.a, {
|
|
id: "currency",
|
|
value: n,
|
|
margin: "dense",
|
|
variant: "outlined",
|
|
fullWidth: !1,
|
|
placeholder: "Currency"
|
|
}), r.createElement("div", {
|
|
className: d.pipe
|
|
}), r.createElement(N.a, {
|
|
id: "receivingAccountNumberCode",
|
|
value: s,
|
|
margin: "dense",
|
|
variant: "outlined",
|
|
select: !0,
|
|
fullWidth: !1,
|
|
type: "number",
|
|
placeholder: "Code",
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "receivingAccountNumberCode")
|
|
}
|
|
}, 101 === o ? this.renderSelect(q) : this.renderSelect(J)), r.createElement(
|
|
"div", {
|
|
className: d.pipe
|
|
}), r.createElement(N.a, {
|
|
id: "accountUID",
|
|
value: c,
|
|
fullWidth: !1,
|
|
placeholder: "UID",
|
|
margin: "dense",
|
|
variant: "outlined",
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "accountUID")
|
|
}
|
|
}))), r.createElement("div", {
|
|
className: d.separateBlocks
|
|
}, r.createElement(N.a, {
|
|
id: "description",
|
|
label: "Adjustment description",
|
|
multiline: !0,
|
|
value: l,
|
|
rows: "16",
|
|
className: d.textField,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "description")
|
|
},
|
|
margin: "normal",
|
|
variant: "outlined",
|
|
fullWidth: !0
|
|
}), r.createElement("div", {
|
|
className: d.buttons
|
|
}, r.createElement(L.a, {
|
|
variant: "contained",
|
|
className: d.blue,
|
|
onClick: this.props.handleCreate
|
|
}, "Create")))))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
X = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
paper: {
|
|
padding: "15px 20px"
|
|
},
|
|
buttons: {
|
|
display: "flex",
|
|
justifyContent: "flex-end"
|
|
},
|
|
blue: {
|
|
background: "#0030AE",
|
|
color: "#fff",
|
|
margin: "0 10px",
|
|
marginTop: "50px"
|
|
},
|
|
textField: {
|
|
marginLeft: e.spacing(1),
|
|
marginRight: e.spacing(1)
|
|
},
|
|
text: {
|
|
color: "#898989"
|
|
},
|
|
separateBlocks: {
|
|
padding: "10px 20px 50px",
|
|
width: "50%",
|
|
"&:first-child": {
|
|
borderRight: "1px solid #e6e6e6"
|
|
},
|
|
"&:last-child": {
|
|
position: "relative"
|
|
}
|
|
},
|
|
pipe: {
|
|
alignSelf: "center",
|
|
display: "flex",
|
|
width: "15px",
|
|
marginLeft: e.spacing(1),
|
|
marginRight: e.spacing(1),
|
|
top: "10px",
|
|
borderTop: "1px solid #bbbbbb"
|
|
},
|
|
receivingNumber: {
|
|
display: "flex",
|
|
position: "relative"
|
|
},
|
|
menuItemFull: {
|
|
alignItems: "center",
|
|
display: "flex",
|
|
flexDirection: "row",
|
|
textOverflow: "clip"
|
|
},
|
|
infoIcon: {
|
|
color: "#979797",
|
|
cursor: "pointer",
|
|
height: "12px",
|
|
marginTop: "-25px",
|
|
marginLeft: "65px",
|
|
position: "absolute",
|
|
width: "12px",
|
|
"&:hover": {
|
|
color: "#6683CE"
|
|
}
|
|
},
|
|
infoIconSelect: {
|
|
position: "relative",
|
|
marginTop: "0",
|
|
marginLeft: "5px"
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(Q),
|
|
$ = a(596),
|
|
ee = a(15),
|
|
te = a.n(ee),
|
|
ae = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).getMessage = function(t) {
|
|
var a = e.props.classes;
|
|
return r.createElement("span", {
|
|
id: "client-snackbar",
|
|
className: a.message
|
|
}, t)
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.classes,
|
|
a = e.message,
|
|
n = e.type,
|
|
i = te()(t[n], t.snackbar);
|
|
return r.createElement($.a, {
|
|
className: te()(t[n], i),
|
|
message: this.getMessage(a)
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
ne = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
snackbar: {
|
|
position: "relative",
|
|
zIndex: 1e4,
|
|
display: "flex",
|
|
margin: 10,
|
|
backgroundColor: "transparent"
|
|
},
|
|
error: {
|
|
background: "#d32f2f !important"
|
|
},
|
|
success: {
|
|
backgroundColor: "#43a047"
|
|
},
|
|
message: {
|
|
display: "flex",
|
|
alignItems: "center"
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(ae),
|
|
re = a(636),
|
|
ie = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).getStatus = function(t) {
|
|
var a = e.props.classes;
|
|
return r.createElement(F.a, {
|
|
className: te()({
|
|
[a.switcherActive]: t,
|
|
[a.switcherDisabled]: !t
|
|
})
|
|
}, t ? "Enabled" : "Disabled")
|
|
}, e.renderReset = function() {
|
|
var t = e.props.classes;
|
|
return r.createElement(L.a, {
|
|
variant: "contained",
|
|
color: "primary",
|
|
onClick: e.reset,
|
|
className: t.reset
|
|
}, "Reset")
|
|
}, e.handleChangeValue = function(t, a) {
|
|
return e.props.handleChangeValue(t, a)
|
|
}, e.submit = function(t) {
|
|
t && t.preventDefault(), e.props.handleSubmit()
|
|
}, e.reset = function(t) {
|
|
t && t.preventDefault(), e.props.handleReset()
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this,
|
|
t = this.props,
|
|
a = t.classes,
|
|
n = t.name,
|
|
i = t.client,
|
|
o = t.server,
|
|
s = t.min_confirmations,
|
|
c = t.height,
|
|
l = t.blockchain_key,
|
|
u = t.explorer_address,
|
|
d = t.explorer_transaction,
|
|
p = t.status,
|
|
h = t.clients,
|
|
g = "active" === p ? "disabled" : "active",
|
|
m = "active" === p;
|
|
return r.createElement(D.a, {
|
|
className: a.root
|
|
}, r.createElement("div", {
|
|
className: a.separateBlocks
|
|
}, r.createElement("div", {
|
|
className: a.walletTitle
|
|
}, r.createElement(N.a, {
|
|
id: "name",
|
|
label: "Name",
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "name")
|
|
},
|
|
className: te()(a.textField, a.dense),
|
|
margin: "dense",
|
|
value: n
|
|
}), r.createElement("div", {
|
|
className: a.switcherBlock
|
|
}, r.createElement(F.a, {
|
|
className: a.status
|
|
}, "Status"), r.createElement(re.a, {
|
|
checked: m,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(g, "status")
|
|
},
|
|
value: p,
|
|
color: "primary"
|
|
}), this.getStatus(m))), r.createElement(N.a, {
|
|
id: "client",
|
|
select: !0,
|
|
label: "Client",
|
|
value: i,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "client")
|
|
},
|
|
fullWidth: !0,
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
},
|
|
margin: "normal",
|
|
type: "text",
|
|
placeholder: "Select"
|
|
}, h.map(function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e,
|
|
value: e
|
|
}, e)
|
|
})), r.createElement(N.a, {
|
|
id: "server",
|
|
label: "Server",
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "server")
|
|
},
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
type: "text",
|
|
value: o,
|
|
placeholder: "http://geth:8545",
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
}), r.createElement(N.a, {
|
|
id: "min_confirmations",
|
|
label: "Min Confirmations",
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "min_confirmations")
|
|
},
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
value: s,
|
|
placeholder: "6",
|
|
type: "number",
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
},
|
|
variant: "outlined"
|
|
})), r.createElement("div", {
|
|
className: a.separateBlocks
|
|
}, r.createElement(N.a, {
|
|
id: "height",
|
|
label: "Height",
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "height")
|
|
},
|
|
margin: "dense",
|
|
className: te()(a.textField, a.dense),
|
|
fullWidth: !0,
|
|
placeholder: "45409310",
|
|
value: c,
|
|
type: "number",
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
},
|
|
variant: "outlined"
|
|
}), this.props.handleReset ? this.renderReset() : null, r.createElement(N.a, {
|
|
id: "blockchain_key",
|
|
label: "Key",
|
|
placeholder: "eth-rinkeby",
|
|
value: l,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "key")
|
|
},
|
|
fullWidth: !0,
|
|
className: a.keyTextField,
|
|
type: "text",
|
|
margin: "normal",
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
}), r.createElement(N.a, {
|
|
id: "explorer_address",
|
|
label: "Explorer Address",
|
|
placeholder: "https://rinkeby.etherscan.io/address/#{address}",
|
|
value: u,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "explorer_address")
|
|
},
|
|
fullWidth: !0,
|
|
type: "text",
|
|
margin: "normal",
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
}), r.createElement(N.a, {
|
|
id: "explorer_transaction",
|
|
label: "Explorer Transaction",
|
|
placeholder: "https://rinkeby.etherscan.io/tx/#{txid}",
|
|
value: d,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "explorer_transaction")
|
|
},
|
|
fullWidth: !0,
|
|
type: "text",
|
|
margin: "normal",
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
}), r.createElement(F.a, {
|
|
variant: "h6",
|
|
color: "inherit",
|
|
className: a.grow
|
|
}), r.createElement(L.a, {
|
|
variant: "contained",
|
|
color: "primary",
|
|
onClick: this.submit,
|
|
className: a.submit
|
|
}, "Submit")))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
oe = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
root: {
|
|
display: "flex",
|
|
padding: "10px 5px"
|
|
},
|
|
textField: {
|
|
marginLeft: e.spacing(1),
|
|
marginRight: e.spacing(1),
|
|
width: 300
|
|
},
|
|
dense: {
|
|
margin: 0
|
|
},
|
|
submit: {
|
|
marginTop: e.spacing(1),
|
|
marginBottom: e.spacing(1),
|
|
marginLeft: e.spacing(1),
|
|
marginRight: e.spacing(2),
|
|
bottom: 0,
|
|
right: 0,
|
|
position: "absolute"
|
|
},
|
|
reset: {
|
|
marginTop: e.spacing(1.7),
|
|
marginLeft: e.spacing(2)
|
|
},
|
|
grow: {
|
|
flexGrow: 1
|
|
},
|
|
separateBlocks: {
|
|
padding: "10px 20px 50px",
|
|
width: "50%",
|
|
"&:first-child": {
|
|
borderRight: "1px solid #e6e6e6"
|
|
},
|
|
"&:last-child": {
|
|
position: "relative"
|
|
}
|
|
},
|
|
switcherBlock: {
|
|
position: "relative",
|
|
float: "right"
|
|
},
|
|
status: {
|
|
position: "absolute",
|
|
top: 14,
|
|
right: 85,
|
|
color: "#999999"
|
|
},
|
|
switcherActive: {
|
|
color: "#00A41A",
|
|
margin: 0,
|
|
textAlign: "center"
|
|
},
|
|
switcherDisabled: {
|
|
color: "#E23328",
|
|
margin: 0,
|
|
textAlign: "center"
|
|
},
|
|
walletTitle: {
|
|
marginBottom: "50px"
|
|
},
|
|
json: {
|
|
position: "relative",
|
|
border: "1px solid #e6e6e6",
|
|
borderRadius: 5,
|
|
padding: 20,
|
|
width: "100%",
|
|
marginTop: 50
|
|
},
|
|
jsonLegend: {
|
|
top: "-8px",
|
|
left: "13px",
|
|
position: "absolute",
|
|
fontSize: "14px",
|
|
background: "#FFFFFF"
|
|
},
|
|
keyTextField: {
|
|
marginTop: 62
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(ie),
|
|
se = a(25),
|
|
ce = a(600),
|
|
le = a(598),
|
|
ue = a(599),
|
|
de = [{
|
|
value: "coin"
|
|
}, {
|
|
value: "fiat"
|
|
}],
|
|
pe = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).renderBlockchainKey = function() {
|
|
var e = n.props,
|
|
t = e.blockchains,
|
|
a = e.blockchain_key;
|
|
return r.createElement(N.a, {
|
|
id: "blockchain_key",
|
|
select: !0,
|
|
label: "Blockchain Key",
|
|
value: a,
|
|
onChange: function(e) {
|
|
return n.handleChangeValue(e.target.value, "blockchain_key")
|
|
},
|
|
fullWidth: !0,
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
},
|
|
margin: "normal",
|
|
placeholder: "Select"
|
|
}, t.map(function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e.key,
|
|
value: e.key
|
|
}, e.key)
|
|
}))
|
|
}, n.renderOptions = function() {
|
|
var e, t = n.props,
|
|
a = t.classes,
|
|
i = t.options,
|
|
o = n.state.isOpenMenu,
|
|
s = {},
|
|
c = Object(se.a)(i);
|
|
try {
|
|
for (c.s(); !(e = c.n()).done;) {
|
|
var l = e.value;
|
|
s[l.key] = l.value
|
|
}
|
|
} catch (d) {
|
|
c.e(d)
|
|
} finally {
|
|
c.f()
|
|
}
|
|
var u = JSON.stringify(s, void 0, Object.keys(s).length);
|
|
return r.createElement(D.a, {
|
|
className: a.root
|
|
}, r.createElement("div", {
|
|
className: a.separateBlocks
|
|
}, r.createElement("div", {
|
|
className: a.flexBlock
|
|
}, r.createElement(F.a, {
|
|
className: a.walletTitle
|
|
}, "Properties"), r.createElement("div", {
|
|
className: a.btn,
|
|
onClick: n.toggleMenu
|
|
}, r.createElement(ue.a, {
|
|
className: a.add
|
|
}), r.createElement(F.a, {
|
|
variant: "body2",
|
|
color: "inherit",
|
|
className: a.extraSpaceLeft
|
|
}, "Add property"))), o && n.renderMenu(), i.map(function(e, t) {
|
|
return r.createElement("div", {
|
|
className: a.flexBlock
|
|
}, r.createElement(N.a, {
|
|
id: t,
|
|
label: e.key,
|
|
onChange: function(t) {
|
|
return n.handleChangeOption(t.target.value, e.key)
|
|
},
|
|
margin: "normal",
|
|
type: "text",
|
|
fullWidth: !0,
|
|
placeholder: e.placeholder || "Enter ".concat(e.key),
|
|
value: e.value,
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
}), r.createElement(le.a, {
|
|
className: a.remove,
|
|
onClick: function() {
|
|
return n.props.handleRemoveOption(e.key)
|
|
}
|
|
}))
|
|
})), r.createElement("div", {
|
|
className: a.separateBlocks
|
|
}, r.createElement("div", {
|
|
className: a.json
|
|
}, r.createElement(F.a, {
|
|
className: a.jsonLegend
|
|
}, "JSON"), r.createElement("pre", null, u)), r.createElement(F.a, {
|
|
variant: "h6",
|
|
color: "inherit",
|
|
className: a.grow
|
|
}), r.createElement(L.a, {
|
|
variant: "contained",
|
|
color: "primary",
|
|
onClick: n.submit,
|
|
className: a.submit
|
|
}, "Submit")))
|
|
}, n.renderSubmit = function() {
|
|
var e = n.props.classes;
|
|
return r.createElement(L.a, {
|
|
variant: "contained",
|
|
color: "primary",
|
|
onClick: n.submit,
|
|
className: e.submit
|
|
}, "Submit")
|
|
}, n.getStatus = function(e) {
|
|
var t = n.props.classes;
|
|
return r.createElement(F.a, {
|
|
className: te()({
|
|
[t.switcherActive]: e,
|
|
[t.switcherDisabled]: !e
|
|
}),
|
|
variant: "body2"
|
|
}, e ? "Enabled" : "Disabled")
|
|
}, n.renderMenu = function() {
|
|
var e = n.state.name,
|
|
t = n.props.classes;
|
|
return r.createElement(ce.a, {
|
|
onClickAway: n.toggleMenu
|
|
}, r.createElement("div", {
|
|
className: t.flexEnd
|
|
}, r.createElement(D.a, {
|
|
className: t.menu
|
|
}, r.createElement(N.a, {
|
|
id: "property_name",
|
|
label: "New property",
|
|
onChange: function(e) {
|
|
return n.handleChangeName(e.target.value)
|
|
},
|
|
margin: "normal",
|
|
type: "text",
|
|
fullWidth: !0,
|
|
value: e,
|
|
placeholder: "Property name",
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
}), r.createElement("span", {
|
|
className: t.icon,
|
|
onClick: n.handleAddProperty
|
|
}, r.createElement(ue.a, {
|
|
className: t.add
|
|
})))))
|
|
}, n.handleChangeValue = function(e, t) {
|
|
return n.props.handleChangeValue(e, t)
|
|
}, n.handleChangeOption = function(e, t) {
|
|
return n.props.handleChangeOption(e, t)
|
|
}, n.handleChangeName = function(e) {
|
|
return n.setState({
|
|
name: e
|
|
})
|
|
}, n.submit = function(e) {
|
|
e && e.preventDefault(), n.props.handleSubmit()
|
|
}, n.handleAddProperty = function() {
|
|
n.state.name.length && (n.props.handleAddOption(n.state.name), n.toggleMenu())
|
|
}, n.toggleMenu = function() {
|
|
return n.setState({
|
|
isOpenMenu: !n.state.isOpenMenu,
|
|
name: ""
|
|
})
|
|
}, n.state = {
|
|
isOpenMenu: !1,
|
|
name: ""
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this,
|
|
t = this.props,
|
|
a = t.classes,
|
|
n = t.name,
|
|
i = t.code,
|
|
o = t.symbol,
|
|
s = t.type,
|
|
c = t.subunits,
|
|
l = t.precision,
|
|
u = t.deposit_fee,
|
|
d = t.min_deposit_amount,
|
|
p = t.min_collection_amount,
|
|
h = t.min_withdraw_amount,
|
|
g = t.withdraw_fee,
|
|
m = t.withdraw_limit_24h,
|
|
f = t.withdraw_limit_72h,
|
|
b = t.position,
|
|
y = t.icon_url,
|
|
v = t.visible,
|
|
w = t.deposit_enabled,
|
|
E = t.withdrawal_enabled;
|
|
return r.createElement(r.Fragment, null, r.createElement(D.a, {
|
|
className: a.root
|
|
}, r.createElement("div", {
|
|
className: a.separateBlocks
|
|
}, r.createElement("div", {
|
|
className: a.walletTitle
|
|
}, r.createElement(N.a, {
|
|
id: "name",
|
|
label: "Name",
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "name")
|
|
},
|
|
className: te()(this.props.classes.textField, this.props.classes.dense),
|
|
margin: "dense",
|
|
value: n
|
|
}), r.createElement("div", {
|
|
className: a.switcherBlock
|
|
}, r.createElement(F.a, {
|
|
className: a.visible
|
|
}, "Visible"), r.createElement(re.a, {
|
|
checked: v,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(!v, "visible")
|
|
},
|
|
value: v,
|
|
color: "primary"
|
|
}), this.getStatus(v))), r.createElement(N.a, {
|
|
id: "code",
|
|
label: "Code",
|
|
className: a.extraSpaceRight,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "code")
|
|
},
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
placeholder: "Enter a code",
|
|
value: i,
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
}), r.createElement(N.a, {
|
|
id: "symbol",
|
|
label: "Symbol",
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "symbol")
|
|
},
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
value: o,
|
|
placeholder: "Enter a symbol",
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
}), r.createElement(N.a, {
|
|
id: "type",
|
|
select: !0,
|
|
label: "Type",
|
|
value: s,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "type")
|
|
},
|
|
fullWidth: !0,
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
},
|
|
margin: "normal",
|
|
placeholder: "Select"
|
|
}, de.map(function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e.value,
|
|
value: e.value
|
|
}, e.value)
|
|
})), r.createElement(N.a, {
|
|
id: "subunit",
|
|
label: "Subunits",
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "subunits")
|
|
},
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
value: c,
|
|
placeholder: "Enter a subunits",
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
}), r.createElement(N.a, {
|
|
id: "precision",
|
|
label: "Precision",
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "precision")
|
|
},
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
value: l,
|
|
placeholder: "Enter a precision",
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
}), "fiat" !== s && this.renderBlockchainKey()), r.createElement("div", {
|
|
className: a.separateBlocks
|
|
}, r.createElement("div", {
|
|
className: a.flexBlock
|
|
}, r.createElement("div", {
|
|
className: a.switcherBlock
|
|
}, r.createElement(F.a, {
|
|
className: a.visible
|
|
}, "Deposit"), r.createElement(re.a, {
|
|
checked: w,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(!w, "deposit_enabled")
|
|
},
|
|
value: w,
|
|
color: "primary"
|
|
}), this.getStatus(w)), r.createElement("div", {
|
|
className: a.switcherBlock
|
|
}, r.createElement(F.a, {
|
|
className: a.visible
|
|
}, "Withdrawal"), r.createElement(re.a, {
|
|
checked: E,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(!E, "withdrawal_enabled")
|
|
},
|
|
value: E,
|
|
color: "primary"
|
|
}), this.getStatus(E))), r.createElement(N.a, {
|
|
id: "depositFee",
|
|
label: "Deposit Fee",
|
|
placeholder: "0.00",
|
|
value: u,
|
|
className: a.extraSpaceTop,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(String(t.target.value), "deposit_fee")
|
|
},
|
|
fullWidth: !0,
|
|
type: "number",
|
|
margin: "normal",
|
|
variant: "outlined",
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
}), r.createElement("div", {
|
|
className: a.flexBlock
|
|
}, r.createElement(N.a, {
|
|
id: "min_deposit_amount",
|
|
label: "Min Deposit Amount",
|
|
placeholder: "0.00",
|
|
value: d,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(String(t.target.value), "min_deposit_amount")
|
|
},
|
|
fullWidth: !0,
|
|
type: "number",
|
|
margin: "normal",
|
|
variant: "outlined",
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
},
|
|
className: a.outlinedItem
|
|
}), r.createElement(N.a, {
|
|
id: "min_collection_amount",
|
|
label: "Min Collection Amount",
|
|
value: p,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(String(t.target.value),
|
|
"min_collection_amount")
|
|
},
|
|
fullWidth: !0,
|
|
type: "number",
|
|
margin: "normal",
|
|
placeholder: "0.00",
|
|
variant: "outlined",
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
},
|
|
className: a.outlinedItem
|
|
})), r.createElement(N.a, {
|
|
id: "withdraw_fee",
|
|
label: "Withdraw Fee",
|
|
value: g,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(String(t.target.value), "withdraw_fee")
|
|
},
|
|
fullWidth: !0,
|
|
type: "number",
|
|
margin: "normal",
|
|
placeholder: "0.00",
|
|
variant: "outlined",
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
}), r.createElement(N.a, {
|
|
id: "min_withdraw_amount",
|
|
label: "Min Withdraw Amount",
|
|
placeholder: "0.00",
|
|
value: h,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(String(t.target.value), "min_withdraw_amount")
|
|
},
|
|
fullWidth: !0,
|
|
type: "number",
|
|
margin: "normal",
|
|
variant: "outlined",
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
}), r.createElement("div", {
|
|
className: a.flexBlock
|
|
}, r.createElement(N.a, {
|
|
id: "withdraw_limit_24h",
|
|
label: "24h Withdraw Limit",
|
|
value: m,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(String(t.target.value), "withdraw_limit_24h")
|
|
},
|
|
fullWidth: !0,
|
|
type: "number",
|
|
margin: "normal",
|
|
placeholder: "0.00",
|
|
variant: "outlined",
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
},
|
|
className: a.outlinedItem
|
|
}), r.createElement(N.a, {
|
|
id: "withdraw_limit_72h",
|
|
label: "72h Withdraw Limit",
|
|
value: f,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(String(t.target.value), "withdraw_limit_72h")
|
|
},
|
|
fullWidth: !0,
|
|
type: "number",
|
|
margin: "normal",
|
|
placeholder: "0.00",
|
|
variant: "outlined",
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
},
|
|
className: a.outlinedItem
|
|
})), r.createElement(N.a, {
|
|
id: "postions",
|
|
label: "Position",
|
|
placeholder: "0",
|
|
type: "text",
|
|
fullWidth: !0,
|
|
margin: "normal",
|
|
value: b,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "position")
|
|
},
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
}), r.createElement(N.a, {
|
|
id: "uri",
|
|
label: "Icon URL",
|
|
placeholder: "Enter icon URL",
|
|
type: "text",
|
|
fullWidth: !0,
|
|
margin: "normal",
|
|
value: y,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "icon_url")
|
|
},
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
}), "fiat" === s && this.renderSubmit(), r.createElement(F.a, {
|
|
variant: "h6",
|
|
color: "inherit",
|
|
className: a.grow
|
|
}))), "fiat" !== s && this.renderOptions())
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
he = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
root: {
|
|
display: "flex",
|
|
padding: e.spacing(1),
|
|
paddingBottom: 25,
|
|
marginTop: 20
|
|
},
|
|
textField: {
|
|
marginLeft: e.spacing(1),
|
|
marginRight: e.spacing(1),
|
|
width: 300
|
|
},
|
|
dense: {
|
|
margin: 0
|
|
},
|
|
submit: {
|
|
margin: e.spacing(1),
|
|
top: 30,
|
|
float: "right"
|
|
},
|
|
grow: {
|
|
flexGrow: 1
|
|
},
|
|
separateBlocks: {
|
|
padding: "10px 20px",
|
|
width: "50%",
|
|
"&:first-child": {
|
|
borderRight: "1px solid #e6e6e6"
|
|
},
|
|
"&:last-child": {
|
|
position: "relative"
|
|
}
|
|
},
|
|
switcherBlock: {
|
|
position: "relative",
|
|
float: "right",
|
|
paddingLeft: "85px"
|
|
},
|
|
visible: {
|
|
position: "absolute",
|
|
top: 14,
|
|
right: 85,
|
|
color: "#999999"
|
|
},
|
|
switcherActive: {
|
|
color: "#00A41A",
|
|
margin: 0,
|
|
textAlign: "center"
|
|
},
|
|
switcherDisabled: {
|
|
color: "#E23328",
|
|
margin: 0,
|
|
textAlign: "center"
|
|
},
|
|
walletTitle: {
|
|
fontSize: 20,
|
|
marginBottom: "40px"
|
|
},
|
|
json: {
|
|
position: "relative",
|
|
border: "1px solid #e6e6e6",
|
|
borderRadius: 5,
|
|
padding: 20,
|
|
width: "100%",
|
|
marginTop: 50
|
|
},
|
|
jsonLegend: {
|
|
top: "-10px",
|
|
left: "13px",
|
|
position: "absolute",
|
|
fontSize: "14px",
|
|
background: "#FFFFFF"
|
|
},
|
|
flexBlock: {
|
|
display: "flex",
|
|
justifyContent: "space-between"
|
|
},
|
|
extraSpaceRight: {
|
|
marginRight: 40
|
|
},
|
|
extraSpaceTop: {
|
|
marginTop: 66
|
|
},
|
|
outlinedItem: {
|
|
width: "49%"
|
|
},
|
|
extraSpaceLeft: {
|
|
marginLeft: 12
|
|
},
|
|
btn: {
|
|
display: "flex",
|
|
justifyContent: "space-between",
|
|
cursor: "pointer"
|
|
},
|
|
menu: {
|
|
display: "flex",
|
|
justifyContent: "space-between",
|
|
alignItems: "flex-end",
|
|
padding: e.spacing(1),
|
|
paddingLeft: 12,
|
|
paddingRight: 12,
|
|
position: "absolute",
|
|
zIndex: 1,
|
|
top: "-35px",
|
|
width: "40%"
|
|
},
|
|
flexEnd: {
|
|
display: "flex",
|
|
justifyContent: "flex-end",
|
|
position: "relative"
|
|
},
|
|
icon: {
|
|
marginLeft: 18,
|
|
marginBottom: 8
|
|
},
|
|
add: {
|
|
color: "rgba(0, 0, 0, 0.42)",
|
|
"&:hover": {
|
|
color: "#0030AE"
|
|
}
|
|
},
|
|
remove: {
|
|
cursor: "pointer",
|
|
marginTop: 35,
|
|
marginLeft: 30,
|
|
color: "rgba(0, 0, 0, 0.42)",
|
|
"&:hover": {
|
|
color: "#E23328"
|
|
}
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(pe),
|
|
ge = a(597),
|
|
me = a(550),
|
|
fe = a(603),
|
|
be = a(604),
|
|
ye = a(640),
|
|
ve = a(606),
|
|
we = a(592),
|
|
Ee = a(151),
|
|
Ce = a(601),
|
|
Oe = a(602),
|
|
ke = a(20),
|
|
xe = a(32),
|
|
je = "ADJUSTMENTS_LIST_FETCH",
|
|
_e = "ADJUSTMENT_ADD_FETCH",
|
|
Re = "ADJUSTMENTS_GET_FETCH",
|
|
Se = "ADJUSTMENT_UPDATE_FETCH",
|
|
Te = "ALERT_PUSH",
|
|
Pe = "ASSETS_LIST_FETCH",
|
|
Ae = "LOGIN_FETCH",
|
|
Le = "LOGOUT_FETCH",
|
|
De = "BLOCKCHAINS_LIST_FETCH",
|
|
Ie = "BLOCKCHAINS_ITEM_FETCH",
|
|
Ne = "BLOCKCHAIN_ITEM_UPDATE_FETCH",
|
|
Fe = "BLOCKCHAIN_ITEM_CREATE_FETCH",
|
|
Ue = "BLOCKCHAIN_CLIENTS_FETCH",
|
|
Me = "CHANGE_USER_STATE_FETCH",
|
|
Be = "CHANGE_USER_ROLE_FETCH",
|
|
We = "CHANGE_USER_OTP_FETCH",
|
|
He = "CURRENCIES_LIST_FETCH",
|
|
Ve = "CURRENCY_ADD_FETCH",
|
|
Ge = "CURRENCY_EDIT_FETCH",
|
|
ze = "CURRENCY_GET_FETCH",
|
|
Ke = "DEPOSITS_LIST_FETCH",
|
|
Ze = "DEPOSIT_FETCH",
|
|
Ye = "DEPOSIT_ACCEPT_FETCH",
|
|
qe = "DEPOSIT_REJECT_FETCH",
|
|
Je = "DEPOSIT_ADD_FETCH",
|
|
Qe = "EXPENSES_LIST_FETCH",
|
|
Xe = "DELETE_USER_LABEL_FETCH",
|
|
$e = "ADD_USER_LABEL_FETCH",
|
|
et = "EDIT_USER_LABEL_FETCH",
|
|
tt = "LIABILITIES_LIST_FETCH",
|
|
at = "MARKETS_LIST_FETCH",
|
|
nt = "MARKET_FETCH",
|
|
rt = "MARKET_UPDATE_FETCH",
|
|
it = "MARKET_CREATE_FETCH",
|
|
ot = "METRICS_FETCH",
|
|
st = "ASKS_FETCH",
|
|
ct = "BIDS_FETCH",
|
|
lt = "CHANGE_USER_FEE_GROUP_FETCH",
|
|
ut = "GET_USER_FEE_GROUP_FETCH",
|
|
dt = "ORDERS_LIST_FETCH",
|
|
pt = "ORDERS_CANCEL_FETCH",
|
|
ht = "ORDER_CANCEL_FETCH",
|
|
gt = "PERMISSIONS_LIST_FETCH",
|
|
mt = "PERMISSIONS_ADD_FETCH",
|
|
ft = "PERMISSIONS_UPDATE_FETCH",
|
|
bt = "PERMISSIONS_DELETE_FETCH",
|
|
yt = "REVENUES_LIST_FETCH",
|
|
vt = "TRADES_LIST_FETCH",
|
|
wt = "TRADING_FEES_LIST_FETCH",
|
|
Et = "TRADING_FEE_GROUPS_FETCH",
|
|
Ct = "TRADING_FEE_GET_FETCH",
|
|
Ot = "TRADING_FEE_ADD_FETCH",
|
|
kt = "TRADING_FEE_UPDATE_FETCH",
|
|
xt = "TRADING_FEE_DELETE_FETCH",
|
|
jt = "ADMIN_ACTIVITY_FETCH",
|
|
_t = "BLACKLIST_RULES_FETCH",
|
|
Rt = "BLACKLIST_RULES_EDIT",
|
|
St = "BLACKLIST_RULES_ADD",
|
|
Tt = "BLACKLIST_RULES_DELETE",
|
|
Pt = "GET_CURRENT_USER_FETCH",
|
|
At = "EMAIL_VERIFICATION_FETCH",
|
|
Lt = "USER_ACTIVITY_FETCH",
|
|
Dt = "USER_BALANCES_FETCH",
|
|
It = "GET_USER_DATA_FETCH",
|
|
Nt = "EDIT_USER_PROFILE_FETCH",
|
|
Ft = "USER_DEPOSITS_FETCH",
|
|
Ut = "USER_OPEN_ORDERS_FETCH",
|
|
Mt = "USER_ORDERS_FETCH",
|
|
Bt = "GET_USERS_FETCH",
|
|
Wt = "GET_DATA_BY_FILTER_FETCH",
|
|
Ht = "GET_USERS_PENDING_DOCUMENTS_FETCH",
|
|
Vt = "USER_TRADES_FETCH",
|
|
Gt = "WALLETS_LIST_FETCH",
|
|
zt = "WALLET_GET_FETCH",
|
|
Kt = "WALLET_ADD_FETCH",
|
|
Zt = "WALLET_UPDATE_FETCH",
|
|
Yt = "WALLET_GATEWAYS_FETCH",
|
|
qt = "WALLET_KINDS_FETCH",
|
|
Jt = "WITHDRAWS_LIST_FETCH",
|
|
Qt = "WITHDRAW_ITEM_FETCH",
|
|
Xt = "WITHDRAW_PROCESS_FETCH",
|
|
$t = "WITHDRAW_PROCESS_FIAT_FETCH",
|
|
ea = "WITHDRAW_REJECT_FETCH",
|
|
ta = "WITHDRAW_LOAD_FETCH",
|
|
aa = "WITHDRAWS_HISTORY_FETCH",
|
|
na = "GET_QUESTIONS_FETCH",
|
|
ra = "DELETE_QUESTION_INFO_FETCH",
|
|
ia = function(e) {
|
|
return {
|
|
type: "ADJUSTMENTS_LIST_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
oa = function() {
|
|
return {
|
|
type: "ADJUSTMENTS_LIST_ERROR"
|
|
}
|
|
},
|
|
sa = function(e) {
|
|
return {
|
|
type: "ADJUSTMENTS_GET_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
ca = function() {
|
|
return {
|
|
type: "ADJUSTMENTS_GET_ERROR"
|
|
}
|
|
},
|
|
la = function(e) {
|
|
return {
|
|
type: "ADJUSTMENT_ADD_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
ua = function() {
|
|
return {
|
|
type: "ADJUSTMENT_ADD_ERROR"
|
|
}
|
|
},
|
|
da = function() {
|
|
return {
|
|
type: "ADJUSTMENT_UPDATE_DATA"
|
|
}
|
|
},
|
|
pa = function() {
|
|
return {
|
|
type: "ADJUSTMENT_UPDATE_ERROR"
|
|
}
|
|
},
|
|
ha = {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
},
|
|
ga = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : ha,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case je:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "ADJUSTMENTS_LIST_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: t.payload.list,
|
|
total: t.payload.total
|
|
});
|
|
case "ADJUSTMENTS_LIST_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
});
|
|
case _e:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "ADJUSTMENT_ADD_DATA":
|
|
case "ADJUSTMENT_ADD_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1
|
|
});
|
|
case Se:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "ADJUSTMENT_UPDATE_DATA":
|
|
case "ADJUSTMENT_UPDATE_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1
|
|
});
|
|
case Re:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0,
|
|
adjustment: void 0
|
|
});
|
|
case "ADJUSTMENTS_GET_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
adjustment: t.payload
|
|
});
|
|
case "ADJUSTMENTS_GET_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
adjustment: void 0
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
ma = a(80),
|
|
fa = a(113),
|
|
ba = a.n(fa),
|
|
ya = function(e, t) {
|
|
var a = e.body,
|
|
n = e.method,
|
|
r = e.url,
|
|
i = t.apiVersion,
|
|
o = t.headers,
|
|
s = {
|
|
barong: "".concat(v.config.authUrl || w("authUrl")),
|
|
applogic: "".concat(v.config.applogicUrl || ""),
|
|
peatio: "".concat(E()),
|
|
finex: "".concat(v.config.finexUrl || "")
|
|
},
|
|
c = {
|
|
"content-type": a instanceof FormData ? "multipart/form-data" : "application/json"
|
|
};
|
|
return {
|
|
baseURL: s[i],
|
|
data: a,
|
|
headers: Object(b.a)(Object(b.a)({}, o), c),
|
|
method: n,
|
|
url: r,
|
|
withCredentials: v.config.withCredentials
|
|
}
|
|
},
|
|
va = {
|
|
status: 500,
|
|
data: {
|
|
error: "Server error"
|
|
}
|
|
},
|
|
wa = function(e) {
|
|
var t = e.response || va,
|
|
a = t.data && (t.data.errors || [t.data.error]);
|
|
return {
|
|
code: t.status,
|
|
message: a
|
|
}
|
|
},
|
|
Ea = function() {
|
|
var e = Object(ma.a)(T.a.mark(function e(t, a) {
|
|
var n;
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return n = ya(t, a), e.abrupt("return", new Promise(function(e, t) {
|
|
ba()(n).then(e).catch(function(e) {
|
|
t(wa(e))
|
|
})
|
|
}));
|
|
case 2:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, e)
|
|
}));
|
|
return function(t, a) {
|
|
return e.apply(this, arguments)
|
|
}
|
|
}(),
|
|
Ca = {
|
|
get: function(e) {
|
|
return function() {
|
|
var t = Object(ma.a)(T.a.mark(function t(a) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.abrupt("return", Ea({
|
|
method: "get",
|
|
url: a
|
|
}, e));
|
|
case 1:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, t)
|
|
}));
|
|
return function(e) {
|
|
return t.apply(this, arguments)
|
|
}
|
|
}()
|
|
},
|
|
post: function(e) {
|
|
return function() {
|
|
var t = Object(ma.a)(T.a.mark(function t(a, n) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.abrupt("return", Ea({
|
|
method: "post",
|
|
body: n,
|
|
url: a
|
|
}, e));
|
|
case 1:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, t)
|
|
}));
|
|
return function(e, a) {
|
|
return t.apply(this, arguments)
|
|
}
|
|
}()
|
|
},
|
|
patch: function(e) {
|
|
return function() {
|
|
var t = Object(ma.a)(T.a.mark(function t(a, n) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.abrupt("return", Ea({
|
|
method: "patch",
|
|
body: n,
|
|
url: a
|
|
}, e));
|
|
case 1:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, t)
|
|
}));
|
|
return function(e, a) {
|
|
return t.apply(this, arguments)
|
|
}
|
|
}()
|
|
},
|
|
put: function(e) {
|
|
return function() {
|
|
var t = Object(ma.a)(T.a.mark(function t(a, n) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.abrupt("return", Ea({
|
|
method: "put",
|
|
body: n,
|
|
url: a
|
|
}, e));
|
|
case 1:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, t)
|
|
}));
|
|
return function(e, a) {
|
|
return t.apply(this, arguments)
|
|
}
|
|
}()
|
|
},
|
|
delete: function(e) {
|
|
return function() {
|
|
var t = Object(ma.a)(T.a.mark(function t(a) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.abrupt("return", Ea({
|
|
method: "delete",
|
|
url: a
|
|
}, e));
|
|
case 1:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, t)
|
|
}));
|
|
return function(e) {
|
|
return t.apply(this, arguments)
|
|
}
|
|
}()
|
|
}
|
|
},
|
|
Oa = function(e) {
|
|
var t = [];
|
|
return e.map(function(e) {
|
|
return e.origin_volume
|
|
}).reduce(function(e, a, n) {
|
|
return t[n] = Number(e) + Number(a), Number(e) + Number(a)
|
|
}, 0), t
|
|
},
|
|
ka = function(e) {
|
|
return Object.entries(e).filter(function(e) {
|
|
return "" !== e[1]
|
|
}).map(function(e) {
|
|
return Array.isArray(e[1]) ? (t = e[0], e[1].map(function(e) {
|
|
return "".concat(t, "[]=").concat(encodeURIComponent(e))
|
|
}).join("&")) : function(e, t) {
|
|
return "".concat(e, "=").concat(encodeURIComponent(t))
|
|
}(e[0], e[1]);
|
|
var t
|
|
}).join("&")
|
|
},
|
|
xa = function(e) {
|
|
return e ? e.charAt(0).toUpperCase() + e.slice(1) : ""
|
|
},
|
|
ja = {
|
|
"resource.labels.private": "Can't update label",
|
|
"resource.user.no_activity": "No activity recorded or wrong topic",
|
|
"resource.profile.not_exist": "User has no profile",
|
|
"resource.profile.exist": "Profile already exists",
|
|
"resource.api_key.2fa_disabled": "Only accounts with enabled 2FA alowed",
|
|
"resource.api_key.missing_otp": "Theaccount has enabled 2FA but OTP code is missing",
|
|
"resource.api_key.invalid_otp": "OTP code is invalid",
|
|
"resource.phone.twillio": "Something wrong with Twilio Client",
|
|
"resource.phone.invalid_num ": "Phone number is invalid",
|
|
"resource.phone.number_exist": "Phone number already exists",
|
|
"resource.phone.verification_invalid": "Phone is not found or verification code is invalid",
|
|
"resource.documents.limit_reached": "Maximum number of documents already reached",
|
|
"resource.documents.limit_will_be_reached": "Documents amount will reach limit by this upload",
|
|
"resource.otp.already_enabled": "2FA has been already enabled for this account",
|
|
"resource.otp.invalid": "OTP code is invalid",
|
|
"resource.password.doesnt_match": "New passwords don't match",
|
|
"resource.password.prev_pass_not_correct": "Previous password is not correct",
|
|
"resource.password.no_change_provided": "New password cant be the same, as old one",
|
|
"identity.user.invalid_referral_format": "Invalid referral uid format",
|
|
"identity.user.referral_doesnt_exist": "Referral doesn't exist",
|
|
"identity.user.active_or_doesnt_exist": "User doesn't exist or has already been activated",
|
|
"identity.password.user_doesnt_exist": "User doesn't exist",
|
|
"identity.user.passwords_doesnt_match": "Passwords don't match",
|
|
"identity.user.utilized_token": "JWT has already been used",
|
|
"identity.session.invalid_login_params": "Invalid Email or Password",
|
|
"identity.session.invalid": "Invalid Session",
|
|
"identity.captcha.required": "captcha_response is required",
|
|
"identity.captcha.mandatory_fields": "Mandatory fields must be filled in",
|
|
"identity.session.not_active": "Your account is not active",
|
|
"identity.session.banned": "Your account is banned",
|
|
"identity.session.invalid_params": "Invalid Email or Password",
|
|
"identity.session.missing_otp": "The account has enabled 2FA but OTP code is missing",
|
|
"identity.session.invalid_otp": "OTP code is invalid",
|
|
"first_name.invalid": "First name is invalid",
|
|
"last_name.invalid": "Last name is invalid",
|
|
"city.invalid": "City is invalid",
|
|
"postcode.invalid": "Postcode is invalid",
|
|
"address.invalid": "Address is invalid",
|
|
"first_name.blank": "First name is missing or empty",
|
|
"last_name.blank": "Last name is missing or empty",
|
|
"dob.blank": "Date of birth is invalid",
|
|
"address.blank": "Address is missing or empty",
|
|
"city.blank": "City is missing or empty",
|
|
"country.blank": "Country is missing or empty",
|
|
"postcode.blank": "Postcode.blank is missing or empty",
|
|
"country.must have alpha2 or alpha3 format": "Country must have alpha2 or alpha3 format",
|
|
"totp.error": "OTP code is invalid",
|
|
"admin.user.update_himself": "Admin can't update himself",
|
|
"admin.user.enable_2fa": "Manual 2FA enabling not allowed",
|
|
"admin.user.state_no_change": "Can't change state",
|
|
"admin.user.doesnt_exist": "User with such UID doesnt exist",
|
|
"admin.label.doesnt_exist": "Label with such key doesnt exist or not assigned to chosen user",
|
|
"admin.access.denied": "Access Denied: User is not Admin",
|
|
"record.not_found": "Record is not found",
|
|
"jwt.decode_and_verify": "Failed to decode and verify JWT",
|
|
"authz.invalid_session": "Unauthorized",
|
|
"authz.user_not_active": "User is not active",
|
|
"authz.invalid_signature": "API Key header 'signature' is invalid",
|
|
"authz.apikey_not_active": "API Key state is 'inactive",
|
|
"authz.disabled_2fa": "API Key owner has disabled 2FA",
|
|
"authz.invalid_api_key_headers": "Blank or missing API Key headers",
|
|
"authz.permission_denied": "Path is blacklisted",
|
|
"authz.unexistent_apikey": "X-Auth-Apikey header is invalid",
|
|
"admin.adjustment.missing_receiving_member_uid": "Missing receiving member UID",
|
|
"admin.adjustment.redundant_receiving_member_uid": "Redundant receiving member UID",
|
|
"admin.adjustment.cannot_perform_accept_action": "Cannot perform accept action",
|
|
"admin.adjustment.cannot_perform_reject_action": "Cannot perform reject action",
|
|
"admin.blockchain.invalid_server": "Invalid server",
|
|
"admin.blockchain.non_positive_min_confirmations": "",
|
|
"admin.blockchain.key_too_long": "Key is too long",
|
|
"admin.blockchain.name_too_long": "Name is too long",
|
|
"admin.currency.invalid_type": "Invalid type",
|
|
"admin.currency.invalid_subunits": "Invalid subunits",
|
|
"admin.currency.blockchain_key_doesnt_exist": "Blockchain key does not exit",
|
|
"admin.currency.one_of_base_factor_subunits_fields": "One of base_factor subunits fields",
|
|
"admin.currency.non_json_options": "Non json options",
|
|
"admin.depodit.cannot_cancel": "Cannot cancel",
|
|
"admin.depodit.cannot_accept": "Cannot accept",
|
|
"admin.depodit.cannot_reject": "Cannot reject",
|
|
"admin.depodit.cannot_skip": "Cannot skip",
|
|
"admin.depodit.cannot_dispatch": "Cannot dispatch",
|
|
"admin.market.currency_doesnt_exist": "Currency does not exist",
|
|
"admin.market.invalid_state": "Invalid state"
|
|
},
|
|
_a = function(e) {
|
|
return ja.hasOwnProperty(e) ? ja[e] : e
|
|
},
|
|
Ra = function(e) {
|
|
return j().filter(function(t) {
|
|
return t.name === e
|
|
})[0].label
|
|
},
|
|
Sa = function(e) {
|
|
return e ? "true" : "false"
|
|
},
|
|
Ta = function(e) {
|
|
var t, a = e[0],
|
|
n = Object(se.a)(e);
|
|
try {
|
|
for (n.s(); !(t = n.n()).done;) {
|
|
var r = t.value;
|
|
(!a.validated_at || r.validated_at && r.validated_at > a.validated_at) && (a = r)
|
|
}
|
|
} catch (i) {
|
|
n.e(i)
|
|
} finally {
|
|
n.f()
|
|
}
|
|
return a
|
|
},
|
|
Pa = function(e, t) {
|
|
var a = Number(t) || 0,
|
|
n = "undefined" === typeof e ? "0" : (Math.floor(+e * Math.pow(10, a)) / Math.pow(10, a)).toString();
|
|
for (-1 === n.indexOf(".") && +a > 0 && (n += "."); n.slice(n.indexOf(".")).length <= a;) n += "0";
|
|
return n
|
|
},
|
|
Aa = function(e, t) {
|
|
if (e.length) {
|
|
var a = e.find(function(e) {
|
|
return e.key === t
|
|
});
|
|
if (a && null !== a.value) return a.value
|
|
}
|
|
return ""
|
|
},
|
|
La = function(e) {
|
|
switch (e) {
|
|
case "/tower/exchange/trades":
|
|
return "".concat(E(), "/admin/trades.csv");
|
|
case "/tower/accountings/deposits":
|
|
return "".concat(E(), "/admin/deposits.csv");
|
|
case "/tower/accountings/withdrawals":
|
|
case "/tower/accountings/withdrawals-pending":
|
|
return "".concat(E(), "/admin/withdraws.csv");
|
|
case "/tower/accountings/adjustments":
|
|
return "".concat(E(), "/admin/adjustments.csv");
|
|
case "/tower/exchange/orders/open":
|
|
case "/tower/exchange/orders/history":
|
|
return "".concat(E(), "/admin/orders.csv");
|
|
default:
|
|
return ""
|
|
}
|
|
},
|
|
Da = a(145),
|
|
Ia = function(e) {
|
|
var t = new Da;
|
|
if (t.setUA(e), e.length > 0) {
|
|
var a = t.getResult().browser;
|
|
return a && a.name
|
|
}
|
|
return "-"
|
|
},
|
|
Na = function(e) {
|
|
var t = new Da;
|
|
if (e.length > 0) {
|
|
t.setUA(e);
|
|
var a = t.getResult().os;
|
|
return a && a.name
|
|
}
|
|
return "-"
|
|
},
|
|
Fa = (a(261), a(262), function e(t) {
|
|
if (!Object.keys(t).length) return [];
|
|
var a = [];
|
|
for (var n in t) t[n] && 0 !== t[n].length && (a.push({
|
|
type: "key",
|
|
value: n
|
|
}), t[n] instanceof Object ? a = a.concat(e(t[n])) : a.push({
|
|
type: "value",
|
|
value: t[n]
|
|
}));
|
|
return a
|
|
}),
|
|
Ua = a(117),
|
|
Ma = a.n(Ua),
|
|
Ba = "",
|
|
Wa = function(e, t) {
|
|
var a = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : Ba.length > 0 ? Ba : Ua.tz
|
|
.guess(),
|
|
n = {
|
|
fullDate: "DD-MM-YYYY HH:mm:ss",
|
|
shortDate: "DD-MM-YYYY HH:mm",
|
|
time: "HH:mm:ss",
|
|
date: "YYYY/MM/DD"
|
|
} [t];
|
|
return ("number" === typeof e ? Ma.a.unix(e) : Ma()(e)).tz(a).format(n)
|
|
},
|
|
Ha = function(e) {
|
|
var t = new Date(e).toISOString().split("T")[0].split("-");
|
|
return "".concat(t[2], "/").concat(t[1])
|
|
},
|
|
Va = function(e) {
|
|
return e.replace(/,[ ]*/, ", ")
|
|
},
|
|
Ga = function(e) {
|
|
return Object.keys(e).reduce(function(t, a) {
|
|
return Object(b.a)(Object(b.a)({}, t), e[a] && {
|
|
[a]: e[a]
|
|
})
|
|
}, {})
|
|
},
|
|
za = function() {
|
|
return localStorage.getItem("csrfToken") || void 0
|
|
},
|
|
Ka = function(e) {
|
|
return {
|
|
apiVersion: "peatio",
|
|
headers: {
|
|
"X-CSRF-Token": e
|
|
}
|
|
}
|
|
},
|
|
Za = function(e) {
|
|
return {
|
|
apiVersion: "barong",
|
|
headers: {
|
|
"X-CSRF-Token": e
|
|
}
|
|
}
|
|
},
|
|
Ya = function(e) {
|
|
return {
|
|
apiVersion: "finex",
|
|
headers: {
|
|
"X-CSRF-Token": e
|
|
}
|
|
}
|
|
},
|
|
qa = a(206),
|
|
Ja = function(e) {
|
|
return e && e.length && void 0 !== qa.countries[e.toUpperCase()] ? qa.countries[e.toUpperCase()].name :
|
|
""
|
|
},
|
|
Qa = function(e) {
|
|
return {
|
|
firstName: e.first_name,
|
|
lastName: e.last_name,
|
|
dob: e.dob ? Wa(e.dob, "date") : "",
|
|
address: e.address,
|
|
city: e.city,
|
|
country: Ja(e.country),
|
|
nationality: e.metadata ? JSON.parse(e.metadata).nationality : "",
|
|
postcode: e.postcode,
|
|
state: e.state,
|
|
created_at: e.created_at,
|
|
updated_at: e.updated_at
|
|
}
|
|
},
|
|
Xa = function(e) {
|
|
return {
|
|
type: Te,
|
|
payload: e
|
|
}
|
|
},
|
|
$a = function(e) {
|
|
return {
|
|
type: "ALERT_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
en = function() {
|
|
return {
|
|
type: "ALERT_DELETE"
|
|
}
|
|
},
|
|
tn = T.a.mark(nn),
|
|
an = T.a.mark(rn);
|
|
|
|
function nn(e) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
if ("error" !== e.payload.type) {
|
|
t.next = 42;
|
|
break
|
|
}
|
|
t.t0 = e.payload.code, t.next = 401 === t.t0 ? 4 : 403 === t.t0 ? 31 : 38;
|
|
break;
|
|
case 4:
|
|
if (!(e.payload.message.indexOf("identity.session.not_active") > -1)) {
|
|
t.next = 13;
|
|
break
|
|
}
|
|
return t.next = 7, Object(P.c)(Vl());
|
|
case 7:
|
|
return localStorage.removeItem("csrfToken"), t.next = 10, Object(P.c)($a(e.payload));
|
|
case 10:
|
|
return t.abrupt("return");
|
|
case 13:
|
|
if (!(e.payload.message.indexOf("authz.invalid_session") > -1)) {
|
|
t.next = 19;
|
|
break
|
|
}
|
|
return t.next = 16, Object(P.c)(Vl());
|
|
case 16:
|
|
localStorage.removeItem("csrfToken"), t.next = 30;
|
|
break;
|
|
case 19:
|
|
if (!(e.payload.message.indexOf("authz.client_session_mismatch") > -1 || e.payload.message
|
|
.indexOf("authz.csrf_token_mismatch") > -1)) {
|
|
t.next = 27;
|
|
break
|
|
}
|
|
return t.next = 22, Object(P.c)(Vl());
|
|
case 22:
|
|
return localStorage.removeItem("csrfToken"), t.next = 25, Object(P.b)(rn, e);
|
|
case 25:
|
|
t.next = 30;
|
|
break;
|
|
case 27:
|
|
return t.next = 29, Object(P.b)(rn, e);
|
|
case 29:
|
|
case 30:
|
|
return t.abrupt("break", 40);
|
|
case 31:
|
|
if (!(e.payload.message.indexOf("identity.session.invalid_otp") > -1)) {
|
|
t.next = 34;
|
|
break
|
|
}
|
|
return t.next = 34, Object(P.b)(rn, e);
|
|
case 34:
|
|
if (!(e.payload.message.indexOf("jwt.decode_and_verify") > -1)) {
|
|
t.next = 37;
|
|
break
|
|
}
|
|
return t.next = 37, Object(P.b)(rn, e);
|
|
case 37:
|
|
return t.abrupt("return");
|
|
case 38:
|
|
return t.next = 40, Object(P.b)(rn, e);
|
|
case 40:
|
|
t.next = 44;
|
|
break;
|
|
case 42:
|
|
return t.next = 44, Object(P.b)(rn, e);
|
|
case 44:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, tn)
|
|
}
|
|
|
|
function rn(e) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.next = 2, Object(P.c)($a(e.payload));
|
|
case 2:
|
|
return t.next = 4, Object(l.b)(parseFloat(C()));
|
|
case 4:
|
|
return t.next = 6, Object(P.c)(en());
|
|
case 6:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, an)
|
|
}
|
|
var on = T.a.mark(sn);
|
|
|
|
function sn() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.d)(Te, nn);
|
|
case 2:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, on)
|
|
}
|
|
var cn = {
|
|
alerts: []
|
|
},
|
|
ln = function() {
|
|
var e, t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : cn,
|
|
a = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (a.type) {
|
|
case "ALERT_DATA":
|
|
return {
|
|
alerts: [].concat(Object(f.a)(t.alerts), [a.payload])
|
|
};
|
|
case "ALERT_DELETE":
|
|
return {
|
|
alerts: Object(f.a)(t.alerts.slice(1, t.alerts.length))
|
|
};
|
|
case "ALERT_DELETE_BY_INDEX":
|
|
return {
|
|
alerts: Object(f.a)((e = t.alerts.slice(0, a.index)).concat.apply(e, Object(f.a)(t.alerts.slice(a
|
|
.index + 1))))
|
|
};
|
|
default:
|
|
return t
|
|
}
|
|
},
|
|
un = function(e) {
|
|
return e.alert
|
|
},
|
|
dn = T.a.mark(pn);
|
|
|
|
function pn(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(n) {
|
|
for (;;) switch (n.prev = n.next) {
|
|
case 0:
|
|
return n.prev = 0, n.next = 3, Object(P.b)(Ca.post(Ka(za())), "/admin/adjustments/new", e
|
|
.payload);
|
|
case 3:
|
|
return t = n.sent, a = t.data, n.next = 7, Object(P.c)(la(a));
|
|
case 7:
|
|
return n.next = 9, Object(P.c)(Xa({
|
|
message: ["Adjustment successfully created"],
|
|
type: "success"
|
|
}));
|
|
case 9:
|
|
return n.next = 11, Object(P.c)(Object(s.push)("/tower/accountings/adjustments"));
|
|
case 11:
|
|
n.next = 19;
|
|
break;
|
|
case 13:
|
|
return n.prev = 13, n.t0 = n.catch(0), n.next = 17, Object(P.c)(ua());
|
|
case 17:
|
|
return n.next = 19, Object(P.c)(Xa({
|
|
message: n.t0.message,
|
|
code: n.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 19:
|
|
case "end":
|
|
return n.stop()
|
|
}
|
|
}, dn, null, [
|
|
[0, 13]
|
|
])
|
|
}
|
|
var hn = T.a.mark(mn),
|
|
gn = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function mn(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(n) {
|
|
for (;;) switch (n.prev = n.next) {
|
|
case 0:
|
|
return n.prev = 0, n.next = 3, Object(P.b)(Ca.get(gn), "/admin/adjustments/".concat(e.payload
|
|
.id));
|
|
case 3:
|
|
return t = n.sent, a = t.data, n.next = 7, Object(P.c)(sa(a));
|
|
case 7:
|
|
n.next = 15;
|
|
break;
|
|
case 9:
|
|
return n.prev = 9, n.t0 = n.catch(0), n.next = 13, Object(P.c)(ca());
|
|
case 13:
|
|
return n.next = 15, Object(P.c)(Xa({
|
|
message: n.t0.message,
|
|
code: n.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return n.stop()
|
|
}
|
|
}, hn, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var fn = T.a.mark(yn),
|
|
bn = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function yn(e) {
|
|
var t, a, n, r;
|
|
return T.a.wrap(function(i) {
|
|
for (;;) switch (i.prev = i.next) {
|
|
case 0:
|
|
return i.prev = 0, t = ka(e.payload), i.next = 4, Object(P.b)(Ca.get(bn),
|
|
"/admin/adjustments?".concat(t));
|
|
case 4:
|
|
return a = i.sent, n = a.data, r = a.headers, i.next = 9, Object(P.c)(ia({
|
|
list: n,
|
|
total: r.total
|
|
}));
|
|
case 9:
|
|
i.next = 17;
|
|
break;
|
|
case 11:
|
|
return i.prev = 11, i.t0 = i.catch(0), i.next = 15, Object(P.c)(oa());
|
|
case 15:
|
|
return i.next = 17, Object(P.c)(Xa({
|
|
message: i.t0.message,
|
|
code: i.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 17:
|
|
case "end":
|
|
return i.stop()
|
|
}
|
|
}, fn, null, [
|
|
[0, 11]
|
|
])
|
|
}
|
|
var vn = T.a.mark(wn);
|
|
|
|
function wn(e) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.prev = 0, t.next = 3, Object(P.b)(Ca.post(Ka(za())), "/admin/adjustments/action", e
|
|
.payload);
|
|
case 3:
|
|
return t.next = 5, Object(P.c)(da());
|
|
case 5:
|
|
return t.next = 7, Object(P.c)(Xa({
|
|
message: ["Adjustment successfully updated"],
|
|
type: "success"
|
|
}));
|
|
case 7:
|
|
return t.next = 9, Object(P.c)(Object(s.push)("/tower/accountings/adjustments"));
|
|
case 9:
|
|
t.next = 17;
|
|
break;
|
|
case 11:
|
|
return t.prev = 11, t.t0 = t.catch(0), t.next = 15, Object(P.c)(pa());
|
|
case 15:
|
|
return t.next = 17, Object(P.c)(Xa({
|
|
message: t.t0.message,
|
|
code: t.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 17:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, vn, null, [
|
|
[0, 11]
|
|
])
|
|
}
|
|
var En = T.a.mark(Cn);
|
|
|
|
function Cn() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(je, yn);
|
|
case 2:
|
|
return e.next = 4, Object(P.e)(_e, pn);
|
|
case 4:
|
|
return e.next = 6, Object(P.e)(Re, mn);
|
|
case 6:
|
|
return e.next = 8, Object(P.e)(Se, wn);
|
|
case 8:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, En)
|
|
}
|
|
var On = function(e) {
|
|
return e.adjustments.list
|
|
},
|
|
kn = function(e) {
|
|
return e.adjustments.total
|
|
},
|
|
xn = function(e) {
|
|
return e.adjustments.adjustment
|
|
},
|
|
jn = function(e) {
|
|
return {
|
|
type: "ASSETS_LIST_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
_n = function() {
|
|
return {
|
|
type: "ASSETS_LIST_ERROR"
|
|
}
|
|
},
|
|
Rn = {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
},
|
|
Sn = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Rn,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case Pe:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "ASSETS_LIST_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: t.payload.list,
|
|
total: t.payload.total
|
|
});
|
|
case "ASSETS_LIST_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
Tn = function(e) {
|
|
return e.assets.list
|
|
},
|
|
Pn = function(e) {
|
|
return e.assets.total
|
|
},
|
|
An = T.a.mark(Dn),
|
|
Ln = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function Dn(e) {
|
|
var t, a, n, r, i, o, s, c, l;
|
|
return T.a.wrap(function(u) {
|
|
for (;;) switch (u.prev = u.next) {
|
|
case 0:
|
|
return u.prev = 0, t = e.payload, a = t.page, n = t.limit, r = ka(e.payload), u.next = 5,
|
|
Object(P.b)(Ca.get(Ln), "/admin/assets?".concat(r));
|
|
case 5:
|
|
if (i = u.sent, o = i.data, s = (a - 1) * n + o.length, o.length !== n) {
|
|
u.next = 15;
|
|
break
|
|
}
|
|
return c = Object(b.a)(Object(b.a)({}, e.payload), {}, {
|
|
page: a * n + 1,
|
|
limit: 1
|
|
}), l = ka(c), u.next = 13, Object(P.b)(Ca.get(Ln), "/admin/assets?".concat(l));
|
|
case 13:
|
|
1 === u.sent.data.length && s++;
|
|
case 15:
|
|
return u.next = 17, Object(P.c)(jn({
|
|
list: o,
|
|
total: s
|
|
}));
|
|
case 17:
|
|
u.next = 25;
|
|
break;
|
|
case 19:
|
|
return u.prev = 19, u.t0 = u.catch(0), u.next = 23, Object(P.c)(_n());
|
|
case 23:
|
|
return u.next = 25, Object(P.c)(Xa({
|
|
message: u.t0.message,
|
|
code: u.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 25:
|
|
case "end":
|
|
return u.stop()
|
|
}
|
|
}, An, null, [
|
|
[0, 19]
|
|
])
|
|
}
|
|
var In = T.a.mark(Nn);
|
|
|
|
function Nn() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(Pe, Dn);
|
|
case 2:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, In)
|
|
}
|
|
var Fn = function(e) {
|
|
return {
|
|
type: "SIGN_IN_REQUIRE_2FA",
|
|
payload: e
|
|
}
|
|
},
|
|
Un = function() {
|
|
return {
|
|
type: Le
|
|
}
|
|
},
|
|
Mn = {
|
|
require2FA: !1
|
|
},
|
|
Bn = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Mn,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case "SIGN_IN_REQUIRE_2FA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
require2FA: t.payload.require2fa
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
Wn = T.a.mark(Vn),
|
|
Hn = {
|
|
apiVersion: "barong"
|
|
};
|
|
|
|
function Vn(e) {
|
|
var t;
|
|
return T.a.wrap(function(a) {
|
|
for (;;) switch (a.prev = a.next) {
|
|
case 0:
|
|
return a.prev = 0, a.next = 3, Object(P.b)(Ca.post(Hn), "/identity/sessions", e.payload);
|
|
case 3:
|
|
if (t = a.sent, !["admin", "superadmin", "accountant", "compliance", "support", "technical"]
|
|
.includes(t.data.role)) {
|
|
a.next = 10;
|
|
break
|
|
}
|
|
return a.next = 7, Object(P.c)(Hl(t.data));
|
|
case 7:
|
|
localStorage.setItem("csrfToken", t.data.csrf_token), a.next = 12;
|
|
break;
|
|
case 10:
|
|
return a.next = 12, Object(P.c)(Un());
|
|
case 12:
|
|
a.next = 30;
|
|
break;
|
|
case 14:
|
|
a.prev = 14, a.t0 = a.catch(0), a.t1 = a.t0.code, a.next = 401 === a.t1 ? 19 : 27;
|
|
break;
|
|
case 19:
|
|
if (!(a.t0.message.indexOf("identity.session.missing_otp") > -1)) {
|
|
a.next = 24;
|
|
break
|
|
}
|
|
return a.next = 22, Object(P.c)(Fn({
|
|
require2fa: !0
|
|
}));
|
|
case 22:
|
|
a.next = 26;
|
|
break;
|
|
case 24:
|
|
return a.next = 26, Object(P.c)(Xa({
|
|
message: a.t0.message,
|
|
code: a.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 26:
|
|
return a.abrupt("break", 30);
|
|
case 27:
|
|
return a.next = 29, Object(P.c)(Xa({
|
|
message: a.t0.message,
|
|
code: a.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 29:
|
|
return a.abrupt("break", 30);
|
|
case 30:
|
|
case "end":
|
|
return a.stop()
|
|
}
|
|
}, Wn, null, [
|
|
[0, 14]
|
|
])
|
|
}
|
|
var Gn = T.a.mark(Kn),
|
|
zn = {
|
|
apiVersion: "barong"
|
|
};
|
|
|
|
function Kn(e) {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.prev = 0, e.next = 3, Object(P.b)(Ca.delete(zn), "/identity/sessions");
|
|
case 3:
|
|
return e.next = 5, Object(P.c)(Vl());
|
|
case 5:
|
|
return localStorage.removeItem("csrfToken"), e.next = 8, Object(P.c)(Fn({
|
|
require2fa: !1
|
|
}));
|
|
case 8:
|
|
return e.next = 10, Object(P.c)(Qi({
|
|
isFilterOpen: !1
|
|
}));
|
|
case 10:
|
|
return e.next = 12, Object(P.c)(os(!1));
|
|
case 12:
|
|
e.next = 18;
|
|
break;
|
|
case 14:
|
|
return e.prev = 14, e.t0 = e.catch(0), e.next = 18, Object(P.c)(Xa({
|
|
message: e.t0.message,
|
|
code: e.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 18:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, Gn, null, [
|
|
[0, 14]
|
|
])
|
|
}
|
|
var Zn = T.a.mark(Yn);
|
|
|
|
function Yn() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(Ae, Vn);
|
|
case 2:
|
|
return e.next = 4, Object(P.e)(Le, Kn);
|
|
case 4:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, Zn)
|
|
}
|
|
var qn = function(e) {
|
|
return e.auth.require2FA
|
|
},
|
|
Jn = function(e) {
|
|
return {
|
|
type: De,
|
|
payload: e
|
|
}
|
|
},
|
|
Qn = function(e) {
|
|
return {
|
|
type: "BLOCKCHAINS_LIST_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
Xn = function() {
|
|
return {
|
|
type: "BLOCKCHAINS_LIST_ERROR"
|
|
}
|
|
},
|
|
$n = function(e) {
|
|
return {
|
|
type: "BLOCKCHAINS_ITEM_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
er = function() {
|
|
return {
|
|
type: "BLOCKCHAINS_ITEM_ERROR"
|
|
}
|
|
},
|
|
tr = function(e) {
|
|
return {
|
|
type: "BLOCKCHAIN_ITEM_UPDATE_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
ar = function() {
|
|
return {
|
|
type: "BLOCKCHAIN_ITEM_UPDATE_ERROR"
|
|
}
|
|
},
|
|
nr = function(e) {
|
|
return {
|
|
type: "BLOCKCHAIN_ITEM_CREATE_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
rr = function() {
|
|
return {
|
|
type: "BLOCKCHAIN_ITEM_CREATE_ERROR"
|
|
}
|
|
},
|
|
ir = function() {
|
|
return {
|
|
type: Ue
|
|
}
|
|
},
|
|
or = function(e) {
|
|
return {
|
|
type: "BLOCKCHAIN_CLIENTS_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
sr = function() {
|
|
return {
|
|
type: "BLOCKCHAIN_CLIENTS_ERROR"
|
|
}
|
|
},
|
|
cr = {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0,
|
|
clientsList: []
|
|
},
|
|
lr = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : cr,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case De:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "BLOCKCHAINS_LIST_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: t.payload.list,
|
|
total: t.payload.total
|
|
});
|
|
case "BLOCKCHAINS_LIST_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
});
|
|
case Ie:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "BLOCKCHAINS_ITEM_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
currentBlockchainItem: t.payload
|
|
});
|
|
case "BLOCKCHAINS_ITEM_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
currentBlockchainItem: void 0
|
|
});
|
|
case Ne:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "BLOCKCHAIN_ITEM_UPDATE_DATA":
|
|
case "BLOCKCHAIN_ITEM_UPDATE_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1
|
|
});
|
|
case Fe:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "BLOCKCHAIN_ITEM_CREATE_DATA":
|
|
case "BLOCKCHAIN_ITEM_CREATE_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1
|
|
});
|
|
case Ue:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "BLOCKCHAIN_CLIENTS_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
clientsList: t.payload.clientsList
|
|
});
|
|
case "BLOCKCHAIN_CLIENTS_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
clientsList: []
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
ur = function(e) {
|
|
return e.blockchains.list
|
|
},
|
|
dr = function(e) {
|
|
return e.blockchains.total
|
|
},
|
|
pr = function(e) {
|
|
return e.blockchains.currentBlockchainItem
|
|
},
|
|
hr = function(e) {
|
|
return e.blockchains.clientsList
|
|
},
|
|
gr = T.a.mark(mr);
|
|
|
|
function mr(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(n) {
|
|
for (;;) switch (n.prev = n.next) {
|
|
case 0:
|
|
return n.prev = 0, n.next = 3, Object(P.b)(Ca.post(Ka(za())), "/admin/blockchains/new", e
|
|
.payload);
|
|
case 3:
|
|
return t = n.sent, a = t.data, n.next = 7, Object(P.c)(nr(a));
|
|
case 7:
|
|
return n.next = 9, Object(P.c)(Xa({
|
|
message: ["Blockchain successfully created"],
|
|
type: "success"
|
|
}));
|
|
case 9:
|
|
return n.next = 11, Object(P.c)(Object(s.push)("/tower/settings/blockchains"));
|
|
case 11:
|
|
n.next = 19;
|
|
break;
|
|
case 13:
|
|
return n.prev = 13, n.t0 = n.catch(0), n.next = 17, Object(P.c)(rr());
|
|
case 17:
|
|
return n.next = 19, Object(P.c)(Xa({
|
|
message: n.t0.message,
|
|
code: n.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 19:
|
|
case "end":
|
|
return n.stop()
|
|
}
|
|
}, gr, null, [
|
|
[0, 13]
|
|
])
|
|
}
|
|
var fr = T.a.mark(yr),
|
|
br = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function yr(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(n) {
|
|
for (;;) switch (n.prev = n.next) {
|
|
case 0:
|
|
return n.prev = 0, n.next = 3, Object(P.b)(Ca.get(br), "/admin/blockchains/".concat(e
|
|
.payload));
|
|
case 3:
|
|
return t = n.sent, a = t.data, n.next = 7, Object(P.c)($n(a));
|
|
case 7:
|
|
n.next = 15;
|
|
break;
|
|
case 9:
|
|
return n.prev = 9, n.t0 = n.catch(0), n.next = 13, Object(P.c)(er());
|
|
case 13:
|
|
return n.next = 15, Object(P.c)(Xa({
|
|
message: n.t0.message,
|
|
code: n.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return n.stop()
|
|
}
|
|
}, fr, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var vr = T.a.mark(Er),
|
|
wr = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function Er(e) {
|
|
var t, a, n, r;
|
|
return T.a.wrap(function(i) {
|
|
for (;;) switch (i.prev = i.next) {
|
|
case 0:
|
|
return i.prev = 0, t = ka(e.payload), i.next = 4, Object(P.b)(Ca.get(wr),
|
|
"/admin/blockchains?".concat(t));
|
|
case 4:
|
|
return a = i.sent, n = a.data, r = a.headers, i.next = 9, Object(P.c)(Qn({
|
|
list: n,
|
|
total: r.total
|
|
}));
|
|
case 9:
|
|
i.next = 17;
|
|
break;
|
|
case 11:
|
|
return i.prev = 11, i.t0 = i.catch(0), i.next = 15, Object(P.c)(Xn());
|
|
case 15:
|
|
return i.next = 17, Object(P.c)(Xa({
|
|
message: i.t0.message,
|
|
code: i.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 17:
|
|
case "end":
|
|
return i.stop()
|
|
}
|
|
}, vr, null, [
|
|
[0, 11]
|
|
])
|
|
}
|
|
var Cr = T.a.mark(kr),
|
|
Or = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function kr(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.prev = 0, e.next = 3, Object(P.b)(Ca.get(Or), "/admin/blockchains/clients");
|
|
case 3:
|
|
return t = e.sent, a = t.data, e.next = 7, Object(P.c)(or({
|
|
clientsList: a
|
|
}));
|
|
case 7:
|
|
e.next = 15;
|
|
break;
|
|
case 9:
|
|
return e.prev = 9, e.t0 = e.catch(0), e.next = 13, Object(P.c)(sr());
|
|
case 13:
|
|
return e.next = 15, Object(P.c)(Xa({
|
|
message: e.t0.message,
|
|
code: e.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, Cr, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var xr = T.a.mark(jr);
|
|
|
|
function jr(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(n) {
|
|
for (;;) switch (n.prev = n.next) {
|
|
case 0:
|
|
return n.prev = 0, n.next = 3, Object(P.b)(Ca.post(Ka(za())), "/admin/blockchains/update", e
|
|
.payload);
|
|
case 3:
|
|
return t = n.sent, a = t.data, n.next = 7, Object(P.c)(tr(a));
|
|
case 7:
|
|
return n.next = 9, Object(P.c)(Xa({
|
|
message: ["Blockchain successfully updated"],
|
|
type: "success"
|
|
}));
|
|
case 9:
|
|
return n.next = 11, Object(P.c)(Object(s.push)("/tower/settings/blockchains"));
|
|
case 11:
|
|
n.next = 19;
|
|
break;
|
|
case 13:
|
|
return n.prev = 13, n.t0 = n.catch(0), n.next = 17, Object(P.c)(ar());
|
|
case 17:
|
|
return n.next = 19, Object(P.c)(Xa({
|
|
message: n.t0.message,
|
|
code: n.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 19:
|
|
case "end":
|
|
return n.stop()
|
|
}
|
|
}, xr, null, [
|
|
[0, 13]
|
|
])
|
|
}
|
|
var _r = T.a.mark(Rr);
|
|
|
|
function Rr() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(De, Er);
|
|
case 2:
|
|
return e.next = 4, Object(P.e)(Ie, yr);
|
|
case 4:
|
|
return e.next = 6, Object(P.e)(Fe, mr);
|
|
case 6:
|
|
return e.next = 8, Object(P.e)(Ne, jr);
|
|
case 8:
|
|
return e.next = 10, Object(P.e)(Ue, kr);
|
|
case 10:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, _r)
|
|
}
|
|
var Sr = {
|
|
OTPChanged: !1,
|
|
roleChanged: !1,
|
|
stateChanged: !1
|
|
},
|
|
Tr = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Sr;
|
|
switch ((arguments.length > 1 ? arguments[1] : void 0).type) {
|
|
case We:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
OTPChanged: !0
|
|
});
|
|
case Be:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
roleChanged: !0
|
|
});
|
|
case Me:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
stateChanged: !0
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
Pr = T.a.mark(Ar);
|
|
|
|
function Ar(e) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.prev = 0, t.next = 3, Object(P.b)(Ca.post(Za(za())), "/admin/users/update", e
|
|
.payload);
|
|
case 3:
|
|
return t.next = 5, Object(P.c)(Cu({
|
|
uid: e.payload.uid
|
|
}));
|
|
case 5:
|
|
t.next = 11;
|
|
break;
|
|
case 7:
|
|
return t.prev = 7, t.t0 = t.catch(0), t.next = 11, Object(P.c)(Xa({
|
|
message: t.t0.message,
|
|
code: t.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 11:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, Pr, null, [
|
|
[0, 7]
|
|
])
|
|
}
|
|
var Lr = T.a.mark(Dr);
|
|
|
|
function Dr(e) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.prev = 0, t.next = 3, Object(P.b)(Ca.post(Za(za())), "/admin/users/role", e.payload);
|
|
case 3:
|
|
return t.next = 5, Object(P.c)(Cu({
|
|
uid: e.payload.uid
|
|
}));
|
|
case 5:
|
|
t.next = 11;
|
|
break;
|
|
case 7:
|
|
return t.prev = 7, t.t0 = t.catch(0), t.next = 11, Object(P.c)(Xa({
|
|
message: t.t0.message,
|
|
code: t.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 11:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, Lr, null, [
|
|
[0, 7]
|
|
])
|
|
}
|
|
var Ir = T.a.mark(Nr);
|
|
|
|
function Nr(e) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.prev = 0, t.next = 3, Object(P.b)(Ca.post(Za(za())), "/admin/users/update", e
|
|
.payload);
|
|
case 3:
|
|
return t.next = 5, Object(P.c)(Cu({
|
|
uid: e.payload.uid
|
|
}));
|
|
case 5:
|
|
t.next = 11;
|
|
break;
|
|
case 7:
|
|
return t.prev = 7, t.t0 = t.catch(0), t.next = 11, Object(P.c)(Xa({
|
|
message: t.t0.message,
|
|
code: t.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 11:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, Ir, null, [
|
|
[0, 7]
|
|
])
|
|
}
|
|
var Fr = T.a.mark(Ur);
|
|
|
|
function Ur() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(We, Ar);
|
|
case 2:
|
|
return e.next = 4, Object(P.e)(Be, Dr);
|
|
case 4:
|
|
return e.next = 6, Object(P.e)(Me, Nr);
|
|
case 6:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, Fr)
|
|
}
|
|
var Mr = function(e) {
|
|
return {
|
|
type: He,
|
|
payload: e
|
|
}
|
|
},
|
|
Br = function(e) {
|
|
return {
|
|
type: "CURRENCIES_LIST_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
Wr = function() {
|
|
return {
|
|
type: "CURRENCIES_LIST_ERROR"
|
|
}
|
|
},
|
|
Hr = function(e) {
|
|
return {
|
|
type: "CURRENCY_ADD_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
Vr = function() {
|
|
return {
|
|
type: "CURRENCY_ADD_ERROR"
|
|
}
|
|
},
|
|
Gr = function(e) {
|
|
return {
|
|
type: "CURRENCY_EDIT_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
zr = function() {
|
|
return {
|
|
type: "CURRENCY_EDIT_ERROR"
|
|
}
|
|
},
|
|
Kr = function(e) {
|
|
return {
|
|
type: ze,
|
|
payload: e
|
|
}
|
|
},
|
|
Zr = function(e) {
|
|
return {
|
|
type: "CURRENCY_GET_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
Yr = function() {
|
|
return {
|
|
type: "CURRENCY_GET_ERROR"
|
|
}
|
|
},
|
|
qr = {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
},
|
|
Jr = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : qr,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case He:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "CURRENCIES_LIST_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: t.payload.list,
|
|
total: t.payload.total
|
|
});
|
|
case "CURRENCIES_LIST_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
});
|
|
case Ve:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "CURRENCY_ADD_DATA":
|
|
case "CURRENCY_ADD_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1
|
|
});
|
|
case Ge:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "CURRENCY_EDIT_DATA":
|
|
case "CURRENCY_EDIT_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1
|
|
});
|
|
case ze:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "CURRENCY_GET_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
currency: t.payload.currency
|
|
});
|
|
case "CURRENCY_GET_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
currency: void 0
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
Qr = function(e) {
|
|
return e.currencies.list
|
|
},
|
|
Xr = function(e) {
|
|
return e.currencies.total
|
|
},
|
|
$r = function(e) {
|
|
return e.currencies.currency
|
|
},
|
|
ei = T.a.mark(ti);
|
|
|
|
function ti(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(n) {
|
|
for (;;) switch (n.prev = n.next) {
|
|
case 0:
|
|
return n.prev = 0, n.next = 3, Object(P.b)(Ca.post(Ka(za())), "/admin/currencies/new", e
|
|
.payload);
|
|
case 3:
|
|
return t = n.sent, a = t.data, n.next = 7, Object(P.c)(Hr({
|
|
currency: a
|
|
}));
|
|
case 7:
|
|
return n.next = 9, Object(P.c)(Xa({
|
|
message: ["Currency successfully created"],
|
|
type: "success"
|
|
}));
|
|
case 9:
|
|
return n.next = 11, Object(P.c)(Object(s.push)("/tower/exchange/currencies"));
|
|
case 11:
|
|
n.next = 19;
|
|
break;
|
|
case 13:
|
|
return n.prev = 13, n.t0 = n.catch(0), n.next = 17, Object(P.c)(Vr());
|
|
case 17:
|
|
return n.next = 19, Object(P.c)(Xa({
|
|
message: n.t0.message,
|
|
code: n.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 19:
|
|
case "end":
|
|
return n.stop()
|
|
}
|
|
}, ei, null, [
|
|
[0, 13]
|
|
])
|
|
}
|
|
var ai = T.a.mark(ni);
|
|
|
|
function ni(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(n) {
|
|
for (;;) switch (n.prev = n.next) {
|
|
case 0:
|
|
return n.prev = 0, n.next = 3, Object(P.b)(Ca.post(Ka(za())), "/admin/currencies/update", e
|
|
.payload);
|
|
case 3:
|
|
return t = n.sent, a = t.data, n.next = 7, Object(P.c)(Gr({
|
|
currency: a
|
|
}));
|
|
case 7:
|
|
return n.next = 9, Object(P.c)(Xa({
|
|
message: ["Currency successfully updated"],
|
|
type: "success"
|
|
}));
|
|
case 9:
|
|
return n.next = 11, Object(P.c)(Object(s.push)("/tower/exchange/currencies"));
|
|
case 11:
|
|
n.next = 19;
|
|
break;
|
|
case 13:
|
|
return n.prev = 13, n.t0 = n.catch(0), n.next = 17, Object(P.c)(zr());
|
|
case 17:
|
|
return n.next = 19, Object(P.c)(Xa({
|
|
message: n.t0.message,
|
|
code: n.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 19:
|
|
case "end":
|
|
return n.stop()
|
|
}
|
|
}, ai, null, [
|
|
[0, 13]
|
|
])
|
|
}
|
|
var ri = T.a.mark(oi),
|
|
ii = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function oi(e) {
|
|
var t, a, n, r;
|
|
return T.a.wrap(function(i) {
|
|
for (;;) switch (i.prev = i.next) {
|
|
case 0:
|
|
return i.prev = 0, t = ka(e.payload), i.next = 4, Object(P.b)(Ca.get(ii), "/admin/currencies?"
|
|
.concat(t));
|
|
case 4:
|
|
return a = i.sent, n = a.data, r = a.headers, i.next = 9, Object(P.c)(Br({
|
|
list: n,
|
|
total: r.total
|
|
}));
|
|
case 9:
|
|
i.next = 17;
|
|
break;
|
|
case 11:
|
|
return i.prev = 11, i.t0 = i.catch(0), i.next = 15, Object(P.c)(Wr());
|
|
case 15:
|
|
return i.next = 17, Object(P.c)(Xa({
|
|
message: i.t0.message,
|
|
code: i.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 17:
|
|
case "end":
|
|
return i.stop()
|
|
}
|
|
}, ri, null, [
|
|
[0, 11]
|
|
])
|
|
}
|
|
var si = T.a.mark(li),
|
|
ci = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function li(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(n) {
|
|
for (;;) switch (n.prev = n.next) {
|
|
case 0:
|
|
return n.prev = 0, n.next = 3, Object(P.b)(Ca.get(ci), "/admin/currencies/".concat(e.payload
|
|
.code));
|
|
case 3:
|
|
return t = n.sent, a = t.data, n.next = 7, Object(P.c)(Zr({
|
|
currency: a
|
|
}));
|
|
case 7:
|
|
n.next = 15;
|
|
break;
|
|
case 9:
|
|
return n.prev = 9, n.t0 = n.catch(0), n.next = 13, Object(P.c)(Yr());
|
|
case 13:
|
|
return n.next = 15, Object(P.c)(Xa({
|
|
message: n.t0.message,
|
|
code: n.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return n.stop()
|
|
}
|
|
}, si, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var ui = T.a.mark(di);
|
|
|
|
function di() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(He, oi);
|
|
case 2:
|
|
return e.next = 4, Object(P.e)(Ve, ti);
|
|
case 4:
|
|
return e.next = 6, Object(P.e)(Ge, ni);
|
|
case 6:
|
|
return e.next = 8, Object(P.e)(ze, li);
|
|
case 8:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, ui)
|
|
}
|
|
var pi = function(e) {
|
|
return {
|
|
type: Ke,
|
|
payload: e
|
|
}
|
|
},
|
|
hi = function(e) {
|
|
return {
|
|
type: "DEPOSITS_LIST_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
gi = function() {
|
|
return {
|
|
type: "DEPOSITS_LIST_ERROR"
|
|
}
|
|
},
|
|
mi = function(e) {
|
|
return {
|
|
type: Ze,
|
|
payload: e
|
|
}
|
|
},
|
|
fi = function(e) {
|
|
return {
|
|
type: "DEPOSIT_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
bi = function() {
|
|
return {
|
|
type: "DEPOSIT_ERROR"
|
|
}
|
|
},
|
|
yi = function() {
|
|
return {
|
|
type: "DEPOSIT_ACCEPT_ERROR"
|
|
}
|
|
},
|
|
vi = function() {
|
|
return {
|
|
type: "DEPOSIT_REJECT_ERROR"
|
|
}
|
|
},
|
|
wi = function() {
|
|
return {
|
|
type: "DEPOSIT_ADD_ERROR"
|
|
}
|
|
},
|
|
Ei = {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0,
|
|
deposit: [],
|
|
rejectLoading: !1,
|
|
acceptLoading: !1,
|
|
depositAddLoading: !1
|
|
},
|
|
Ci = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Ei,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case Ke:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "DEPOSITS_LIST_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: t.payload.list,
|
|
total: t.payload.total
|
|
});
|
|
case "DEPOSITS_LIST_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
});
|
|
case Ze:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "DEPOSIT_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
deposit: t.payload
|
|
});
|
|
case "DEPOSIT_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1
|
|
});
|
|
case Ye:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
acceptLoading: !0
|
|
});
|
|
case "DEPOSIT_ACCEPT_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
acceptLoading: !1
|
|
});
|
|
case qe:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
rejectLoading: !0
|
|
});
|
|
case "DEPOSIT_REJECT_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
rejectLoading: !1
|
|
});
|
|
case Je:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
depositAddLoading: !0
|
|
});
|
|
case "DEPOSIT_ADD_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
depositAddLoading: !1
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
Oi = function(e) {
|
|
return e.deposits.list
|
|
},
|
|
ki = function(e) {
|
|
return e.deposits.total
|
|
},
|
|
xi = function(e) {
|
|
return e.deposits.deposit
|
|
},
|
|
ji = T.a.mark(_i);
|
|
|
|
function _i(e) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.prev = 0, t.next = 3, Object(P.b)(Ca.post(Ka(za())), "/admin/deposits/new", e.payload
|
|
.deposit);
|
|
case 3:
|
|
return t.next = 5, Object(P.c)(pi(e.payload.params));
|
|
case 5:
|
|
return t.next = 7, Object(P.c)(Xa({
|
|
message: ["Deposit successfully created"],
|
|
type: "success"
|
|
}));
|
|
case 7:
|
|
t.next = 15;
|
|
break;
|
|
case 9:
|
|
return t.prev = 9, t.t0 = t.catch(0), t.next = 13, Object(P.c)(wi());
|
|
case 13:
|
|
return t.next = 15, Object(P.c)(Xa({
|
|
message: t.t0.message,
|
|
code: t.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, ji, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var Ri = T.a.mark(Si);
|
|
|
|
function Si(e) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.prev = 0, t.next = 3, Object(P.b)(Ca.post(Ka(za())), "/admin/deposits/actions", e
|
|
.payload);
|
|
case 3:
|
|
return t.next = 5, Object(P.c)(mi({
|
|
id: e.payload.id
|
|
}));
|
|
case 5:
|
|
return t.next = 7, Object(P.c)(Xa({
|
|
message: ["Deposit successfully accepted"],
|
|
type: "success"
|
|
}));
|
|
case 7:
|
|
t.next = 15;
|
|
break;
|
|
case 9:
|
|
return t.prev = 9, t.t0 = t.catch(0), t.next = 13, Object(P.c)(yi());
|
|
case 13:
|
|
return t.next = 15, Object(P.c)(Xa({
|
|
message: t.t0.message,
|
|
code: t.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, Ri, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var Ti = T.a.mark(Ai),
|
|
Pi = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function Ai(e) {
|
|
var t, a, n;
|
|
return T.a.wrap(function(r) {
|
|
for (;;) switch (r.prev = r.next) {
|
|
case 0:
|
|
return r.prev = 0, t = ka(e.payload), r.next = 4, Object(P.b)(Ca.get(Pi), "/admin/deposits?"
|
|
.concat(t));
|
|
case 4:
|
|
return a = r.sent, n = a.data, r.next = 8, Object(P.c)(fi(n));
|
|
case 8:
|
|
r.next = 16;
|
|
break;
|
|
case 10:
|
|
return r.prev = 10, r.t0 = r.catch(0), r.next = 14, Object(P.c)(bi());
|
|
case 14:
|
|
return r.next = 16, Object(P.c)(Xa({
|
|
message: r.t0.message,
|
|
code: r.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 16:
|
|
case "end":
|
|
return r.stop()
|
|
}
|
|
}, Ti, null, [
|
|
[0, 10]
|
|
])
|
|
}
|
|
var Li = T.a.mark(Di);
|
|
|
|
function Di(e) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.prev = 0, t.next = 3, Object(P.b)(Ca.post(Ka(za())), "/admin/deposits/actions", e
|
|
.payload);
|
|
case 3:
|
|
return t.next = 5, Object(P.c)(mi({
|
|
id: e.payload.id
|
|
}));
|
|
case 5:
|
|
return t.next = 7, Object(P.c)(Xa({
|
|
message: ["Deposit successfully rejected"],
|
|
type: "success"
|
|
}));
|
|
case 7:
|
|
t.next = 15;
|
|
break;
|
|
case 9:
|
|
return t.prev = 9, t.t0 = t.catch(0), t.next = 13, Object(P.c)(vi());
|
|
case 13:
|
|
return t.next = 15, Object(P.c)(Xa({
|
|
message: t.t0.message,
|
|
code: t.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, Li, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var Ii = T.a.mark(Fi),
|
|
Ni = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function Fi(e) {
|
|
var t, a, n, r;
|
|
return T.a.wrap(function(i) {
|
|
for (;;) switch (i.prev = i.next) {
|
|
case 0:
|
|
return i.prev = 0, t = ka(e.payload), i.next = 4, Object(P.b)(Ca.get(Ni), "/admin/deposits?"
|
|
.concat(t));
|
|
case 4:
|
|
return a = i.sent, n = a.data, r = a.headers, i.next = 9, Object(P.c)(hi({
|
|
list: n,
|
|
total: r.total
|
|
}));
|
|
case 9:
|
|
i.next = 17;
|
|
break;
|
|
case 11:
|
|
return i.prev = 11, i.t0 = i.catch(0), i.next = 15, Object(P.c)(gi());
|
|
case 15:
|
|
return i.next = 17, Object(P.c)(Xa({
|
|
message: i.t0.message,
|
|
code: i.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 17:
|
|
case "end":
|
|
return i.stop()
|
|
}
|
|
}, Ii, null, [
|
|
[0, 11]
|
|
])
|
|
}
|
|
var Ui = T.a.mark(Mi);
|
|
|
|
function Mi() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(Ke, Fi);
|
|
case 2:
|
|
return e.next = 4, Object(P.e)(Ze, Ai);
|
|
case 4:
|
|
return e.next = 6, Object(P.e)(qe, Di);
|
|
case 6:
|
|
return e.next = 8, Object(P.e)(Ye, Si);
|
|
case 8:
|
|
return e.next = 10, Object(P.e)(Je, _i);
|
|
case 10:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, Ui)
|
|
}
|
|
var Bi = function(e) {
|
|
return {
|
|
type: "EXPENSES_LIST_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
Wi = function() {
|
|
return {
|
|
type: "EXPENSES_LIST_ERROR"
|
|
}
|
|
},
|
|
Hi = {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
},
|
|
Vi = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Hi,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case Qe:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "EXPENSES_LIST_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: t.payload.list,
|
|
total: t.payload.total
|
|
});
|
|
case "EXPENSES_LIST_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
Gi = function(e) {
|
|
return e.expenses.list
|
|
},
|
|
zi = function(e) {
|
|
return e.expenses.total
|
|
},
|
|
Ki = T.a.mark(Yi),
|
|
Zi = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function Yi(e) {
|
|
var t, a, n, r, i, o, s, c, l;
|
|
return T.a.wrap(function(u) {
|
|
for (;;) switch (u.prev = u.next) {
|
|
case 0:
|
|
return u.prev = 0, t = e.payload, a = t.page, n = t.limit, r = ka(e.payload), u.next = 5,
|
|
Object(P.b)(Ca.get(Zi), "/admin/expenses?".concat(r));
|
|
case 5:
|
|
if (i = u.sent, o = i.data, s = (a - 1) * n + o.length, o.length !== n) {
|
|
u.next = 15;
|
|
break
|
|
}
|
|
return c = Object(b.a)(Object(b.a)({}, e.payload), {}, {
|
|
page: a * n + 1,
|
|
limit: 1
|
|
}), l = ka(c), u.next = 13, Object(P.b)(Ca.get(Zi), "/admin/expenses?".concat(l));
|
|
case 13:
|
|
1 === u.sent.data.length && s++;
|
|
case 15:
|
|
return u.next = 17, Object(P.c)(Bi({
|
|
list: o,
|
|
total: s
|
|
}));
|
|
case 17:
|
|
u.next = 25;
|
|
break;
|
|
case 19:
|
|
return u.prev = 19, u.t0 = u.catch(0), u.next = 23, Object(P.c)(Wi());
|
|
case 23:
|
|
return u.next = 25, Object(P.c)(Xa({
|
|
message: u.t0.message,
|
|
code: u.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 25:
|
|
case "end":
|
|
return u.stop()
|
|
}
|
|
}, Ki, null, [
|
|
[0, 19]
|
|
])
|
|
}
|
|
var qi = T.a.mark(Ji);
|
|
|
|
function Ji() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(Qe, Yi);
|
|
case 2:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, qi)
|
|
}
|
|
var Qi = function(e) {
|
|
return {
|
|
type: "TOGGLE_FILTER_WIDGET",
|
|
payload: e
|
|
}
|
|
},
|
|
Xi = {
|
|
isFilterOpen: !1,
|
|
filterData: []
|
|
},
|
|
$i = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Xi,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case "TOGGLE_FILTER_WIDGET":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
isFilterOpen: t.payload.isFilterOpen
|
|
});
|
|
case "SAVE_FILTER_DATA_TO_STATE":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
filterData: t.payload
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
eo = function(e) {
|
|
return e.filterStatus.isFilterOpen
|
|
},
|
|
to = function(e) {
|
|
return e.filterStatus.filterData
|
|
},
|
|
ao = function(e) {
|
|
return {
|
|
type: Xe,
|
|
payload: e
|
|
}
|
|
},
|
|
no = function(e) {
|
|
return {
|
|
type: et,
|
|
payload: e
|
|
}
|
|
},
|
|
ro = {
|
|
labelAdded: !1,
|
|
labelDeleted: !1,
|
|
labelEdited: !1
|
|
},
|
|
io = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : ro;
|
|
switch ((arguments.length > 1 ? arguments[1] : void 0).type) {
|
|
case $e:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
labelAdded: !0
|
|
});
|
|
case Xe:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
labelDeleted: !0
|
|
});
|
|
case et:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
labelEdited: !0
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
oo = T.a.mark(so);
|
|
|
|
function so(e) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.prev = 0, t.next = 3, Object(P.b)(Ca.post(Za(za())), "/admin/users/labels", e
|
|
.payload);
|
|
case 3:
|
|
return t.next = 5, Object(P.c)(Cu({
|
|
uid: e.payload.uid
|
|
}));
|
|
case 5:
|
|
t.next = 11;
|
|
break;
|
|
case 7:
|
|
return t.prev = 7, t.t0 = t.catch(0), t.next = 11, Object(P.c)(Xa({
|
|
message: t.t0.message,
|
|
code: t.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 11:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, oo, null, [
|
|
[0, 7]
|
|
])
|
|
}
|
|
var co = T.a.mark(lo);
|
|
|
|
function lo(e) {
|
|
var t;
|
|
return T.a.wrap(function(a) {
|
|
for (;;) switch (a.prev = a.next) {
|
|
case 0:
|
|
return a.prev = 0, t = ka(e.payload), a.next = 4, Object(P.b)(Ca.delete(Za(za())),
|
|
"/admin/users/labels?".concat(t));
|
|
case 4:
|
|
return a.next = 6, Object(P.c)(Cu({
|
|
uid: e.payload.uid
|
|
}));
|
|
case 6:
|
|
if ("document" !== e.payload.key) {
|
|
a.next = 10;
|
|
break
|
|
}
|
|
return a.next = 10, Object(P.c)(bd({
|
|
uid: e.payload.uid
|
|
}));
|
|
case 10:
|
|
a.next = 16;
|
|
break;
|
|
case 12:
|
|
return a.prev = 12, a.t0 = a.catch(0), a.next = 16, Object(P.c)(Xa({
|
|
message: a.t0.message,
|
|
code: a.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 16:
|
|
case "end":
|
|
return a.stop()
|
|
}
|
|
}, co, null, [
|
|
[0, 12]
|
|
])
|
|
}
|
|
var uo = T.a.mark(po);
|
|
|
|
function po(e) {
|
|
var t, a, n;
|
|
return T.a.wrap(function(r) {
|
|
for (;;) switch (r.prev = r.next) {
|
|
case 0:
|
|
return r.prev = 0, r.next = 3, Object(P.b)(Ca.post(Za(za())), "/admin/users/labels/update", e
|
|
.payload);
|
|
case 3:
|
|
return r.next = 5, Object(P.c)(Cu({
|
|
uid: e.payload.uid
|
|
}));
|
|
case 5:
|
|
if (t = e.payload, a = t.key, n = t.value, "document" !== a || "verified" !== n) {
|
|
r.next = 9;
|
|
break
|
|
}
|
|
return r.next = 9, Object(P.c)(bd({
|
|
uid: e.payload.uid
|
|
}));
|
|
case 9:
|
|
r.next = 15;
|
|
break;
|
|
case 11:
|
|
return r.prev = 11, r.t0 = r.catch(0), r.next = 15, Object(P.c)(Xa({
|
|
message: r.t0.message,
|
|
code: r.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return r.stop()
|
|
}
|
|
}, uo, null, [
|
|
[0, 11]
|
|
])
|
|
}
|
|
var ho = T.a.mark(go);
|
|
|
|
function go() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)($e, so);
|
|
case 2:
|
|
return e.next = 4, Object(P.d)(Xe, lo);
|
|
case 4:
|
|
return e.next = 6, Object(P.d)(et, po);
|
|
case 6:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, ho)
|
|
}
|
|
var mo = function(e) {
|
|
return {
|
|
type: "LIABILITIES_LIST_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
fo = function() {
|
|
return {
|
|
type: "LIABILITIES_LIST_ERROR"
|
|
}
|
|
},
|
|
bo = {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
},
|
|
yo = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : bo,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case tt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "LIABILITIES_LIST_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: t.payload.list,
|
|
total: t.payload.total
|
|
});
|
|
case "LIABILITIES_LIST_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
vo = function(e) {
|
|
return e.liabilities.list
|
|
},
|
|
wo = function(e) {
|
|
return e.liabilities.total
|
|
},
|
|
Eo = T.a.mark(Oo),
|
|
Co = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function Oo(e) {
|
|
var t, a, n, r, i, o, s, c, l;
|
|
return T.a.wrap(function(u) {
|
|
for (;;) switch (u.prev = u.next) {
|
|
case 0:
|
|
return u.prev = 0, t = e.payload, a = t.page, n = t.limit, r = ka(e.payload), u.next = 5,
|
|
Object(P.b)(Ca.get(Co), "/admin/liabilities?".concat(r));
|
|
case 5:
|
|
if (i = u.sent, o = i.data, s = (a - 1) * n + o.length, o.length !== n) {
|
|
u.next = 15;
|
|
break
|
|
}
|
|
return c = Object(b.a)(Object(b.a)({}, e.payload), {}, {
|
|
page: a * n + 1,
|
|
limit: 1
|
|
}), l = ka(c), u.next = 13, Object(P.b)(Ca.get(Co), "/admin/liabilities?".concat(l));
|
|
case 13:
|
|
1 === u.sent.data.length && s++;
|
|
case 15:
|
|
return u.next = 17, Object(P.c)(mo({
|
|
list: o,
|
|
total: s
|
|
}));
|
|
case 17:
|
|
u.next = 25;
|
|
break;
|
|
case 19:
|
|
return u.prev = 19, u.t0 = u.catch(0), u.next = 23, Object(P.c)(fo());
|
|
case 23:
|
|
return u.next = 25, Object(P.c)(Xa({
|
|
message: u.t0.message,
|
|
code: u.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 25:
|
|
case "end":
|
|
return u.stop()
|
|
}
|
|
}, Eo, null, [
|
|
[0, 19]
|
|
])
|
|
}
|
|
var ko = T.a.mark(xo);
|
|
|
|
function xo() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(tt, Oo);
|
|
case 2:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, ko)
|
|
}
|
|
var jo = function(e) {
|
|
return {
|
|
type: at,
|
|
payload: e
|
|
}
|
|
},
|
|
_o = function(e) {
|
|
return {
|
|
type: nt,
|
|
payload: e
|
|
}
|
|
},
|
|
Ro = function() {
|
|
return {
|
|
type: "MARKET_CREATE_SUCCESS"
|
|
}
|
|
},
|
|
So = function(e) {
|
|
return {
|
|
type: "MARKET_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
To = function() {
|
|
return {
|
|
type: "MARKET_ERROR"
|
|
}
|
|
},
|
|
Po = function(e) {
|
|
return {
|
|
type: "MARKETS_LIST_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
Ao = function() {
|
|
return {
|
|
type: "MARKETS_LIST_ERROR"
|
|
}
|
|
},
|
|
Lo = function(e) {
|
|
return {
|
|
type: "markets/SET_CURRENT_MARKET_IFUNSET",
|
|
payload: e
|
|
}
|
|
},
|
|
Do = {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
},
|
|
Io = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Do,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case at:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "MARKETS_LIST_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: t.payload.list,
|
|
total: t.payload.total
|
|
});
|
|
case "MARKETS_LIST_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
});
|
|
case nt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "MARKET_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
currentMarket: t.payload.currentMarket
|
|
});
|
|
case "MARKET_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1
|
|
});
|
|
case "MARKET_CREATE_SUCCESS":
|
|
return Object(b.a)({}, e);
|
|
case "markets/SET_CURRENT_MARKET":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
currentMarket: t.payload
|
|
});
|
|
case "markets/SET_CURRENT_MARKET_IFUNSET":
|
|
return e.currentMarket ? e : Object(b.a)(Object(b.a)({}, e), {}, {
|
|
currentMarket: t.payload
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
No = function(e) {
|
|
return e.markets.list
|
|
},
|
|
Fo = function(e) {
|
|
return e.markets.total
|
|
},
|
|
Uo = function(e) {
|
|
return e.markets.currentMarket
|
|
},
|
|
Mo = T.a.mark(Bo);
|
|
|
|
function Bo(e) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.prev = 0, t.next = 3, Object(P.b)(Ca.post(Ka(za())), "/admin/markets/new", e
|
|
.payload);
|
|
case 3:
|
|
return t.next = 5, Object(P.c)(Ro());
|
|
case 5:
|
|
return t.next = 7, Object(P.c)(Xa({
|
|
message: ["Market successfully created"],
|
|
type: "success"
|
|
}));
|
|
case 7:
|
|
return t.next = 9, Object(P.c)(Object(s.push)("/tower/exchange/markets"));
|
|
case 9:
|
|
t.next = 15;
|
|
break;
|
|
case 11:
|
|
return t.prev = 11, t.t0 = t.catch(0), t.next = 15, Object(P.c)(Xa({
|
|
message: t.t0.message,
|
|
code: t.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, Mo, null, [
|
|
[0, 11]
|
|
])
|
|
}
|
|
var Wo = T.a.mark(Vo),
|
|
Ho = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function Vo(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(n) {
|
|
for (;;) switch (n.prev = n.next) {
|
|
case 0:
|
|
return n.prev = 0, n.next = 3, Object(P.b)(Ca.get(Ho), "/admin/markets/".concat(e.payload
|
|
.pair));
|
|
case 3:
|
|
return t = n.sent, a = t.data, n.next = 7, Object(P.c)(So({
|
|
currentMarket: a
|
|
}));
|
|
case 7:
|
|
n.next = 15;
|
|
break;
|
|
case 9:
|
|
return n.prev = 9, n.t0 = n.catch(0), n.next = 13, Object(P.c)(To());
|
|
case 13:
|
|
return n.next = 15, Object(P.c)(Xa({
|
|
message: n.t0.message,
|
|
code: n.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return n.stop()
|
|
}
|
|
}, Wo, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var Go = T.a.mark(Ko),
|
|
zo = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function Ko(e) {
|
|
var t, a, n, r;
|
|
return T.a.wrap(function(i) {
|
|
for (;;) switch (i.prev = i.next) {
|
|
case 0:
|
|
return i.prev = 0, t = ka(e.payload), i.next = 4, Object(P.b)(Ca.get(zo), "/admin/markets?"
|
|
.concat(t));
|
|
case 4:
|
|
return a = i.sent, n = a.data, r = a.headers, i.next = 9, Object(P.c)(Po({
|
|
list: n,
|
|
total: r.total
|
|
}));
|
|
case 9:
|
|
return i.next = 11, Object(P.c)(Lo(n[0]));
|
|
case 11:
|
|
i.next = 19;
|
|
break;
|
|
case 13:
|
|
return i.prev = 13, i.t0 = i.catch(0), i.next = 17, Object(P.c)(Ao());
|
|
case 17:
|
|
return i.next = 19, Object(P.c)(Xa({
|
|
message: i.t0.message,
|
|
code: i.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 19:
|
|
case "end":
|
|
return i.stop()
|
|
}
|
|
}, Go, null, [
|
|
[0, 13]
|
|
])
|
|
}
|
|
var Zo = T.a.mark(Yo);
|
|
|
|
function Yo(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(n) {
|
|
for (;;) switch (n.prev = n.next) {
|
|
case 0:
|
|
return n.prev = 0, n.next = 3, Object(P.b)(Ca.post(Ka(za())), "/admin/markets/update", e
|
|
.payload);
|
|
case 3:
|
|
return t = n.sent, a = t.data, n.next = 7, Object(P.c)(So({
|
|
currentMarket: a
|
|
}));
|
|
case 7:
|
|
return n.next = 9, Object(P.c)(Xa({
|
|
message: ["Market updated created"],
|
|
type: "success"
|
|
}));
|
|
case 9:
|
|
return n.next = 11, Object(P.c)(Object(s.push)("/tower/exchange/markets"));
|
|
case 11:
|
|
n.next = 19;
|
|
break;
|
|
case 13:
|
|
return n.prev = 13, n.t0 = n.catch(0), n.next = 17, Object(P.c)(Ao());
|
|
case 17:
|
|
return n.next = 19, Object(P.c)(Xa({
|
|
message: n.t0.message,
|
|
code: n.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 19:
|
|
case "end":
|
|
return n.stop()
|
|
}
|
|
}, Zo, null, [
|
|
[0, 13]
|
|
])
|
|
}
|
|
var qo = T.a.mark(Jo);
|
|
|
|
function Jo() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(at, Ko);
|
|
case 2:
|
|
return e.next = 4, Object(P.e)(nt, Vo);
|
|
case 4:
|
|
return e.next = 6, Object(P.e)(rt, Yo);
|
|
case 6:
|
|
return e.next = 8, Object(P.e)(it, Bo);
|
|
case 8:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, qo)
|
|
}
|
|
var Qo = function(e) {
|
|
return {
|
|
type: "METRICS_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
Xo = {
|
|
metrics: {
|
|
signups: {},
|
|
sucessful_logins: {},
|
|
failed_logins: {},
|
|
pending_applications: 0
|
|
}
|
|
},
|
|
$o = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Xo,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case "METRICS_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
metrics: t.payload.metrics
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
es = T.a.mark(as),
|
|
ts = {
|
|
apiVersion: "barong"
|
|
};
|
|
|
|
function as() {
|
|
var e;
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.prev = 0, t.next = 3, Object(P.b)(Ca.get(ts), "/admin/metrics");
|
|
case 3:
|
|
return e = t.sent, t.next = 6, Object(P.c)(Qo({
|
|
metrics: e.data
|
|
}));
|
|
case 6:
|
|
t.next = 12;
|
|
break;
|
|
case 8:
|
|
return t.prev = 8, t.t0 = t.catch(0), t.next = 12, Object(P.c)(Xa({
|
|
message: t.t0.message,
|
|
code: t.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 12:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, es, null, [
|
|
[0, 8]
|
|
])
|
|
}
|
|
var ns = T.a.mark(rs);
|
|
|
|
function rs() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(ot, as);
|
|
case 2:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, ns)
|
|
}
|
|
var is = function(e) {
|
|
return e.metrics.metrics
|
|
},
|
|
os = function(e) {
|
|
return {
|
|
type: "NAVBAR_MODAL_STATUS",
|
|
payload: e
|
|
}
|
|
},
|
|
ss = {
|
|
navbarModalStatus: !1
|
|
},
|
|
cs = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : ss,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case "NAVBAR_MODAL_STATUS":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
navbarModalStatus: t.payload
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
ls = function(e) {
|
|
return e.navbarStatus.navbarModalStatus
|
|
},
|
|
us = T.a.mark(ps),
|
|
ds = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function ps(e) {
|
|
var t, a, n, r;
|
|
return T.a.wrap(function(i) {
|
|
for (;;) switch (i.prev = i.next) {
|
|
case 0:
|
|
return i.prev = 0, t = ka(e.payload), i.next = 4, Object(P.b)(Ca.get(ds), "/admin/orders?"
|
|
.concat(t, "&state=wait&type=sell&order_by=price"));
|
|
case 4:
|
|
return a = i.sent, n = a.data, r = a.headers, i.next = 9, Object(P.c)(ys({
|
|
list: n,
|
|
total: r.total
|
|
}));
|
|
case 9:
|
|
i.next = 17;
|
|
break;
|
|
case 11:
|
|
return i.prev = 11, i.t0 = i.catch(0), i.next = 15, Object(P.c)(ws());
|
|
case 15:
|
|
return i.next = 17, Object(P.c)(Xa({
|
|
message: i.t0.message,
|
|
code: i.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 17:
|
|
case "end":
|
|
return i.stop()
|
|
}
|
|
}, us, null, [
|
|
[0, 11]
|
|
])
|
|
}
|
|
var hs = T.a.mark(ms),
|
|
gs = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function ms(e) {
|
|
var t, a, n, r;
|
|
return T.a.wrap(function(i) {
|
|
for (;;) switch (i.prev = i.next) {
|
|
case 0:
|
|
return i.prev = 0, t = ka(e.payload), i.next = 4, Object(P.b)(Ca.get(gs), "/admin/orders?"
|
|
.concat(t, "&state=wait&type=buy&order_by=price&ordering=desc"));
|
|
case 4:
|
|
return a = i.sent, n = a.data, r = a.headers, i.next = 9, Object(P.c)(vs({
|
|
list: n,
|
|
total: r.total
|
|
}));
|
|
case 9:
|
|
i.next = 17;
|
|
break;
|
|
case 11:
|
|
return i.prev = 11, i.t0 = i.catch(0), i.next = 15, Object(P.c)(Es());
|
|
case 15:
|
|
return i.next = 17, Object(P.c)(Xa({
|
|
message: i.t0.message,
|
|
code: i.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 17:
|
|
case "end":
|
|
return i.stop()
|
|
}
|
|
}, hs, null, [
|
|
[0, 11]
|
|
])
|
|
}
|
|
var fs = T.a.mark(bs);
|
|
|
|
function bs() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(st, ps);
|
|
case 2:
|
|
return e.next = 4, Object(P.e)(ct, ms);
|
|
case 4:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, fs)
|
|
}
|
|
var ys = function(e) {
|
|
return {
|
|
type: "ASKS_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
vs = function(e) {
|
|
return {
|
|
type: "BIDS_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
ws = function() {
|
|
return {
|
|
type: "ASKS_ERROR"
|
|
}
|
|
},
|
|
Es = function() {
|
|
return {
|
|
type: "BIDS_ERROR"
|
|
}
|
|
},
|
|
Cs = {
|
|
list: [],
|
|
total: 0,
|
|
loading: !1
|
|
},
|
|
Os = {
|
|
list: [],
|
|
total: 0,
|
|
loading: !1
|
|
},
|
|
ks = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Cs,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case st:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "ASKS_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: t.payload.list,
|
|
total: t.payload.total
|
|
});
|
|
case "ASKS_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
});
|
|
default:
|
|
return e
|
|
}
|
|
},
|
|
xs = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Os,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case ct:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "BIDS_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: t.payload.list,
|
|
total: t.payload.total
|
|
});
|
|
case "BIDS_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
});
|
|
default:
|
|
return e
|
|
}
|
|
},
|
|
js = function(e) {
|
|
return e.asks.list
|
|
},
|
|
_s = function(e) {
|
|
return e.asks.total
|
|
},
|
|
Rs = function(e) {
|
|
return e.bids.list
|
|
},
|
|
Ss = function(e) {
|
|
return e.bids.total
|
|
},
|
|
Ts = function(e) {
|
|
return {
|
|
type: dt,
|
|
payload: e
|
|
}
|
|
},
|
|
Ps = function(e) {
|
|
return {
|
|
type: "ORDERS_LIST_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
As = function() {
|
|
return {
|
|
type: "ORDERS_LIST_ERROR"
|
|
}
|
|
},
|
|
Ls = function() {
|
|
return {
|
|
type: "ORDERS_CANCEL_DATA"
|
|
}
|
|
},
|
|
Ds = function() {
|
|
return {
|
|
type: "ORDERS_CANCEL_ERROR"
|
|
}
|
|
},
|
|
Is = function(e) {
|
|
return {
|
|
type: ht,
|
|
payload: e
|
|
}
|
|
},
|
|
Ns = function() {
|
|
return {
|
|
type: "ORDER_CANCEL_DATA"
|
|
}
|
|
},
|
|
Fs = function() {
|
|
return {
|
|
type: "ORDER_CANCEL_ERROR"
|
|
}
|
|
},
|
|
Us = {
|
|
list: [],
|
|
loading: !1,
|
|
total: 0
|
|
},
|
|
Ms = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Us,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case dt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "ORDERS_LIST_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: t.payload.list,
|
|
total: t.payload.total
|
|
});
|
|
case "ORDERS_LIST_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
Bs = T.a.mark(Ws);
|
|
|
|
function Ws(e) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
if (t.prev = 0, !x()) {
|
|
t.next = 6;
|
|
break
|
|
}
|
|
return t.next = 4, Object(P.b)(Ca.post(Ya(za())), "/admin/orders/cancel/".concat(e.payload
|
|
.orders.id), e.payload.orders);
|
|
case 4:
|
|
t.next = 8;
|
|
break;
|
|
case 6:
|
|
return t.next = 8, Object(P.b)(Ca.post(Ka(za())), "/admin/orders/".concat(e.payload.orders.id,
|
|
"/cancel"), e.payload.orders);
|
|
case 8:
|
|
return t.next = 10, Object(P.c)(Ns());
|
|
case 10:
|
|
if (!e.payload.params) {
|
|
t.next = 13;
|
|
break
|
|
}
|
|
return t.next = 13, Object(P.c)(Ts(e.payload.params));
|
|
case 13:
|
|
return t.next = 15, Object(P.c)(Xa({
|
|
message: ["Order cancelled successfully"],
|
|
type: "success"
|
|
}));
|
|
case 15:
|
|
t.next = 23;
|
|
break;
|
|
case 17:
|
|
return t.prev = 17, t.t0 = t.catch(0), t.next = 21, Object(P.c)(Fs());
|
|
case 21:
|
|
return t.next = 23, Object(P.c)(Xa({
|
|
message: t.t0.message,
|
|
code: t.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 23:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, Bs, null, [
|
|
[0, 17]
|
|
])
|
|
}
|
|
var Hs = T.a.mark(Vs);
|
|
|
|
function Vs(e) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
if (t.prev = 0, !x()) {
|
|
t.next = 6;
|
|
break
|
|
}
|
|
return t.next = 4, Object(P.b)(Ca.post(Ya(za())), "/admin/orders/cancel", e.payload.orders);
|
|
case 4:
|
|
t.next = 8;
|
|
break;
|
|
case 6:
|
|
return t.next = 8, Object(P.b)(Ca.post(Ka(za())), "/admin/orders/cancel", e.payload.orders);
|
|
case 8:
|
|
return t.next = 10, Object(P.c)(Ls());
|
|
case 10:
|
|
return t.next = 12, Object(P.c)(Ts(e.payload.params));
|
|
case 12:
|
|
return t.next = 14, Object(P.c)(Xa({
|
|
message: ["Orders cancelled successfully"],
|
|
type: "success"
|
|
}));
|
|
case 14:
|
|
t.next = 22;
|
|
break;
|
|
case 16:
|
|
return t.prev = 16, t.t0 = t.catch(0), t.next = 20, Object(P.c)(Ds());
|
|
case 20:
|
|
return t.next = 22, Object(P.c)(Xa({
|
|
message: t.t0.message,
|
|
code: t.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 22:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, Hs, null, [
|
|
[0, 16]
|
|
])
|
|
}
|
|
var Gs = T.a.mark(Ks),
|
|
zs = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function Ks(e) {
|
|
var t, a, n, r, i, o, s, c, l;
|
|
return T.a.wrap(function(u) {
|
|
for (;;) switch (u.prev = u.next) {
|
|
case 0:
|
|
return u.prev = 0, t = e.payload, a = t.page, n = t.limit, r = ka(e.payload), u.next = 5,
|
|
Object(P.b)(Ca.get(zs), "/admin/orders?".concat(r));
|
|
case 5:
|
|
if (i = u.sent, o = i.data, s = (a - 1) * n + o.length, o.length !== n) {
|
|
u.next = 15;
|
|
break
|
|
}
|
|
return c = Object(b.a)(Object(b.a)({}, e.payload), {}, {
|
|
page: a * n + 1,
|
|
limit: 1
|
|
}), l = ka(c), u.next = 13, Object(P.b)(Ca.get(zs), "/admin/orders?".concat(l));
|
|
case 13:
|
|
1 === u.sent.data.length && s++;
|
|
case 15:
|
|
return u.next = 17, Object(P.c)(Ps({
|
|
list: o,
|
|
total: s
|
|
}));
|
|
case 17:
|
|
u.next = 25;
|
|
break;
|
|
case 19:
|
|
return u.prev = 19, u.t0 = u.catch(0), u.next = 23, Object(P.c)(As());
|
|
case 23:
|
|
return u.next = 25, Object(P.c)(Xa({
|
|
message: u.t0.message,
|
|
code: u.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 25:
|
|
case "end":
|
|
return u.stop()
|
|
}
|
|
}, Gs, null, [
|
|
[0, 19]
|
|
])
|
|
}
|
|
var Zs = T.a.mark(Ys);
|
|
|
|
function Ys() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(dt, Ks);
|
|
case 2:
|
|
return e.next = 4, Object(P.e)(pt, Vs);
|
|
case 4:
|
|
return e.next = 6, Object(P.e)(ht, Ws);
|
|
case 6:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, Zs)
|
|
}
|
|
var qs = function(e) {
|
|
return e.orders.list
|
|
},
|
|
Js = function(e) {
|
|
return e.orders.total
|
|
},
|
|
Qs = function(e) {
|
|
return {
|
|
type: gt,
|
|
payload: e
|
|
}
|
|
},
|
|
Xs = function(e) {
|
|
return {
|
|
type: "PERMISSIONS_LIST_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
$s = function() {
|
|
return {
|
|
type: "PERMISSIONS_LIST_ERROR"
|
|
}
|
|
},
|
|
ec = function() {
|
|
return {
|
|
type: "PERMISSIONS_ADD_ERROR"
|
|
}
|
|
},
|
|
tc = function() {
|
|
return {
|
|
type: "PERMISSIONS_UPDATE_ERROR"
|
|
}
|
|
},
|
|
ac = function() {
|
|
return {
|
|
type: "PERMISSIONS_DELETE_ERROR"
|
|
}
|
|
},
|
|
nc = {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0,
|
|
addSuccess: !1,
|
|
updateSuccess: !1,
|
|
deleteSuccess: !1
|
|
},
|
|
rc = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : nc,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case gt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "PERMISSIONS_LIST_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: t.payload.list,
|
|
total: t.payload.total
|
|
});
|
|
case "PERMISSIONS_LIST_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
});
|
|
case mt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "PERMISSIONS_ADD_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
addSuccess: !1
|
|
});
|
|
case ft:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "PERMISSIONS_UPDATE_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
updateSuccess: !1
|
|
});
|
|
case bt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "PERMISSIONS_DELETE_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
deleteSuccess: !1
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
ic = function(e) {
|
|
return e.permissions.list
|
|
},
|
|
oc = function(e) {
|
|
return e.permissions.total
|
|
},
|
|
sc = T.a.mark(cc);
|
|
|
|
function cc(e) {
|
|
var t;
|
|
return T.a.wrap(function(a) {
|
|
for (;;) switch (a.prev = a.next) {
|
|
case 0:
|
|
return a.prev = 0, t = ka(e.payload.permission), a.next = 4, Object(P.b)(Ca.post(Za(za())),
|
|
"/admin/permissions?".concat(t));
|
|
case 4:
|
|
return a.next = 6, Object(P.c)(Qs(e.payload.params));
|
|
case 6:
|
|
return a.next = 8, Object(P.c)(Xa({
|
|
message: ["Permission successfully created"],
|
|
type: "success"
|
|
}));
|
|
case 8:
|
|
a.next = 16;
|
|
break;
|
|
case 10:
|
|
return a.prev = 10, a.t0 = a.catch(0), a.next = 14, Object(P.c)(ec());
|
|
case 14:
|
|
return a.next = 16, Object(P.c)(Xa({
|
|
message: a.t0.message,
|
|
code: a.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 16:
|
|
case "end":
|
|
return a.stop()
|
|
}
|
|
}, sc, null, [
|
|
[0, 10]
|
|
])
|
|
}
|
|
var lc = T.a.mark(uc);
|
|
|
|
function uc(e) {
|
|
var t;
|
|
return T.a.wrap(function(a) {
|
|
for (;;) switch (a.prev = a.next) {
|
|
case 0:
|
|
return a.prev = 0, t = ka(e.payload.permission), a.next = 4, Object(P.b)(Ca.delete(Za(za())),
|
|
"/admin/permissions?".concat(t));
|
|
case 4:
|
|
return a.next = 6, Object(P.c)(Qs(e.payload.params));
|
|
case 6:
|
|
return a.next = 8, Object(P.c)(Xa({
|
|
message: ["Permission successfully deleted"],
|
|
type: "success"
|
|
}));
|
|
case 8:
|
|
a.next = 16;
|
|
break;
|
|
case 10:
|
|
return a.prev = 10, a.t0 = a.catch(0), a.next = 14, Object(P.c)(ac());
|
|
case 14:
|
|
return a.next = 16, Object(P.c)(Xa({
|
|
message: a.t0.message,
|
|
code: a.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 16:
|
|
case "end":
|
|
return a.stop()
|
|
}
|
|
}, lc, null, [
|
|
[0, 10]
|
|
])
|
|
}
|
|
var dc = T.a.mark(pc);
|
|
|
|
function pc(e) {
|
|
var t;
|
|
return T.a.wrap(function(a) {
|
|
for (;;) switch (a.prev = a.next) {
|
|
case 0:
|
|
return a.prev = 0, t = ka(e.payload.permission), a.next = 4, Object(P.b)(Ca.put(Za(za())),
|
|
"/admin/permissions?".concat(t));
|
|
case 4:
|
|
return a.next = 6, Object(P.c)(Qs(e.payload.params));
|
|
case 6:
|
|
return a.next = 8, Object(P.c)(Xa({
|
|
message: ["Permission successfully edited"],
|
|
type: "success"
|
|
}));
|
|
case 8:
|
|
a.next = 16;
|
|
break;
|
|
case 10:
|
|
return a.prev = 10, a.t0 = a.catch(0), a.next = 14, Object(P.c)(tc());
|
|
case 14:
|
|
return a.next = 16, Object(P.c)(Xa({
|
|
message: a.t0.message,
|
|
code: a.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 16:
|
|
case "end":
|
|
return a.stop()
|
|
}
|
|
}, dc, null, [
|
|
[0, 10]
|
|
])
|
|
}
|
|
var hc = T.a.mark(mc),
|
|
gc = {
|
|
apiVersion: "barong"
|
|
};
|
|
|
|
function mc(e) {
|
|
var t, a, n, r;
|
|
return T.a.wrap(function(i) {
|
|
for (;;) switch (i.prev = i.next) {
|
|
case 0:
|
|
return i.prev = 0, t = ka(e.payload), i.next = 4, Object(P.b)(Ca.get(gc),
|
|
"/admin/permissions?".concat(t));
|
|
case 4:
|
|
return a = i.sent, n = a.data, r = a.headers, i.next = 9, Object(P.c)(Xs({
|
|
list: n,
|
|
total: r.total
|
|
}));
|
|
case 9:
|
|
i.next = 17;
|
|
break;
|
|
case 11:
|
|
return i.prev = 11, i.t0 = i.catch(0), i.next = 15, Object(P.c)($s());
|
|
case 15:
|
|
return i.next = 17, Object(P.c)(Xa({
|
|
message: i.t0.message,
|
|
code: i.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 17:
|
|
case "end":
|
|
return i.stop()
|
|
}
|
|
}, hc, null, [
|
|
[0, 11]
|
|
])
|
|
}
|
|
var fc = T.a.mark(bc);
|
|
|
|
function bc() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(gt, mc);
|
|
case 2:
|
|
return e.next = 4, Object(P.e)(mt, cc);
|
|
case 4:
|
|
return e.next = 6, Object(P.e)(bt, uc);
|
|
case 6:
|
|
return e.next = 8, Object(P.e)(ft, pc);
|
|
case 8:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, fc)
|
|
}
|
|
var yc = function(e) {
|
|
return {
|
|
type: "GET_QUESTIONS_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
vc = function() {
|
|
return {
|
|
type: "GET_QUESTIONS_ERROR"
|
|
}
|
|
},
|
|
wc = {
|
|
loading: !1,
|
|
list: [],
|
|
error: !1
|
|
},
|
|
Ec = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : wc,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case na:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0,
|
|
error: !1,
|
|
list: []
|
|
});
|
|
case "GET_QUESTIONS_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: t.payload
|
|
});
|
|
case "GET_QUESTIONS_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: [],
|
|
error: !0
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
Cc = T.a.mark(kc),
|
|
Oc = {
|
|
apiVersion: "applogic"
|
|
};
|
|
|
|
function kc(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.prev = 0, e.next = 3, Object(P.b)(Ca.get(Oc), "/admin/questions");
|
|
case 3:
|
|
return t = e.sent, a = t.data, e.next = 7, Object(P.c)(yc(a));
|
|
case 7:
|
|
e.next = 15;
|
|
break;
|
|
case 9:
|
|
return e.prev = 9, e.t0 = e.catch(0), e.next = 13, Object(P.c)(vc());
|
|
case 13:
|
|
return e.next = 15, Object(P.c)(Xa({
|
|
message: e.t0.message,
|
|
code: e.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, Cc, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var xc = T.a.mark(jc);
|
|
|
|
function jc() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(na, kc);
|
|
case 2:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, xc)
|
|
}
|
|
var _c = function(e) {
|
|
return {
|
|
type: "REVENUES_LIST_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
Rc = function() {
|
|
return {
|
|
type: "REVENUES_LIST_ERROR"
|
|
}
|
|
},
|
|
Sc = {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
},
|
|
Tc = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Sc,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case yt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "REVENUES_LIST_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: t.payload.list,
|
|
total: t.payload.total
|
|
});
|
|
case "REVENUES_LIST_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
Pc = function(e) {
|
|
return e.revenues.list
|
|
},
|
|
Ac = function(e) {
|
|
return e.revenues.total
|
|
},
|
|
Lc = T.a.mark(Ic),
|
|
Dc = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function Ic(e) {
|
|
var t, a, n, r, i, o, s, c, l;
|
|
return T.a.wrap(function(u) {
|
|
for (;;) switch (u.prev = u.next) {
|
|
case 0:
|
|
return u.prev = 0, t = e.payload, a = t.page, n = t.limit, r = ka(e.payload), u.next = 5,
|
|
Object(P.b)(Ca.get(Dc), "/admin/revenues?".concat(r));
|
|
case 5:
|
|
if (i = u.sent, o = i.data, s = (a - 1) * n + o.length, o.length !== n) {
|
|
u.next = 15;
|
|
break
|
|
}
|
|
return c = Object(b.a)(Object(b.a)({}, e.payload), {}, {
|
|
page: a * n + 1,
|
|
limit: 1
|
|
}), l = ka(c), u.next = 13, Object(P.b)(Ca.get(Dc), "/admin/revenues?".concat(l));
|
|
case 13:
|
|
1 === u.sent.data.length && s++;
|
|
case 15:
|
|
return u.next = 17, Object(P.c)(_c({
|
|
list: o,
|
|
total: s
|
|
}));
|
|
case 17:
|
|
u.next = 25;
|
|
break;
|
|
case 19:
|
|
return u.prev = 19, u.t0 = u.catch(0), u.next = 23, Object(P.c)(Rc());
|
|
case 23:
|
|
return u.next = 25, Object(P.c)(Xa({
|
|
message: u.t0.message,
|
|
code: u.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 25:
|
|
case "end":
|
|
return u.stop()
|
|
}
|
|
}, Lc, null, [
|
|
[0, 19]
|
|
])
|
|
}
|
|
var Nc = T.a.mark(Fc);
|
|
|
|
function Fc() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(yt, Ic);
|
|
case 2:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, Nc)
|
|
}
|
|
var Uc = function(e) {
|
|
return {
|
|
type: "CURRENT_SIDEBAR_STATUS",
|
|
payload: e
|
|
}
|
|
},
|
|
Mc = {
|
|
sidebarStatus: !1
|
|
},
|
|
Bc = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Mc,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case "CURRENT_SIDEBAR_STATUS":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
sidebarStatus: t.payload.currentSidebarStatus
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
Wc = function(e) {
|
|
return e.sidebarStatus.sidebarStatus
|
|
},
|
|
Hc = function(e) {
|
|
return {
|
|
type: "TRADES_LIST_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
Vc = function() {
|
|
return {
|
|
type: "TRADES_LIST_ERROR"
|
|
}
|
|
},
|
|
Gc = {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
},
|
|
zc = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Gc,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case vt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "TRADES_LIST_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: t.payload.list,
|
|
total: t.payload.total
|
|
});
|
|
case "TRADES_LIST_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
Kc = function(e) {
|
|
return e.trades.list
|
|
},
|
|
Zc = function(e) {
|
|
return e.trades.total
|
|
},
|
|
Yc = T.a.mark(Jc),
|
|
qc = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function Jc(e) {
|
|
var t, a, n, r, i, o, s, c, l;
|
|
return T.a.wrap(function(u) {
|
|
for (;;) switch (u.prev = u.next) {
|
|
case 0:
|
|
return u.prev = 0, t = e.payload, a = t.page, n = t.limit, r = ka(e.payload), u.next = 5,
|
|
Object(P.b)(Ca.get(qc), "/admin/trades?".concat(r));
|
|
case 5:
|
|
if (i = u.sent, o = i.data, s = (a - 1) * n + o.length, o.length !== n) {
|
|
u.next = 15;
|
|
break
|
|
}
|
|
return c = Object(b.a)(Object(b.a)({}, e.payload), {}, {
|
|
page: a * n + 1,
|
|
limit: 1
|
|
}), l = ka(c), u.next = 13, Object(P.b)(Ca.get(qc), "/admin/trades?".concat(l));
|
|
case 13:
|
|
1 === u.sent.data.length && s++;
|
|
case 15:
|
|
return u.next = 17, Object(P.c)(Hc({
|
|
list: o,
|
|
total: s
|
|
}));
|
|
case 17:
|
|
u.next = 25;
|
|
break;
|
|
case 19:
|
|
return u.prev = 19, u.t0 = u.catch(0), u.next = 23, Object(P.c)(Vc());
|
|
case 23:
|
|
return u.next = 25, Object(P.c)(Xa({
|
|
message: u.t0.message,
|
|
code: u.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 25:
|
|
case "end":
|
|
return u.stop()
|
|
}
|
|
}, Yc, null, [
|
|
[0, 19]
|
|
])
|
|
}
|
|
var Qc = T.a.mark(Xc);
|
|
|
|
function Xc() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(vt, Jc);
|
|
case 2:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, Qc)
|
|
}
|
|
var $c = function(e) {
|
|
return {
|
|
type: wt,
|
|
payload: e
|
|
}
|
|
},
|
|
el = function(e) {
|
|
return {
|
|
type: "TRADING_FEES_LIST_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
tl = function() {
|
|
return {
|
|
type: "TRADING_FEES_LIST_ERROR"
|
|
}
|
|
},
|
|
al = function(e) {
|
|
return {
|
|
type: "TRADING_FEE_GROUPS_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
nl = function() {
|
|
return {
|
|
type: "TRADING_FEE_GROUPS_ERROR"
|
|
}
|
|
},
|
|
rl = function(e) {
|
|
return {
|
|
type: "TRADING_FEE_GET_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
il = function() {
|
|
return {
|
|
type: "TRADING_FEE_GET_ERROR"
|
|
}
|
|
},
|
|
ol = function() {
|
|
return {
|
|
type: "TRADING_FEE_ADD_ERROR"
|
|
}
|
|
},
|
|
sl = function() {
|
|
return {
|
|
type: "TRADING_FEE_UPDATE_ERROR"
|
|
}
|
|
},
|
|
cl = function() {
|
|
return {
|
|
type: "TRADING_FEE_DELETE_ERROR"
|
|
}
|
|
},
|
|
ll = {
|
|
loading: !1,
|
|
list: [],
|
|
groups: [],
|
|
total: 0
|
|
},
|
|
ul = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : ll,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case wt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "TRADING_FEES_LIST_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: t.payload.list,
|
|
total: t.payload.total
|
|
});
|
|
case "TRADING_FEES_LIST_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
});
|
|
case Ct:
|
|
case Et:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "TRADING_FEE_GROUPS_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
groups: t.payload
|
|
});
|
|
case "TRADING_FEE_GROUPS_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1
|
|
});
|
|
case "TRADING_FEE_GET_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
tradingFee: t.payload
|
|
});
|
|
case "TRADING_FEE_GET_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
tradingFee: void 0
|
|
});
|
|
case Ot:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "TRADING_FEE_ADD_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1
|
|
});
|
|
case kt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "TRADING_FEE_UPDATE_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1
|
|
});
|
|
case xt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "TRADING_FEE_DELETE_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
dl = function(e) {
|
|
return e.tradingFees.list
|
|
},
|
|
pl = function(e) {
|
|
return e.tradingFees.groups
|
|
},
|
|
hl = function(e) {
|
|
return e.tradingFees.total
|
|
},
|
|
gl = T.a.mark(ml);
|
|
|
|
function ml(e) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.prev = 0, t.next = 3, Object(P.b)(Ca.post(Ka(za())), "/admin/trading_fees/new", e
|
|
.payload.fee);
|
|
case 3:
|
|
return t.next = 5, Object(P.c)($c(e.payload.params));
|
|
case 5:
|
|
return t.next = 7, Object(P.c)(Xa({
|
|
message: ["Fee Schedule successfully created"],
|
|
type: "success"
|
|
}));
|
|
case 7:
|
|
t.next = 15;
|
|
break;
|
|
case 9:
|
|
return t.prev = 9, t.t0 = t.catch(0), t.next = 13, Object(P.c)(ol());
|
|
case 13:
|
|
return t.next = 15, Object(P.c)(Xa({
|
|
message: t.t0.message,
|
|
code: t.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, gl, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var fl = T.a.mark(bl);
|
|
|
|
function bl(e) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.prev = 0, t.next = 3, Object(P.b)(Ca.post(Ka(za())), "/admin/trading_fees/delete", e
|
|
.payload.fee);
|
|
case 3:
|
|
return t.next = 5, Object(P.c)($c(e.payload.params));
|
|
case 5:
|
|
return t.next = 7, Object(P.c)(Xa({
|
|
message: ["Fee Schedule successfully deleted"],
|
|
type: "success"
|
|
}));
|
|
case 7:
|
|
t.next = 15;
|
|
break;
|
|
case 9:
|
|
return t.prev = 9, t.t0 = t.catch(0), t.next = 13, Object(P.c)(cl());
|
|
case 13:
|
|
return t.next = 15, Object(P.c)(Xa({
|
|
message: t.t0.message,
|
|
code: t.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, fl, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var yl = T.a.mark(vl);
|
|
|
|
function vl(e) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.prev = 0, t.next = 3, Object(P.b)(Ca.post(Ka(za())), "/admin/trading_fees/update", e
|
|
.payload.fee);
|
|
case 3:
|
|
return t.next = 5, Object(P.c)($c(e.payload.params));
|
|
case 5:
|
|
return t.next = 7, Object(P.c)(Xa({
|
|
message: ["Fee Schedule successfully updated"],
|
|
type: "success"
|
|
}));
|
|
case 7:
|
|
t.next = 15;
|
|
break;
|
|
case 9:
|
|
return t.prev = 9, t.t0 = t.catch(0), t.next = 13, Object(P.c)(sl());
|
|
case 13:
|
|
return t.next = 15, Object(P.c)(Xa({
|
|
message: t.t0.message,
|
|
code: t.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, yl, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var wl = T.a.mark(Cl),
|
|
El = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function Cl(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.prev = 0, e.next = 3, Object(P.b)(Ca.get(El), "/admin/members/groups");
|
|
case 3:
|
|
return t = e.sent, a = t.data, e.next = 7, Object(P.c)(al(a));
|
|
case 7:
|
|
e.next = 15;
|
|
break;
|
|
case 9:
|
|
return e.prev = 9, e.t0 = e.catch(0), e.next = 13, Object(P.c)(nl());
|
|
case 13:
|
|
return e.next = 15, Object(P.c)(Xa({
|
|
message: e.t0.message,
|
|
code: e.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, wl, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var Ol = T.a.mark(xl),
|
|
kl = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function xl(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(n) {
|
|
for (;;) switch (n.prev = n.next) {
|
|
case 0:
|
|
return n.prev = 0, n.next = 3, Object(P.b)(Ca.get(kl), "/admin/trading_fees/".concat(e
|
|
.payload));
|
|
case 3:
|
|
return t = n.sent, a = t.data, n.next = 7, Object(P.c)(rl(a));
|
|
case 7:
|
|
n.next = 15;
|
|
break;
|
|
case 9:
|
|
return n.prev = 9, n.t0 = n.catch(0), n.next = 13, Object(P.c)(il());
|
|
case 13:
|
|
return n.next = 15, Object(P.c)(Xa({
|
|
message: n.t0.message,
|
|
code: n.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return n.stop()
|
|
}
|
|
}, Ol, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var jl = T.a.mark(Rl),
|
|
_l = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function Rl(e) {
|
|
var t, a, n, r;
|
|
return T.a.wrap(function(i) {
|
|
for (;;) switch (i.prev = i.next) {
|
|
case 0:
|
|
return i.prev = 0, t = ka(e.payload), i.next = 4, Object(P.b)(Ca.get(_l),
|
|
"/admin/trading_fees?".concat(t));
|
|
case 4:
|
|
return a = i.sent, n = a.data, r = a.headers, i.next = 9, Object(P.c)(el({
|
|
list: n,
|
|
total: r.total
|
|
}));
|
|
case 9:
|
|
i.next = 17;
|
|
break;
|
|
case 11:
|
|
return i.prev = 11, i.t0 = i.catch(0), i.next = 15, Object(P.c)(tl());
|
|
case 15:
|
|
return i.next = 17, Object(P.c)(Xa({
|
|
message: i.t0.message,
|
|
code: i.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 17:
|
|
case "end":
|
|
return i.stop()
|
|
}
|
|
}, jl, null, [
|
|
[0, 11]
|
|
])
|
|
}
|
|
var Sl = T.a.mark(Tl);
|
|
|
|
function Tl() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(Ot, ml);
|
|
case 2:
|
|
return e.next = 4, Object(P.e)(Ct, xl);
|
|
case 4:
|
|
return e.next = 6, Object(P.e)(kt, vl);
|
|
case 6:
|
|
return e.next = 8, Object(P.e)(Et, Cl);
|
|
case 8:
|
|
return e.next = 10, Object(P.e)(wt, Rl);
|
|
case 10:
|
|
return e.next = 12, Object(P.e)(xt, bl);
|
|
case 12:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, Sl)
|
|
}
|
|
var Pl = function(e) {
|
|
return {
|
|
type: "USER_ACTIVITY_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
Al = T.a.mark(Dl),
|
|
Ll = {
|
|
apiVersion: "barong"
|
|
};
|
|
|
|
function Dl(e) {
|
|
var t, a, n, r, i, o, s, c;
|
|
return T.a.wrap(function(l) {
|
|
for (;;) switch (l.prev = l.next) {
|
|
case 0:
|
|
return l.prev = 0, t = e.payload.page, a = ka(e.payload), l.next = 5, Object(P.b)(Ca.get(Ll),
|
|
"/admin/activities/admin?".concat(a));
|
|
case 5:
|
|
n = l.sent, r = n.data, i = n.headers, o = Object(se.a)(r);
|
|
try {
|
|
for (o.s(); !(s = o.n()).done;)(c = s.value).data = Fa(JSON.parse(c.data) || {})
|
|
} catch (u) {
|
|
o.e(u)
|
|
} finally {
|
|
o.f()
|
|
}
|
|
return l.next = 12, Object(P.c)(Pl({
|
|
list: r,
|
|
page: t,
|
|
total: i.total
|
|
}));
|
|
case 12:
|
|
l.next = 18;
|
|
break;
|
|
case 14:
|
|
return l.prev = 14, l.t0 = l.catch(0), l.next = 18, Object(P.c)(Xa({
|
|
message: l.t0.message,
|
|
code: l.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 18:
|
|
case "end":
|
|
return l.stop()
|
|
}
|
|
}, Al, null, [
|
|
[0, 14]
|
|
])
|
|
}
|
|
var Il = T.a.mark(Nl);
|
|
|
|
function Nl() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.d)(jt, Dl);
|
|
case 2:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, Il)
|
|
}
|
|
var Fl = {
|
|
list: [],
|
|
loading: !1,
|
|
page: 0,
|
|
total: 0
|
|
},
|
|
Ul = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Fl,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case jt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "USER_ACTIVITY_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
list: t.payload.list,
|
|
loading: !1,
|
|
page: t.payload.page,
|
|
total: t.payload.total
|
|
});
|
|
default:
|
|
return e
|
|
}
|
|
},
|
|
Ml = function(e) {
|
|
return e.adminActivity.list
|
|
},
|
|
Bl = function(e) {
|
|
return e.adminActivity.total
|
|
},
|
|
Wl = function() {
|
|
return {
|
|
type: "GET_CURRENT_USER_ERROR"
|
|
}
|
|
},
|
|
Hl = function(e) {
|
|
return {
|
|
type: "GET_CURRENT_USER_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
Vl = function() {
|
|
return {
|
|
type: "CURRENT_USER_RESET"
|
|
}
|
|
},
|
|
Gl = {
|
|
loading: !0,
|
|
user: {
|
|
email: "",
|
|
level: 0,
|
|
otp: !1,
|
|
role: "",
|
|
state: "",
|
|
uid: "",
|
|
profiles: []
|
|
}
|
|
},
|
|
zl = T.a.mark(Zl),
|
|
Kl = {
|
|
apiVersion: "barong"
|
|
};
|
|
|
|
function Zl(e) {
|
|
var t;
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.prev = 0, e.next = 3, Object(P.b)(Ca.get(Kl), "/resource/users/me");
|
|
case 3:
|
|
return t = e.sent, e.next = 6, Object(P.c)(Hl(t.data));
|
|
case 6:
|
|
e.next = 14;
|
|
break;
|
|
case 8:
|
|
return e.prev = 8, e.t0 = e.catch(0), e.next = 12, Object(P.c)(Wl());
|
|
case 12:
|
|
return e.next = 14, Object(P.c)(Xa({
|
|
message: e.t0.message,
|
|
code: e.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 14:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, zl, null, [
|
|
[0, 8]
|
|
])
|
|
}
|
|
var Yl = T.a.mark(ql);
|
|
|
|
function ql() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(Pt, Zl);
|
|
case 2:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, Yl)
|
|
}
|
|
var Jl = function(e) {
|
|
return e.usersData.currentUser.user
|
|
},
|
|
Ql = function(e) {
|
|
return e.usersData.currentUser.loading
|
|
},
|
|
Xl = function(e) {
|
|
return !Ql(e) && "active" === Jl(e).state
|
|
},
|
|
$l = T.a.mark(tu),
|
|
eu = {
|
|
apiVersion: "barong"
|
|
};
|
|
|
|
function tu(e) {
|
|
var t, a, n, r, i;
|
|
return T.a.wrap(function(o) {
|
|
for (;;) switch (o.prev = o.next) {
|
|
case 0:
|
|
return o.prev = 0, t = e.payload.page, a = ka(e.payload), o.next = 5, Object(P.b)(Ca.get(eu),
|
|
"/admin/activities?".concat(a));
|
|
case 5:
|
|
return n = o.sent, r = n.data, i = n.headers, o.next = 10, Object(P.c)(iu({
|
|
list: r,
|
|
page: t,
|
|
total: i.total
|
|
}));
|
|
case 10:
|
|
o.next = 16;
|
|
break;
|
|
case 12:
|
|
return o.prev = 12, o.t0 = o.catch(0), o.next = 16, Object(P.c)(Xa({
|
|
message: o.t0.message,
|
|
code: o.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 16:
|
|
case "end":
|
|
return o.stop()
|
|
}
|
|
}, $l, null, [
|
|
[0, 12]
|
|
])
|
|
}
|
|
var au = T.a.mark(nu);
|
|
|
|
function nu() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.d)(Lt, tu);
|
|
case 2:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, au)
|
|
}
|
|
var ru = function(e) {
|
|
return {
|
|
type: Lt,
|
|
payload: e
|
|
}
|
|
},
|
|
iu = function(e) {
|
|
return {
|
|
type: "USER_ACTIVITY_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
ou = {
|
|
list: [],
|
|
loading: !1,
|
|
page: 0,
|
|
total: 0
|
|
},
|
|
su = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : ou,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case Lt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "USER_ACTIVITY_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
list: t.payload.list,
|
|
loading: !1,
|
|
page: t.payload.page,
|
|
total: t.payload.total
|
|
});
|
|
default:
|
|
return e
|
|
}
|
|
},
|
|
cu = function(e) {
|
|
return e.userActivity.list
|
|
},
|
|
lu = function(e) {
|
|
return e.userActivity.total
|
|
},
|
|
uu = function(e) {
|
|
return e.userActivity.page
|
|
},
|
|
du = function(e) {
|
|
return e.userActivity.loading
|
|
},
|
|
pu = function(e) {
|
|
return {
|
|
type: Dt,
|
|
payload: e
|
|
}
|
|
},
|
|
hu = function(e) {
|
|
return {
|
|
type: "USER_BALANCES_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
gu = T.a.mark(fu),
|
|
mu = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function fu(e) {
|
|
var t, a, n;
|
|
return T.a.wrap(function(r) {
|
|
for (;;) switch (r.prev = r.next) {
|
|
case 0:
|
|
return r.prev = 0, t = ka(e.payload), r.next = 4, Object(P.b)(Ca.get(mu), "/admin/members?"
|
|
.concat(t));
|
|
case 4:
|
|
return a = r.sent, n = a.data, r.next = 8, Object(P.c)(hu(n[0]));
|
|
case 8:
|
|
r.next = 14;
|
|
break;
|
|
case 10:
|
|
return r.prev = 10, r.t0 = r.catch(0), r.next = 14, Object(P.c)(Xa({
|
|
message: r.t0.message,
|
|
code: r.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 14:
|
|
case "end":
|
|
return r.stop()
|
|
}
|
|
}, gu, null, [
|
|
[0, 10]
|
|
])
|
|
}
|
|
var bu = T.a.mark(yu);
|
|
|
|
function yu() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.d)(Dt, fu);
|
|
case 2:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, bu)
|
|
}
|
|
var vu = {
|
|
loading: !1
|
|
},
|
|
wu = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : vu,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case Dt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "USER_BALANCES_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
userData: t.payload,
|
|
loading: !1
|
|
});
|
|
default:
|
|
return e
|
|
}
|
|
},
|
|
Eu = function(e) {
|
|
return e.userBalances.userData
|
|
},
|
|
Cu = function(e) {
|
|
return {
|
|
type: It,
|
|
payload: e
|
|
}
|
|
},
|
|
Ou = function(e) {
|
|
return {
|
|
type: "GET_USER_DATA_SUCCESS",
|
|
payload: e
|
|
}
|
|
},
|
|
ku = function(e) {
|
|
return {
|
|
type: Nt,
|
|
payload: e
|
|
}
|
|
},
|
|
xu = function(e) {
|
|
return {
|
|
type: "EDIT_USER_PROFILE_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
ju = function() {
|
|
return {
|
|
type: "EDIT_USER_PROFILE_ERROR"
|
|
}
|
|
},
|
|
_u = {
|
|
getUserData: !1,
|
|
editProfile: !1,
|
|
userData: {
|
|
created_at: "",
|
|
email: "",
|
|
id: 0,
|
|
level: 0,
|
|
otp: !1,
|
|
role: "",
|
|
state: "",
|
|
profiles: [],
|
|
documents: [],
|
|
uid: "",
|
|
updated_at: ""
|
|
}
|
|
},
|
|
Ru = T.a.mark(Su);
|
|
|
|
function Su(e) {
|
|
var t, a, n, r, i, o, s, c, l;
|
|
return T.a.wrap(function(u) {
|
|
for (;;) switch (u.prev = u.next) {
|
|
case 0:
|
|
return u.prev = 0, u.next = 3, Object(P.b)(Ca.delete(Za(za())),
|
|
"/admin/users/data_storage?title=".concat(e.payload.title, "&uid=").concat(e.payload.uid));
|
|
case 3:
|
|
if (t = u.sent, (a = t.data).data_storages) {
|
|
n = [], r = Object(se.a)(a.data_storages);
|
|
try {
|
|
for (r.s(); !(i = r.n()).done;)
|
|
for (c in o = i.value, s = JSON.parse(o.data)) s.hasOwnProperty(c) && (l = {
|
|
mainTitle: o.title,
|
|
title: c,
|
|
value: s[c]
|
|
}, n.push(l))
|
|
} catch (d) {
|
|
r.e(d)
|
|
} finally {
|
|
r.f()
|
|
}
|
|
a = Object(b.a)(Object(b.a)({}, a), {}, {
|
|
data_storages: n
|
|
})
|
|
}
|
|
return u.next = 8, Object(P.c)(Ou(a));
|
|
case 8:
|
|
u.next = 14;
|
|
break;
|
|
case 10:
|
|
return u.prev = 10, u.t0 = u.catch(0), u.next = 14, Object(P.c)(Xa({
|
|
message: u.t0.message,
|
|
code: u.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 14:
|
|
case "end":
|
|
return u.stop()
|
|
}
|
|
}, Ru, null, [
|
|
[0, 10]
|
|
])
|
|
}
|
|
var Tu = T.a.mark(Pu);
|
|
|
|
function Pu(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(n) {
|
|
for (;;) switch (n.prev = n.next) {
|
|
case 0:
|
|
return n.prev = 0, n.next = 3, Object(P.b)(Ca.put(Za(za())), "/admin/profiles", Ga(e
|
|
.payload));
|
|
case 3:
|
|
return t = n.sent, a = t.data, n.next = 7, Object(P.c)(xu(a));
|
|
case 7:
|
|
return n.next = 9, Object(P.c)(Xa({
|
|
message: ["Profile successfully updated"],
|
|
type: "success"
|
|
}));
|
|
case 9:
|
|
return n.next = 11, Object(P.c)(Cu({
|
|
uid: e.payload.uid
|
|
}));
|
|
case 11:
|
|
n.next = 19;
|
|
break;
|
|
case 13:
|
|
return n.prev = 13, n.t0 = n.catch(0), n.next = 17, Object(P.c)(ju());
|
|
case 17:
|
|
return n.next = 19, Object(P.c)(Xa({
|
|
message: n.t0.message,
|
|
code: n.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 19:
|
|
case "end":
|
|
return n.stop()
|
|
}
|
|
}, Tu, null, [
|
|
[0, 13]
|
|
])
|
|
}
|
|
var Au = T.a.mark(Du),
|
|
Lu = {
|
|
apiVersion: "barong"
|
|
};
|
|
|
|
function Du(e) {
|
|
var t, a, n, r, i, o, s, c, l;
|
|
return T.a.wrap(function(u) {
|
|
for (;;) switch (u.prev = u.next) {
|
|
case 0:
|
|
return u.prev = 0, u.next = 3, Object(P.b)(Ca.get(Lu), "/admin/users/".concat(e.payload.uid));
|
|
case 3:
|
|
if (t = u.sent, (a = t.data).data_storages) {
|
|
n = [], r = Object(se.a)(a.data_storages);
|
|
try {
|
|
for (r.s(); !(i = r.n()).done;)
|
|
for (c in o = i.value, s = JSON.parse(o.data)) s.hasOwnProperty(c) && (l = {
|
|
mainTitle: o.title,
|
|
title: c,
|
|
value: s[c]
|
|
}, n.push(l))
|
|
} catch (d) {
|
|
r.e(d)
|
|
} finally {
|
|
r.f()
|
|
}
|
|
a = Object(b.a)(Object(b.a)({}, a), {}, {
|
|
data_storages: n
|
|
})
|
|
}
|
|
return u.next = 8, Object(P.c)(Ou(a));
|
|
case 8:
|
|
u.next = 14;
|
|
break;
|
|
case 10:
|
|
return u.prev = 10, u.t0 = u.catch(0), u.next = 14, Object(P.c)(Xa({
|
|
message: u.t0.message,
|
|
code: u.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 14:
|
|
case "end":
|
|
return u.stop()
|
|
}
|
|
}, Au, null, [
|
|
[0, 10]
|
|
])
|
|
}
|
|
var Iu = T.a.mark(Nu);
|
|
|
|
function Nu() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(It, Du);
|
|
case 2:
|
|
return e.next = 4, Object(P.e)(Nt, Pu);
|
|
case 4:
|
|
return e.next = 6, Object(P.e)(ra, Su);
|
|
case 6:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, Iu)
|
|
}
|
|
var Fu = function(e) {
|
|
return e.usersData.selectedUser.userData
|
|
},
|
|
Uu = function(e) {
|
|
return e.usersData.selectedUser.latestProfile
|
|
},
|
|
Mu = function(e) {
|
|
return {
|
|
type: "USER_DEPOSITS_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
Bu = T.a.mark(Hu),
|
|
Wu = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function Hu(e) {
|
|
var t, a, n, r;
|
|
return T.a.wrap(function(i) {
|
|
for (;;) switch (i.prev = i.next) {
|
|
case 0:
|
|
return i.prev = 0, t = ka(e.payload), i.next = 4, Object(P.b)(Ca.get(Wu), "/admin/deposits?"
|
|
.concat(t));
|
|
case 4:
|
|
return a = i.sent, n = a.data, r = a.headers, i.next = 9, Object(P.c)(Mu({
|
|
list: n,
|
|
total: r.total
|
|
}));
|
|
case 9:
|
|
i.next = 15;
|
|
break;
|
|
case 11:
|
|
return i.prev = 11, i.t0 = i.catch(0), i.next = 15, Object(P.c)(Xa({
|
|
message: i.t0.message,
|
|
code: i.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return i.stop()
|
|
}
|
|
}, Bu, null, [
|
|
[0, 11]
|
|
])
|
|
}
|
|
var Vu = T.a.mark(Gu);
|
|
|
|
function Gu() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.d)(Ft, Hu);
|
|
case 2:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, Vu)
|
|
}
|
|
var zu = {
|
|
loading: !1,
|
|
total: 0,
|
|
list: []
|
|
},
|
|
Ku = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : zu,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case Ft:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "USER_DEPOSITS_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
list: t.payload.list,
|
|
total: t.payload.total,
|
|
loading: !1
|
|
});
|
|
default:
|
|
return e
|
|
}
|
|
},
|
|
Zu = function(e) {
|
|
return e.userDeposits.list
|
|
},
|
|
Yu = function(e) {
|
|
return e.userDeposits.total
|
|
},
|
|
qu = function(e) {
|
|
return {
|
|
type: "USER_OPEN_ORDERS_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
Ju = T.a.mark(Xu),
|
|
Qu = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function Xu(e) {
|
|
var t, a, n, r, i, o, s, c, l;
|
|
return T.a.wrap(function(u) {
|
|
for (;;) switch (u.prev = u.next) {
|
|
case 0:
|
|
return u.prev = 0, t = e.payload, a = t.page, n = t.limit, r = ka(e.payload), u.next = 5,
|
|
Object(P.b)(Ca.get(Qu), "/admin/orders?".concat(r, "&state=wait"));
|
|
case 5:
|
|
if (i = u.sent, o = i.data, s = (a - 1) * n + o.length, o.length !== n) {
|
|
u.next = 15;
|
|
break
|
|
}
|
|
return c = Object(b.a)(Object(b.a)({}, e.payload), {}, {
|
|
page: a * n + 1,
|
|
limit: 1
|
|
}), l = ka(c), u.next = 13, Object(P.b)(Ca.get(Qu), "/admin/orders?".concat(l,
|
|
"&state=wait"));
|
|
case 13:
|
|
1 === u.sent.data.length && s++;
|
|
case 15:
|
|
return u.next = 17, Object(P.c)(qu({
|
|
list: o,
|
|
total: s
|
|
}));
|
|
case 17:
|
|
u.next = 23;
|
|
break;
|
|
case 19:
|
|
return u.prev = 19, u.t0 = u.catch(0), u.next = 23, Object(P.c)(Xa({
|
|
message: u.t0.message,
|
|
code: u.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 23:
|
|
case "end":
|
|
return u.stop()
|
|
}
|
|
}, Ju, null, [
|
|
[0, 19]
|
|
])
|
|
}
|
|
var $u = T.a.mark(ed);
|
|
|
|
function ed() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.d)(Ut, Xu);
|
|
case 2:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, $u)
|
|
}
|
|
var td = {
|
|
loading: !1,
|
|
total: 0,
|
|
list: []
|
|
},
|
|
ad = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : td,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case Ut:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "USER_OPEN_ORDERS_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
list: t.payload.list,
|
|
total: t.payload.total,
|
|
loading: !1
|
|
});
|
|
default:
|
|
return e
|
|
}
|
|
},
|
|
nd = function(e) {
|
|
return e.userOpenOrders.list
|
|
},
|
|
rd = function(e) {
|
|
return e.userOpenOrders.total
|
|
},
|
|
id = function(e) {
|
|
return {
|
|
type: "USER_ORDERS_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
od = T.a.mark(cd),
|
|
sd = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function cd(e) {
|
|
var t, a, n, r, i, o, s, c, l;
|
|
return T.a.wrap(function(u) {
|
|
for (;;) switch (u.prev = u.next) {
|
|
case 0:
|
|
return u.prev = 0, t = e.payload, a = t.page, n = t.limit, r = ka(e.payload), u.next = 5,
|
|
Object(P.b)(Ca.get(sd), "/admin/orders?".concat(r));
|
|
case 5:
|
|
if (i = u.sent, o = i.data, s = (a - 1) * n + o.length, o.length !== n) {
|
|
u.next = 15;
|
|
break
|
|
}
|
|
return c = Object(b.a)(Object(b.a)({}, e.payload), {}, {
|
|
page: a * n + 1,
|
|
limit: 1
|
|
}), l = ka(c), u.next = 13, Object(P.b)(Ca.get(sd), "/admin/orders?".concat(l));
|
|
case 13:
|
|
1 === u.sent.data.length && s++;
|
|
case 15:
|
|
return u.next = 17, Object(P.c)(id({
|
|
list: o,
|
|
total: s
|
|
}));
|
|
case 17:
|
|
u.next = 23;
|
|
break;
|
|
case 19:
|
|
return u.prev = 19, u.t0 = u.catch(0), u.next = 23, Object(P.c)(Xa({
|
|
message: u.t0.message,
|
|
code: u.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 23:
|
|
case "end":
|
|
return u.stop()
|
|
}
|
|
}, od, null, [
|
|
[0, 19]
|
|
])
|
|
}
|
|
var ld = T.a.mark(ud);
|
|
|
|
function ud() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.d)(Mt, cd);
|
|
case 2:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, ld)
|
|
}
|
|
var dd = {
|
|
loading: !1,
|
|
total: 0,
|
|
list: []
|
|
},
|
|
pd = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : dd,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case Mt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "USER_ORDERS_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
list: t.payload.list,
|
|
total: t.payload.total,
|
|
loading: !1
|
|
});
|
|
default:
|
|
return e
|
|
}
|
|
},
|
|
hd = function(e) {
|
|
return e.userOrders.list
|
|
},
|
|
gd = function(e) {
|
|
return e.userOrders.total
|
|
},
|
|
md = function(e) {
|
|
return {
|
|
type: "GET_USERS_SUCCESS",
|
|
payload: e
|
|
}
|
|
},
|
|
fd = function(e) {
|
|
return {
|
|
type: "GET_USERS_PENDING_DOCUMENTS_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
bd = function(e) {
|
|
return {
|
|
type: "FILTER_USERS_VERIFIED_DOCUMENTS",
|
|
payload: e
|
|
}
|
|
},
|
|
yd = {
|
|
loading: !1,
|
|
users: [],
|
|
pending: [],
|
|
usersTotal: 0,
|
|
pendingTotal: 0
|
|
},
|
|
vd = T.a.mark(Cd),
|
|
wd = T.a.mark(Od),
|
|
Ed = {
|
|
apiVersion: "barong"
|
|
};
|
|
|
|
function Cd(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(n) {
|
|
for (;;) switch (n.prev = n.next) {
|
|
case 0:
|
|
return n.prev = 0, t = ka(e.payload), n.next = 4, Object(P.b)(Ca.get(Ed), "/admin/users?"
|
|
.concat(t));
|
|
case 4:
|
|
return a = n.sent, n.next = 7, Object(P.c)(md({
|
|
users: a.data,
|
|
total: a.headers.total
|
|
}));
|
|
case 7:
|
|
n.next = 13;
|
|
break;
|
|
case 9:
|
|
return n.prev = 9, n.t0 = n.catch(0), n.next = 13, Object(P.c)(Xa({
|
|
message: n.t0.message,
|
|
code: n.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 13:
|
|
case "end":
|
|
return n.stop()
|
|
}
|
|
}, vd, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
|
|
function Od(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(n) {
|
|
for (;;) switch (n.prev = n.next) {
|
|
case 0:
|
|
return n.prev = 0, t = ka(e.payload), n.next = 4, Object(P.b)(Ca.get(Ed), "/admin/users?"
|
|
.concat(t));
|
|
case 4:
|
|
return a = n.sent, n.next = 7, Object(P.c)(md({
|
|
users: a.data,
|
|
total: a.headers.total
|
|
}));
|
|
case 7:
|
|
n.next = 13;
|
|
break;
|
|
case 9:
|
|
return n.prev = 9, n.t0 = n.catch(0), n.next = 13, Object(P.c)(Xa({
|
|
message: n.t0.message,
|
|
code: n.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 13:
|
|
case "end":
|
|
return n.stop()
|
|
}
|
|
}, wd, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var kd = T.a.mark(jd),
|
|
xd = {
|
|
apiVersion: "barong"
|
|
};
|
|
|
|
function jd(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(n) {
|
|
for (;;) switch (n.prev = n.next) {
|
|
case 0:
|
|
return n.prev = 0, t = ka(e.payload), n.next = 4, Object(P.b)(Ca.get(xd),
|
|
"/admin/users/documents/pending?".concat(t));
|
|
case 4:
|
|
return a = n.sent, n.next = 7, Object(P.c)(fd({
|
|
users: a.data,
|
|
total: a.headers.total
|
|
}));
|
|
case 7:
|
|
n.next = 13;
|
|
break;
|
|
case 9:
|
|
return n.prev = 9, n.t0 = n.catch(0), n.next = 13, Object(P.c)(Xa({
|
|
message: n.t0.message,
|
|
code: n.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 13:
|
|
case "end":
|
|
return n.stop()
|
|
}
|
|
}, kd, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var _d = T.a.mark(Rd);
|
|
|
|
function Rd() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(Bt, Cd);
|
|
case 2:
|
|
return e.next = 4, Object(P.e)(Wt, Od);
|
|
case 4:
|
|
return e.next = 6, Object(P.e)(Ht, jd);
|
|
case 6:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, _d)
|
|
}
|
|
var Sd = function(e) {
|
|
return e.usersData.users.users
|
|
},
|
|
Td = function(e) {
|
|
return e.usersData.users.pending
|
|
},
|
|
Pd = function(e) {
|
|
return e.usersData.users.usersTotal
|
|
},
|
|
Ad = function(e) {
|
|
return e.usersData.users.pendingTotal
|
|
},
|
|
Ld = function(e) {
|
|
return {
|
|
type: "USER_TRADES_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
Dd = T.a.mark(Nd),
|
|
Id = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function Nd(e) {
|
|
var t, a, n, r, i, o, s, c, l;
|
|
return T.a.wrap(function(u) {
|
|
for (;;) switch (u.prev = u.next) {
|
|
case 0:
|
|
return u.prev = 0, t = e.payload, a = t.page, n = t.limit, r = ka(e.payload), u.next = 5,
|
|
Object(P.b)(Ca.get(Id), "/admin/trades?".concat(r));
|
|
case 5:
|
|
if (i = u.sent, o = i.data, s = (a - 1) * n + o.length, o.length !== n) {
|
|
u.next = 15;
|
|
break
|
|
}
|
|
return c = Object(b.a)(Object(b.a)({}, e.payload), {}, {
|
|
page: a * n + 1,
|
|
limit: 1
|
|
}), l = ka(c), u.next = 13, Object(P.b)(Ca.get(Id), "/admin/trades?".concat(l));
|
|
case 13:
|
|
1 === u.sent.data.length && s++;
|
|
case 15:
|
|
return u.next = 17, Object(P.c)(Ld({
|
|
list: o,
|
|
total: s
|
|
}));
|
|
case 17:
|
|
u.next = 23;
|
|
break;
|
|
case 19:
|
|
return u.prev = 19, u.t0 = u.catch(0), u.next = 23, Object(P.c)(Xa({
|
|
message: u.t0.message,
|
|
code: u.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 23:
|
|
case "end":
|
|
return u.stop()
|
|
}
|
|
}, Dd, null, [
|
|
[0, 19]
|
|
])
|
|
}
|
|
var Fd = T.a.mark(Ud);
|
|
|
|
function Ud() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.d)(Vt, Nd);
|
|
case 2:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, Fd)
|
|
}
|
|
var Md = {
|
|
loading: !1,
|
|
total: 0,
|
|
list: []
|
|
},
|
|
Bd = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Md,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case Vt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "USER_TRADES_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
list: t.payload.list,
|
|
total: t.payload.total,
|
|
loading: !1
|
|
});
|
|
default:
|
|
return e
|
|
}
|
|
},
|
|
Wd = function(e) {
|
|
return e.userTrades.list
|
|
},
|
|
Hd = function(e) {
|
|
return e.userTrades.total
|
|
},
|
|
Vd = function(e) {
|
|
return {
|
|
type: "GET_USER_FEE_GROUP_SUCCESS",
|
|
payload: e
|
|
}
|
|
},
|
|
Gd = function() {
|
|
return {
|
|
type: "GET_USER_FEE_GROUP_FETCH_ERROR"
|
|
}
|
|
},
|
|
zd = function(e) {
|
|
return {
|
|
type: "CHANGE_USER_FEE_GROUP_SUCCESS",
|
|
payload: e
|
|
}
|
|
},
|
|
Kd = function() {
|
|
return {
|
|
type: "CHANGE_USER_FEE_GROUP_FETCH_ERROR"
|
|
}
|
|
},
|
|
Zd = {
|
|
getUserData: !1,
|
|
user: {
|
|
id: 0,
|
|
uid: "",
|
|
email: "",
|
|
role: "",
|
|
level: 0,
|
|
group: "",
|
|
state: "",
|
|
accounts: [],
|
|
created_at: "",
|
|
updated_at: ""
|
|
}
|
|
},
|
|
Yd = T.a.mark(qd);
|
|
|
|
function qd(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(n) {
|
|
for (;;) switch (n.prev = n.next) {
|
|
case 0:
|
|
return n.prev = 0, n.next = 3, Object(P.b)(Ca.put(Ka(za())), "/admin/members/".concat(e
|
|
.payload.uid), {
|
|
group: e.payload.group
|
|
});
|
|
case 3:
|
|
return t = n.sent, a = t.data, n.next = 7, Object(P.c)(zd(a));
|
|
case 7:
|
|
n.next = 15;
|
|
break;
|
|
case 9:
|
|
return n.prev = 9, n.t0 = n.catch(0), n.next = 13, Object(P.c)(Kd());
|
|
case 13:
|
|
return n.next = 15, Object(P.c)(Xa({
|
|
message: n.t0.message,
|
|
code: n.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return n.stop()
|
|
}
|
|
}, Yd, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var Jd = T.a.mark(Xd),
|
|
Qd = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function Xd(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(n) {
|
|
for (;;) switch (n.prev = n.next) {
|
|
case 0:
|
|
return n.prev = 0, n.next = 3, Object(P.b)(Ca.get(Qd), "/admin/members/".concat(e.payload
|
|
.uid));
|
|
case 3:
|
|
return t = n.sent, a = t.data, n.next = 7, Object(P.c)(Vd(a));
|
|
case 7:
|
|
n.next = 15;
|
|
break;
|
|
case 9:
|
|
return n.prev = 9, n.t0 = n.catch(0), n.next = 13, Object(P.c)(Gd());
|
|
case 13:
|
|
return n.next = 15, Object(P.c)(Xa({
|
|
message: n.t0.message,
|
|
code: n.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return n.stop()
|
|
}
|
|
}, Jd, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var $d = T.a.mark(ep);
|
|
|
|
function ep() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(ut, Xd);
|
|
case 2:
|
|
return e.next = 4, Object(P.e)(lt, qd);
|
|
case 4:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, $d)
|
|
}
|
|
var tp = function(e) {
|
|
return e.usersData.userFeeGroup.user
|
|
},
|
|
ap = T.a.mark(np);
|
|
|
|
function np(e) {
|
|
var t;
|
|
return T.a.wrap(function(a) {
|
|
for (;;) switch (a.prev = a.next) {
|
|
case 0:
|
|
return a.prev = 0, t = ka(e.payload), a.next = 4, Object(P.b)(Ca.post(Za(za())),
|
|
"/admin/restrictions?".concat(t));
|
|
case 4:
|
|
return a.next = 6, Object(P.c)(Xa({
|
|
message: ["Restriction successfully created"],
|
|
type: "success"
|
|
}));
|
|
case 6:
|
|
a.next = 12;
|
|
break;
|
|
case 8:
|
|
return a.prev = 8, a.t0 = a.catch(0), a.next = 12, Object(P.c)(Xa({
|
|
message: a.t0.message,
|
|
code: a.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 12:
|
|
case "end":
|
|
return a.stop()
|
|
}
|
|
}, ap, null, [
|
|
[0, 8]
|
|
])
|
|
}
|
|
var rp = function(e) {
|
|
return {
|
|
type: "BLACKLIST_RULES_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
ip = T.a.mark(sp),
|
|
op = {
|
|
apiVersion: "barong"
|
|
};
|
|
|
|
function sp(e) {
|
|
var t, a, n, r, i;
|
|
return T.a.wrap(function(o) {
|
|
for (;;) switch (o.prev = o.next) {
|
|
case 0:
|
|
return o.prev = 0, t = e.payload.page, a = ka(e.payload), o.next = 5, Object(l.b)(500);
|
|
case 5:
|
|
return o.next = 7, Object(P.b)(Ca.get(op), "/admin/restrictions?".concat(a));
|
|
case 7:
|
|
return n = o.sent, r = n.data, i = n.headers, o.next = 12, Object(P.c)(rp({
|
|
list: r,
|
|
page: t,
|
|
total: i.total
|
|
}));
|
|
case 12:
|
|
o.next = 18;
|
|
break;
|
|
case 14:
|
|
return o.prev = 14, o.t0 = o.catch(0), o.next = 18, Object(P.c)(Xa({
|
|
message: o.t0.message,
|
|
code: o.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 18:
|
|
case "end":
|
|
return o.stop()
|
|
}
|
|
}, ip, null, [
|
|
[0, 14]
|
|
])
|
|
}
|
|
var cp = T.a.mark(lp);
|
|
|
|
function lp(e) {
|
|
var t;
|
|
return T.a.wrap(function(a) {
|
|
for (;;) switch (a.prev = a.next) {
|
|
case 0:
|
|
return a.prev = 0, t = ka(e.payload), a.next = 4, Object(P.b)(Ca.delete(Za(za())),
|
|
"/admin/restrictions?".concat(t));
|
|
case 4:
|
|
return a.next = 6, Object(P.c)(Xa({
|
|
message: ["Restriction successfully deleted"],
|
|
type: "success"
|
|
}));
|
|
case 6:
|
|
a.next = 12;
|
|
break;
|
|
case 8:
|
|
return a.prev = 8, a.t0 = a.catch(0), a.next = 12, Object(P.c)(Xa({
|
|
message: a.t0.message,
|
|
code: a.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 12:
|
|
case "end":
|
|
return a.stop()
|
|
}
|
|
}, cp, null, [
|
|
[0, 8]
|
|
])
|
|
}
|
|
var up = T.a.mark(dp);
|
|
|
|
function dp(e) {
|
|
var t;
|
|
return T.a.wrap(function(a) {
|
|
for (;;) switch (a.prev = a.next) {
|
|
case 0:
|
|
return a.prev = 0, t = ka(e.payload), a.next = 4, Object(P.b)(Ca.put(Za(za())),
|
|
"/admin/restrictions?".concat(t));
|
|
case 4:
|
|
return a.next = 6, Object(P.c)(Xa({
|
|
message: ["Restriction successfully updated"],
|
|
type: "success"
|
|
}));
|
|
case 6:
|
|
a.next = 12;
|
|
break;
|
|
case 8:
|
|
return a.prev = 8, a.t0 = a.catch(0), a.next = 12, Object(P.c)(Xa({
|
|
message: a.t0.message,
|
|
code: a.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 12:
|
|
case "end":
|
|
return a.stop()
|
|
}
|
|
}, up, null, [
|
|
[0, 8]
|
|
])
|
|
}
|
|
var pp = T.a.mark(hp);
|
|
|
|
function hp() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.d)(_t, sp);
|
|
case 2:
|
|
return e.next = 4, Object(P.d)(St, np);
|
|
case 4:
|
|
return e.next = 6, Object(P.d)(Rt, dp);
|
|
case 6:
|
|
return e.next = 8, Object(P.d)(Tt, lp);
|
|
case 8:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, pp)
|
|
}
|
|
var gp = {
|
|
list: [],
|
|
loading: !1,
|
|
page: 0,
|
|
total: 0
|
|
},
|
|
mp = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : gp,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case _t:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "BLACKLIST_RULES_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
list: t.payload.list,
|
|
loading: !1,
|
|
page: t.payload.page,
|
|
total: t.payload.total
|
|
});
|
|
default:
|
|
return e
|
|
}
|
|
},
|
|
fp = function(e) {
|
|
return e.blacklistRules.list
|
|
},
|
|
bp = function(e) {
|
|
return e.blacklistRules.total
|
|
},
|
|
yp = function(e) {
|
|
return e.blacklistRules.page
|
|
},
|
|
vp = function(e) {
|
|
return e.blacklistRules.loading
|
|
},
|
|
wp = function() {
|
|
return {
|
|
type: "EMAIL_VERIFICATION_DATA"
|
|
}
|
|
},
|
|
Ep = function() {
|
|
return {
|
|
type: "EMAIL_VERIFICATION_ERROR"
|
|
}
|
|
},
|
|
Cp = T.a.mark(kp),
|
|
Op = {
|
|
apiVersion: "barong"
|
|
};
|
|
|
|
function kp(e) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.prev = 0, t.next = 3, Object(P.b)(Ca.post(Op),
|
|
"/identity/users/email/generate_code", {
|
|
email: e.payload.email,
|
|
lang: e.payload.lang
|
|
});
|
|
case 3:
|
|
return t.next = 5, Object(P.c)(wp());
|
|
case 5:
|
|
return t.next = 7, Object(P.c)(Xa({
|
|
message: ["Successfully resend email confirmation link"],
|
|
type: "success"
|
|
}));
|
|
case 7:
|
|
t.next = 15;
|
|
break;
|
|
case 9:
|
|
return t.prev = 9, t.t0 = t.catch(0), t.next = 13, Object(P.c)(Ep());
|
|
case 13:
|
|
return t.next = 15, Object(P.c)(Xa({
|
|
message: t.t0.message,
|
|
code: t.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, Cp, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var xp = T.a.mark(jp);
|
|
|
|
function jp() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(At, kp);
|
|
case 2:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, xp)
|
|
}
|
|
var _p = {
|
|
loading: !1,
|
|
success: !1
|
|
},
|
|
Rp = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : _p;
|
|
switch ((arguments.length > 1 ? arguments[1] : void 0).type) {
|
|
case "EMAIL_VERIFICATION_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
success: !0
|
|
});
|
|
case "EMAIL_VERIFICATION_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
success: !1
|
|
});
|
|
case At:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0,
|
|
success: !1
|
|
});
|
|
default:
|
|
return e
|
|
}
|
|
},
|
|
Sp = function(e) {
|
|
return {
|
|
type: "WALLETS_LIST_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
Tp = function() {
|
|
return {
|
|
type: "WALLETS_LIST_ERROR"
|
|
}
|
|
},
|
|
Pp = function(e) {
|
|
return {
|
|
type: "WALLET_ADD_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
Ap = function() {
|
|
return {
|
|
type: "WALLET_ADD_ERROR"
|
|
}
|
|
},
|
|
Lp = function(e) {
|
|
return {
|
|
type: "WALLET_UPDATE_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
Dp = function() {
|
|
return {
|
|
type: "WALLET_UPDATE_ERROR"
|
|
}
|
|
},
|
|
Ip = function(e) {
|
|
return {
|
|
type: "WALLET_GET_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
Np = function() {
|
|
return {
|
|
type: "WALLET_GET_ERROR"
|
|
}
|
|
},
|
|
Fp = function() {
|
|
return {
|
|
type: Yt
|
|
}
|
|
},
|
|
Up = function(e) {
|
|
return {
|
|
type: "WALLET_GATEWAYS_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
Mp = function() {
|
|
return {
|
|
type: "WALLET_GATEWAYS_ERROR"
|
|
}
|
|
},
|
|
Bp = function() {
|
|
return {
|
|
type: qt
|
|
}
|
|
},
|
|
Wp = function(e) {
|
|
return {
|
|
type: "WALLET_KINDS_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
Hp = function() {
|
|
return {
|
|
type: "WALLET_KINDS_ERROR"
|
|
}
|
|
},
|
|
Vp = {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0,
|
|
gatewaysList: [],
|
|
kindsList: []
|
|
},
|
|
Gp = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Vp,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case Gt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "WALLETS_LIST_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: t.payload.list,
|
|
total: t.payload.total
|
|
});
|
|
case "WALLETS_LIST_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
});
|
|
case Kt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "WALLET_ADD_DATA":
|
|
case "WALLET_ADD_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1
|
|
});
|
|
case zt:
|
|
return Object(b.a)({}, e);
|
|
case "WALLET_GET_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
wallet: t.payload
|
|
});
|
|
case "WALLET_GET_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
wallet: void 0
|
|
});
|
|
case Zt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "WALLET_UPDATE_DATA":
|
|
case "WALLET_UPDATE_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1
|
|
});
|
|
case Yt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "WALLET_GATEWAYS_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
gatewaysList: t.payload.gatewaysList
|
|
});
|
|
case "WALLET_GATEWAYS_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
gatewaysList: []
|
|
});
|
|
case qt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "WALLET_KINDS_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
kindsList: t.payload.kindsList
|
|
});
|
|
case "WALLET_KINDS_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
kindsList: []
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
zp = function(e) {
|
|
return e.wallets.list
|
|
},
|
|
Kp = function(e) {
|
|
return e.wallets.wallet
|
|
},
|
|
Zp = function(e) {
|
|
return e.wallets.total
|
|
},
|
|
Yp = function(e) {
|
|
return e.wallets.gatewaysList
|
|
},
|
|
qp = function(e) {
|
|
return e.wallets.kindsList
|
|
},
|
|
Jp = T.a.mark(Qp);
|
|
|
|
function Qp(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(n) {
|
|
for (;;) switch (n.prev = n.next) {
|
|
case 0:
|
|
return n.prev = 0, n.next = 3, Object(P.b)(Ca.post(Ka(za())), "/admin/wallets/new", e
|
|
.payload);
|
|
case 3:
|
|
return t = n.sent, a = t.data, n.next = 7, Object(P.c)(Pp(a));
|
|
case 7:
|
|
return n.next = 9, Object(P.c)(Xa({
|
|
message: ["Wallet successfully created"],
|
|
type: "success"
|
|
}));
|
|
case 9:
|
|
return n.next = 11, Object(P.c)(Object(s.push)("/tower/settings/wallets"));
|
|
case 11:
|
|
n.next = 19;
|
|
break;
|
|
case 13:
|
|
return n.prev = 13, n.t0 = n.catch(0), n.next = 17, Object(P.c)(Ap());
|
|
case 17:
|
|
return n.next = 19, Object(P.c)(Xa({
|
|
message: n.t0.message,
|
|
code: n.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 19:
|
|
case "end":
|
|
return n.stop()
|
|
}
|
|
}, Jp, null, [
|
|
[0, 13]
|
|
])
|
|
}
|
|
var Xp = T.a.mark(eh),
|
|
$p = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function eh(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.prev = 0, e.next = 3, Object(P.b)(Ca.get($p), "/admin/wallets/gateways");
|
|
case 3:
|
|
return t = e.sent, a = t.data, e.next = 7, Object(P.c)(Up({
|
|
gatewaysList: a
|
|
}));
|
|
case 7:
|
|
e.next = 15;
|
|
break;
|
|
case 9:
|
|
return e.prev = 9, e.t0 = e.catch(0), e.next = 13, Object(P.c)(Mp());
|
|
case 13:
|
|
return e.next = 15, Object(P.c)(Xa({
|
|
message: e.t0.message,
|
|
code: e.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, Xp, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var th = T.a.mark(nh),
|
|
ah = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function nh(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.prev = 0, e.next = 3, Object(P.b)(Ca.get(ah), "/admin/wallets/kinds");
|
|
case 3:
|
|
return t = e.sent, a = t.data, e.next = 7, Object(P.c)(Wp({
|
|
kindsList: a
|
|
}));
|
|
case 7:
|
|
e.next = 15;
|
|
break;
|
|
case 9:
|
|
return e.prev = 9, e.t0 = e.catch(0), e.next = 13, Object(P.c)(Hp());
|
|
case 13:
|
|
return e.next = 15, Object(P.c)(Xa({
|
|
message: e.t0.message,
|
|
code: e.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, th, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var rh = T.a.mark(oh),
|
|
ih = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function oh(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(n) {
|
|
for (;;) switch (n.prev = n.next) {
|
|
case 0:
|
|
return n.prev = 0, n.next = 3, Object(P.b)(Ca.get(ih), "/admin/wallets/".concat(e.payload
|
|
.id));
|
|
case 3:
|
|
return t = n.sent, a = t.data, n.next = 7, Object(P.c)(Ip(a));
|
|
case 7:
|
|
n.next = 15;
|
|
break;
|
|
case 9:
|
|
return n.prev = 9, n.t0 = n.catch(0), n.next = 13, Object(P.c)(Np());
|
|
case 13:
|
|
return n.next = 15, Object(P.c)(Xa({
|
|
message: n.t0.message,
|
|
code: n.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return n.stop()
|
|
}
|
|
}, rh, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var sh = T.a.mark(lh),
|
|
ch = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function lh(e) {
|
|
var t, a, n, r;
|
|
return T.a.wrap(function(i) {
|
|
for (;;) switch (i.prev = i.next) {
|
|
case 0:
|
|
return i.prev = 0, t = ka(e.payload), i.next = 4, Object(P.b)(Ca.get(ch), "/admin/wallets?"
|
|
.concat(t));
|
|
case 4:
|
|
return a = i.sent, n = a.data, r = a.headers, i.next = 9, Object(P.c)(Sp({
|
|
list: n,
|
|
total: r.total
|
|
}));
|
|
case 9:
|
|
i.next = 17;
|
|
break;
|
|
case 11:
|
|
return i.prev = 11, i.t0 = i.catch(0), i.next = 15, Object(P.c)(Tp());
|
|
case 15:
|
|
return i.next = 17, Object(P.c)(Xa({
|
|
message: i.t0.message,
|
|
code: i.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 17:
|
|
case "end":
|
|
return i.stop()
|
|
}
|
|
}, sh, null, [
|
|
[0, 11]
|
|
])
|
|
}
|
|
var uh = T.a.mark(dh);
|
|
|
|
function dh(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(n) {
|
|
for (;;) switch (n.prev = n.next) {
|
|
case 0:
|
|
return n.prev = 0, n.next = 3, Object(P.b)(Ca.post(Ka(za())), "/admin/wallets/update", e
|
|
.payload);
|
|
case 3:
|
|
return t = n.sent, a = t.data, n.next = 7, Object(P.c)(Lp(a));
|
|
case 7:
|
|
return n.next = 9, Object(P.c)(Xa({
|
|
message: ["Wallet successfully updated"],
|
|
type: "success"
|
|
}));
|
|
case 9:
|
|
return n.next = 11, Object(P.c)(Object(s.push)("/tower/settings/wallets"));
|
|
case 11:
|
|
n.next = 19;
|
|
break;
|
|
case 13:
|
|
return n.prev = 13, n.t0 = n.catch(0), n.next = 17, Object(P.c)(Dp());
|
|
case 17:
|
|
return n.next = 19, Object(P.c)(Xa({
|
|
message: n.t0.message,
|
|
code: n.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 19:
|
|
case "end":
|
|
return n.stop()
|
|
}
|
|
}, uh, null, [
|
|
[0, 13]
|
|
])
|
|
}
|
|
var ph = T.a.mark(hh);
|
|
|
|
function hh() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(Gt, lh);
|
|
case 2:
|
|
return e.next = 4, Object(P.e)(zt, oh);
|
|
case 4:
|
|
return e.next = 6, Object(P.e)(Kt, Qp);
|
|
case 6:
|
|
return e.next = 8, Object(P.e)(Zt, dh);
|
|
case 8:
|
|
return e.next = 10, Object(P.e)(Yt, eh);
|
|
case 10:
|
|
return e.next = 12, Object(P.e)(qt, nh);
|
|
case 12:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, ph)
|
|
}
|
|
var gh = function(e) {
|
|
return {
|
|
type: Jt,
|
|
payload: e
|
|
}
|
|
},
|
|
mh = function(e) {
|
|
return {
|
|
type: "WITHDRAWS_LIST_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
fh = function() {
|
|
return {
|
|
type: "WITHDRAWS_LIST_ERROR"
|
|
}
|
|
},
|
|
bh = function(e) {
|
|
return {
|
|
type: Qt,
|
|
payload: e
|
|
}
|
|
},
|
|
yh = function(e) {
|
|
return {
|
|
type: "WITHDRAW_ITEM_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
vh = function() {
|
|
return {
|
|
type: "WITHDRAW_ITEM_ERROR"
|
|
}
|
|
},
|
|
wh = function() {
|
|
return {
|
|
type: "WITHDRAW_PROCESS_ERROR"
|
|
}
|
|
},
|
|
Eh = function() {
|
|
return {
|
|
type: "WITHDRAW_PROCESS_FIAT_ERROR"
|
|
}
|
|
},
|
|
Ch = function() {
|
|
return {
|
|
type: "WITHDRAW_REJECT_ERROR"
|
|
}
|
|
},
|
|
Oh = function() {
|
|
return {
|
|
type: "WITHDRAW_LOAD_ERROR"
|
|
}
|
|
},
|
|
kh = {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0,
|
|
rejectLoading: !1,
|
|
processLoading: !1,
|
|
loadWithdrawLoading: !1,
|
|
totalExtra: 0,
|
|
listExtra: [],
|
|
loadingExtra: !1
|
|
},
|
|
xh = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : kh,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case Jt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "WITHDRAWS_LIST_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: t.payload.list,
|
|
total: t.payload.total
|
|
});
|
|
case "WITHDRAWS_LIST_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
});
|
|
case Qt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "WITHDRAW_ITEM_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
withdraw: t.payload
|
|
});
|
|
case "WITHDRAW_ITEM_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1
|
|
});
|
|
case Xt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
processLoading: !0
|
|
});
|
|
case "WITHDRAW_PROCESS_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
processLoading: !1
|
|
});
|
|
case $t:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
processLoading: !0
|
|
});
|
|
case "WITHDRAW_PROCESS_FIAT_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
processLoading: !1
|
|
});
|
|
case ea:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
rejectLoading: !0
|
|
});
|
|
case "WITHDRAW_REJECT_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
rejectLoading: !1
|
|
});
|
|
case ta:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loadWithdrawLoading: !0
|
|
});
|
|
case "WITHDRAW_LOAD_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loadWithdrawLoading: !1
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
jh = function(e) {
|
|
return e.withdraws.list
|
|
},
|
|
_h = function(e) {
|
|
return e.withdraws.total
|
|
},
|
|
Rh = function(e) {
|
|
return e.withdraws.withdraw
|
|
},
|
|
Sh = T.a.mark(Ph),
|
|
Th = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function Ph(e) {
|
|
var t, a;
|
|
return T.a.wrap(function(n) {
|
|
for (;;) switch (n.prev = n.next) {
|
|
case 0:
|
|
return n.prev = 0, n.next = 3, Object(P.b)(Ca.get(Th), "/admin/withdraws/".concat(e.payload
|
|
.id));
|
|
case 3:
|
|
return t = n.sent, a = t.data, n.next = 7, Object(P.c)(yh(a));
|
|
case 7:
|
|
n.next = 15;
|
|
break;
|
|
case 9:
|
|
return n.prev = 9, n.t0 = n.catch(0), n.next = 13, Object(P.c)(vh());
|
|
case 13:
|
|
return n.next = 15, Object(P.c)(Xa({
|
|
message: n.t0.message,
|
|
code: n.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return n.stop()
|
|
}
|
|
}, Sh, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var Ah = T.a.mark(Lh);
|
|
|
|
function Lh(e) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.prev = 0, t.next = 3, Object(P.b)(Ca.post(Ka(za())), "/admin/withdraws/actions", e
|
|
.payload);
|
|
case 3:
|
|
return t.next = 5, Object(P.c)(bh({
|
|
id: e.payload.id
|
|
}));
|
|
case 5:
|
|
return t.next = 7, Object(P.c)(Xa({
|
|
message: ["Withdraw successfully loaded"],
|
|
type: "success"
|
|
}));
|
|
case 7:
|
|
t.next = 15;
|
|
break;
|
|
case 9:
|
|
return t.prev = 9, t.t0 = t.catch(0), t.next = 13, Object(P.c)(Oh());
|
|
case 13:
|
|
return t.next = 15, Object(P.c)(Xa({
|
|
message: t.t0.message,
|
|
code: t.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, Ah, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var Dh = T.a.mark(Ih);
|
|
|
|
function Ih(e) {
|
|
var t;
|
|
return T.a.wrap(function(a) {
|
|
for (;;) switch (a.prev = a.next) {
|
|
case 0:
|
|
return a.prev = 0, t = e.payload.id, a.next = 4, Object(P.b)(Ca.post(Ka(za())),
|
|
"/admin/withdraws/actions", {
|
|
id: t,
|
|
action: "process"
|
|
});
|
|
case 4:
|
|
return a.next = 6, Object(P.b)(Ca.post(Ka(za())), "/admin/withdraws/actions", {
|
|
id: t,
|
|
action: "dispatch"
|
|
});
|
|
case 6:
|
|
return a.next = 8, Object(P.b)(Ca.post(Ka(za())), "/admin/withdraws/actions", {
|
|
id: t,
|
|
action: "success"
|
|
});
|
|
case 8:
|
|
return a.next = 10, Object(P.c)(bh({
|
|
id: e.payload.id
|
|
}));
|
|
case 10:
|
|
return a.next = 12, Object(P.c)(Xa({
|
|
message: ["Withdraw successfully processed"],
|
|
type: "success"
|
|
}));
|
|
case 12:
|
|
a.next = 20;
|
|
break;
|
|
case 14:
|
|
return a.prev = 14, a.t0 = a.catch(0), a.next = 18, Object(P.c)(Eh());
|
|
case 18:
|
|
return a.next = 20, Object(P.c)(Xa({
|
|
message: a.t0.message,
|
|
code: a.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 20:
|
|
case "end":
|
|
return a.stop()
|
|
}
|
|
}, Dh, null, [
|
|
[0, 14]
|
|
])
|
|
}
|
|
var Nh = T.a.mark(Fh);
|
|
|
|
function Fh(e) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.prev = 0, t.next = 3, Object(P.b)(Ca.post(Ka(za())), "/admin/withdraws/actions", e
|
|
.payload);
|
|
case 3:
|
|
return t.next = 5, Object(P.c)(bh({
|
|
id: e.payload.id
|
|
}));
|
|
case 5:
|
|
return t.next = 7, Object(P.c)(Xa({
|
|
message: ["Withdraw successfully processed"],
|
|
type: "success"
|
|
}));
|
|
case 7:
|
|
t.next = 15;
|
|
break;
|
|
case 9:
|
|
return t.prev = 9, t.t0 = t.catch(0), t.next = 13, Object(P.c)(wh());
|
|
case 13:
|
|
return t.next = 15, Object(P.c)(Xa({
|
|
message: t.t0.message,
|
|
code: t.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, Nh, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var Uh = T.a.mark(Mh);
|
|
|
|
function Mh(e) {
|
|
return T.a.wrap(function(t) {
|
|
for (;;) switch (t.prev = t.next) {
|
|
case 0:
|
|
return t.prev = 0, t.next = 3, Object(P.b)(Ca.post(Ka(za())), "/admin/withdraws/actions", e
|
|
.payload);
|
|
case 3:
|
|
return t.next = 5, Object(P.c)(bh({
|
|
id: e.payload.id
|
|
}));
|
|
case 5:
|
|
return t.next = 7, Object(P.c)(Xa({
|
|
message: ["Withdraw successfully rejected"],
|
|
type: "success"
|
|
}));
|
|
case 7:
|
|
t.next = 15;
|
|
break;
|
|
case 9:
|
|
return t.prev = 9, t.t0 = t.catch(0), t.next = 13, Object(P.c)(Ch());
|
|
case 13:
|
|
return t.next = 15, Object(P.c)(Xa({
|
|
message: t.t0.message,
|
|
code: t.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return t.stop()
|
|
}
|
|
}, Uh, null, [
|
|
[0, 9]
|
|
])
|
|
}
|
|
var Bh = T.a.mark(Hh),
|
|
Wh = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function Hh(e) {
|
|
var t, a, n, r;
|
|
return T.a.wrap(function(i) {
|
|
for (;;) switch (i.prev = i.next) {
|
|
case 0:
|
|
return i.prev = 0, t = ka(e.payload), i.next = 4, Object(P.b)(Ca.get(Wh), "/admin/withdraws?"
|
|
.concat(t));
|
|
case 4:
|
|
return a = i.sent, n = a.data, r = a.headers, i.next = 9, Object(P.c)(mh({
|
|
list: n,
|
|
total: r.total
|
|
}));
|
|
case 9:
|
|
i.next = 17;
|
|
break;
|
|
case 11:
|
|
return i.prev = 11, i.t0 = i.catch(0), i.next = 15, Object(P.c)(fh());
|
|
case 15:
|
|
return i.next = 17, Object(P.c)(Xa({
|
|
message: i.t0.message,
|
|
code: i.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 17:
|
|
case "end":
|
|
return i.stop()
|
|
}
|
|
}, Bh, null, [
|
|
[0, 11]
|
|
])
|
|
}
|
|
var Vh = T.a.mark(Gh);
|
|
|
|
function Gh() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.e)(Jt, Hh);
|
|
case 2:
|
|
return e.next = 4, Object(P.e)(Qt, Ph);
|
|
case 4:
|
|
return e.next = 6, Object(P.e)(ta, Lh);
|
|
case 6:
|
|
return e.next = 8, Object(P.e)(ea, Mh);
|
|
case 8:
|
|
return e.next = 10, Object(P.e)(Xt, Fh);
|
|
case 10:
|
|
return e.next = 12, Object(P.e)($t, Ih);
|
|
case 12:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, Vh)
|
|
}
|
|
var zh = function(e) {
|
|
return {
|
|
type: "WITHDRAWS_HISTORY_DATA",
|
|
payload: e
|
|
}
|
|
},
|
|
Kh = T.a.mark(Yh),
|
|
Zh = {
|
|
apiVersion: "peatio"
|
|
};
|
|
|
|
function Yh(e) {
|
|
var t, a, n, r;
|
|
return T.a.wrap(function(i) {
|
|
for (;;) switch (i.prev = i.next) {
|
|
case 0:
|
|
return i.prev = 0, t = ka(e.payload), i.next = 4, Object(P.b)(Ca.get(Zh), "/admin/withdraws?"
|
|
.concat(t));
|
|
case 4:
|
|
return a = i.sent, n = a.data, r = a.headers, i.next = 9, Object(P.c)(zh({
|
|
list: n,
|
|
total: r.total
|
|
}));
|
|
case 9:
|
|
i.next = 15;
|
|
break;
|
|
case 11:
|
|
return i.prev = 11, i.t0 = i.catch(0), i.next = 15, Object(P.c)(Xa({
|
|
message: i.t0.message,
|
|
code: i.t0.code,
|
|
type: "error"
|
|
}));
|
|
case 15:
|
|
case "end":
|
|
return i.stop()
|
|
}
|
|
}, Kh, null, [
|
|
[0, 11]
|
|
])
|
|
}
|
|
var qh = T.a.mark(Jh);
|
|
|
|
function Jh() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.d)(aa, Yh);
|
|
case 2:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, qh)
|
|
}
|
|
var Qh = {
|
|
loading: !1,
|
|
total: 0,
|
|
list: []
|
|
},
|
|
Xh = function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Qh,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case aa:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "WITHDRAWS_HISTORY_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
list: t.payload.list,
|
|
total: t.payload.total,
|
|
loading: !1
|
|
});
|
|
case "WITHDRAWS_HISTORY_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
list: [],
|
|
total: 0
|
|
});
|
|
default:
|
|
return e
|
|
}
|
|
},
|
|
$h = function(e) {
|
|
return e.withdrawsHistory.list
|
|
},
|
|
eg = function(e) {
|
|
return e.withdrawsHistory.total
|
|
},
|
|
tg = T.a.mark(ng),
|
|
ag = Object(c.combineReducers)({
|
|
selectedUser: function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : _u,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case It:
|
|
return Object(b.a)({}, e);
|
|
case "GET_USER_DATA_SUCCESS":
|
|
var a = t.payload.profiles.filter(function(e) {
|
|
return "rejected" !== e.state
|
|
});
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
userData: t.payload,
|
|
latestProfile: a.length ? a[a.length - 1] : void 0,
|
|
getUserData: !0
|
|
});
|
|
case "RESET_USER_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
userData: _u.userData,
|
|
latestProfile: void 0
|
|
});
|
|
case Nt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
editProfile: !0
|
|
});
|
|
case "EDIT_USER_PROFILE_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
editProfile: !1,
|
|
latestProfile: t.payload
|
|
});
|
|
case "EDIT_USER_PROFILE_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
editProfile: !1
|
|
});
|
|
case ra:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
getUserData: !1
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
users: function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : yd,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case Bt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "GET_USERS_SUCCESS":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
users: t.payload.users,
|
|
usersTotal: t.payload.total
|
|
});
|
|
case Wt:
|
|
case Ht:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "GET_USERS_PENDING_DOCUMENTS_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
pending: t.payload.users,
|
|
pendingTotal: t.payload.total
|
|
});
|
|
case "FILTER_USERS_VERIFIED_DOCUMENTS":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
pending: e.pending.filter(function(e) {
|
|
return e.uid !== t.payload.uid
|
|
})
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
currentUser: function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Gl,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case Pt:
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !0
|
|
});
|
|
case "GET_CURRENT_USER_DATA":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1,
|
|
user: t.payload
|
|
});
|
|
case "GET_CURRENT_USER_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
loading: !1
|
|
});
|
|
case "CURRENT_USER_RESET":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
user: Gl.user
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
},
|
|
userFeeGroup: function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : Zd,
|
|
t = arguments.length > 1 ? arguments[1] : void 0;
|
|
switch (t.type) {
|
|
case "GET_USER_FEE_GROUP_SUCCESS":
|
|
case "CHANGE_USER_FEE_GROUP_SUCCESS":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
getUserData: !0,
|
|
user: t.payload
|
|
});
|
|
case ut:
|
|
case "GET_USER_FEE_GROUP_FETCH_ERROR":
|
|
case lt:
|
|
case "CHANGE_USER_FEE_GROUP_FETCH_ERROR":
|
|
return Object(b.a)(Object(b.a)({}, e), {}, {
|
|
getUserData: !1
|
|
});
|
|
default:
|
|
return Object(b.a)({}, e)
|
|
}
|
|
}
|
|
});
|
|
|
|
function ng() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.a)([Object(P.b)(go), Object(P.b)(Nl), Object(P.b)(Yn), Object(P.b)
|
|
(Ur), Object(P.b)(Nu), Object(P.b)(nu), Object(P.b)(hp), Object(P.b)(Rd), Object(P.b)(
|
|
sn), Object(P.b)(rs), Object(P.b)(ql), Object(P.b)(Rr), Object(P.b)(di), Object(P.b)(
|
|
Jo), Object(P.b)(hh), Object(P.b)(Ys), Object(P.b)(Mi), Object(P.b)(Gh), Object(P.b)(
|
|
Xc), Object(P.b)(yu), Object(P.b)(ed), Object(P.b)(Ud), Object(P.b)(Gu), Object(P.b)(
|
|
Jh), Object(P.b)(ud), Object(P.b)(bc), Object(P.b)(Tl), Object(P.b)(Nn), Object(P.b)(
|
|
xo), Object(P.b)(Fc), Object(P.b)(bs), Object(P.b)(Cn), Object(P.b)(Ji), Object(P.b)(
|
|
jp), Object(P.b)(jc), Object(P.b)(ep), Object(P.b)(my.getRootPluginsSaga())
|
|
]);
|
|
case 2:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, tg)
|
|
}
|
|
var rg = function(e) {
|
|
switch (e) {
|
|
case "/tower":
|
|
case "/tower/":
|
|
return r.createElement("svg", {
|
|
width: "32",
|
|
height: "32",
|
|
viewBox: "0 0 32 32",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M16.04 7.5L13.53 10H18.53L16.04 7.5ZM8 12V25H24V12H8ZM16 5L21 10H24C24.5304 10 25.0391 10.2107 25.4142 10.5858C25.7893 10.9609 26 11.4696 26 12V25C26 25.5304 25.7893 26.0391 25.4142 26.4142C25.0391 26.7893 24.5304 27 24 27H8C7.46957 27 6.96086 26.7893 6.58579 26.4142C6.21071 26.0391 6 25.5304 6 25V12C6 11.4696 6.21071 10.9609 6.58579 10.5858C6.96086 10.2107 7.46957 10 8 10H11L16 5ZM11 23V19H16V23H11ZM18 22V15H22V22H18ZM10 17V14H15V17H10Z",
|
|
fill: "#979797"
|
|
}));
|
|
case "users":
|
|
case "/tower/users/user-directory":
|
|
return r.createElement("svg", {
|
|
width: "32",
|
|
height: "32",
|
|
viewBox: "0 0 32 32",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M20 17C19.71 17 19.38 17 19.03 17.05C20.19 17.89 21 19 21 20.5V23H27V20.5C27 18.17 22.33 17 20 17ZM12 17C9.67 17 5 18.17 5 20.5V23H19V20.5C19 18.17 14.33 17 12 17ZM12 15C12.7956 15 13.5587 14.6839 14.1213 14.1213C14.6839 13.5587 15 12.7956 15 12C15 11.2044 14.6839 10.4413 14.1213 9.87868C13.5587 9.31607 12.7956 9 12 9C11.2044 9 10.4413 9.31607 9.87868 9.87868C9.31607 10.4413 9 11.2044 9 12C9 12.7956 9.31607 13.5587 9.87868 14.1213C10.4413 14.6839 11.2044 15 12 15ZM20 15C20.7956 15 21.5587 14.6839 22.1213 14.1213C22.6839 13.5587 23 12.7956 23 12C23 11.2044 22.6839 10.4413 22.1213 9.87868C21.5587 9.31607 20.7956 9 20 9C19.2044 9 18.4413 9.31607 17.8787 9.87868C17.3161 10.4413 17 11.2044 17 12C17 12.7956 17.3161 13.5587 17.8787 14.1213C18.4413 14.6839 19.2044 15 20 15Z",
|
|
fill: "#979797"
|
|
}));
|
|
case "/tower/users/operators":
|
|
return r.createElement("svg", {
|
|
width: "32",
|
|
height: "32",
|
|
viewBox: "0 0 32 32",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M13 6C11.9391 6 10.9217 6.42143 10.1716 7.17157C9.42143 7.92172 9 8.93913 9 10C9 11.0609 9.42143 12.0783 10.1716 12.8284C10.9217 13.5786 11.9391 14 13 14C14.0609 14 15.0783 13.5786 15.8284 12.8284C16.5786 12.0783 17 11.0609 17 10C17 8.93913 16.5786 7.92172 15.8284 7.17157C15.0783 6.42143 14.0609 6 13 6ZM13 16C10.33 16 5 17.33 5 20V22H16.08C16.03 21.67 16 21.34 16 21C16 19.5 16.5 18 17.41 16.8C15.88 16.28 14.18 16 13 16ZM22 16C21.87 16 21.76 16.09 21.74 16.21L21.55 17.53C21.25 17.66 20.96 17.82 20.7 18L19.46 17.5C19.35 17.5 19.22 17.5 19.15 17.63L18.15 19.36C18.09 19.47 18.11 19.6 18.21 19.68L19.27 20.5C19.25 20.67 19.24 20.83 19.24 21C19.24 21.17 19.25 21.33 19.27 21.5L18.21 22.32C18.12 22.4 18.09 22.53 18.15 22.64L19.15 24.37C19.21 24.5 19.34 24.5 19.46 24.5L20.7 24C20.96 24.18 21.24 24.35 21.55 24.47L21.74 25.79C21.76 25.91 21.86 26 22 26H24C24.11 26 24.22 25.91 24.24 25.79L24.43 24.47C24.73 24.34 25 24.18 25.27 24L26.5 24.5C26.63 24.5 26.76 24.5 26.83 24.37L27.83 22.64C27.89 22.53 27.86 22.4 27.77 22.32L26.7 21.5C26.72 21.33 26.74 21.17 26.74 21C26.74 20.83 26.73 20.67 26.7 20.5L27.76 19.68C27.85 19.6 27.88 19.47 27.82 19.36L26.82 17.63C26.76 17.5 26.63 17.5 26.5 17.5L25.27 18C25 17.82 24.73 17.65 24.42 17.53L24.23 16.21C24.22 16.09 24.11 16 24 16H22ZM23 19.5C23.3978 19.5 23.7794 19.658 24.0607 19.9393C24.342 20.2206 24.5 20.6022 24.5 21C24.5 21.3978 24.342 21.7794 24.0607 22.0607C23.7794 22.342 23.3978 22.5 23 22.5C22.16 22.5 21.5 21.83 21.5 21C21.5 20.6022 21.658 20.2206 21.9393 19.9393C22.2206 19.658 22.6022 19.5 23 19.5Z",
|
|
fill: "#979797"
|
|
}));
|
|
case "/tower/users/pending":
|
|
return r.createElement("svg", {
|
|
width: "32",
|
|
height: "32",
|
|
viewBox: "0 0 32 32",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M18 24C18 24.5304 17.7893 25.0391 17.4142 25.4142C17.0391 25.7893 16.5304 26 16 26C15.4696 26 14.9609 25.7893 14.5858 25.4142C14.2107 25.0391 14 24.5304 14 24H18ZM16 6C16.2652 6 16.5196 6.10536 16.7071 6.29289C16.8946 6.48043 17 6.73478 17 7V8.08C19.84 8.56 22 11.03 22 14V20L25 23H7L10 20V14C10 11.03 12.16 8.56 15 8.08V7C15 6.73478 15.1054 6.48043 15.2929 6.29289C15.4804 6.10536 15.7348 6 16 6Z",
|
|
fill: "#979797"
|
|
}));
|
|
case "exchange":
|
|
return r.createElement("svg", {
|
|
width: "32",
|
|
height: "32",
|
|
viewBox: "0 0 32 32",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M21 21H19V17H21V21ZM17 21H15V11H17V21ZM13 21H11V14H13V21ZM23 7H9C7.89 7 7 7.89 7 9V23C7 23.5304 7.21071 24.0391 7.58579 24.4142C7.96086 24.7893 8.46957 25 9 25H23C23.5304 25 24.0391 24.7893 24.4142 24.4142C24.7893 24.0391 25 23.5304 25 23V9C25 7.89 24.1 7 23 7Z",
|
|
fill: "#979797"
|
|
}));
|
|
case "/tower/exchange/currencies":
|
|
return r.createElement("svg", {
|
|
width: "32",
|
|
height: "32",
|
|
viewBox: "0 0 32 32",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M16 6C17.3132 6 18.6136 6.25866 19.8268 6.7612C21.0401 7.26375 22.1425 8.00035 23.0711 8.92893C23.9997 9.85752 24.7362 10.9599 25.2388 12.1732C25.7413 13.3864 26 14.6868 26 16C26 18.6522 24.9464 21.1957 23.0711 23.0711C21.1957 24.9464 18.6522 26 16 26C14.6868 26 13.3864 25.7413 12.1732 25.2388C10.9599 24.7362 9.85752 23.9997 8.92893 23.0711C7.05357 21.1957 6 18.6522 6 16C6 13.3478 7.05357 10.8043 8.92893 8.92893C10.8043 7.05357 13.3478 6 16 6ZM16 8C13.8783 8 11.8434 8.84285 10.3431 10.3431C8.84285 11.8434 8 13.8783 8 16C8 18.1217 8.84285 20.1566 10.3431 21.6569C11.8434 23.1571 13.8783 24 16 24C18.1217 24 20.1566 23.1571 21.6569 21.6569C23.1571 20.1566 24 18.1217 24 16C24 13.8783 23.1571 11.8434 21.6569 10.3431C20.1566 8.84285 18.1217 8 16 8ZM15 21V20H13V18H17V17H14C13.7348 17 13.4804 16.8946 13.2929 16.7071C13.1054 16.5196 13 16.2652 13 16V13C13 12.7348 13.1054 12.4804 13.2929 12.2929C13.4804 12.1054 13.7348 12 14 12H15V11H17V12H19V14H15V15H18C18.2652 15 18.5196 15.1054 18.7071 15.2929C18.8946 15.4804 19 15.7348 19 16V19C19 19.2652 18.8946 19.5196 18.7071 19.7071C18.5196 19.8946 18.2652 20 18 20H17V21H15Z",
|
|
fill: "#979797"
|
|
}));
|
|
case "/tower/exchange/markets":
|
|
return r.createElement("svg", {
|
|
width: "32",
|
|
height: "32",
|
|
viewBox: "0 0 32 32",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M26 25H6V7H8V23H10V14H14V23H16V10H20V23H22V18H26V25Z",
|
|
fill: "#979797"
|
|
}));
|
|
case "/tower/exchange/orders/open":
|
|
case "/tower/exchange/orders/history":
|
|
return r.createElement("svg", {
|
|
width: "32",
|
|
height: "32",
|
|
viewBox: "0 0 32 32",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M11 13C10.4696 13 9.96086 12.7893 9.58579 12.4142C9.21071 12.0391 9 11.5304 9 11C9 10.4696 9.21071 9.96086 9.58579 9.58579C9.96086 9.21071 10.4696 9 11 9C11.5304 9 12.0391 9.21071 12.4142 9.58579C12.7893 9.96086 13 10.4696 13 11C13 11.5304 12.7893 12.0391 12.4142 12.4142C12.0391 12.7893 11.5304 13 11 13ZM24 7H8C7.73478 7 7.48043 7.10536 7.29289 7.29289C7.10536 7.48043 7 7.73478 7 8V14C7 14.2652 7.10536 14.5196 7.29289 14.7071C7.48043 14.8946 7.73478 15 8 15H24C24.2652 15 24.5196 14.8946 24.7071 14.7071C24.8946 14.5196 25 14.2652 25 14V8C25 7.73478 24.8946 7.48043 24.7071 7.29289C24.5196 7.10536 24.2652 7 24 7ZM11 23C10.4696 23 9.96086 22.7893 9.58579 22.4142C9.21071 22.0391 9 21.5304 9 21C9 20.4696 9.21071 19.9609 9.58579 19.5858C9.96086 19.2107 10.4696 19 11 19C11.5304 19 12.0391 19.2107 12.4142 19.5858C12.7893 19.9609 13 20.4696 13 21C13 21.5304 12.7893 22.0391 12.4142 22.4142C12.0391 22.7893 11.5304 23 11 23ZM24 17H8C7.73478 17 7.48043 17.1054 7.29289 17.2929C7.10536 17.4804 7 17.7348 7 18V24C7 24.2652 7.10536 24.5196 7.29289 24.7071C7.48043 24.8946 7.73478 25 8 25H24C24.2652 25 24.5196 24.8946 24.7071 24.7071C24.8946 24.5196 25 24.2652 25 24V18C25 17.7348 24.8946 17.4804 24.7071 17.2929C24.5196 17.1054 24.2652 17 24 17Z",
|
|
fill: "#979797"
|
|
}));
|
|
case "/tower/exchange/trades":
|
|
return r.createElement("svg", {
|
|
width: "32",
|
|
height: "32",
|
|
viewBox: "0 0 32 32",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M6 9H14V6H16V26H14V22H10V19H14V17H8V14H14V12H6V9ZM18 9H21V12H18V9ZM18 14H23V17H18V14ZM18 19H26V22H18V19Z",
|
|
fill: "#979797"
|
|
}));
|
|
case "plugins":
|
|
return r.createElement("svg", {
|
|
width: "32",
|
|
height: "32",
|
|
viewBox: "0 0 32 32",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
fillRule: "evenodd",
|
|
clipRule: "evenodd",
|
|
d: "M6 7.31H14V11.65L19.66 6L25.31 11.65L19.66 17.31H24V25.31H16V17.31H19.66L14 11.65V15.31H6V7.31ZM6 17.31H14V25.31H6V17.31Z",
|
|
fill: "#979797"
|
|
}));
|
|
case "settings":
|
|
return r.createElement("svg", {
|
|
width: "32",
|
|
height: "32",
|
|
viewBox: "0 0 32 32",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M15.7293 19.5C14.8011 19.5 13.9108 19.1313 13.2545 18.4749C12.5981 17.8185 12.2293 16.9283 12.2293 16C12.2293 15.0717 12.5981 14.1815 13.2545 13.5251C13.9108 12.8687 14.8011 12.5 15.7293 12.5C16.6576 12.5 17.5478 12.8687 18.2042 13.5251C18.8606 14.1815 19.2293 15.0717 19.2293 16C19.2293 16.9283 18.8606 17.8185 18.2042 18.4749C17.5478 19.1313 16.6576 19.5 15.7293 19.5V19.5ZM23.1593 16.97C23.1993 16.65 23.2293 16.33 23.2293 16C23.2293 15.67 23.1993 15.34 23.1593 15L25.2693 13.37C25.4593 13.22 25.5093 12.95 25.3893 12.73L23.3893 9.27C23.2693 9.05 22.9993 8.96 22.7793 9.05L20.2893 10.05C19.7693 9.66 19.2293 9.32 18.5993 9.07L18.2293 6.42C18.1893 6.18 17.9793 6 17.7293 6H13.7293C13.4793 6 13.2693 6.18 13.2293 6.42L12.8593 9.07C12.2293 9.32 11.6893 9.66 11.1693 10.05L8.67933 9.05C8.45933 8.96 8.18933 9.05 8.06933 9.27L6.06933 12.73C5.93933 12.95 5.99933 13.22 6.18933 13.37L8.29933 15C8.25933 15.34 8.22933 15.67 8.22933 16C8.22933 16.33 8.25933 16.65 8.29933 16.97L6.18933 18.63C5.99933 18.78 5.93933 19.05 6.06933 19.27L8.06933 22.73C8.18933 22.95 8.45933 23.03 8.67933 22.95L11.1693 21.94C11.6893 22.34 12.2293 22.68 12.8593 22.93L13.2293 25.58C13.2693 25.82 13.4793 26 13.7293 26H17.7293C17.9793 26 18.1893 25.82 18.2293 25.58L18.5993 22.93C19.2293 22.67 19.7693 22.34 20.2893 21.94L22.7793 22.95C22.9993 23.03 23.2693 22.95 23.3893 22.73L25.3893 19.27C25.5093 19.05 25.4593 18.78 25.2693 18.63L23.1593 16.97Z",
|
|
fill: "#979797"
|
|
}));
|
|
case "/tower/settings/blockchains":
|
|
return r.createElement("svg", {
|
|
width: "32",
|
|
height: "32",
|
|
viewBox: "0 0 32 32",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M9 9H12.5V6H14.5V9H16V6H18V9C23.5 9 23.5 15 20.5 15.25C24.5 15 25.5 23 18 23V26H16V23H14.5V26H12.5V23H9L9.5 21H10.5C10.7652 21 11.0196 20.8946 11.2071 20.7071C11.3946 20.5196 11.5 20.2652 11.5 20V12C11.5 11.7348 11.3946 11.4804 11.2071 11.2929C11.0196 11.1054 10.7652 11 10.5 11H9V9ZM14.5 11V15C14.5 15 19 15.25 19 13C19 10.75 14.5 11 14.5 11ZM14.5 16.5V21C14.5 21 20 21 20 18.75C20 16.5 14.5 16.5 14.5 16.5Z",
|
|
fill: "#979797"
|
|
}));
|
|
case "/tower/settings/wallets":
|
|
return r.createElement("svg", {
|
|
width: "32",
|
|
height: "32",
|
|
viewBox: "0 0 32 32",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M24 22V23C24 23.5304 23.7893 24.0391 23.4142 24.4142C23.0391 24.7893 22.5304 25 22 25H8C6.89 25 6 24.1 6 23V9C6 8.46957 6.21071 7.96086 6.58579 7.58579C6.96086 7.21071 7.46957 7 8 7H22C22.5304 7 23.0391 7.21071 23.4142 7.58579C23.7893 7.96086 24 8.46957 24 9V10H15C13.89 10 13 10.9 13 12V20C13 20.5304 13.2107 21.0391 13.5858 21.4142C13.9609 21.7893 14.4696 22 15 22H24ZM15 20H25V12H15V20ZM19 17.5C18.6022 17.5 18.2206 17.342 17.9393 17.0607C17.658 16.7794 17.5 16.3978 17.5 16C17.5 15.6022 17.658 15.2206 17.9393 14.9393C18.2206 14.658 18.6022 14.5 19 14.5C19.3978 14.5 19.7794 14.658 20.0607 14.9393C20.342 15.2206 20.5 15.6022 20.5 16C20.5 16.3978 20.342 16.7794 20.0607 17.0607C19.7794 17.342 19.3978 17.5 19 17.5Z",
|
|
fill: "#979797"
|
|
}));
|
|
case "/tower/settings/restrictions":
|
|
return r.createElement("svg", {
|
|
width: "32",
|
|
height: "32",
|
|
viewBox: "0 0 32 32",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
fillRule: "evenodd",
|
|
clipRule: "evenodd",
|
|
d: "M16 6C10.5 6 6 10.5 6 16C6 21.5 10.5 26 16 26C21.5 26 26 21.5 26 16C26 10.5 21.5 6 16 6ZM8 16C8 11.6 11.6 8 16 8C17.8 8 19.5 8.6 20.9 9.7L9.7 20.9C8.6 19.5 8 17.8 8 16ZM16 24C14.2 24 12.5 23.4 11.1 22.3L22.3 11.1C23.4 12.5 24 14.2 24 16C24 20.4 20.4 24 16 24Z",
|
|
fill: "#979797"
|
|
}));
|
|
case "/tower/settings/permissions":
|
|
return r.createElement("svg", {
|
|
width: "32",
|
|
height: "32",
|
|
viewBox: "0 0 32 32",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M16 19C11.58 19 8 20.79 8 23V25H24V23C24 20.79 20.42 19 16 19ZM12 13C12 14.0609 12.4214 15.0783 13.1716 15.8284C13.9217 16.5786 14.9391 17 16 17C17.0609 17 18.0783 16.5786 18.8284 15.8284C19.5786 15.0783 20 14.0609 20 13H12ZM15.5 6C15.2 6 15 6.21 15 6.5V9.5H14V7C14 7 11.75 7.86 11.75 10.75C11.75 10.75 11 10.89 11 12H21C20.95 10.89 20.25 10.75 20.25 10.75C20.25 7.86 18 7 18 7V9.5H17V6.5C17 6.21 16.81 6 16.5 6H15.5Z",
|
|
fill: "#979797"
|
|
}));
|
|
case "/tower/settings/fees-schedules":
|
|
return r.createElement("svg", {
|
|
width: "32",
|
|
height: "32",
|
|
viewBox: "0 0 32 32",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M22.43 7.16L23.04 11.02L26.55 12.81L24.78 16.31L26.56 19.81L23.02 21.6L22.41 25.46L18.52 24.85L15.75 27.61L12.97 24.81L9.11 25.45L8.49 21.56L5 19.78L6.78 16.28L5.01 12.81L8.52 11L9.13 7.17L13 7.81L15.78 5L18.55 7.77L22.43 7.16ZM13.28 11.31C12.8822 11.31 12.5006 11.468 12.2193 11.7493C11.938 12.0306 11.78 12.4122 11.78 12.81C11.78 13.2078 11.938 13.5894 12.2193 13.8707C12.5006 14.152 12.8822 14.31 13.28 14.31C13.6778 14.31 14.0594 14.152 14.3407 13.8707C14.622 13.5894 14.78 13.2078 14.78 12.81C14.78 12.4122 14.622 12.0306 14.3407 11.7493C14.0594 11.468 13.6778 11.31 13.28 11.31ZM18.28 18.31C17.8822 18.31 17.5006 18.468 17.2193 18.7493C16.938 19.0306 16.78 19.4122 16.78 19.81C16.78 20.2078 16.938 20.5894 17.2193 20.8707C17.5006 21.152 17.8822 21.31 18.28 21.31C18.6778 21.31 19.0594 21.152 19.3407 20.8707C19.622 20.5894 19.78 20.2078 19.78 19.81C19.78 19.4122 19.622 19.0306 19.3407 18.7493C19.0594 18.468 18.6778 18.31 18.28 18.31ZM12.19 21.31L20.78 12.72L19.37 11.31L10.78 19.9L12.19 21.31Z",
|
|
fill: "#979797"
|
|
}));
|
|
case "accountings":
|
|
return r.createElement("svg", {
|
|
width: "32",
|
|
height: "32",
|
|
viewBox: "0 0 32 32",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M11 6H21C21.5304 6 22.0391 6.21071 22.4142 6.58579C22.7893 6.96086 23 7.46957 23 8V24C23 24.5304 22.7893 25.0391 22.4142 25.4142C22.0391 25.7893 21.5304 26 21 26H11C10.4696 26 9.96086 25.7893 9.58579 25.4142C9.21071 25.0391 9 24.5304 9 24V8C9 7.46957 9.21071 6.96086 9.58579 6.58579C9.96086 6.21071 10.4696 6 11 6V6ZM11 8V12H21V8H11ZM11 14V16H13V14H11ZM15 14V16H17V14H15ZM19 14V16H21V14H19ZM11 18V20H13V18H11ZM15 18V20H17V18H15ZM19 18V20H21V18H19ZM11 22V24H13V22H11ZM15 22V24H17V22H15ZM19 22V24H21V22H19Z",
|
|
fill: "#979797"
|
|
}));
|
|
case "/tower/accountings/deposits":
|
|
return r.createElement("svg", {
|
|
width: "32",
|
|
height: "32",
|
|
viewBox: "0 0 32 32",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M16 23L11 18H14V14H18V18H21L16 23ZM16 8C16.2652 8 16.5196 8.10536 16.7071 8.29289C16.8946 8.48043 17 8.73478 17 9C17 9.26522 16.8946 9.51957 16.7071 9.70711C16.5196 9.89464 16.2652 10 16 10C15.7348 10 15.4804 9.89464 15.2929 9.70711C15.1054 9.51957 15 9.26522 15 9C15 8.73478 15.1054 8.48043 15.2929 8.29289C15.4804 8.10536 15.7348 8 16 8ZM23 8H18.82C18.4 6.84 17.3 6 16 6C14.7 6 13.6 6.84 13.18 8H9C8.46957 8 7.96086 8.21071 7.58579 8.58579C7.21071 8.96086 7 9.46957 7 10V24C7 24.5304 7.21071 25.0391 7.58579 25.4142C7.96086 25.7893 8.46957 26 9 26H23C23.5304 26 24.0391 25.7893 24.4142 25.4142C24.7893 25.0391 25 24.5304 25 24V10C25 9.46957 24.7893 8.96086 24.4142 8.58579C24.0391 8.21071 23.5304 8 23 8Z",
|
|
fill: "#979797"
|
|
}));
|
|
case "/tower/accountings/withdrawals/coin":
|
|
return r.createElement("svg", {
|
|
width: "32",
|
|
height: "32",
|
|
viewBox: "0 0 32 32",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M14 7H18C18.5304 7 19.0391 7.21071 19.4142 7.58579C19.7893 7.96086 20 8.46957 20 9V11H24C24.5304 11 25.0391 11.2107 25.4142 11.5858C25.7893 11.9609 26 12.4696 26 13V24C26 24.5304 25.7893 25.0391 25.4142 25.4142C25.0391 25.7893 24.5304 26 24 26H8C6.89 26 6 25.1 6 24V13C6 11.89 6.89 11 8 11H12V9C12 7.89 12.89 7 14 7ZM18 11V9H14V11H18ZM16 14L11 19H14V23H18V19H21L16 14Z",
|
|
fill: "#979797"
|
|
}));
|
|
case "/tower/accountings/withdrawals-pending/coin":
|
|
return r.createElement("svg", {
|
|
width: "32",
|
|
height: "32",
|
|
viewBox: "0 0 32 32",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M9 8H27V20H9V8ZM18 11C18.7956 11 19.5587 11.3161 20.1213 11.8787C20.6839 12.4413 21 13.2044 21 14C21 14.7956 20.6839 15.5587 20.1213 16.1213C19.5587 16.6839 18.7956 17 18 17C17.2044 17 16.4413 16.6839 15.8787 16.1213C15.3161 15.5587 15 14.7956 15 14C15 13.2044 15.3161 12.4413 15.8787 11.8787C16.4413 11.3161 17.2044 11 18 11ZM13 10C13 10.5304 12.7893 11.0391 12.4142 11.4142C12.0391 11.7893 11.5304 12 11 12V16C11.5304 16 12.0391 16.2107 12.4142 16.5858C12.7893 16.9609 13 17.4696 13 18H23C23 17.4696 23.2107 16.9609 23.5858 16.5858C23.9609 16.2107 24.4696 16 25 16V12C24.4696 12 23.9609 11.7893 23.5858 11.4142C23.2107 11.0391 23 10.5304 23 10H13ZM5 12H7V22H23V24H5V12Z",
|
|
fill: "#979797"
|
|
}));
|
|
case "/tower/accountings/operations/assets":
|
|
case "/tower/accountings/operations/liabilities":
|
|
case "/tower/accountings/operations/revenues":
|
|
return r.createElement("svg", {
|
|
width: "32",
|
|
height: "32",
|
|
viewBox: "0 0 32 32",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M13.01 18H6V20H13.01V23L17 19L13.01 15V18ZM18.99 17V14H26V12H18.99V9L15 13L18.99 17Z",
|
|
fill: "#979797"
|
|
}));
|
|
case "/tower/accountings/adjustments":
|
|
return r.createElement("svg", {
|
|
width: "32",
|
|
height: "32",
|
|
viewBox: "0 0 32 32",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M7 21V23H13V21H7ZM7 9V11H17V9H7ZM17 25V23H25V21H17V19H15V25H17ZM11 13V15H7V17H11V19H13V13H11ZM25 17V15H15V17H25ZM19 13H21V11H25V9H21V7H19V13Z",
|
|
fill: "#979797"
|
|
}));
|
|
default:
|
|
return my.getMenuIcons(e) || r.createElement(Ee.a, null)
|
|
}
|
|
},
|
|
ig = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).state = {
|
|
key: "",
|
|
open: !1
|
|
}, e.handleLogout = function() {
|
|
e.props.logout()
|
|
}, e.triggerCurrentSidebar = function() {
|
|
e.setState({
|
|
open: !e.state.open
|
|
}), e.props.changeCurrentSidebarStatus({
|
|
currentSidebarStatus: !e.state.open
|
|
})
|
|
}, e.getTitleText = function(t) {
|
|
var a = e.props.classes,
|
|
n = fy("mainMenu", e.props.isSuperAdmin).find(function(e) {
|
|
return e.key === t
|
|
});
|
|
return n && r.createElement("div", {
|
|
className: a.header
|
|
}, r.createElement("span", {
|
|
className: te()(e.state.open && a.collapsSideMenu, a.titleIcon)
|
|
}, rg(n.key)), r.createElement(F.a, {
|
|
variant: "body1",
|
|
className: te()(e.state.open && a.collapsSideMenu, a.title)
|
|
}, n.value), r.createElement("div", {
|
|
className: te()(e.state.open && a.chevronIconSlide, a.drawerHeader)
|
|
}, r.createElement(ge.a, {
|
|
onClick: e.triggerCurrentSidebar
|
|
}, e.state.open ? r.createElement(Ce.a, null) : r.createElement(Oe.a, null))))
|
|
}, e.handleClick = function(t) {
|
|
return function(a) {
|
|
e.setState({
|
|
key: t
|
|
})
|
|
}
|
|
}, e.renderList = function(t) {
|
|
var a = e.props.classes;
|
|
return t.map(function(t) {
|
|
return r.createElement(ke.a, {
|
|
to: t.key,
|
|
className: a.link,
|
|
key: t.key
|
|
}, r.createElement(me.a, {
|
|
className: a.listItem,
|
|
classes: {
|
|
selected: a.selected,
|
|
button: a.button
|
|
},
|
|
button: !0,
|
|
key: t.key,
|
|
onClick: e.handleClick(t.key),
|
|
selected: e.getSelectedMenuItem(t.key)
|
|
}, r.createElement(fe.a, null, rg(t.key)), r.createElement(be.a, {
|
|
className: te()(e.state.open && a.collapsSideMenu),
|
|
disableTypography: !0,
|
|
primary: r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, t.value)
|
|
})))
|
|
})
|
|
}, e.getSelectedMenuItem = function(t) {
|
|
return e.props.history.location.pathname.includes(t)
|
|
}, e.getMenuItems = function() {
|
|
var t = e.props.history.location.pathname.split("/")[2];
|
|
return "user-directory" === t ? "users" : t
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
var e = this.props.history.location.pathname;
|
|
this.setState({
|
|
key: e || "/tower"
|
|
})
|
|
}
|
|
}, {
|
|
key: "UNSAFE_componentWillReceiveProps",
|
|
value: function(e) {
|
|
e.history.location.pathname !== this.state.key && this.setState({
|
|
key: e.history.location.pathname
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.classes,
|
|
a = e.loggedIn,
|
|
n = e.isSuperAdmin,
|
|
i = this.state.open,
|
|
o = this.getMenuItems(),
|
|
s = te()({
|
|
[t.hide]: !a || !o
|
|
});
|
|
return r.createElement("div", {
|
|
className: s
|
|
}, r.createElement(ye.a, {
|
|
className: te()(t.drawer),
|
|
variant: "persistent",
|
|
anchor: "left",
|
|
open: !0,
|
|
classes: {
|
|
paper: te()(t.drawerPaper, i && t.drawerUpdateWidth)
|
|
}
|
|
}, this.getTitleText(o), r.createElement(ve.a, null), r.createElement("div", {
|
|
className: t.mainBlock
|
|
}, r.createElement(we.a, null, this.renderList(fy(o, n))), r.createElement("div", {
|
|
className: t.logoutBlock
|
|
}, r.createElement(ve.a, null), r.createElement(ge.a, {
|
|
color: "inherit",
|
|
className: t.logoutBtn,
|
|
onClick: this.handleLogout
|
|
}, r.createElement(Ee.a, {
|
|
viewBox: "0 0 24 24"
|
|
}, r.createElement("path", {
|
|
d: "M11.08 12.59L13.67 10H4V8H13.67L11.08 5.41L12.5 4L17.5 9L12.5 14L11.08 12.59ZM16 0C16.5304 0 17.0391 0.210714 17.4142 0.585786C17.7893 0.960859 18 1.46957 18 2V6.67L16 4.67V2H2V16H16V13.33L18 11.33V16C18 16.5304 17.7893 17.0391 17.4142 17.4142C17.0391 17.7893 16.5304 18 16 18H2C0.89 18 0 17.1 0 16V2C0 0.89 0.89 0 2 0H16Z",
|
|
fill: "#979797",
|
|
stroke: "null"
|
|
})), !i && r.createElement("span", {
|
|
className: t.logoutText
|
|
}, "Logout"))))))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
og = Object(xe.g)(Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
root: {
|
|
display: "inline-block"
|
|
},
|
|
drawer: {
|
|
width: 256
|
|
},
|
|
drawerPaper: {
|
|
width: 256,
|
|
top: 48,
|
|
zIndex: 1099
|
|
},
|
|
drawerHeader: {
|
|
"& button": {
|
|
margin: 5,
|
|
padding: 8
|
|
}
|
|
},
|
|
drawerUpdateWidth: {
|
|
width: 60
|
|
},
|
|
listItem: {
|
|
letterSpacing: "0.1px",
|
|
padding: "15px 13px 10px",
|
|
"&:hover": {
|
|
backgroundColor: "rgba(0,48,174,0.05)"
|
|
},
|
|
"&:focus": {
|
|
backgroundColor: "rgba(0,48,174,0.05)"
|
|
}
|
|
},
|
|
selected: {
|
|
backgroundColor: "rgba(0,48,174,0.05) !important",
|
|
"& svg": {
|
|
"& path": {
|
|
fill: "#0030AE"
|
|
}
|
|
},
|
|
"& p": {
|
|
color: "#0030AE"
|
|
}
|
|
},
|
|
button: {
|
|
color: "#309CEA"
|
|
},
|
|
link: {
|
|
textDecoration: "none"
|
|
},
|
|
hide: {
|
|
display: "none"
|
|
},
|
|
header: {
|
|
color: "#979797",
|
|
display: "flex",
|
|
alignItems: "center",
|
|
marginTop: 5,
|
|
marginLeft: 13,
|
|
padding: 0,
|
|
"& div": {
|
|
"& svg": {
|
|
"& path:first-child": {
|
|
fill: "#979797",
|
|
opasity: .5
|
|
}
|
|
}
|
|
},
|
|
"& svg": {
|
|
"& path:first-child": {
|
|
fill: "#0030AE"
|
|
}
|
|
},
|
|
"& p": {
|
|
color: "#0030AE"
|
|
}
|
|
},
|
|
mainBlock: {
|
|
position: "relative",
|
|
height: "calc(100vh - 103px)"
|
|
},
|
|
title: {
|
|
flexGrow: 1,
|
|
fontSize: 20,
|
|
letterSpacing: .15,
|
|
color: "#979797"
|
|
},
|
|
collapsSideMenu: {
|
|
display: "none"
|
|
},
|
|
chevronIconSlide: {
|
|
marginLeft: -9
|
|
},
|
|
titleIcon: {
|
|
marginTop: 5,
|
|
marginRight: e.spacing(3)
|
|
},
|
|
logoutBlock: {
|
|
position: "absolute",
|
|
width: "100%",
|
|
textAlign: "center",
|
|
bottom: 0
|
|
},
|
|
logoutBtn: {
|
|
borderRadius: 0,
|
|
borderWidth: "40px",
|
|
width: "100%",
|
|
"& svg": {
|
|
marginTop: 6
|
|
},
|
|
"&:hover": {
|
|
backgroundColor: "rgba(0,48,174,0.05)"
|
|
},
|
|
"&:focus": {
|
|
backgroundColor: "rgba(0,48,174,0.05)"
|
|
}
|
|
},
|
|
logoutText: {
|
|
color: "#979797",
|
|
fontSize: 14,
|
|
fontWeight: "bold",
|
|
letterSpacing: .4
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(Object(o.b)(null, function(e) {
|
|
return {
|
|
changeCurrentSidebarStatus: function(t) {
|
|
return e(Uc(t))
|
|
}
|
|
}
|
|
})(ig))),
|
|
sg = a(588),
|
|
cg = a(586),
|
|
lg = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
margin: {
|
|
margin: "16px 0 8px",
|
|
width: "100%"
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(function(e) {
|
|
var t = e.classes,
|
|
a = e.date,
|
|
n = e.disabled,
|
|
i = e.label;
|
|
return r.createElement(sg.a, {
|
|
className: t.margin
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, i), r.createElement(cg.a, {
|
|
value: a,
|
|
onChange: e.handleChangeDate,
|
|
disabled: n,
|
|
placeholder: "DD-MM-YYYY HH:mm:ss",
|
|
fullWidth: !0
|
|
}))
|
|
}),
|
|
ug = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).getButtons = function() {
|
|
var t = e.props,
|
|
a = t.deposit,
|
|
n = t.classes;
|
|
return "submitted" === a.state ? r.createElement("div", null, r.createElement(L.a, {
|
|
variant: "contained",
|
|
className: n.redBtn,
|
|
onClick: e.props.handleRejectDeposit
|
|
}, "Reject"), r.createElement(L.a, {
|
|
variant: "contained",
|
|
className: n.blueBtn,
|
|
onClick: e.props.handleAcceptDeposit
|
|
}, "Accept")) : null
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.classes,
|
|
a = e.deposit;
|
|
return r.createElement(D.a, {
|
|
className: t.root
|
|
}, r.createElement(I.a, {
|
|
container: !0,
|
|
direction: "column"
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
className: t.row
|
|
}, r.createElement(F.a, {
|
|
variant: "h6",
|
|
className: t.header
|
|
}, "Deposit details")), r.createElement(I.a, {
|
|
container: !0,
|
|
direction: "row",
|
|
className: t.row
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
direction: "column",
|
|
className: t.column
|
|
}, r.createElement(I.a, {
|
|
item: !0
|
|
}, r.createElement(F.a, {
|
|
variant: "caption",
|
|
className: t.title
|
|
}, "UID")), r.createElement(I.a, {
|
|
item: !0
|
|
}, r.createElement(F.a, {
|
|
variant: "body2",
|
|
className: t.text
|
|
}, a.uid)), r.createElement(I.a, {
|
|
item: !0
|
|
}, r.createElement(F.a, {
|
|
variant: "caption",
|
|
className: t.title
|
|
}, "Member")), r.createElement(I.a, {
|
|
item: !0
|
|
}, r.createElement(F.a, {
|
|
variant: "body2",
|
|
className: t.text
|
|
}, a.email)), r.createElement(I.a, {
|
|
item: !0
|
|
}, r.createElement(F.a, {
|
|
variant: "caption",
|
|
className: t.title
|
|
}, "Amount")), r.createElement(I.a, {
|
|
item: !0
|
|
}, r.createElement(F.a, {
|
|
variant: "body2",
|
|
className: t.text
|
|
}, a.amount))), r.createElement(I.a, {
|
|
item: !0,
|
|
direction: "column",
|
|
className: t.column
|
|
}, r.createElement(I.a, {
|
|
item: !0
|
|
}, r.createElement(F.a, {
|
|
variant: "caption",
|
|
className: t.title
|
|
}, "Date")), r.createElement(I.a, {
|
|
item: !0
|
|
}, r.createElement(F.a, {
|
|
variant: "body2",
|
|
className: t.text
|
|
}, Wa(a.created_at, "fullDate"))), r.createElement(I.a, {
|
|
item: !0
|
|
}, r.createElement(F.a, {
|
|
variant: "caption",
|
|
className: t.title
|
|
}, "State")), r.createElement(I.a, {
|
|
item: !0
|
|
}, r.createElement(F.a, {
|
|
variant: "body2",
|
|
className: t.text
|
|
}, a.state)))), r.createElement(I.a, {
|
|
item: !0,
|
|
className: t.rowEnd
|
|
}, this.getButtons())))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
dg = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
root: {
|
|
display: "flex",
|
|
padding: "16px 28px"
|
|
},
|
|
header: {
|
|
color: "#000000",
|
|
marginBottom: 24
|
|
},
|
|
title: {
|
|
color: "rgba(0, 0, 0, 0.54)"
|
|
},
|
|
row: {
|
|
display: "flex",
|
|
width: "100%",
|
|
flexDirection: "row",
|
|
justifyContent: "space-between"
|
|
},
|
|
text: {
|
|
color: "rgba(0, 0, 0, 0.7)",
|
|
marginBottom: 14
|
|
},
|
|
rowEnd: {
|
|
display: "flex",
|
|
width: "100%",
|
|
justifyContent: "flex-end"
|
|
},
|
|
blueBtn: {
|
|
background: "#0030AE",
|
|
color: "#FFFFFF",
|
|
textTransform: "none",
|
|
width: 100,
|
|
fontSize: 12,
|
|
lineHeight: 1
|
|
},
|
|
redBtn: {
|
|
background: "#E23328",
|
|
color: "#FFFFFF",
|
|
textTransform: "none",
|
|
width: 100,
|
|
marginRight: 30,
|
|
lineHeight: 1,
|
|
fontSize: 12
|
|
},
|
|
column: {
|
|
width: "50%"
|
|
}
|
|
})
|
|
})(ug),
|
|
pg = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).prevButton = function(t) {
|
|
var a = e.props.classes;
|
|
return r.createElement(ge.a, {
|
|
className: a.button,
|
|
onClick: e.handleClick(t),
|
|
disabled: t < 0
|
|
}, r.createElement(Oe.a, {
|
|
className: a.icon
|
|
}))
|
|
}, e.nextButton = function(t) {
|
|
var a = e.props,
|
|
n = a.classes,
|
|
i = a.documents;
|
|
return r.createElement(ge.a, {
|
|
className: n.button,
|
|
onClick: e.handleClick(t),
|
|
disabled: t >= i.length
|
|
}, r.createElement(Ce.a, {
|
|
className: n.icon
|
|
}))
|
|
}, e.handleClick = function(t) {
|
|
return function() {
|
|
e.props.handleNavigate(t)
|
|
}
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.classes,
|
|
a = e.handleClose,
|
|
n = e.documents,
|
|
i = e.documentIndex;
|
|
return r.createElement("div", {
|
|
className: t.root
|
|
}, r.createElement("div", {
|
|
className: t.boxWrapper
|
|
}, r.createElement(ce.a, {
|
|
onClickAway: a
|
|
}, r.createElement("div", {
|
|
className: t.box
|
|
}, this.prevButton(i - 1), r.createElement("img", {
|
|
src: n[i].upload.url,
|
|
alt: "document",
|
|
className: t.img
|
|
}), this.nextButton(i + 1)))))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
hg = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
root: {
|
|
zIndex: 2,
|
|
position: "fixed",
|
|
right: 0,
|
|
bottom: 0,
|
|
top: 0,
|
|
left: 0,
|
|
backgroundColor: "rgba(0, 0, 0, 0.2)"
|
|
},
|
|
boxWrapper: {
|
|
position: "absolute",
|
|
top: "50%",
|
|
left: "50%",
|
|
transform: "translate(-50%, -50%)"
|
|
},
|
|
box: {
|
|
display: "flex",
|
|
justifyContent: "center",
|
|
alignItems: "center"
|
|
},
|
|
img: {
|
|
height: "auto",
|
|
maxWidth: 500,
|
|
overflow: "hidden",
|
|
boxShadow: "0px 2px 4px rgba(0, 0, 0, 0.25)"
|
|
},
|
|
button: {
|
|
color: "#2076D2",
|
|
padding: "2px",
|
|
margin: "15px",
|
|
backgroundColor: "#fff"
|
|
},
|
|
icon: {
|
|
fontSize: "18px"
|
|
}
|
|
})
|
|
})(pg),
|
|
gg = a(183),
|
|
mg = a(43),
|
|
fg = a(630),
|
|
bg = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).getDatePicker = function() {
|
|
var t = e.props,
|
|
a = t.classes,
|
|
n = t.data,
|
|
i = t.handlePickerChange,
|
|
o = n.find(function(e) {
|
|
return "from" === e.property
|
|
}),
|
|
s = n.find(function(e) {
|
|
return "to" === e.property
|
|
});
|
|
return o && s ? r.createElement(r.Fragment, null, r.createElement(sg.a, {
|
|
fullWidth: !0,
|
|
className: a.formControl
|
|
}, r.createElement("div", {
|
|
className: a.drawerLabel
|
|
}, "Date Range"), r.createElement("div", {
|
|
className: a.dateWrapper
|
|
}, r.createElement(mg.a, {
|
|
utils: gg.a
|
|
}, r.createElement(fg.a, {
|
|
value: o && o.value,
|
|
onChange: function(e) {
|
|
return i && i(e, "from")
|
|
},
|
|
placeholder: "Start date",
|
|
format: "DD-MM-YYYY",
|
|
maxDate: s && s.value || void 0
|
|
})), r.createElement(mg.a, {
|
|
utils: gg.a
|
|
}, r.createElement(fg.a, {
|
|
value: s.value,
|
|
onChange: function(e) {
|
|
return i && i(e, "to")
|
|
},
|
|
placeholder: "End date",
|
|
minDate: o && o.value || void 0,
|
|
format: "DD-MM-YYYY"
|
|
})))), r.createElement(ve.a, null)) : null
|
|
}, e.renderFilterItems = function() {
|
|
var t = e.props,
|
|
a = t.classes,
|
|
n = t.data,
|
|
i = t.handleChange;
|
|
return n.map(function(e, t) {
|
|
return "from" !== e.property && "to" !== e.property ? r.createElement(r.Fragment, {
|
|
key: t
|
|
}, r.createElement(sg.a, {
|
|
fullWidth: !0,
|
|
className: a.formControl
|
|
}, r.createElement("div", {
|
|
className: a.drawerLabel
|
|
}, e.title), r.createElement(N.a, {
|
|
onChange: function(t) {
|
|
return i(t, e.property)
|
|
},
|
|
id: "filter-".concat(e.property),
|
|
value: e.value,
|
|
type: e.type,
|
|
placeholder: e.title
|
|
})), r.createElement(ve.a, null)) : null
|
|
})
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.isOpen,
|
|
a = e.handleOnClose,
|
|
n = e.classes,
|
|
i = e.handleResetAll,
|
|
o = e.handleSubmit;
|
|
return r.createElement(ye.a, {
|
|
anchor: "right",
|
|
open: t,
|
|
onClose: a
|
|
}, r.createElement("div", {
|
|
className: n.drawerWrapper
|
|
}, this.getDatePicker(), this.renderFilterItems()), r.createElement("div", {
|
|
className: n.drawerButtons
|
|
}, r.createElement(L.a, {
|
|
onClick: i,
|
|
className: n.button,
|
|
variant: "contained",
|
|
color: "secondary"
|
|
}, "Reset All"), r.createElement(L.a, {
|
|
onClick: o,
|
|
className: n.button,
|
|
variant: "contained",
|
|
color: "primary"
|
|
}, "Apply Filters")))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
yg = Object(U.a)(function() {
|
|
return Object(A.a)({
|
|
formControl: {
|
|
margin: "20px 0",
|
|
padding: "0 20px"
|
|
},
|
|
drawerWrapper: {
|
|
width: 400,
|
|
backgroundColor: "#FFFFFF",
|
|
fontFamily: "Roboto, Helvetica, Arial, sans-serif"
|
|
},
|
|
drawerLabel: {
|
|
color: "#000000",
|
|
letterSpacing: .15,
|
|
fontWeight: 500,
|
|
fontSize: 20
|
|
},
|
|
drawerButtons: {
|
|
padding: "0 20px",
|
|
display: "flex",
|
|
justifyContent: "space-between"
|
|
},
|
|
button: {
|
|
flex: 1,
|
|
borderRadius: 3,
|
|
marginTop: 40,
|
|
"&:first-child": {
|
|
marginRight: 15
|
|
}
|
|
},
|
|
dateWrapper: {
|
|
display: "flex",
|
|
justifyContent: "space-between",
|
|
marginTop: 15
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(bg),
|
|
vg = a(364),
|
|
wg = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
main: {
|
|
width: "100%",
|
|
borderTop: "1px solid rgba(0, 0, 0, 0.1)",
|
|
display: "flex",
|
|
flexDirection: "row",
|
|
alignItems: "center",
|
|
justifyContent: "flex-end",
|
|
padding: "8px 12px",
|
|
fontFamily: "Roboto"
|
|
},
|
|
grey: {
|
|
letterSpacing: "0.4px",
|
|
color: "#000000",
|
|
paddingRight: 4,
|
|
fontWeight: "normal",
|
|
fontSize: 12
|
|
},
|
|
link: {
|
|
textDecoration: "none",
|
|
paddingTop: 3
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(function(e) {
|
|
var t = e.classes;
|
|
return r.createElement("div", {
|
|
className: t.main
|
|
}, r.createElement("span", {
|
|
className: t.grey
|
|
}, "Powered by Fibitex"))
|
|
}),
|
|
Eg = function(e) {
|
|
switch (e) {
|
|
case "addPage":
|
|
return r.createElement(Ee.a, {
|
|
width: "20",
|
|
height: "20",
|
|
viewBox: "0 0 20 20",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M10 18C5.59 18 2 14.41 2 10C2 5.59 5.59 2 10 2C14.41 2 18 5.59 18 10C18 14.41 14.41 18 10 18ZM10 0C8.68678 0 7.38642 0.258658 6.17317 0.761205C4.95991 1.26375 3.85752 2.00035 2.92893 2.92893C1.05357 4.8043 0 7.34784 0 10C0 12.6522 1.05357 15.1957 2.92893 17.0711C3.85752 17.9997 4.95991 18.7362 6.17317 19.2388C7.38642 19.7413 8.68678 20 10 20C12.6522 20 15.1957 18.9464 17.0711 17.0711C18.9464 15.1957 20 12.6522 20 10C20 8.68678 19.7413 7.38642 19.2388 6.17317C18.7362 4.95991 17.9997 3.85752 17.0711 2.92893C16.1425 2.00035 15.0401 1.26375 13.8268 0.761205C12.6136 0.258658 11.3132 0 10 0ZM11 5H9V9H5V11H9V15H11V11H15V9H11V5Z",
|
|
fill: "white"
|
|
}));
|
|
case "cancel":
|
|
return r.createElement(Ee.a, {
|
|
width: "20",
|
|
height: "20",
|
|
viewBox: "0 0 20 20",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M10 18C5.59 18 2 14.41 2 10C2 5.59 5.59 2 10 2C14.41 2 18 5.59 18 10C18 14.41 14.41 18 10 18ZM10 0C4.47 0 0 4.47 0 10C0 15.53 4.47 20 10 20C15.53 20 20 15.53 20 10C20 4.47 15.53 0 10 0ZM12.59 6L10 8.59L7.41 6L6 7.41L8.59 10L6 12.59L7.41 14L10 11.41L12.59 14L14 12.59L11.41 10L14 7.41L12.59 6Z",
|
|
fill: "white"
|
|
}));
|
|
case "filter":
|
|
return r.createElement(Ee.a, {
|
|
width: "18",
|
|
height: "12",
|
|
viewBox: "0 0 18 12",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M3 7H15V5H3V7ZM0 0V2H18V0H0ZM7 12H11V10H7V12Z",
|
|
fill: "white"
|
|
}));
|
|
case "refresh":
|
|
return r.createElement(Ee.a, {
|
|
width: "16",
|
|
height: "20",
|
|
viewBox: "0 0 16 20",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M8 4V0L13 5L8 10V6C6.4087 6 4.88258 6.63214 3.75736 7.75736C2.63214 8.88258 2 10.4087 2 12C2 13.5913 2.63214 15.1174 3.75736 16.2426C4.88258 17.3679 6.4087 18 8 18C9.5913 18 11.1174 17.3679 12.2426 16.2426C13.3679 15.1174 14 13.5913 14 12H16C16 14.1217 15.1571 16.1566 13.6569 17.6569C12.1566 19.1571 10.1217 20 8 20C5.87827 20 3.84344 19.1571 2.34315 17.6569C0.842854 16.1566 0 14.1217 0 12C0 9.87827 0.842854 7.84344 2.34315 6.34315C3.84344 4.84285 5.87827 4 8 4Z",
|
|
fill: "white"
|
|
}));
|
|
case "goBack":
|
|
return r.createElement(Ee.a, {
|
|
width: "16",
|
|
height: "16",
|
|
viewBox: "0 0 16 16",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M16 7H3.83L9.42 1.41L8 0L0 8L8 16L9.41 14.59L3.83 9H16V7Z",
|
|
fill: "white"
|
|
}));
|
|
case "export":
|
|
return r.createElement(Ee.a, {
|
|
width: "16",
|
|
height: "20",
|
|
viewBox: "0 0 16 20",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, r.createElement("path", {
|
|
d: "M0 17H14V15H0V17ZM14 6H10V0H4V6H0L7 13L14 6Z",
|
|
fill: "white"
|
|
}));
|
|
default:
|
|
return r.createElement(Ee.a, null)
|
|
}
|
|
},
|
|
Cg = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
return Object(u.a)(this, a), t.apply(this, arguments)
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "shouldShowAddParameter",
|
|
value: function(e) {
|
|
return ["/tower/settings/restrictions"].includes(e)
|
|
}
|
|
}, {
|
|
key: "shouldShowCreatePermisson",
|
|
value: function(e) {
|
|
return ["/tower/settings/permissions"].includes(e)
|
|
}
|
|
}, {
|
|
key: "shouldShowAddFeesSchedule",
|
|
value: function(e) {
|
|
return ["/tower/settings/fees-schedules"].includes(e)
|
|
}
|
|
}, {
|
|
key: "shouldShowAddWallet",
|
|
value: function(e) {
|
|
return ["/tower/settings/wallets"].includes(e)
|
|
}
|
|
}, {
|
|
key: "shouldShowAddBlockchain",
|
|
value: function(e) {
|
|
return ["/tower/settings/blockchains"].includes(e)
|
|
}
|
|
}, {
|
|
key: "shouldShowAddMarket",
|
|
value: function(e) {
|
|
return ["/tower/exchange/markets"].includes(e)
|
|
}
|
|
}, {
|
|
key: "shouldShowAddCurrency",
|
|
value: function(e) {
|
|
return ["/tower/exchange/currencies"].includes(e)
|
|
}
|
|
}, {
|
|
key: "shouldShowAddPage",
|
|
value: function(e) {
|
|
return ["/tower/accountings/adjustments"].includes(e)
|
|
}
|
|
}, {
|
|
key: "shouldShowCancelOrders",
|
|
value: function(e) {
|
|
return ["/tower/exchange/orders/open"].includes(e)
|
|
}
|
|
}, {
|
|
key: "shouldShowCreateDeposit",
|
|
value: function(e) {
|
|
return ["/tower/accountings/deposits"].includes(e)
|
|
}
|
|
}, {
|
|
key: "shouldShowFilter",
|
|
value: function(e) {
|
|
var t;
|
|
return (t = ["/tower/users/user-directory", "/open-orders", "/tower/users/operators",
|
|
"/tower/users/pending", "/tower/exchange/currencies", "/tower/exchange/orders/open",
|
|
"/tower/exchange/orders/history", "/tower/exchange/trades",
|
|
"/tower/accountings/deposits", "/tower/accountings/withdrawals/coin",
|
|
"/tower/accountings/withdrawals/fiat", "/tower/accountings/withdrawals-pending/coin",
|
|
"/tower/accountings/withdrawals-pending/fiat", "/tower/accountings/adjustments",
|
|
"/tower/accountings/operations/assets", "/tower/accountings/operations/liabilities",
|
|
"/tower/accountings/operations/revenues", "/tower/settings/wallets",
|
|
"/tower/settings/fees-schedules", "/tower/settings/restrictions",
|
|
"/tower/accountings/operations/expenses"
|
|
]).concat.apply(t, Object(f.a)(my.getHeaderActions().filter(function(e) {
|
|
return e
|
|
}).map(function(e) {
|
|
return e.pagesWithFilter
|
|
}) || [])).includes(e)
|
|
}
|
|
}, {
|
|
key: "shouldShowRefresh",
|
|
value: function(e) {
|
|
var t;
|
|
return (t = ["/tower/exchange/markets", "/tower/", "/tower", "/tower/users/user-directory",
|
|
"/open-orders", "/tower/users/operators", "/tower/users/pending",
|
|
"/tower/exchange/currencies", "/tower/exchange/orders/open",
|
|
"/tower/exchange/orders/history", "/tower/exchange/trades",
|
|
"/tower/accountings/deposits", "/tower/accountings/withdrawals/coin",
|
|
"/tower/accountings/withdrawals/fiat", "/tower/accountings/withdrawals-pending/coin",
|
|
"/tower/accountings/withdrawals-pending/fiat", "/tower/accountings/adjustments",
|
|
"/tower/accountings/operations/assets", "/tower/accountings/operations/liabilities",
|
|
"/tower/accountings/operations/revenues", "/tower/settings/blockchains",
|
|
"/tower/settings/wallets", "/tower/settings/fees-schedules",
|
|
"/tower/settings/permissions", "/tower/settings/restrictions",
|
|
"/tower/accountings/operations/expenses"
|
|
]).concat.apply(t, Object(f.a)(my.getHeaderActions().filter(function(e) {
|
|
return e
|
|
}).map(function(e) {
|
|
return e.pagesWithRefresh
|
|
}) || [])).includes(e)
|
|
}
|
|
}, {
|
|
key: "shouldShowExport",
|
|
value: function(e) {
|
|
var t;
|
|
return (t = ["/tower/exchange/orders/open", "/tower/exchange/orders/history",
|
|
"/tower/exchange/trades"
|
|
]).concat.apply(t, Object(f.a)(my.getHeaderActions().filter(function(e) {
|
|
return e
|
|
}).map(function(e) {
|
|
return e.pagesWithExport
|
|
}) || [])).includes(e)
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this,
|
|
t = this.props,
|
|
a = t.classes,
|
|
n = t.history.location.pathname,
|
|
i = n.includes("/tower/users/user-directory/") ? "/".concat(n.split("/").splice(5)[0]) :
|
|
n;
|
|
return r.createElement("div", {
|
|
className: a.wrapper
|
|
}, this.shouldShowAddParameter(n) && r.createElement("div", {
|
|
className: a.item,
|
|
onClick: function() {
|
|
return e.props.handleOpenModal()
|
|
}
|
|
}, Eg("addPage"), " ", r.createElement("span", {
|
|
className: a.itemText
|
|
}, "Add Parameter")), this.shouldShowCreatePermisson(n) && r.createElement("div", {
|
|
className: a.item,
|
|
onClick: function() {
|
|
return e.props.handleOpenModal()
|
|
}
|
|
}, Eg("addPage"), " ", r.createElement("span", {
|
|
className: a.itemText
|
|
}, "Create Permission")), this.shouldShowAddFeesSchedule(n) && r.createElement("div", {
|
|
className: a.item,
|
|
onClick: function() {
|
|
return e.props.handleOpenModal()
|
|
}
|
|
}, Eg("addPage"), " ", r.createElement("span", {
|
|
className: a.itemText
|
|
}, "Add Fees Schedule")), this.shouldShowAddWallet(n) && r.createElement("div", {
|
|
className: a.item,
|
|
onClick: function() {
|
|
return e.props.handleAddWallet()
|
|
}
|
|
}, Eg("addPage"), " ", r.createElement("span", {
|
|
className: a.itemText
|
|
}, "Add Wallet")), this.shouldShowAddBlockchain(n) && r.createElement("div", {
|
|
className: a.item,
|
|
onClick: function() {
|
|
return e.props.handleAddBlockchain()
|
|
}
|
|
}, Eg("addPage"), " ", r.createElement("span", {
|
|
className: a.itemText
|
|
}, "Add Blockchain")), this.shouldShowAddPage(n) && r.createElement("div", {
|
|
className: a.item,
|
|
onClick: function() {
|
|
return e.props.handleAddPage()
|
|
}
|
|
}, Eg("addPage"), " ", r.createElement("span", {
|
|
className: a.itemText
|
|
}, "Add New")), this.shouldShowCancelOrders(n) && r.createElement("div", {
|
|
className: a.item,
|
|
onClick: function() {
|
|
return e.props.handleOpenModal()
|
|
}
|
|
}, Eg("cancel"), " ", r.createElement("span", {
|
|
className: a.itemText
|
|
}, "Cancel Orders")), this.shouldShowAddCurrency(n) && r.createElement("div", {
|
|
className: a.item,
|
|
onClick: function() {
|
|
return e.props.handleAddCurrency()
|
|
}
|
|
}, Eg("addPage"), " ", r.createElement("span", {
|
|
className: a.itemText
|
|
}, "Add Currency")), this.shouldShowAddMarket(n) && r.createElement("div", {
|
|
className: a.item,
|
|
onClick: function() {
|
|
return e.props.handleAddMarket()
|
|
}
|
|
}, Eg("addPage"), " ", r.createElement("span", {
|
|
className: a.itemText
|
|
}, "Add Market")), this.shouldShowCreateDeposit(n) && r.createElement("div", {
|
|
className: a.item,
|
|
onClick: function() {
|
|
return e.props.handleOpenModal()
|
|
}
|
|
}, Eg("addPage"), " ", r.createElement("span", {
|
|
className: a.itemText
|
|
}, "Add new")), this.shouldShowFilter(i) && r.createElement("div", {
|
|
className: a.item,
|
|
onClick: function() {
|
|
return e.props.handleFilter()
|
|
}
|
|
}, Eg("filter"), " ", r.createElement("span", {
|
|
className: a.itemText
|
|
}, "Filter")), this.shouldShowExport(n) && r.createElement("div", {
|
|
className: a.item,
|
|
onClick: function() {
|
|
return e.props.handleExportData()
|
|
}
|
|
}, Eg("export"), " ", r.createElement("span", {
|
|
className: a.itemText
|
|
}, "Export")), this.shouldShowRefresh(i) && r.createElement("div", {
|
|
className: a.item,
|
|
onClick: function() {
|
|
return window.location.reload()
|
|
}
|
|
}, Eg("refresh"), " ", r.createElement("span", {
|
|
className: a.itemText
|
|
}, "Refresh")), my.getHeaderActions().filter(function(e) {
|
|
return e
|
|
}).map(function(e) {
|
|
return e.customHeaderActions
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Og = Object(xe.g)(Object(U.a)(function() {
|
|
return Object(A.a)({
|
|
wrapper: {
|
|
fontFamily: "Roboto, Helvetica, Arial, sans-serif",
|
|
display: "flex",
|
|
alignItems: "center"
|
|
},
|
|
item: {
|
|
display: "flex",
|
|
alignItems: "center",
|
|
marginLeft: 4,
|
|
cursor: "pointer",
|
|
transition: "background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
|
|
padding: "5px 10px",
|
|
borderRadius: 5,
|
|
"&:hover": {
|
|
backgroundColor: "#ffffff1a"
|
|
}
|
|
},
|
|
itemText: {
|
|
textTransform: "uppercase",
|
|
paddingLeft: 6,
|
|
fontWeight: "bold",
|
|
fontSize: 12,
|
|
letterSpacing: .4
|
|
},
|
|
link: {
|
|
display: "flex",
|
|
alignItems: "center",
|
|
marginLeft: 4,
|
|
cursor: "pointer",
|
|
transition: "background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms",
|
|
padding: "5px 10px",
|
|
borderRadius: 5,
|
|
"&:hover": {
|
|
backgroundColor: "rgba(0, 0, 0, 0.08)"
|
|
},
|
|
textDecoration: "none",
|
|
color: "#fff"
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(Cg)),
|
|
kg = a(590),
|
|
xg = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
popper: {
|
|
minWidth: 150,
|
|
padding: "10px 0px"
|
|
},
|
|
info: {
|
|
minWidth: 225,
|
|
minHeight: "auto"
|
|
},
|
|
title: {
|
|
opacity: .54
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(function(e) {
|
|
var t = e.anchorEl,
|
|
a = e.open,
|
|
n = e.handleClose,
|
|
i = e.data,
|
|
o = e.classes,
|
|
s = e.anchorOrigin,
|
|
c = e.transitionDuration,
|
|
l = e.transformOrigin,
|
|
u = e.action,
|
|
d = e.style,
|
|
p = a ? "simple-popper" : void 0;
|
|
return r.createElement(kg.a, {
|
|
action: u,
|
|
id: p,
|
|
open: a,
|
|
anchorEl: t,
|
|
onClose: n,
|
|
anchorOrigin: s,
|
|
transformOrigin: l,
|
|
transitionDuration: c,
|
|
className: o.popper
|
|
}, r.createElement(D.a, {
|
|
style: d,
|
|
className: o.info
|
|
}, i))
|
|
}),
|
|
jg = a(589),
|
|
_g = a(273),
|
|
Rg = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).isCaptchaDisabled = function() {
|
|
var t = e.props,
|
|
a = t.captchaType,
|
|
n = t.captchaChecked;
|
|
return "none" !== a && !n
|
|
}, e.getCaptcha = function() {
|
|
var t = e.props,
|
|
a = t.captchaType,
|
|
n = t.classes,
|
|
i = t.siteKey;
|
|
return "none" === a ? null : r.createElement("div", {
|
|
className: n.captcha
|
|
}, r.createElement(_g.a, {
|
|
sitekey: i || "sitekey",
|
|
onChange: e.props.captchaOnChange
|
|
}))
|
|
}, e.getRequire2FA = function() {
|
|
return e.props.require2FA ? r.createElement(sg.a, {
|
|
margin: "normal",
|
|
required: !0,
|
|
fullWidth: !0,
|
|
style: {
|
|
color: "#3598D5"
|
|
}
|
|
}, r.createElement(jg.a, {
|
|
htmlFor: "otp_code",
|
|
style: {
|
|
color: "#3598D5"
|
|
}
|
|
}, "OTP code"), r.createElement(cg.a, {
|
|
id: "otp_code",
|
|
name: "otp_code",
|
|
onChange: e.handleOTPCode,
|
|
autoFocus: !0
|
|
})) : null
|
|
}, e.handleEmail = function(t) {
|
|
return e.props.handleChangeEmail(t)
|
|
}, e.handlePassword = function(t) {
|
|
return e.props.handleChangePassword(t)
|
|
}, e.handleOTPCode = function(t) {
|
|
return e.props.handleOTPCode(t)
|
|
}, e.signIn = function(t) {
|
|
t && t.preventDefault(), e.props.handleSignIn()
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.classes,
|
|
a = e.email,
|
|
n = e.password;
|
|
return r.createElement(r.Fragment, null, r.createElement(F.a, {
|
|
className: t.header,
|
|
variant: "h6"
|
|
}, "Sign in"), r.createElement("form", {
|
|
className: t.form
|
|
}, r.createElement(sg.a, {
|
|
margin: "normal",
|
|
required: !0,
|
|
fullWidth: !0
|
|
}, r.createElement(jg.a, {
|
|
htmlFor: "email",
|
|
className: t.label
|
|
}, "Email"), r.createElement(cg.a, {
|
|
id: "email",
|
|
name: "email",
|
|
value: a,
|
|
onChange: this.handleEmail,
|
|
autoComplete: "email",
|
|
autoFocus: !0,
|
|
placeholder: "Enter email address"
|
|
})), r.createElement(sg.a, {
|
|
margin: "normal",
|
|
required: !0,
|
|
fullWidth: !0
|
|
}, r.createElement(jg.a, {
|
|
htmlFor: "password",
|
|
className: t.label
|
|
}, "Password"), r.createElement(cg.a, {
|
|
name: "password",
|
|
type: "password",
|
|
value: n,
|
|
onChange: this.handlePassword,
|
|
id: "password",
|
|
autoComplete: "current-password",
|
|
placeholder: "Enter password"
|
|
})), this.getRequire2FA(), this.getCaptcha(), r.createElement(L.a, {
|
|
type: "submit",
|
|
onClick: this.signIn,
|
|
fullWidth: !0,
|
|
variant: "contained",
|
|
className: t.submit,
|
|
disabled: this.isCaptchaDisabled()
|
|
}, "Sign in")))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Sg = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
avatar: {
|
|
margin: e.spacing(1),
|
|
backgroundColor: e.palette.secondary.main
|
|
},
|
|
form: {
|
|
width: "100%",
|
|
marginTop: e.spacing(1)
|
|
},
|
|
submit: {
|
|
marginTop: e.spacing(6.8),
|
|
backgroundColor: "#0030AE",
|
|
color: "#ffffff",
|
|
borderRadius: 3,
|
|
letterSpacing: .75,
|
|
fontSize: 14
|
|
},
|
|
header: {
|
|
letterSpacing: .15,
|
|
fontWeight: "bold",
|
|
textTransform: "uppercase"
|
|
},
|
|
label: {
|
|
color: "#000000",
|
|
opacity: .54,
|
|
letterSpacing: .4
|
|
},
|
|
captcha: {
|
|
display: "flex",
|
|
width: "100%",
|
|
justifyContent: "center",
|
|
marginTop: 20
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(Rg),
|
|
Tg = a(632),
|
|
Pg = a(548),
|
|
Ag = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
return Object(u.a)(this, a), t.apply(this, arguments)
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this,
|
|
t = this.props,
|
|
a = t.classes,
|
|
n = t.market,
|
|
i = "enabled" === n.state;
|
|
return r.createElement("div", {
|
|
className: a.main
|
|
}, r.createElement("div", {
|
|
className: a.wrapper
|
|
}, r.createElement(D.a, {
|
|
className: a.paper
|
|
}, r.createElement("div", {
|
|
className: a.paperTitle
|
|
}, "Base currency"), r.createElement("div", {
|
|
className: a.paperInput
|
|
}, r.createElement("div", {
|
|
className: a.subTitle
|
|
}, "Currency"), r.createElement("div", {
|
|
className: a.paperInput
|
|
}, r.createElement(Tg.a, {
|
|
placeholder: "Select base currency",
|
|
value: n.base_unit,
|
|
onChange: this.props.handleSelectBase && this.props.handleSelectBase,
|
|
disabled: void 0 === this.props.handleSelectBase
|
|
}, this.props.getBaseCurrencies())))), r.createElement(D.a, {
|
|
className: a.paper
|
|
}, r.createElement("div", {
|
|
className: a.paperTitle
|
|
}, "Quote currency"), r.createElement("div", {
|
|
className: a.paperInput
|
|
}, r.createElement("div", {
|
|
className: a.subTitle
|
|
}, "Currency"), r.createElement("div", {
|
|
className: a.paperInput
|
|
}, r.createElement(Tg.a, {
|
|
value: n.quote_unit,
|
|
onChange: this.props.handleSelectQuote && this.props.handleSelectQuote,
|
|
disabled: void 0 === this.props.handleSelectQuote
|
|
}, this.props.getQuoteCurrencies()))))), r.createElement("div", null, r.createElement(D
|
|
.a, {
|
|
className: "".concat(a.paperSettings, " ").concat(a.paper)
|
|
}, r.createElement("div", {
|
|
className: a.paperSettingsHeader
|
|
}, r.createElement("div", {
|
|
className: a.paperTitle
|
|
}, "Settings"), r.createElement("div", {
|
|
className: a.switch
|
|
}, r.createElement("span", {
|
|
className: a.status
|
|
}, "Status"), r.createElement("div", null, r.createElement(re.a, {
|
|
checked: i,
|
|
color: "primary",
|
|
value: i ? "enabled" : "disabled",
|
|
onChange: this.props.handleChange
|
|
}), r.createElement("div", {
|
|
style: i ? {} : {
|
|
color: "red"
|
|
},
|
|
className: a.switchType
|
|
}, i ? "Enabled" : "Disabled")))), r.createElement("div", null, r.createElement(
|
|
"form", null, r.createElement("div", {
|
|
className: a.formWrapper
|
|
}, r.createElement("div", {
|
|
className: a.section
|
|
}, r.createElement("div", {
|
|
className: a.flex
|
|
}, r.createElement(sg.a, {
|
|
className: a.formControl
|
|
}, r.createElement(Pg.a, null, "Min Price"), r.createElement(N.a, {
|
|
onChange: function(t) {
|
|
return e.props.handleUpdateMarket(t, "min_price")
|
|
},
|
|
className: a.dense,
|
|
margin: "dense",
|
|
type: "number",
|
|
value: n.min_price,
|
|
variant: "outlined"
|
|
})), r.createElement(sg.a, {
|
|
className: a.formControl
|
|
}, r.createElement(Pg.a, null, "Max Price"), r.createElement(N.a, {
|
|
onChange: function(t) {
|
|
return e.props.handleUpdateMarket(t, "max_price")
|
|
},
|
|
className: a.dense,
|
|
margin: "dense",
|
|
type: "number",
|
|
value: n.max_price,
|
|
variant: "outlined"
|
|
}))), r.createElement("div", {
|
|
className: a.flex
|
|
}, r.createElement(sg.a, {
|
|
className: a.formControl
|
|
}, r.createElement(Pg.a, null, "Min Amount"), r.createElement(N.a, {
|
|
onChange: function(t) {
|
|
return e.props.handleUpdateMarket(t, "min_amount")
|
|
},
|
|
className: a.dense,
|
|
margin: "dense",
|
|
type: "number",
|
|
value: n.min_amount,
|
|
variant: "outlined"
|
|
})), r.createElement(sg.a, {
|
|
className: a.formControl
|
|
}, r.createElement(Pg.a, null, "Engine"), r.createElement(N.a, {
|
|
select: !0,
|
|
onChange: function(t) {
|
|
return e.props.handleUpdateMarket(t, "engine_id")
|
|
},
|
|
className: a.dense,
|
|
margin: "dense",
|
|
value: n.engine_id || "",
|
|
variant: "outlined",
|
|
disabled: !e.props.getEngines,
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
},
|
|
displayEmpty: !0
|
|
}, r.createElement(G.a, {
|
|
value: "",
|
|
disabled: !0
|
|
}, e.props.getEngines ? "Select engine" : "N/A"), e.props.getEngines ? e.props.getEngines() : null)))), r.createElement("div", {
|
|
className: a.section
|
|
}, r.createElement("div", {
|
|
className: a.flex
|
|
}, r.createElement(sg.a, {
|
|
className: a.formControl
|
|
}, r.createElement(Pg.a, null, "Price precision"), r.createElement(N
|
|
.a, {
|
|
onChange: function(t) {
|
|
return e.props.handleUpdateMarket(t, "price_precision")
|
|
},
|
|
value: n.price_precision,
|
|
margin: "dense",
|
|
className: a.formInput,
|
|
type: "number"
|
|
})), r.createElement(sg.a, {
|
|
className: a.formControl
|
|
}, r.createElement(Pg.a, null, "Amount precision"), r.createElement(N
|
|
.a, {
|
|
onChange: function(t) {
|
|
return e.props.handleUpdateMarket(t, "amount_precision")
|
|
},
|
|
value: n.amount_precision,
|
|
margin: "dense",
|
|
className: a.formInput,
|
|
type: "number"
|
|
}))), r.createElement("div", {
|
|
className: a.flex
|
|
}, r.createElement("div", {
|
|
className: a.formControl
|
|
}), r.createElement(sg.a, {
|
|
className: a.formControl
|
|
}, r.createElement(Pg.a, null, "Position"), r.createElement(N.a, {
|
|
onChange: function(t) {
|
|
return e.props.handleUpdateMarket(t, "position")
|
|
},
|
|
value: n.position,
|
|
margin: "dense",
|
|
className: a.formInput,
|
|
type: "number"
|
|
}))))), r.createElement("div", {
|
|
className: a.buttonWrapper
|
|
}, r.createElement(L.a, {
|
|
onClick: function() {
|
|
return e.props.handleSubmit(n)
|
|
},
|
|
variant: "contained",
|
|
color: "primary"
|
|
}, "Submit")))))))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Lg = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
main: {
|
|
fontFamily: "Roboto, Helvetica, Arial, sans-serif"
|
|
},
|
|
wrapper: {
|
|
display: "flex",
|
|
justifyContent: "space-between"
|
|
},
|
|
paper: {
|
|
flex: 1,
|
|
padding: 15,
|
|
height: 160,
|
|
"&:first-child": {
|
|
marginRight: 10
|
|
},
|
|
display: "flex",
|
|
flexDirection: "column",
|
|
justifyContent: "space-between"
|
|
},
|
|
paperTitle: {
|
|
color: "#000000",
|
|
fontSize: 20,
|
|
fontWeight: 500
|
|
},
|
|
paperInput: {
|
|
width: "100%",
|
|
display: "flex",
|
|
flexDirection: "column"
|
|
},
|
|
subTitle: {
|
|
fontSize: 12
|
|
},
|
|
paperSettings: {
|
|
minHeight: 295,
|
|
height: "100%",
|
|
justifyContent: "flex-start",
|
|
marginTop: 12,
|
|
"&:first-child": {
|
|
marginRight: 0
|
|
}
|
|
},
|
|
switch: {
|
|
display: "flex",
|
|
justifyContent: "space-between",
|
|
alignItems: "center"
|
|
},
|
|
paperSettingsHeader: {
|
|
display: "flex",
|
|
justifyContent: "space-between",
|
|
alignItems: "flex-start"
|
|
},
|
|
status: {
|
|
fontSize: 12,
|
|
opacity: .4,
|
|
marginBottom: 10,
|
|
fontWeight: 500
|
|
},
|
|
switchType: {
|
|
color: "#00A41A",
|
|
opacity: .54,
|
|
fontSize: 10,
|
|
letterSpacing: 1.5,
|
|
textTransform: "uppercase"
|
|
},
|
|
formWrapper: {
|
|
display: "flex"
|
|
},
|
|
section: {
|
|
display: "flex",
|
|
flex: 1,
|
|
justifyContent: "space-between",
|
|
flexDirection: "column"
|
|
},
|
|
dense: {
|
|
paddingTop: 10.5,
|
|
paddingBottom: 10.5
|
|
},
|
|
formControl: {
|
|
flex: 1,
|
|
marginRight: 10
|
|
},
|
|
flex: {
|
|
display: "flex",
|
|
marginTop: 10
|
|
},
|
|
buttonWrapper: {
|
|
textAlign: "right",
|
|
margin: "30px 0 20px 0"
|
|
},
|
|
formInput: {
|
|
padding: "30px 0 15px 0"
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(Ag),
|
|
Dg = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).renderModalBody = function() {
|
|
var t = e.props,
|
|
a = t.classes,
|
|
n = t.markets,
|
|
i = t.market;
|
|
return r.createElement(I.a, {
|
|
container: !0,
|
|
direction: "column",
|
|
className: a.paper
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
className: a.row
|
|
}, r.createElement(N.a, {
|
|
id: "market",
|
|
label: "Market",
|
|
placeholder: "Select market",
|
|
value: i,
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
select: !0,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "market")
|
|
},
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
}, n.map(function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e.id,
|
|
value: e.id
|
|
}, e.id)
|
|
}))))
|
|
}, e.handleChangeValue = function(t, a) {
|
|
return e.props.handleChangeSelect(t, a)
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.open,
|
|
a = e.modalClose,
|
|
n = e.handleClick,
|
|
i = e.header,
|
|
o = e.buttonLabel;
|
|
return r.createElement(Vg, {
|
|
open: t,
|
|
modalClose: a,
|
|
handleClick: n,
|
|
header: i,
|
|
buttonLabel: o,
|
|
children: this.renderModalBody()
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Ig = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
paper: {},
|
|
textField: {
|
|
marginLeft: e.spacing(1),
|
|
marginRight: e.spacing(1),
|
|
width: 312
|
|
},
|
|
menu: {
|
|
width: 400
|
|
},
|
|
button: {
|
|
backgroundColor: "#E23328",
|
|
color: "#FFFFFF"
|
|
},
|
|
row: {
|
|
width: "100%"
|
|
}
|
|
})
|
|
})(Dg),
|
|
Ng = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).renderModalBody = function() {
|
|
var t = e.props,
|
|
a = t.classes,
|
|
n = t.uid,
|
|
i = t.amount,
|
|
o = t.currency,
|
|
s = t.currencies;
|
|
return r.createElement(I.a, {
|
|
container: !0,
|
|
direction: "column",
|
|
className: a.paper
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
className: a.row
|
|
}, r.createElement(N.a, {
|
|
id: "currency",
|
|
label: "Currency",
|
|
placeholder: "Choose currency",
|
|
value: o,
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
select: !0,
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
},
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "currency")
|
|
}
|
|
}, s.map(function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e,
|
|
value: e
|
|
}, e.toUpperCase())
|
|
}))), r.createElement(I.a, {
|
|
item: !0,
|
|
className: a.row
|
|
}, r.createElement(N.a, {
|
|
id: "amount",
|
|
label: "Amount",
|
|
placeholder: "Enter amount",
|
|
value: i,
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "amount")
|
|
},
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
})), r.createElement(I.a, {
|
|
item: !0,
|
|
className: a.row
|
|
}, r.createElement(N.a, {
|
|
id: "uid",
|
|
label: "UID",
|
|
placeholder: "Enter UID",
|
|
value: n,
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "uid")
|
|
},
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
})))
|
|
}, e.handleChangeValue = function(t, a) {
|
|
return e.props.handleChangeSelect(t, a)
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.open,
|
|
a = e.modalClose,
|
|
n = e.handleClick;
|
|
return r.createElement(Vg, {
|
|
open: t,
|
|
modalClose: a,
|
|
handleClick: n,
|
|
header: "Create deposit",
|
|
buttonLabel: "Create",
|
|
children: this.renderModalBody()
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Fg = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
paper: {},
|
|
textField: {
|
|
marginLeft: e.spacing(1),
|
|
marginRight: e.spacing(1),
|
|
width: 312
|
|
},
|
|
menu: {
|
|
width: 400
|
|
},
|
|
button: {
|
|
background: "#0030AE",
|
|
color: "#FFFFFF"
|
|
},
|
|
row: {
|
|
width: "100%"
|
|
}
|
|
})
|
|
})(Ng),
|
|
Ug = [{
|
|
value: "public",
|
|
key: "public"
|
|
}, {
|
|
value: "private",
|
|
key: "private"
|
|
}],
|
|
Mg = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).renderBody = function() {
|
|
var t = e.props,
|
|
a = t.classes,
|
|
n = t.name,
|
|
i = t.value,
|
|
o = t.scope;
|
|
return r.createElement(I.a, {
|
|
container: !0,
|
|
direction: "column"
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
className: a.fullWidth
|
|
}, r.createElement(N.a, {
|
|
id: "key",
|
|
label: "Key",
|
|
placeholder: "Enter key",
|
|
value: n,
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
onChange: e.handleChangeValue("name"),
|
|
required: !0
|
|
})), r.createElement(I.a, {
|
|
item: !0,
|
|
className: a.fullWidth
|
|
}, r.createElement(N.a, {
|
|
id: "value",
|
|
label: "Value",
|
|
placeholder: "Enter value",
|
|
value: i,
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
onChange: e.handleChangeValue("value"),
|
|
required: !0
|
|
})), r.createElement(I.a, {
|
|
item: !0,
|
|
className: a.fullWidth
|
|
}, r.createElement(N.a, {
|
|
id: "scope",
|
|
label: "Scope",
|
|
select: !0,
|
|
placeholder: "Choose scope",
|
|
value: o,
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
onChange: e.handleChangeValue("scope")
|
|
}, Ug.map(function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e.value,
|
|
value: e.value
|
|
}, e.value)
|
|
}))))
|
|
}, e.handleChangeValue = function(t) {
|
|
return function(a) {
|
|
e.props.handleChangeSelect(a, t)
|
|
}
|
|
}, e.editLabel = function() {
|
|
var t = e.props,
|
|
a = t.name,
|
|
n = t.value,
|
|
r = t.scope;
|
|
e.props.editLabel(a, n, r)
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.open,
|
|
a = e.modalClose,
|
|
n = e.header;
|
|
return r.createElement(Vg, {
|
|
open: t,
|
|
modalClose: a,
|
|
header: n,
|
|
handleClick: this.editLabel,
|
|
buttonLabel: n,
|
|
children: this.renderBody()
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Bg = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
fullWidth: {
|
|
width: "100%"
|
|
}
|
|
})
|
|
})(Mg),
|
|
Wg = a(552),
|
|
Hg = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++) r[i] = arguments[i];
|
|
return (e = t.call.apply(t, [this].concat(r))).handleClose = function() {
|
|
e.props.modalClose()
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.classes,
|
|
a = e.open,
|
|
n = e.header,
|
|
i = e.children,
|
|
o = e.buttonLabel,
|
|
s = e.handleClick,
|
|
c = e.disabled;
|
|
return r.createElement(Wg.a, {
|
|
open: a,
|
|
onClose: this.handleClose
|
|
}, r.createElement(I.a, {
|
|
container: !0,
|
|
direction: "column",
|
|
className: t.paper
|
|
}, r.createElement(I.a, {
|
|
item: !0
|
|
}, r.createElement(F.a, {
|
|
variant: "h6",
|
|
className: t.textField
|
|
}, n)), r.createElement(I.a, {
|
|
item: !0
|
|
}, i), r.createElement(L.a, {
|
|
variant: "contained",
|
|
color: "primary",
|
|
className: t.button,
|
|
fullWidth: !0,
|
|
onClick: s,
|
|
disabled: c,
|
|
style: {
|
|
marginTop: 20
|
|
}
|
|
}, o)))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Vg = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
paper: {
|
|
display: "block",
|
|
margin: "100px auto",
|
|
width: "360px",
|
|
backgroundColor: e.palette.background.paper,
|
|
boxShadow: e.shadows[3],
|
|
padding: 24,
|
|
borderRadius: 8,
|
|
"&:focus": {
|
|
outline: "none"
|
|
}
|
|
},
|
|
textField: {
|
|
fontWeight: "bold"
|
|
},
|
|
menu: {
|
|
width: 400
|
|
},
|
|
button: {
|
|
background: "#0030AE",
|
|
color: "#FFFFFF"
|
|
}
|
|
})
|
|
})(Hg),
|
|
Gg = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).renderModalBody = function() {
|
|
var t = e.props,
|
|
a = t.classes,
|
|
n = t.role,
|
|
i = t.path,
|
|
o = t.verb,
|
|
s = t.topic,
|
|
c = t.action,
|
|
l = t.verbs,
|
|
u = t.actions;
|
|
return r.createElement(I.a, {
|
|
container: !0,
|
|
direction: "column",
|
|
className: a.paper
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
className: a.row
|
|
}, r.createElement(N.a, {
|
|
id: "role",
|
|
label: "Role",
|
|
placeholder: "Enter role",
|
|
value: n,
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "role")
|
|
},
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
})), r.createElement(I.a, {
|
|
item: !0,
|
|
className: a.row
|
|
}, r.createElement(N.a, {
|
|
id: "path",
|
|
label: "Path",
|
|
placeholder: "Enter path",
|
|
value: i,
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "path")
|
|
},
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
})), r.createElement(I.a, {
|
|
item: !0,
|
|
className: a.row
|
|
}, r.createElement(N.a, {
|
|
id: "topic",
|
|
label: "Topic",
|
|
placeholder: "Enter topic",
|
|
value: s || "",
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "topic")
|
|
},
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
})), r.createElement(I.a, {
|
|
item: !0,
|
|
className: a.row
|
|
}, r.createElement(N.a, {
|
|
id: "verb",
|
|
label: "Verb",
|
|
placeholder: "Enter verb",
|
|
value: o,
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
select: !0,
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
},
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "verb")
|
|
}
|
|
}, l.map(function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e,
|
|
value: e
|
|
}, e)
|
|
}))), r.createElement(I.a, {
|
|
item: !0,
|
|
className: a.row
|
|
}, r.createElement(N.a, {
|
|
id: "action",
|
|
select: !0,
|
|
label: "Action",
|
|
placeholder: "Enter action",
|
|
value: c,
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
onChange: function(t) {
|
|
return e.handleChangeValue(t.target.value, "action")
|
|
},
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
}
|
|
}, u.map(function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e,
|
|
value: e
|
|
}, e)
|
|
}))))
|
|
}, e.handleChangeValue = function(t, a) {
|
|
return e.props.handleChangeSelect(t, a)
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.open,
|
|
a = e.modalClose,
|
|
n = e.handleClick,
|
|
i = e.header,
|
|
o = e.buttonLabel;
|
|
return r.createElement(Vg, {
|
|
open: t,
|
|
modalClose: a,
|
|
handleClick: n,
|
|
header: i,
|
|
buttonLabel: o,
|
|
children: this.renderModalBody()
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
zg = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
paper: {},
|
|
textField: {
|
|
marginLeft: e.spacing(1),
|
|
marginRight: e.spacing(1),
|
|
width: 312
|
|
},
|
|
menu: {
|
|
width: 400
|
|
},
|
|
button: {
|
|
background: "#0030AE",
|
|
color: "#FFFFFF"
|
|
},
|
|
row: {
|
|
width: "100%"
|
|
}
|
|
})
|
|
})(Gg),
|
|
Kg = [{
|
|
value: "enabled"
|
|
}, {
|
|
value: "disabled"
|
|
}],
|
|
Zg = [{
|
|
value: "ip"
|
|
}, {
|
|
value: "ip_subnet"
|
|
}, {
|
|
value: "country"
|
|
}],
|
|
Yg = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).renderModalBody = function() {
|
|
var t = e.props,
|
|
a = t.classes,
|
|
n = t.scope,
|
|
i = t.state,
|
|
o = t.value;
|
|
return r.createElement(I.a, {
|
|
container: !0,
|
|
direction: "column"
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
className: a.fullWidth
|
|
}, r.createElement(N.a, {
|
|
id: "scope",
|
|
label: "Scope",
|
|
select: !0,
|
|
placeholder: "Choose scope",
|
|
value: n || "",
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
onChange: e.handleChangeValue("scope_key")
|
|
}, Zg.map(function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e.value,
|
|
value: e.value
|
|
}, e.value)
|
|
}))), r.createElement(I.a, {
|
|
item: !0,
|
|
className: a.fullWidth
|
|
}, r.createElement(N.a, {
|
|
id: "value",
|
|
label: "Value",
|
|
placeholder: "Enter value",
|
|
value: o,
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
onChange: e.handleChangeValue("param_key")
|
|
})), r.createElement(I.a, {
|
|
item: !0,
|
|
className: a.fullWidth
|
|
}, r.createElement(N.a, {
|
|
id: "state",
|
|
label: "State",
|
|
select: !0,
|
|
placeholder: "Choose State",
|
|
value: i || "",
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
onChange: e.handleChangeValue("state_key")
|
|
}, Kg.map(function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e.value,
|
|
value: e.value
|
|
}, e.value)
|
|
}))))
|
|
}, e.handleChangeValue = function(t) {
|
|
return function(a) {
|
|
e.props.handleChangeSelect(a, t)
|
|
}
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.open,
|
|
a = e.modalClose,
|
|
n = e.handleCreateClick,
|
|
i = e.header;
|
|
return r.createElement(Vg, {
|
|
open: t,
|
|
modalClose: a,
|
|
handleClick: n,
|
|
header: i,
|
|
buttonLabel: "Save",
|
|
children: this.renderModalBody()
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
qg = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
fullWidth: {
|
|
width: "100%"
|
|
}
|
|
})
|
|
})(Yg),
|
|
Jg = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).renderModalBody = function() {
|
|
var t = e.props,
|
|
a = t.classes,
|
|
n = t.name,
|
|
i = t.maker_fee,
|
|
o = t.taker_fee,
|
|
s = t.market_id,
|
|
c = t.markets,
|
|
l = !!n.length && !e.handleValidateNameInput(n);
|
|
return r.createElement(I.a, {
|
|
container: !0,
|
|
direction: "column",
|
|
className: a.paper
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
className: a.row
|
|
}, r.createElement(N.a, {
|
|
id: "name",
|
|
label: "Name",
|
|
placeholder: "Enter name",
|
|
value: n,
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
onChange: e.handleChangeValue("group"),
|
|
error: l,
|
|
helperText: l && "Only numbers, -, and lowercase letters allowed"
|
|
})), r.createElement(I.a, {
|
|
item: !0,
|
|
className: a.row
|
|
}, r.createElement(N.a, {
|
|
id: "market_id",
|
|
label: "Market ID",
|
|
select: !0,
|
|
placeholder: "Select market ID",
|
|
value: s,
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
disabled: !c.length,
|
|
onChange: e.handleChangeValue("market_id")
|
|
}, c.map(function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e.id,
|
|
value: e.id
|
|
}, e.id)
|
|
}))), r.createElement(I.a, {
|
|
item: !0,
|
|
className: a.row
|
|
}, r.createElement(N.a, {
|
|
id: "maker_fee",
|
|
label: "Maker fee",
|
|
placeholder: "Enter maker fee",
|
|
value: i,
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
onChange: e.handleChangeValue("maker")
|
|
})), r.createElement(I.a, {
|
|
item: !0,
|
|
className: a.row
|
|
}, r.createElement(N.a, {
|
|
id: "taker_fee",
|
|
label: "Taker fee",
|
|
placeholder: "Enter taker fee",
|
|
value: o,
|
|
margin: "normal",
|
|
fullWidth: !0,
|
|
onChange: e.handleChangeValue("taker")
|
|
})))
|
|
}, e.handleChangeValue = function(t) {
|
|
return function(a) {
|
|
e.props.handleChangeSelect(a, t)
|
|
}
|
|
}, e.handleValidateNameInput = function(e) {
|
|
var t = new RegExp("^[a-z-0-9\\-]{1,100}$");
|
|
return !!e.match(t)
|
|
}, e.isDisabled = function() {
|
|
var t = e.props,
|
|
a = t.name,
|
|
n = t.maker_fee,
|
|
r = t.taker_fee,
|
|
i = t.market_id;
|
|
return !e.handleValidateNameInput(a) || !n.length || !r.length || !i.length
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.open,
|
|
a = e.modalClose,
|
|
n = e.handleCreateClick,
|
|
i = e.header;
|
|
return r.createElement(Vg, {
|
|
open: t,
|
|
modalClose: a,
|
|
handleClick: n,
|
|
header: i,
|
|
buttonLabel: "Save",
|
|
children: this.renderModalBody(),
|
|
disabled: this.isDisabled()
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Qg = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
paper: {},
|
|
textField: {
|
|
marginLeft: e.spacing(1),
|
|
marginRight: e.spacing(1),
|
|
width: 312
|
|
},
|
|
menu: {
|
|
width: 400
|
|
},
|
|
button: {
|
|
background: "#0030AE",
|
|
color: "#FFFFFF"
|
|
},
|
|
row: {
|
|
width: "100%"
|
|
}
|
|
})
|
|
})(Jg),
|
|
Xg = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
return Object(u.a)(this, a), t.apply(this, arguments)
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.open,
|
|
a = e.modalClose,
|
|
n = e.handleClick,
|
|
i = e.header,
|
|
o = e.buttonLabel;
|
|
return r.createElement(Vg, {
|
|
open: t,
|
|
modalClose: a,
|
|
handleClick: n,
|
|
header: i,
|
|
buttonLabel: o,
|
|
children: null
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
$g = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
textField: {
|
|
marginLeft: e.spacing(1),
|
|
marginRight: e.spacing(1),
|
|
width: 312
|
|
},
|
|
button: {
|
|
backgroundColor: "#E23328",
|
|
color: "#FFFFFF"
|
|
},
|
|
row: {
|
|
width: "100%"
|
|
}
|
|
})
|
|
})(Xg),
|
|
em = a(611),
|
|
tm = a(634),
|
|
am = a(612),
|
|
nm = a(607),
|
|
rm = a(608),
|
|
im = a(609),
|
|
om = a(610),
|
|
sm = a(613),
|
|
cm = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).popOver = void 0, n.handleExportData = function() {
|
|
var e = n.props.location.pathname,
|
|
t = n.handleGetObject(n.props.filterData);
|
|
"/tower/accountings/withdrawals-pending" === e && (t = 0 === t.length ? "state=accepted" :
|
|
"&state=accepted"), "/tower/exchange/orders/open" === e && (t = 0 === t.length ?
|
|
"state=wait" : "&state=wait"), t ? window.location.replace("".concat(La(e), "?").concat(t)) :
|
|
window.location.replace("".concat(La(e)))
|
|
}, n.handleGetObject = function(e) {
|
|
var t, a = {},
|
|
n = Object(se.a)(e);
|
|
try {
|
|
for (n.s(); !(t = n.n()).done;) {
|
|
var r = t.value;
|
|
a[r.key] = r.value
|
|
}
|
|
} catch (i) {
|
|
n.e(i)
|
|
} finally {
|
|
n.f()
|
|
}
|
|
return ka(a)
|
|
}, n.getInfoPopper = function() {
|
|
var e = n.state,
|
|
t = e.key,
|
|
a = e.anchorEl,
|
|
i = n.props,
|
|
o = i.isSuperAdmin,
|
|
s = i.history,
|
|
c = py.InfoPopper;
|
|
return !s.location.pathname.includes("/login") && r.createElement(c, {
|
|
action: function(e) {
|
|
return n.popOver = e
|
|
},
|
|
open: Boolean(a),
|
|
anchorEl: a,
|
|
transitionDuration: 0,
|
|
handleClose: n.handleClose,
|
|
data: n.renderList(fy(t, o)),
|
|
anchorOrigin: {
|
|
vertical: "top",
|
|
horizontal: "right"
|
|
},
|
|
transformOrigin: {
|
|
vertical: "top",
|
|
horizontal: "left"
|
|
}
|
|
})
|
|
}, n.toggleDrawer = function() {
|
|
n.props.toggleDrawer()
|
|
}, n.handleDrawerClose = function() {
|
|
n.props.handleDrawerClose(), n.setState({
|
|
anchorEl: null
|
|
})
|
|
}, n.handleLogout = function() {
|
|
n.props.logout()
|
|
}, n.handleClick = function(e, t) {
|
|
return function(a) {
|
|
t || n.state.key === e && !n.state.hasBeenClosed || (n.popOver && n.popOver.updatePosition(),
|
|
n.setState({
|
|
anchorEl: a.currentTarget,
|
|
key: e,
|
|
hasBeenClosed: !1
|
|
}))
|
|
}
|
|
}, n.handleClose = function() {
|
|
n.setState({
|
|
anchorEl: null,
|
|
hasBeenClosed: !0
|
|
})
|
|
}, n.resetAnchorEl = function(e) {
|
|
e && n.setState({
|
|
anchorEl: null
|
|
}, function() {
|
|
n.props.handleDrawerClose()
|
|
})
|
|
}, n.renderList = function(e, t) {
|
|
var a = n.props.classes;
|
|
return e.map(function(e) {
|
|
var i = r.createElement("div", {
|
|
key: e.key,
|
|
onMouseMove: n.handleClick(e.key, e.isLink)
|
|
}, r.createElement(me.a, {
|
|
className: a.listItem,
|
|
classes: {
|
|
selected: a.selected,
|
|
button: a.button
|
|
},
|
|
button: !0,
|
|
onClick: function() {
|
|
return n.resetAnchorEl(e.isLink)
|
|
},
|
|
selected: n.getSelectedMenuItem(e.key)
|
|
}, r.createElement(fe.a, null, rg(e.key)), r.createElement(be.a, {
|
|
disableTypography: !0,
|
|
primary: r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, e.value)
|
|
}), !e.isLink && r.createElement(rm.a, {
|
|
className: a.arrow
|
|
})), t);
|
|
return e.isLink ? r.createElement(ke.a, {
|
|
to: e.key,
|
|
className: a.link,
|
|
key: e.key
|
|
}, i) : i
|
|
})
|
|
}, n.renderMobileList = function(e) {
|
|
var t = n.props,
|
|
a = t.classes,
|
|
i = t.isSuperAdmin,
|
|
o = n.state,
|
|
s = o.anchorEl,
|
|
c = o.key;
|
|
return e.map(function(e) {
|
|
var t = Boolean(s) && n.renderList(fy(c, i)).length > 0,
|
|
o = Boolean(s) && e.key === c,
|
|
l = o ? r.createElement(im.a, {
|
|
className: a.expandIcon
|
|
}) : r.createElement(om.a, {
|
|
className: a.expandIcon
|
|
}),
|
|
u = r.createElement(em.a, {
|
|
in: o,
|
|
timeout: "auto",
|
|
unmountOnExit: !0
|
|
}, r.createElement(we.a, {
|
|
className: a.info
|
|
}, n.renderList(fy(c, i), r.createElement(ve.a, null)))),
|
|
d = r.createElement("div", {
|
|
key: e.key
|
|
}, r.createElement(me.a, {
|
|
className: a.listItem,
|
|
classes: {
|
|
selected: a.selected,
|
|
button: a.button
|
|
},
|
|
button: !0,
|
|
onClick: n.handleClick(e.key),
|
|
selected: n.getSelectedMenuItem(e.key)
|
|
}, r.createElement(fe.a, null, rg(e.key)), r.createElement(be.a, {
|
|
disableTypography: !0,
|
|
primary: r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, e.value)
|
|
}), !e.isLink && l), t && u);
|
|
return e.isLink ? r.createElement(ke.a, {
|
|
to: e.key,
|
|
className: a.link,
|
|
key: e.key
|
|
}, d) : d
|
|
})
|
|
}, n.getBreadcrumbs = function() {
|
|
var e = n.props,
|
|
t = e.classes,
|
|
a = e.history,
|
|
i = a.location.pathname.split("/").splice(2, 3);
|
|
return i && i.map(function(e, o) {
|
|
return r.createElement(ke.a, {
|
|
className: t.bread,
|
|
key: o,
|
|
to: n.getBreadRoute(o, i)
|
|
}, a.location.pathname.includes("markets") && 2 === o ? e.toUpperCase() : e)
|
|
})
|
|
}, n.renderBreadcrumbs = function() {
|
|
var e = n.props.classes;
|
|
return r.createElement(tm.a, {
|
|
separator: r.createElement(Ce.a, {
|
|
className: e.bread,
|
|
color: "primary"
|
|
}),
|
|
"aria-label": "Breadcrumb",
|
|
className: e.breadcrumbsList
|
|
}, n.getBreadcrumbs())
|
|
}, n.getBreadRoute = function(e, t) {
|
|
switch (e) {
|
|
case 0:
|
|
return "/tower/".concat(t[0]);
|
|
case 1:
|
|
return "/tower/".concat(t[0], "/").concat(t[1]);
|
|
case 2:
|
|
return "/tower/".concat(t[0], "/").concat(t[1], "/").concat(t[2]);
|
|
default:
|
|
return "/tower"
|
|
}
|
|
}, n.getSelectedMenuItem = function(e) {
|
|
var t = n.props.history.location.pathname.split("/")[2],
|
|
a = "user-directory" === t ? "users" : t;
|
|
return (a = a || "/tower/") === e
|
|
}, n.state = {
|
|
key: "",
|
|
anchorEl: null,
|
|
hasBeenClosed: !1
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "UNSAFE_componentDidMount",
|
|
value: function() {
|
|
var e = this.props.history.location.pathname;
|
|
this.setState({
|
|
key: e || "/tower"
|
|
})
|
|
}
|
|
}, {
|
|
key: "UNSAFE_componentWillReceiveProps",
|
|
value: function(e) {
|
|
e.history.location.pathname !== this.state.key && (this.setState({
|
|
key: e.history.location.pathname
|
|
}), e.isDashboard || this.props.handleDrawerClose())
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this,
|
|
t = this.props,
|
|
a = t.classes,
|
|
n = t.loggedIn,
|
|
i = t.isSuperAdmin,
|
|
o = t.mobile,
|
|
s = t.history,
|
|
c = t.isFilterOpen,
|
|
l = this.state.anchorEl,
|
|
u = py.HeaderIcons,
|
|
d = te()(o && Boolean(l) ? a.relativeLogoutBlock : a.logoutBlock),
|
|
p = te()(a.drawerPaper, {
|
|
[a.drawerOpenPopover]: c
|
|
});
|
|
return r.createElement("div", null, r.createElement(am.a, {
|
|
position: "fixed",
|
|
className: te()(a.appBar, {
|
|
[a.navbarHidden]: !n
|
|
})
|
|
}, r.createElement(nm.a, null, r.createElement(ge.a, {
|
|
color: "inherit",
|
|
"aria-label": "Open drawer",
|
|
onClick: this.toggleDrawer,
|
|
className: a.menuButton
|
|
}, r.createElement(sm.a, null)), r.createElement("div", {
|
|
className: a.routeTitleBox
|
|
}, !o && this.renderBreadcrumbs()), r.createElement(F.a, {
|
|
variant: "h6",
|
|
color: "inherit",
|
|
className: a.grow
|
|
}), r.createElement(u, {
|
|
handleFilter: this.props.handleToggleFilter,
|
|
handleAddCurrency: function() {
|
|
return e.props.history.push("/tower/exchange/currencies/add")
|
|
},
|
|
handleAddMarket: function() {
|
|
return e.props.history.push("/tower/exchange/markets/add")
|
|
},
|
|
handleAddBlockchain: function() {
|
|
return e.props.history.push("/tower/settings/blockchains/add")
|
|
},
|
|
handleAddPage: function() {
|
|
return e.props.history.push("/tower/accountings/adjustments/add")
|
|
},
|
|
handleAddWallet: function() {
|
|
return e.props.history.push("/tower/settings/wallets/add")
|
|
},
|
|
handleAddIEO: function() {
|
|
return e.props.history.push("/tower/plugins/ieo/add")
|
|
},
|
|
handleOpenModal: function() {
|
|
return e.props.changeNavbarModalStatus(!0)
|
|
},
|
|
handleExportData: this.handleExportData,
|
|
location: s.location.pathname,
|
|
tradesCsvLink: "".concat(v.config.peatioUrl, "/admin/trades.csv"),
|
|
ordersCsvLink: "".concat(v.config.peatioUrl, "/admin/orders.csv")
|
|
}))), r.createElement(ye.a, {
|
|
className: a.drawer,
|
|
variant: "persistent",
|
|
anchor: "left",
|
|
open: this.props.open,
|
|
classes: {
|
|
paper: p
|
|
}
|
|
}, r.createElement("div", {
|
|
className: a.drawerHeader
|
|
}, r.createElement(ge.a, {
|
|
onClick: this.handleDrawerClose
|
|
}, this.props.open ? r.createElement(Oe.a, null) : r.createElement(Ce.a, null))), r
|
|
.createElement(ve.a, null), r.createElement("div", {
|
|
className: a.mainSidebarBlock
|
|
}, r.createElement(we.a, null, !o && this.renderList(fy("mainMenu", i)), o && this
|
|
.renderMobileList(fy("mainMenu", i))), r.createElement("div", {
|
|
className: d
|
|
}, r.createElement(ve.a, null), r.createElement(ge.a, {
|
|
color: "inherit",
|
|
className: a.logoutBtn,
|
|
onClick: this.handleLogout
|
|
}, r.createElement(Ee.a, {
|
|
viewBox: "0 0 24 24"
|
|
}, r.createElement("path", {
|
|
d: "M11.08 12.59L13.67 10H4V8H13.67L11.08 5.41L12.5 4L17.5 9L12.5 14L11.08 12.59ZM16 0C16.5304 0 17.0391 0.210714 17.4142 0.585786C17.7893 0.960859 18 1.46957 18 2V6.67L16 4.67V2H2V16H16V13.33L18 11.33V16C18 16.5304 17.7893 17.0391 17.4142 17.4142C17.0391 17.7893 16.5304 18 16 18H2C0.89 18 0 17.1 0 16V2C0 0.89 0.89 0 2 0H16Z",
|
|
fill: "#979797",
|
|
stroke: "null"
|
|
})), r.createElement("span", {
|
|
className: a.logoutText
|
|
}, "Logout"))), !o && this.getInfoPopper())))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
lm = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
root: {
|
|
display: "flex"
|
|
},
|
|
appBar: {
|
|
zIndex: 1300,
|
|
backgroundColor: "#0030AE",
|
|
transition: e.transitions.create(["margin", "width"], {
|
|
easing: e.transitions.easing.sharp,
|
|
duration: e.transitions.duration.leavingScreen
|
|
})
|
|
},
|
|
menuButton: {
|
|
marginLeft: -15,
|
|
marginRight: 20,
|
|
"&:hover": {
|
|
background: "#ffffff1a"
|
|
}
|
|
},
|
|
drawer: {
|
|
width: 256,
|
|
flexShrink: 0
|
|
},
|
|
drawerOpenPopover: {
|
|
zIndex: "1100 !important"
|
|
},
|
|
drawerPaper: {
|
|
top: 48,
|
|
height: "calc(100vh - 48px)",
|
|
width: 256,
|
|
zIndex: 3299
|
|
},
|
|
drawerHeader: Object(b.a)(Object(b.a)({
|
|
display: "flex",
|
|
alignItems: "center",
|
|
padding: "0 8px"
|
|
}, e.mixins.toolbar), {}, {
|
|
justifyContent: "flex-end"
|
|
}),
|
|
content: {
|
|
flexGrow: 1,
|
|
padding: e.spacing(3),
|
|
transition: e.transitions.create("margin", {
|
|
easing: e.transitions.easing.sharp,
|
|
duration: e.transitions.duration.leavingScreen
|
|
}),
|
|
marginLeft: -256
|
|
},
|
|
grow: {
|
|
flexGrow: 1,
|
|
cursor: "pointer"
|
|
},
|
|
listItem: {
|
|
letterSpacing: .1,
|
|
padding: "15px 14px 10px",
|
|
"&:hover": {
|
|
backgroundColor: "rgba(0,48,174,0.05)"
|
|
},
|
|
"&:focus": {
|
|
backgroundColor: "rgba(0,48,174,0.05)"
|
|
}
|
|
},
|
|
selected: {
|
|
backgroundColor: "rgba(0,48,174,0.05) !important",
|
|
"& svg:first-child": {
|
|
"& path": {
|
|
fill: "#0030AE"
|
|
}
|
|
},
|
|
"& p": {
|
|
color: "#0030AE"
|
|
}
|
|
},
|
|
button: {
|
|
color: "#309CEA"
|
|
},
|
|
link: {
|
|
textDecoration: "none"
|
|
},
|
|
navbarHidden: {
|
|
display: "none"
|
|
},
|
|
arrow: {
|
|
color: "#979797"
|
|
},
|
|
routeTitleBox: {
|
|
left: 72,
|
|
position: "absolute",
|
|
display: "inline-flex",
|
|
"& li:last-child > a": {
|
|
cursor: "default"
|
|
}
|
|
},
|
|
breadcrumbsList: {
|
|
"& ol > li > svg": {
|
|
padding: 0,
|
|
"&:hover": {
|
|
background: "none"
|
|
}
|
|
},
|
|
"& ol > li:last-child > a": {
|
|
"&:hover": {
|
|
background: "none"
|
|
}
|
|
}
|
|
},
|
|
bread: {
|
|
textTransform: "capitalize",
|
|
color: "#FFFFFF",
|
|
fontSize: "16px",
|
|
fontWeight: "bold",
|
|
textDecoration: "none",
|
|
padding: 5,
|
|
borderRadius: 5,
|
|
"&:hover": {
|
|
background: "#ffffff1a"
|
|
}
|
|
},
|
|
alignHeaderItems: {
|
|
"& svg": {
|
|
marginRight: "10px",
|
|
padding: "3px"
|
|
},
|
|
"& span": {
|
|
fontWeight: "bold"
|
|
}
|
|
},
|
|
logoutBtn: {
|
|
borderRadius: 0,
|
|
borderWidth: "40px",
|
|
width: "100%",
|
|
"& svg": {
|
|
marginTop: 6
|
|
},
|
|
"&:hover": {
|
|
backgroundColor: "rgba(0,48,174,0.05)"
|
|
},
|
|
"&:focus": {
|
|
backgroundColor: "rgba(0,48,174,0.05)"
|
|
}
|
|
},
|
|
logoutText: {
|
|
color: "#979797",
|
|
fontSize: 14,
|
|
fontWeight: "bold",
|
|
letterSpacing: .4
|
|
},
|
|
info: {
|
|
padding: "8px 20px"
|
|
},
|
|
expandIcon: {
|
|
color: "#989898"
|
|
},
|
|
mainSidebarBlock: {
|
|
position: "relative",
|
|
height: "100vh"
|
|
},
|
|
logoutBlock: {
|
|
position: "absolute",
|
|
width: "100%",
|
|
textAlign: "center",
|
|
bottom: 0
|
|
},
|
|
relativeLogoutBlock: {
|
|
position: "relative",
|
|
marginTop: "70%"
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(Object(xe.g)(cm)),
|
|
um = a(614),
|
|
dm = a(633),
|
|
pm = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
label: {
|
|
textTransform: "none",
|
|
fontSize: "12px",
|
|
color: "#000000",
|
|
minWidth: 135,
|
|
maxWidth: 150,
|
|
opacity: 1,
|
|
minHeight: 28
|
|
},
|
|
tabs: {
|
|
minHeight: 30,
|
|
marginBottom: 24,
|
|
"& div": {
|
|
borderBottom: ".3px solid rgba(0,0,0, 0.4)"
|
|
}
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(function(e) {
|
|
var t = e.activeIndex,
|
|
a = e.labels,
|
|
n = e.handleChange,
|
|
i = e.classes;
|
|
return r.createElement(dm.a, {
|
|
value: t,
|
|
onChange: n,
|
|
indicatorColor: "primary",
|
|
textColor: "primary",
|
|
className: i.tabs
|
|
}, a.map(function(e, t) {
|
|
return r.createElement(um.a, {
|
|
label: e,
|
|
className: i.label,
|
|
key: t
|
|
})
|
|
}))
|
|
}),
|
|
hm = a(615),
|
|
gm = a(616),
|
|
mm = a(617),
|
|
fm = a(618),
|
|
bm = a(642),
|
|
ym = a(624),
|
|
vm = a(619),
|
|
wm = a(620),
|
|
Em = a(621),
|
|
Cm = a(622),
|
|
Om = a(623),
|
|
km = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).renderContent = function() {
|
|
var t = e.props,
|
|
a = t.classes,
|
|
n = t.data;
|
|
return n.length ? r.createElement("div", {
|
|
className: a.root
|
|
}, r.createElement("div", {
|
|
className: a.tableWrapper
|
|
}, r.createElement(hm.a, {
|
|
className: a.table,
|
|
"aria-labelledby": "tableTitle"
|
|
}, e.getHeaderForTable(), r.createElement(gm.a, null, n.map(function(t, a) {
|
|
return e.renderTableRow(t, a)
|
|
})))), e.getPagination()) : r.createElement(F.a, {
|
|
variant: "caption",
|
|
align: "center",
|
|
className: a.emptyTable
|
|
}, "There is no data to show")
|
|
}, e.renderTableRow = function(t, a) {
|
|
var n = e.props,
|
|
i = n.rows,
|
|
o = n.classes,
|
|
s = n.getRowStatus,
|
|
c = s && s(t.uid);
|
|
return r.createElement(mm.a, {
|
|
className: c ? o.selected : o.row,
|
|
key: a,
|
|
onClick: function() {
|
|
return e.props.handleRowOnClick && e.props.handleRowOnClick(t)
|
|
}
|
|
}, i.map(function(n, r) {
|
|
return e.getTableCell(t, n, r, a, c)
|
|
}))
|
|
}, e.getTableCell = function(t, a, n, i, o) {
|
|
var s = e.props,
|
|
c = s.classes,
|
|
l = s.isSmall;
|
|
return r.createElement(fm.a, {
|
|
key: n,
|
|
component: "td",
|
|
align: a.alignRight ? "right" : "left",
|
|
className: l ? c.small : o ? c.selectedCell : ""
|
|
}, r.createElement(F.a, {
|
|
variant: "caption",
|
|
gutterBottom: !0,
|
|
className: o ? c.selectedCell : c.content
|
|
}, e.getTableCellLabel(t, a, i, o)))
|
|
}, e.getTableCellLabel = function(t, a, n, i) {
|
|
var o = e.props,
|
|
s = o.classes,
|
|
c = o.getSelectIcon;
|
|
switch (a.key) {
|
|
case "maker_order_email":
|
|
return r.createElement(ke.a, {
|
|
to: "/tower/users/user-directory/".concat(t.maker_uid).concat(a.linkSuffix || "/main"),
|
|
className: s.link,
|
|
onClick: function(e) {
|
|
return e.stopPropagation()
|
|
}
|
|
}, t.maker_order_email);
|
|
case "taker_order_email":
|
|
return r.createElement(ke.a, {
|
|
to: "/tower/users/user-directory/".concat(t.taker_uid).concat(a.linkSuffix || "/main"),
|
|
className: s.link,
|
|
onClick: function(e) {
|
|
return e.stopPropagation()
|
|
}
|
|
}, t.taker_order_email);
|
|
case "maker_uid":
|
|
case "taker_uid":
|
|
return r.createElement(ke.a, {
|
|
to: "/tower/users/user-directory/".concat(t[a.key]).concat(a.linkSuffix || "/main"),
|
|
className: s.link,
|
|
onClick: function(e) {
|
|
return e.stopPropagation()
|
|
}
|
|
}, t[a.key]);
|
|
case "uid":
|
|
case "email":
|
|
return r.createElement(ke.a, {
|
|
to: "/tower/users/user-directory/".concat(t.uid).concat(a.linkSuffix || "/main"),
|
|
className: i ? s.selectedLink : s.link,
|
|
onClick: function(e) {
|
|
return e.stopPropagation()
|
|
}
|
|
}, t[a.key]);
|
|
case "user_email":
|
|
return r.createElement(ke.a, {
|
|
to: "/tower/users/user-directory/".concat(t.user && t.user.uid, "/main"),
|
|
className: s.link,
|
|
onClick: function(e) {
|
|
return e.stopPropagation()
|
|
}
|
|
}, t.user && t.user.email);
|
|
case "otp":
|
|
return r.createElement("span", null, "true" === Sa(t.otp) ? "2FA" : "-");
|
|
case "upload":
|
|
var l = t.documents && t.documents.length || 1;
|
|
return r.createElement("span", {
|
|
className: i ? s.selectedAttachments : s.attachment
|
|
}, l, "\xa0\xa0", r.createElement(vm.a, {
|
|
onClick: e.handleOpenCarousel(n, t.uid),
|
|
className: i ? s.white : s.grey
|
|
}));
|
|
case "created_at":
|
|
case "validated_at":
|
|
case "updated_at":
|
|
return r.createElement("span", null, Wa(t[a.key], "fullDate"));
|
|
case "browser":
|
|
return r.createElement("span", null, Ia(t.user_agent));
|
|
case "os":
|
|
return r.createElement("span", null, Na(t.user_agent));
|
|
case "user_role":
|
|
return r.createElement("span", null, t.user && t.user.role);
|
|
case "doc_expire":
|
|
return r.createElement("span", null, Wa(t[a.key], "date"));
|
|
case "state":
|
|
case "status":
|
|
case "taker_type":
|
|
case "result":
|
|
case "side":
|
|
return e.getColored(xa(t[a.key]));
|
|
case "visible":
|
|
return e.getColored(e.getVisibleState(t[a.key]));
|
|
case "deposit_enabled":
|
|
case "withdrawal_enabled":
|
|
return e.getColored(e.getWithdrawDepositState(t[a.key]));
|
|
case "name":
|
|
return t.profile && "".concat(t.profile.first_name, " ").concat(t.profile.last_name) || t
|
|
.name;
|
|
case "max_balance":
|
|
return t[a.key];
|
|
case "country":
|
|
return t.profile && t.profile.country;
|
|
case "link":
|
|
return r.createElement(wm.a, {
|
|
className: s.arrowForwardIos
|
|
});
|
|
case "role":
|
|
case "type":
|
|
case "ord_type":
|
|
case "reference_type":
|
|
case "kind":
|
|
case "scope":
|
|
return xa(t[a.key]);
|
|
case "currency":
|
|
case "code":
|
|
case "market":
|
|
case "client":
|
|
case "market_id":
|
|
return t[a.key].toString().toUpperCase();
|
|
case "admin_email":
|
|
return r.createElement(ke.a, {
|
|
to: "/tower/users/user-directory/".concat(t.admin && t.admin.uid, "/main"),
|
|
className: s.link,
|
|
onClick: function(e) {
|
|
return e.stopPropagation()
|
|
}
|
|
}, t.admin && t.admin.email);
|
|
case "admin_role":
|
|
return r.createElement("span", null, t.admin && xa(t.admin.role));
|
|
case "target":
|
|
return r.createElement(ke.a, {
|
|
to: "/tower/users/user-directory/".concat(t.target && t.target.uid, "/main"),
|
|
className: s.link,
|
|
onClick: function(e) {
|
|
return e.stopPropagation()
|
|
}
|
|
}, t.target && t.target.email || "-");
|
|
case "user_ip":
|
|
return r.createElement("span", null, Va(t.user_ip));
|
|
case "info":
|
|
return r.createElement(ge.a, {
|
|
onClick: function(t) {
|
|
return e.handleInfoClick(t, n)
|
|
}
|
|
}, r.createElement(K.a, {
|
|
className: s.icon
|
|
}));
|
|
case "total":
|
|
return t.total || parseFloat(t.balance) + parseFloat(t.locked) || parseFloat(t.amount) *
|
|
parseFloat(t.price) || "0.0";
|
|
case "selectIcon":
|
|
return c && c(t.uid);
|
|
case "arrow_icon":
|
|
return r.createElement(Ce.a, {
|
|
className: s.chevronGrey
|
|
});
|
|
case "settings":
|
|
return r.createElement(r.Fragment, null, r.createElement(Em.a, {
|
|
onClick: e.handleEditRow(t.id),
|
|
className: s.settings
|
|
}), r.createElement(Cm.a, {
|
|
onClick: e.handleDeleteRow(t.id),
|
|
className: s.settings
|
|
}));
|
|
case "id":
|
|
case "maker_order_id":
|
|
case "taker_order_id":
|
|
return r.createElement("span", {
|
|
className: s.black
|
|
}, t[a.key]);
|
|
case "address":
|
|
case "rid":
|
|
return t.explorer_address ? r.createElement("a", {
|
|
href: t.explorer_address,
|
|
className: s.link,
|
|
onClick: function(e) {
|
|
return e.stopPropagation()
|
|
},
|
|
target: "blank"
|
|
}, t[a.key]) : r.createElement("span", {
|
|
className: s.black
|
|
}, t[a.key]);
|
|
case "maker":
|
|
case "taker":
|
|
return "".concat((100 * t[a.key]).toFixed(4), "%");
|
|
case "verb":
|
|
case "action":
|
|
return t[a.key].toLowerCase();
|
|
case "cancel":
|
|
return r.createElement("div", {
|
|
onClick: e.handleDeleteRow(t.id),
|
|
className: s.cancel
|
|
}, "Cancel", r.createElement(Om.a, {
|
|
className: s.cancelIcon
|
|
}));
|
|
case "blockchain_txid":
|
|
case "txid":
|
|
return t[a.key] ? t.explorer_txid ? r.createElement("a", {
|
|
href: t.explorer_txid,
|
|
className: s.link,
|
|
onClick: function(e) {
|
|
return e.stopPropagation()
|
|
},
|
|
target: "blank"
|
|
}, t[a.key]) : r.createElement("span", null, t[a.key]) : "";
|
|
default:
|
|
return r.createElement("span", null, t[a.key])
|
|
}
|
|
}, e.handleInfoClick = function(t, a) {
|
|
var n = e.props.handleOpenPopper;
|
|
t.stopPropagation(), n && n(a)(t)
|
|
}, e.getPagination = function() {
|
|
var t = e.props,
|
|
a = t.classes,
|
|
n = t.dataLength,
|
|
i = t.hidePagination,
|
|
o = t.page,
|
|
s = t.rowsPerPage,
|
|
c = t.showAll;
|
|
return i ? null : r.createElement("div", {
|
|
className: a.footer
|
|
}, r.createElement(bm.a, {
|
|
component: "div",
|
|
count: Number(n),
|
|
rowsPerPage: s,
|
|
page: o || 0,
|
|
backIconButtonProps: {
|
|
"aria-label": "Previous Page"
|
|
},
|
|
nextIconButtonProps: {
|
|
"aria-label": "Next Page"
|
|
},
|
|
onChangePage: e.handleChangePage,
|
|
onChangeRowsPerPage: e.handleChangeRowsPerPage,
|
|
classes: {
|
|
selectIcon: a.selectIcon
|
|
},
|
|
labelDisplayedRows: e.getLabelDisplayedRows
|
|
}), c && e.getShowAllButton())
|
|
}, e.getLabelDisplayedRows = function(t) {
|
|
var a = t.from,
|
|
n = t.to,
|
|
r = t.count;
|
|
return e.props.disableTotal ? "".concat(a, " - ").concat(n) : "".concat(a, "-").concat(-1 === n ?
|
|
r : n, " of ").concat(r)
|
|
}, e.getShowAllButton = function() {
|
|
var t = e.props,
|
|
a = t.classes,
|
|
n = t.handleShowAll;
|
|
return r.createElement(L.a, {
|
|
className: a.showAll,
|
|
onClick: n
|
|
}, "Show all")
|
|
}, e.handleChangePage = function(t, a) {
|
|
e.props.handleChangePage && e.props.handleChangePage(a)
|
|
}, e.handleChangeRowsPerPage = function(t) {
|
|
e.props.handleChangeRowsPerPage && e.props.handleChangeRowsPerPage(t.target.value)
|
|
}, e.handleOpenCarousel = function(t, a) {
|
|
return function(n) {
|
|
var r = e.props.handleOpen;
|
|
n.stopPropagation(), r && r(t, a)
|
|
}
|
|
}, e.getHeaderForTable = function() {
|
|
return r.createElement(ym.a, null, r.createElement(mm.a, {
|
|
className: e.props.classes.tableHeader
|
|
}, e.props.rows.map(function(t) {
|
|
return e.getTableHeaderCell(t)
|
|
})))
|
|
}, e.getTableHeaderCell = function(t) {
|
|
var a = e.props,
|
|
n = a.classes,
|
|
i = a.isSmall,
|
|
o = "".concat(i && n.small, " ").concat(n.removeBorder);
|
|
return r.createElement(fm.a, {
|
|
key: t.key,
|
|
align: t.alignRight ? "right" : "left",
|
|
className: o
|
|
}, r.createElement(F.a, {
|
|
variant: "subtitle2",
|
|
gutterBottom: !0,
|
|
className: n.headers
|
|
}, t.label))
|
|
}, e.getVisibleState = function(e) {
|
|
return e ? "Active" : "Disabled"
|
|
}, e.getWithdrawDepositState = function(e) {
|
|
return e ? "Enabled" : "Disabled"
|
|
}, e.getColored = function(t) {
|
|
var a = e.props.classes;
|
|
return "Pending" === t || "Processing" === t || "Wait" === t || "Submitted" === t ||
|
|
"Confirming" === t || "Accepted" === t ? r.createElement("span", {
|
|
className: a.wait
|
|
}, t) : "Preparing" === t || "Draft" === t || "Refunding" === t || "Ongoing" === t ? r
|
|
.createElement("span", {
|
|
className: a.wait
|
|
}, t) : "Active" === t || "Executing" === t || "Completed" === t || "Distributing" === t ||
|
|
"Finished" === t || "Purchased" === t ? r.createElement("span", {
|
|
className: a.active
|
|
}, t) : "Active" === t || "Succeed" === t || "Done" === t || "Buy" === t || "Collected" === t ||
|
|
"Enabled" === t || "Verified" === t ? r.createElement("span", {
|
|
className: a.active
|
|
}, t) : r.createElement("span", {
|
|
className: a.banned
|
|
}, t)
|
|
}, e.handleDeleteRow = function(t) {
|
|
return function(a) {
|
|
var n = e.props.handleDelete;
|
|
a.stopPropagation(), n && n(t)
|
|
}
|
|
}, e.handleEditRow = function(t) {
|
|
return function(a) {
|
|
var n = e.props.handleEdit;
|
|
a.stopPropagation(), n && n(t)
|
|
}
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props.classes;
|
|
return r.createElement("div", {
|
|
className: e.root
|
|
}, r.createElement(D.a, {
|
|
className: e.paperStyle
|
|
}, this.renderContent()))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
xm = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
root: {
|
|
width: "100%"
|
|
},
|
|
table: {
|
|
width: "100%"
|
|
},
|
|
paperStyle: {
|
|
marginBottom: 25,
|
|
position: "relative"
|
|
},
|
|
tableWrapper: {
|
|
overflowX: "auto"
|
|
},
|
|
link: {
|
|
cursor: "pointer",
|
|
color: "#000",
|
|
textDecoration: "none",
|
|
letterSpacing: "0.4px",
|
|
"&:hover": {
|
|
textDecoration: "underline"
|
|
}
|
|
},
|
|
label: {
|
|
letterSpacing: "0.15px",
|
|
padding: "16px",
|
|
paddingBottom: "0px",
|
|
fontWeight: 600
|
|
},
|
|
headers: {
|
|
fontWeight: 600,
|
|
fontSize: "12px",
|
|
letterpacing: "0.1px"
|
|
},
|
|
content: {
|
|
fontWeight: 400,
|
|
letterSpacing: "0.4px",
|
|
color: "#666666",
|
|
overflow: "hidden",
|
|
whiteSpace: "nowrap"
|
|
},
|
|
emptyTable: {
|
|
padding: e.spacing(1),
|
|
color: "rgba(0, 0, 0, 0.87)",
|
|
fontSize: "12px",
|
|
display: "flex",
|
|
justifyContent: "center"
|
|
},
|
|
selectIcon: {
|
|
paddingLeft: "10px"
|
|
},
|
|
active: {
|
|
color: "#00A41A",
|
|
textTransform: "capitalize"
|
|
},
|
|
attachment: {
|
|
color: "rgba(0, 0, 0, 0.87)",
|
|
cursor: "pointer",
|
|
textDecoration: "none",
|
|
display: "flex",
|
|
alignItems: "center",
|
|
justifyContent: "flex-end"
|
|
},
|
|
banned: {
|
|
color: "#E23328",
|
|
textTransform: "capitalize"
|
|
},
|
|
wait: {
|
|
color: "#E3B930"
|
|
},
|
|
grey: {
|
|
cursor: "pointer",
|
|
color: "#979797"
|
|
},
|
|
cell: {
|
|
padding: "4px 0px"
|
|
},
|
|
arrowForwardIos: {
|
|
fill: "#979797",
|
|
fontSize: 16,
|
|
marginTop: 5
|
|
},
|
|
icon: {
|
|
cursor: "pointer",
|
|
color: "#979797",
|
|
opacity: .5
|
|
},
|
|
tableHeader: {
|
|
borderBottom: "1px solid #cccccc"
|
|
},
|
|
removeBorder: {
|
|
borderBottom: "none"
|
|
},
|
|
colorLightGrey: {
|
|
color: "#666666"
|
|
},
|
|
row: {
|
|
cursor: "pointer",
|
|
"&:hover": {
|
|
backgroundColor: "#f9f9f9",
|
|
cursor: "pointer"
|
|
}
|
|
},
|
|
small: {
|
|
padding: "4px 24px 4px 12px",
|
|
textAlign: "center"
|
|
},
|
|
showAll: {
|
|
background: "#0030AE",
|
|
textTransform: "none",
|
|
color: "#FFFFFF",
|
|
padding: "3px 16px",
|
|
width: "165px",
|
|
"&:hover": {
|
|
background: "#0030AE"
|
|
},
|
|
position: "absolute",
|
|
bottom: 12,
|
|
left: 16
|
|
},
|
|
footer: {
|
|
width: "100%",
|
|
justifyContent: "space-between",
|
|
alignItems: "center"
|
|
},
|
|
settings: {
|
|
color: "#979797",
|
|
cursor: "pointer",
|
|
marginRight: 30,
|
|
opacity: .5
|
|
},
|
|
black: {
|
|
color: "rgba(0, 0, 0, 0.87)"
|
|
},
|
|
selected: {
|
|
backgroundColor: "#0030AE",
|
|
cursor: "pointer",
|
|
"&:hover": {
|
|
backgroundColor: "rgba(0, 48, 174, 0.8)",
|
|
cursor: "pointer"
|
|
}
|
|
},
|
|
selectedCell: {
|
|
color: "#FFFFFF",
|
|
fontWeight: 500,
|
|
letterSpacing: "0.4px"
|
|
},
|
|
selectedLink: {
|
|
cursor: "pointer",
|
|
textDecoration: "none",
|
|
letterSpacing: "0.4px",
|
|
color: "#FFFFFF"
|
|
},
|
|
selectedAttachments: {
|
|
color: "#FFFFFF",
|
|
cursor: "pointer",
|
|
textDecoration: "none",
|
|
display: "flex",
|
|
alignItems: "center",
|
|
justifyContent: "flex-end"
|
|
},
|
|
white: {
|
|
color: "#FFFFFF",
|
|
cursor: "pointer"
|
|
},
|
|
chevronGrey: {
|
|
opacity: .5
|
|
},
|
|
cancel: {
|
|
display: "flex",
|
|
position: "relative",
|
|
opacity: .5,
|
|
alignItems: "center",
|
|
cursor: "pointer",
|
|
color: "#979797",
|
|
"&:hover": {
|
|
color: "#E23328",
|
|
opacity: 1
|
|
}
|
|
},
|
|
cancelIcon: {
|
|
marginLeft: e.spacing(1),
|
|
cursor: "pointer"
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(km),
|
|
jm = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
return Object(u.a)(this, a), t.apply(this, arguments)
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.classes,
|
|
a = e.user,
|
|
n = e.newLabelName,
|
|
i = e.newLabelValue,
|
|
o = e.newLabelScope,
|
|
s = e.addNewLabel,
|
|
c = e.editLabel,
|
|
l = e.deleteUserLabel,
|
|
u = e.isAddLabelModalOpened,
|
|
d = e.isEditLabelModalOpened,
|
|
p = e.openAddLabelModal,
|
|
h = e.openEditLabelModal,
|
|
g = e.closeModal,
|
|
m = e.handleChangeUserState,
|
|
f = e.handleChangeRole,
|
|
b = e.handleChangeUserOTP,
|
|
y = e.handleChangeFeeGroup,
|
|
v = e.currentUser,
|
|
w = e.tradingFeeGroups,
|
|
E = e.handleChange,
|
|
C = e.handleAddLabel,
|
|
O = e.deleteAnyLabel,
|
|
k = e.handleEditLabel,
|
|
x = e.userProfile,
|
|
j = e.userFeeGroup,
|
|
_ = e.resendEmail,
|
|
R = e.onVerifyClick,
|
|
S = py.UserKYC,
|
|
T = py.UserLabel,
|
|
P = py.UserQuestionnaire,
|
|
A = py.UserSettings,
|
|
L = py.UserProfile;
|
|
return r.createElement("div", {
|
|
className: t.userData
|
|
}, r.createElement(I.a, {
|
|
container: !0,
|
|
direction: "row",
|
|
spacing: 4,
|
|
className: t.summaryFirst
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 12,
|
|
md: 6,
|
|
className: t.paperBlock
|
|
}, r.createElement(L, {
|
|
user: a,
|
|
userProfile: x,
|
|
onVerifyClick: R,
|
|
type: "main"
|
|
})), r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 12,
|
|
md: 6,
|
|
classes: {
|
|
item: t.responsiveGridItem
|
|
}
|
|
}, r.createElement(D.a, {
|
|
className: t.mb24
|
|
}, r.createElement(S, {
|
|
user: a,
|
|
deleteUserLabel: l,
|
|
addNewLabel: C,
|
|
alertPush: this.props.alertPush,
|
|
editLabel: k
|
|
})), r.createElement(D.a, {
|
|
className: t.mb24
|
|
}, r.createElement(A, {
|
|
user: a,
|
|
handleChangeUserState: m,
|
|
handleChangeRole: f,
|
|
handleChangeUserOTP: b,
|
|
handleChangeFeeGroup: y,
|
|
currentUser: v,
|
|
userFeeGroup: j,
|
|
tradingFeeGroups: w,
|
|
resendEmail: _
|
|
})))), r.createElement(I.a, {
|
|
container: !0,
|
|
direction: "row",
|
|
spacing: 4,
|
|
className: t.summary
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 12,
|
|
md: 12
|
|
}, r.createElement(D.a, {
|
|
className: t.mb24
|
|
}, r.createElement(T, {
|
|
user: a,
|
|
newLabelName: n,
|
|
newLabelValue: i,
|
|
newLabelScope: o,
|
|
addNewLabel: s,
|
|
editLabel: c,
|
|
deleteUserLabel: O,
|
|
handleChange: E,
|
|
isAddLabelModalOpened: u,
|
|
isEditLabelModalOpened: d,
|
|
openAddLabelModal: p,
|
|
openEditLabelModal: h,
|
|
closeModal: g,
|
|
classes: t
|
|
})))), r.createElement(I.a, {
|
|
container: !0,
|
|
direction: "row",
|
|
spacing: 4,
|
|
className: t.summary
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 12,
|
|
md: 12
|
|
}, r.createElement(D.a, null, r.createElement(P, {
|
|
user: a,
|
|
deleteDataStorage: this.props.deleteDataStorage
|
|
})))))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
_m = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
textField: {
|
|
marginLeft: e.spacing(1),
|
|
marginRight: e.spacing(1),
|
|
width: "75%"
|
|
},
|
|
menu: {
|
|
width: 200
|
|
},
|
|
link: {
|
|
cursor: "pointer",
|
|
textDecoration: "none",
|
|
color: "#3598D5",
|
|
fontSize: "16px",
|
|
letterSpacing: "0.44px"
|
|
},
|
|
arrow: {
|
|
color: "#979797",
|
|
paddingTop: "3px",
|
|
margin: "0 10px"
|
|
},
|
|
header: {
|
|
display: "flex",
|
|
alignItems: "center",
|
|
margin: "0 24px 24px 0",
|
|
fontWeight: 600
|
|
},
|
|
label: {
|
|
height: 32,
|
|
paddingLeft: 16,
|
|
borderRadius: 24,
|
|
width: "auto",
|
|
cursor: "pointer",
|
|
letterSpacing: "0.15px",
|
|
fontWeight: 600
|
|
},
|
|
icon: {
|
|
width: 20,
|
|
height: 20,
|
|
margin: "7px 4px",
|
|
cursor: "pointer",
|
|
opacity: .6
|
|
},
|
|
labelName: {
|
|
paddingTop: 5,
|
|
color: "#ffffff",
|
|
fontSize: 14,
|
|
marginRight: 7,
|
|
letterSpacing: "0.25px"
|
|
},
|
|
title: {
|
|
marginBottom: e.spacing(3),
|
|
letterSpacing: "0.15px",
|
|
fontWeight: 600,
|
|
paddingLeft: 26,
|
|
paddingTop: 26
|
|
},
|
|
userData: {
|
|
marginTop: 20
|
|
},
|
|
addNewButton: {
|
|
color: "#ffffff",
|
|
background: "#0030ae",
|
|
padding: "5px 20px",
|
|
"&:hover": {
|
|
background: "#002484"
|
|
}
|
|
},
|
|
paper: {
|
|
padding: "16px"
|
|
},
|
|
paperBlock: {
|
|
boxShadow: "0px 1px 5px 0px rgba(0,0,0,0.2),\n 0px 2px 2px 0px rgba(0,0,0,0.14),\n 0px 3px 1px -2px rgba(0,0,0,0.12)",
|
|
borderRadius: "4px",
|
|
backgroundColor: "#fff",
|
|
padding: "20px 24px 24px 24px !important",
|
|
margin: "16px 0 38px",
|
|
"@media (min-width: 676px) and (max-width: 959px)": {
|
|
margin: "0 16px !important",
|
|
width: "100% !important",
|
|
maxWidth: "100% !important"
|
|
}
|
|
},
|
|
summaryFirst: {
|
|
padding: "0 16px 0 30px",
|
|
"@media (min-width: 676px) and (max-width: 959px)": {
|
|
padding: "16px",
|
|
width: "100% !important",
|
|
maxWidth: "100% !important"
|
|
}
|
|
},
|
|
summary: {
|
|
padding: "0 14px",
|
|
"@media (min-width: 676px) and (max-width: 959px)": {
|
|
padding: "16px",
|
|
width: "100% !important",
|
|
maxWidth: "100% !important"
|
|
}
|
|
},
|
|
mb24: {
|
|
marginBottom: "24px",
|
|
"@media (min-width: 676px) and (max-width: 959px)": {
|
|
marginBottom: "12px"
|
|
}
|
|
},
|
|
responsiveGridItem: {
|
|
"@media (max-width: 675px)": {
|
|
paddingLeft: "0 !important"
|
|
}
|
|
}
|
|
})
|
|
})(jm),
|
|
Rm = a(276),
|
|
Sm = a(625),
|
|
Tm = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).getUserPhone = function() {
|
|
var t = e.props.user;
|
|
return t.phones && t.phones.length ? Ta(t.phones).number : "-"
|
|
}, e.updateState = function(t) {
|
|
e.props.updateProfileState && e.props.updateProfileState(t)
|
|
}, e.getAction = function() {
|
|
var t = e.props,
|
|
a = t.isEditing,
|
|
n = t.type,
|
|
i = e.props.userProfile.state;
|
|
switch (n) {
|
|
case "main":
|
|
return "submitted" === i ? e.verifyButton() : null;
|
|
case "latest":
|
|
return a ? e.saveButton() : r.createElement(I.a, {
|
|
container: !0,
|
|
md: 4,
|
|
lg: 6,
|
|
justify: "flex-end"
|
|
}, e.rejectButton(), e.approveButton());
|
|
case "left":
|
|
default:
|
|
return e.profileVersionsMenu()
|
|
}
|
|
}, e.headerComponent = function() {
|
|
var t = e.props,
|
|
a = t.user,
|
|
n = t.type,
|
|
i = t.classes,
|
|
o = t.userProfile,
|
|
s = t.isEditing;
|
|
switch (n) {
|
|
case "main":
|
|
return r.createElement("div", null, r.createElement(F.a, {
|
|
gutterBottom: !0,
|
|
variant: "h6",
|
|
className: i.label
|
|
}, a.email), r.createElement(I.a, {
|
|
item: !0
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "Last activity: ", Wa(a.updated_at, "fullDate"))));
|
|
case "latest":
|
|
return r.createElement("div", null, r.createElement(F.a, {
|
|
gutterBottom: !0,
|
|
variant: "h6",
|
|
className: i.label
|
|
}, "Updated by user", s ? null : r.createElement(ge.a, {
|
|
value: "Edit",
|
|
onClick: e.props.editProfile,
|
|
className: i.marginLeft
|
|
}, r.createElement(Em.a, {
|
|
className: i.icon
|
|
}))), r.createElement(I.a, {
|
|
item: !0
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, Wa(o.updated_at, "fullDate"))));
|
|
default:
|
|
return r.createElement("div", null, r.createElement(F.a, {
|
|
gutterBottom: !0,
|
|
variant: "h6",
|
|
className: i.label
|
|
}, xa(o.state), " version"), r.createElement(I.a, {
|
|
item: !0
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, Wa(o.updated_at, "fullDate"))))
|
|
}
|
|
}, e.profileVersionsMenu = function() {
|
|
var t = e.props,
|
|
a = t.versionsList,
|
|
n = t.userProfile,
|
|
i = t.classes;
|
|
return a ? r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 6
|
|
}, r.createElement(N.a, {
|
|
id: "created_at",
|
|
select: !0,
|
|
label: "History version",
|
|
value: Wa(n.created_at, "fullDate"),
|
|
onChange: function(t) {
|
|
return e.props.selectProfileLeft && e.props.selectProfileLeft(t.target.value)
|
|
},
|
|
fullWidth: !0,
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
},
|
|
className: i.marginTop
|
|
}, a.map(function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e,
|
|
value: e,
|
|
className: i.thin
|
|
}, e)
|
|
}))) : null
|
|
}, e.userEmail = function() {
|
|
var t = e.props,
|
|
a = t.user,
|
|
n = t.classes;
|
|
return "main" !== t.type ? r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 6
|
|
}, r.createElement(F.a, {
|
|
gutterBottom: !0,
|
|
className: n.title
|
|
}, "Email"), r.createElement(F.a, {
|
|
gutterBottom: !0
|
|
}, a.email)) : null
|
|
}, e.saveButton = function() {
|
|
return r.createElement(L.a, {
|
|
className: e.props.classes.editButton,
|
|
value: "Save",
|
|
onClick: e.props.saveProfile
|
|
}, r.createElement(F.a, {
|
|
variant: "caption",
|
|
className: e.props.classes.btnLabel
|
|
}, "Save"))
|
|
}, e.verifyButton = function() {
|
|
return r.createElement(L.a, {
|
|
className: e.props.classes.verifyBtn,
|
|
value: "Verify",
|
|
onClick: e.props.onVerifyClick,
|
|
variant: "outlined",
|
|
color: "secondary"
|
|
}, r.createElement(F.a, {
|
|
variant: "caption",
|
|
className: e.props.classes.verifyBtnLabel
|
|
}, "Verify"), r.createElement(Sm.a, {
|
|
className: e.props.classes.redColor
|
|
}))
|
|
}, e.rejectButton = function() {
|
|
return r.createElement(L.a, {
|
|
className: e.props.classes.redBtn,
|
|
value: "rejected",
|
|
onClick: function(t) {
|
|
return e.updateState("rejected")
|
|
},
|
|
color: "secondary"
|
|
}, r.createElement(F.a, {
|
|
variant: "caption",
|
|
className: e.props.classes.btnLabel
|
|
}, "Reject"))
|
|
}, e.approveButton = function() {
|
|
return r.createElement(L.a, {
|
|
className: e.props.classes.editButton,
|
|
value: "verified",
|
|
onClick: function(t) {
|
|
return e.updateState("verified")
|
|
},
|
|
color: "primary"
|
|
}, r.createElement(F.a, {
|
|
variant: "caption",
|
|
className: e.props.classes.btnLabel
|
|
}, "Approve"))
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this,
|
|
t = this.props,
|
|
a = t.classes,
|
|
n = t.user,
|
|
i = t.userProfile,
|
|
o = t.isEditing;
|
|
return r.createElement("div", {
|
|
className: a.paper
|
|
}, r.createElement(I.a, {
|
|
container: !0,
|
|
justify: "space-between"
|
|
}, this.headerComponent(), this.getAction()), r.createElement("br", null), r
|
|
.createElement(I.a, {
|
|
container: !0,
|
|
className: a.gridRow
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 6
|
|
}, r.createElement(F.a, {
|
|
gutterBottom: !0,
|
|
className: a.title
|
|
}, "UID"), r.createElement(F.a, {
|
|
gutterBottom: !0
|
|
}, n.uid)), this.userEmail()), r.createElement(I.a, {
|
|
container: !0,
|
|
className: a.gridRow
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 6
|
|
}, r.createElement(F.a, {
|
|
gutterBottom: !0,
|
|
className: a.title
|
|
}, "Created"), r.createElement(F.a, {
|
|
gutterBottom: !0
|
|
}, Wa(i.created_at || n.created_at, "shortDate") || "-")), r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 6
|
|
}, r.createElement(F.a, {
|
|
gutterBottom: !0,
|
|
className: a.title
|
|
}, "Updated"), r.createElement(F.a, {
|
|
gutterBottom: !0
|
|
}, Wa(i.updated_at || n.updated_at, "shortDate") || "-"))), r.createElement(I.a, {
|
|
container: !0,
|
|
className: a.gridRow
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 6
|
|
}, r.createElement(F.a, {
|
|
gutterBottom: !0,
|
|
className: a.title
|
|
}, "First name"), r.createElement(Rm.a, {
|
|
inputProps: {
|
|
"aria-label": "naked"
|
|
},
|
|
className: o ? a.border : a.text,
|
|
value: i.firstName,
|
|
disabled: !o,
|
|
onChange: function(t) {
|
|
return e.props.handleChange && e.props.handleChange(t.target.value,
|
|
"firstName")
|
|
}
|
|
})), r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 6
|
|
}, r.createElement(F.a, {
|
|
gutterBottom: !0,
|
|
className: a.title
|
|
}, "Last name"), r.createElement(Rm.a, {
|
|
inputProps: {
|
|
"aria-label": "naked"
|
|
},
|
|
className: o ? a.border : a.text,
|
|
value: i.lastName,
|
|
disabled: !o,
|
|
onChange: function(t) {
|
|
return e.props.handleChange && e.props.handleChange(t.target.value,
|
|
"lastName")
|
|
}
|
|
}))), r.createElement(I.a, {
|
|
container: !0,
|
|
className: a.gridRow
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 6
|
|
}, r.createElement(F.a, {
|
|
gutterBottom: !0,
|
|
className: a.title
|
|
}, "Phone number"), r.createElement(F.a, {
|
|
gutterBottom: !0
|
|
}, this.getUserPhone())), r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 6
|
|
}, r.createElement(F.a, {
|
|
gutterBottom: !0,
|
|
className: a.title
|
|
}, "Day of Birth"), r.createElement(Rm.a, {
|
|
inputProps: {
|
|
"aria-label": "naked"
|
|
},
|
|
className: o ? a.border : a.text,
|
|
value: i.dob,
|
|
disabled: !o,
|
|
onChange: function(t) {
|
|
return e.props.handleChange && e.props.handleChange(t.target.value, "dob")
|
|
}
|
|
}))), r.createElement(I.a, {
|
|
container: !0,
|
|
className: a.gridRow
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 6
|
|
}, r.createElement(F.a, {
|
|
gutterBottom: !0,
|
|
className: a.title
|
|
}, "Citizenship"), r.createElement(Rm.a, {
|
|
inputProps: {
|
|
"aria-label": "naked"
|
|
},
|
|
className: o ? a.border : a.text,
|
|
value: i.nationality,
|
|
disabled: !o,
|
|
onChange: function(t) {
|
|
return e.props.handleChange && e.props.handleChange(t.target.value,
|
|
"nationality")
|
|
}
|
|
})), r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 6
|
|
}, r.createElement(F.a, {
|
|
gutterBottom: !0,
|
|
className: a.title
|
|
}, "Country"), r.createElement(Rm.a, {
|
|
inputProps: {
|
|
"aria-label": "naked"
|
|
},
|
|
className: o ? a.border : a.text,
|
|
value: i.country,
|
|
disabled: !o,
|
|
onChange: function(t) {
|
|
return e.props.handleChange && e.props.handleChange(t.target.value,
|
|
"country")
|
|
}
|
|
}), o && r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "Country in alpha2 or alpha3 format"))), r.createElement(I.a, {
|
|
container: !0,
|
|
className: a.gridRow
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 6
|
|
}, r.createElement(F.a, {
|
|
gutterBottom: !0,
|
|
className: a.title
|
|
}, "City"), r.createElement(Rm.a, {
|
|
inputProps: {
|
|
"aria-label": "naked"
|
|
},
|
|
className: o ? a.border : a.text,
|
|
value: i.city,
|
|
disabled: !o,
|
|
onChange: function(t) {
|
|
return e.props.handleChange && e.props.handleChange(t.target.value, "city")
|
|
}
|
|
})), r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 6
|
|
}, r.createElement(F.a, {
|
|
gutterBottom: !0,
|
|
className: a.title
|
|
}, "Address"), r.createElement(Rm.a, {
|
|
inputProps: {
|
|
"aria-label": "naked"
|
|
},
|
|
className: o ? a.border : a.text,
|
|
value: i.address,
|
|
disabled: !o,
|
|
onChange: function(t) {
|
|
return e.props.handleChange && e.props.handleChange(t.target.value,
|
|
"address")
|
|
}
|
|
}))), r.createElement(I.a, {
|
|
container: !0,
|
|
className: a.gridRow
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 6
|
|
}, r.createElement(F.a, {
|
|
gutterBottom: !0,
|
|
className: a.title
|
|
}, "Postcode"), r.createElement(Rm.a, {
|
|
inputProps: {
|
|
"aria-label": "naked"
|
|
},
|
|
className: o ? a.border : a.text,
|
|
value: i.postcode,
|
|
disabled: !o,
|
|
onChange: function(t) {
|
|
return e.props.handleChange && e.props.handleChange(t.target.value,
|
|
"postcode")
|
|
}
|
|
}))))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Pm = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
gridRow: {
|
|
justifyContent: "space-between",
|
|
marginTop: 20
|
|
},
|
|
title: {
|
|
color: "#757575"
|
|
},
|
|
paper: {
|
|
padding: "8px",
|
|
minHeight: 646
|
|
},
|
|
label: {
|
|
letterSpacing: "0.15px",
|
|
paddingBottom: "0px",
|
|
fontWeight: 600
|
|
},
|
|
editButton: {
|
|
color: "#ffffff",
|
|
background: "#0030ae",
|
|
padding: "3px 8px",
|
|
height: 24,
|
|
width: 94,
|
|
"&:hover": {
|
|
background: "#002484"
|
|
},
|
|
marginLeft: 18
|
|
},
|
|
btnLabel: {
|
|
color: "#ffffff",
|
|
lineHeight: "16px",
|
|
fontWeight: "normal",
|
|
fontSize: "0.875rem",
|
|
letterSpacing: .4
|
|
},
|
|
border: {
|
|
fontSize: "0.875rem",
|
|
lineHeight: "20px",
|
|
fontWeight: 500,
|
|
letterSpacing: .25,
|
|
marginBottom: 2,
|
|
color: "rgba(0, 0, 0, 0.87) !important",
|
|
borderBottom: "1px solid rgba(0, 0, 0, 0.77)"
|
|
},
|
|
text: {
|
|
fontSize: "0.875rem",
|
|
lineHeight: "20px",
|
|
fontWeight: 500,
|
|
letterSpacing: .25,
|
|
color: "rgba(0, 0, 0, 0.87) !important"
|
|
},
|
|
verifyBtn: {
|
|
color: "#E23328",
|
|
padding: "3px 8px",
|
|
height: 34,
|
|
width: 104,
|
|
display: "flex",
|
|
justifyContent: "space-between"
|
|
},
|
|
verifyBtnLabel: {
|
|
color: "#E23328",
|
|
lineHeight: "16px",
|
|
fontWeight: 500,
|
|
fontSize: "0.875rem",
|
|
textTransform: "uppercase",
|
|
letterSpacing: "1.5px"
|
|
},
|
|
redBtn: {
|
|
background: "#E23328",
|
|
width: 96,
|
|
height: 24,
|
|
padding: "3px 8px",
|
|
"&:hover": {
|
|
background: "#d4271d"
|
|
}
|
|
},
|
|
redColor: {
|
|
color: "#E23328"
|
|
},
|
|
icon: {
|
|
color: "#979797"
|
|
},
|
|
marginLeft: {
|
|
marginLeft: 8
|
|
},
|
|
marginTop: {
|
|
marginTop: 8
|
|
},
|
|
thin: {
|
|
fontWeight: "normal"
|
|
}
|
|
})
|
|
})(Tm),
|
|
Am = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).displayProfileRight = function() {
|
|
var e = n.props,
|
|
t = e.classes,
|
|
a = e.user,
|
|
i = e.userProfile,
|
|
o = e.isEditing,
|
|
s = py.UserProfile;
|
|
return "submitted" === i.state ? r.createElement("div", {
|
|
className: t.halfBlock
|
|
}, r.createElement(D.a, {
|
|
className: t.paper
|
|
}, r.createElement(s, {
|
|
userProfile: i,
|
|
user: a,
|
|
isEditing: o,
|
|
handleChange: n.props.handleChange,
|
|
editProfile: n.props.editProfile,
|
|
saveProfile: n.props.saveProfile,
|
|
updateProfileState: n.props.updateProfileState,
|
|
type: "latest"
|
|
}))) : null
|
|
}, n.displayProfileLeft = function() {
|
|
var e = n.state.profileLeft,
|
|
t = n.props,
|
|
a = t.classes,
|
|
i = t.user,
|
|
o = py.UserProfile;
|
|
if (e !== vy && i) {
|
|
var s = i.profiles.filter(function(e) {
|
|
return "submitted" !== e.state
|
|
}).map(function(e) {
|
|
return Wa(e.created_at, "fullDate")
|
|
});
|
|
return r.createElement("div", {
|
|
className: a.halfBlock
|
|
}, r.createElement(D.a, {
|
|
className: a.paper
|
|
}, r.createElement(o, {
|
|
userProfile: e,
|
|
user: i,
|
|
versionsList: s,
|
|
selectProfileLeft: n.handleSetProfileLeft,
|
|
type: "left"
|
|
})))
|
|
}
|
|
return null
|
|
}, n.handleSetProfileLeft = function(e) {
|
|
var t = n.props.user.profiles.find(function(t) {
|
|
return Wa(t.created_at, "fullDate") === e
|
|
});
|
|
t && n.setState({
|
|
profileLeft: Qa(t)
|
|
})
|
|
}, n.state = {
|
|
profileLeft: vy
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentWillReceiveProps",
|
|
value: function(e) {
|
|
var t = this.state.profileLeft,
|
|
a = this.props.user;
|
|
if (e.user && e.user.profiles.length && (t === vy || a.profiles !== e.user.profiles)) {
|
|
var n = e.user.profiles.filter(function(e) {
|
|
return "submitted" !== e.state
|
|
}),
|
|
r = e.user.profiles.filter(function(e) {
|
|
return "verified" === e.state
|
|
});
|
|
n.length && this.setState({
|
|
profileLeft: Qa(r[r.length - 1] || n[n.length - 1])
|
|
})
|
|
}
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
return r.createElement(I.a, {
|
|
container: !0,
|
|
direction: "row",
|
|
justify: "space-between"
|
|
}, this.displayProfileLeft(), this.displayProfileRight())
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Lm = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
paper: {
|
|
padding: 24
|
|
},
|
|
halfBlock: {
|
|
width: "calc(50% - 6px)",
|
|
"&:first-child": {
|
|
marginRight: 12
|
|
}
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(Am),
|
|
Dm = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).checkLabel = function(t) {
|
|
var a, n = e.props.user,
|
|
r = !0,
|
|
i = Object(se.a)(Ra(t));
|
|
try {
|
|
var o = function() {
|
|
var e = a.value;
|
|
r = !(!r || !n.labels) && n.labels.filter(function(t) {
|
|
return t.key === Object.keys(e)[0] && t.value === Object.values(e)[0] && "private" ===
|
|
t.scope
|
|
}).length > 0
|
|
};
|
|
for (i.s(); !(a = i.n()).done;) o()
|
|
} catch (s) {
|
|
i.e(s)
|
|
} finally {
|
|
i.f()
|
|
}
|
|
return r
|
|
}, e.getRow = function(t, a) {
|
|
var n = e.props.classes,
|
|
i = e.checkLabel(t) ? "verified" : "verification";
|
|
return r.createElement(I.a, {
|
|
item: !0,
|
|
className: n.level,
|
|
key: t
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
className: n.gridColumn,
|
|
style: {
|
|
alignItems: "flex-start"
|
|
},
|
|
xs: 11
|
|
}, r.createElement(F.a, {
|
|
variant: "subtitle1",
|
|
style: {
|
|
letterSpacing: "0.44px"
|
|
}
|
|
}, xa(t), " ", i), r.createElement(F.a, {
|
|
variant: "body2",
|
|
className: n.info
|
|
}, e.getStatus(i, t))), r.createElement(I.a, {
|
|
item: !0,
|
|
className: n.gridColumn
|
|
}, r.createElement(re.a, {
|
|
checked: "verified" === i,
|
|
onChange: e.onClick(t, a),
|
|
color: "primary"
|
|
})))
|
|
}, e.getStatus = function(t, a) {
|
|
var n = e.props.user,
|
|
r = Object.keys(Ra(a)[Ra(a).length - 1])[0];
|
|
return "verified" === t ? "Completed at ".concat(Wa(n.labels && n.labels.filter(function(e) {
|
|
return e.key === r
|
|
})[0].updated_at, "shortDate")) : "Confirm the ".concat(r)
|
|
}, e.onClick = function(t, a) {
|
|
return function() {
|
|
var n, r = e.props.user,
|
|
i = [],
|
|
o = Object(se.a)(Ra(t));
|
|
try {
|
|
var s = function() {
|
|
var e = n.value;
|
|
r.labels && r.labels.find(function(t) {
|
|
return t.key === Object.keys(e)[0] && t.value === Object.values(e)[0]
|
|
}) && i.push(r.labels.filter(function(t) {
|
|
return t.key === Object.keys(e)[0]
|
|
})[0])
|
|
};
|
|
for (o.s(); !(n = o.n()).done;) s()
|
|
} catch (c) {
|
|
o.e(c)
|
|
} finally {
|
|
o.f()
|
|
}
|
|
i.length ? e.deleteLabel(i, t, a) : e.addLabel(t, a)
|
|
}
|
|
}, e.addLabel = function(t, a) {
|
|
var n, r = e.props.user,
|
|
i = j().filter(function(e, t) {
|
|
return t < a && e
|
|
}),
|
|
o = !0,
|
|
s = Object(se.a)(i);
|
|
try {
|
|
for (s.s(); !(n = s.n()).done;) {
|
|
var c, l = n.value,
|
|
u = Object(se.a)(Ra(l.name));
|
|
try {
|
|
var d = function() {
|
|
var e = c.value;
|
|
o = !(!o || !r.labels) && r.labels.filter(function(t) {
|
|
return t.key === Object.keys(e)[0] && t.value === Object.values(e)[0] &&
|
|
"private" === t.scope
|
|
}).length > 0
|
|
};
|
|
for (u.s(); !(c = u.n()).done;) d()
|
|
} catch (m) {
|
|
u.e(m)
|
|
} finally {
|
|
u.f()
|
|
}
|
|
}
|
|
} catch (m) {
|
|
s.e(m)
|
|
} finally {
|
|
s.f()
|
|
}
|
|
if (o) {
|
|
var p, h = Object(se.a)(Ra(t));
|
|
try {
|
|
var g = function() {
|
|
var t = p.value;
|
|
r.labels && r.labels.find(function(e) {
|
|
return e.key === Object.keys(t)[0]
|
|
}) ? e.props.editLabel(Object.keys(t)[0], String(Object.values(t)[0]), r.labels && r
|
|
.labels.filter(function(e) {
|
|
return e.key === Object.keys(t)[0]
|
|
})[0].scope) : e.props.addNewLabel(Object.keys(t)[0], String(Object.values(t)[0]),
|
|
"private")
|
|
};
|
|
for (h.s(); !(p = h.n()).done;) g()
|
|
} catch (m) {
|
|
h.e(m)
|
|
} finally {
|
|
h.f()
|
|
}
|
|
} else e.props.alertPush({
|
|
message: ["You need to activate previous steps firstly"],
|
|
type: "error"
|
|
})
|
|
}, e.deleteLabel = function(t, a, n) {
|
|
var r, i = e.props.user,
|
|
o = j().filter(function(e, t) {
|
|
return t > n && e
|
|
}),
|
|
s = !1,
|
|
c = Object(se.a)(o);
|
|
try {
|
|
for (c.s(); !(r = c.n()).done;) {
|
|
var l, u = r.value,
|
|
d = Object(se.a)(Ra(u.name));
|
|
try {
|
|
var p = function() {
|
|
var e = l.value;
|
|
s = s || !!i.labels && i.labels.filter(function(t) {
|
|
return t.key === Object.keys(e)[0] && t.value === Object.values(e)[0]
|
|
}).length > 0
|
|
};
|
|
for (d.s(); !(l = d.n()).done;) p()
|
|
} catch (h) {
|
|
d.e(h)
|
|
} finally {
|
|
d.f()
|
|
}
|
|
}
|
|
} catch (h) {
|
|
c.e(h)
|
|
} finally {
|
|
c.f()
|
|
}
|
|
s ? e.props.alertPush({
|
|
message: ["You need to deactivate next steps firstly"],
|
|
type: "error"
|
|
}) : t.map(function(t) {
|
|
return t && e.props.deleteUserLabel(t.key, t.scope)
|
|
})
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this,
|
|
t = this.props,
|
|
a = t.classes,
|
|
n = t.user;
|
|
return r.createElement("div", {
|
|
className: a.paper
|
|
}, r.createElement(I.a, {
|
|
container: !0
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 12,
|
|
className: a.gridRow
|
|
}, r.createElement(F.a, {
|
|
variant: "h6",
|
|
className: a.title
|
|
}, "KYC verification"), r.createElement(F.a, {
|
|
variant: "h6",
|
|
className: a.title
|
|
}, "Level: ", n.level)), r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 12,
|
|
className: a.gridColumn
|
|
}, j().map(function(t, a) {
|
|
return e.getRow(t.name, a)
|
|
}))))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Im = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
paper: {
|
|
padding: "20px 24px 12px 0px"
|
|
},
|
|
formControl: {
|
|
marginBottom: e.spacing(3)
|
|
},
|
|
gridRow: {
|
|
justifyContent: "space-between"
|
|
},
|
|
gridColumn: {
|
|
display: "flex",
|
|
flexDirection: "column",
|
|
marginLeft: 12
|
|
},
|
|
title: {
|
|
marginBottom: e.spacing(3),
|
|
marginLeft: e.spacing(3),
|
|
letterSpacing: "0.15px",
|
|
fontWeight: 600
|
|
},
|
|
info: {
|
|
opacity: .72,
|
|
letterSpacing: "0.25px",
|
|
marginBottom: e.spacing(2)
|
|
},
|
|
level: {
|
|
display: "flex",
|
|
alignItems: "flex-start",
|
|
justifyContent: "space-between"
|
|
}
|
|
})
|
|
})(Dm),
|
|
Nm = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).renderContent = function() {
|
|
var t = e.props.user;
|
|
return t && t.labels && 0 === t.labels.length ? r.createElement(F.a, {
|
|
variant: "h6",
|
|
gutterBottom: !0,
|
|
style: {
|
|
color: "#757575",
|
|
marginLeft: 8
|
|
}
|
|
}, "No labels") : e.props.user.labels && e.props.user.labels.map(function(t, a) {
|
|
return e.getLabelData(t, a, e.props.classes)
|
|
})
|
|
}, e.getLabelData = function(t, a, n) {
|
|
var i = e.props.user;
|
|
switch (t.key) {
|
|
case "email":
|
|
return r.createElement(I.a, {
|
|
item: !0,
|
|
key: a
|
|
}, r.createElement(I.a, {
|
|
container: !0,
|
|
justify: "space-between",
|
|
className: n.label,
|
|
style: {
|
|
backgroundColor: "#43A047"
|
|
}
|
|
}, r.createElement(F.a, {
|
|
onClick: function(a) {
|
|
return e.openEditLabelModal(t.key, t.value, t.scope)
|
|
},
|
|
className: n.labelName
|
|
}, "email:", t.value), r.createElement(Ee.a, {
|
|
onClick: function(a) {
|
|
return e.deleteLabel(i.uid, t.key, t.scope)
|
|
},
|
|
className: n.icon,
|
|
viewBox: "0 0 32 32"
|
|
}, r.createElement("path", {
|
|
d: "m15,0.25c8.15675,0 14.75,6.59325 14.75,14.75c0,8.15675 -6.59325,14.75 -14.75,14.75c-8.15675,0 -14.75,-6.59325 -14.75,-14.75c0,-8.15675 6.59325,-14.75 14.75,-14.75m5.29525,7.375l-5.29525,5.29525l-5.29525,-5.29525l-2.07975,2.07975l5.29525,5.29525l-5.29525,5.29525l2.07975,2.07975l5.29525,-5.29525l5.29525,5.29525l2.07975,-2.07975l-5.29525,-5.29525l5.29525,-5.29525l-2.07975,-2.07975z",
|
|
id: "svg_1",
|
|
fill: "#ffffff",
|
|
stroke: "null"
|
|
}))));
|
|
case "phone":
|
|
return r.createElement(I.a, {
|
|
item: !0,
|
|
key: a
|
|
}, r.createElement(I.a, {
|
|
container: !0,
|
|
justify: "space-between",
|
|
className: n.label,
|
|
style: {
|
|
backgroundColor: "#309CEA"
|
|
}
|
|
}, r.createElement(F.a, {
|
|
onClick: function(a) {
|
|
return e.openEditLabelModal(t.key, t.value, t.scope)
|
|
},
|
|
className: n.labelName
|
|
}, "phone:", t.value), r.createElement(Ee.a, {
|
|
onClick: function(a) {
|
|
return e.deleteLabel(i.uid, t.key, t.scope)
|
|
},
|
|
className: n.icon,
|
|
viewBox: "0 0 32 32"
|
|
}, r.createElement("path", {
|
|
d: "m15,0.25c8.15675,0 14.75,6.59325 14.75,14.75c0,8.15675 -6.59325,14.75 -14.75,14.75c-8.15675,0 -14.75,-6.59325 -14.75,-14.75c0,-8.15675 6.59325,-14.75 14.75,-14.75m5.29525,7.375l-5.29525,5.29525l-5.29525,-5.29525l-2.07975,2.07975l5.29525,5.29525l-5.29525,5.29525l2.07975,2.07975l5.29525,-5.29525l5.29525,5.29525l2.07975,-2.07975l-5.29525,-5.29525l5.29525,-5.29525l-2.07975,-2.07975z",
|
|
id: "svg_1",
|
|
fill: "#ffffff",
|
|
stroke: "null"
|
|
}))));
|
|
case "document":
|
|
return r.createElement(I.a, {
|
|
item: !0,
|
|
key: a
|
|
}, r.createElement(I.a, {
|
|
container: !0,
|
|
justify: "space-between",
|
|
className: n.label,
|
|
style: {
|
|
backgroundColor: "#3F51B5"
|
|
}
|
|
}, r.createElement(F.a, {
|
|
onClick: function(a) {
|
|
return e.openEditLabelModal(t.key, t.value, t.scope)
|
|
},
|
|
className: n.labelName
|
|
}, "document:", t.value), r.createElement(Ee.a, {
|
|
onClick: function(a) {
|
|
return e.deleteLabel(i.uid, t.key, t.scope)
|
|
},
|
|
className: n.icon,
|
|
viewBox: "0 0 32 32"
|
|
}, r.createElement("path", {
|
|
d: "m15,0.25c8.15675,0 14.75,6.59325 14.75,14.75c0,8.15675 -6.59325,14.75 -14.75,14.75c-8.15675,0 -14.75,-6.59325 -14.75,-14.75c0,-8.15675 6.59325,-14.75 14.75,-14.75m5.29525,7.375l-5.29525,5.29525l-5.29525,-5.29525l-2.07975,2.07975l5.29525,5.29525l-5.29525,5.29525l2.07975,2.07975l5.29525,-5.29525l5.29525,5.29525l2.07975,-2.07975l-5.29525,-5.29525l5.29525,-5.29525l-2.07975,-2.07975z",
|
|
id: "svg_1",
|
|
fill: "#ffffff",
|
|
stroke: "null"
|
|
}))));
|
|
default:
|
|
return r.createElement(I.a, {
|
|
item: !0,
|
|
key: a
|
|
}, r.createElement(I.a, {
|
|
container: !0,
|
|
justify: "space-between",
|
|
className: n.label,
|
|
style: {
|
|
backgroundColor: "#e0e0e0"
|
|
}
|
|
}, r.createElement(F.a, {
|
|
onClick: function(a) {
|
|
return e.openEditLabelModal(t.key, t.value, t.scope)
|
|
},
|
|
style: {
|
|
paddingTop: 5,
|
|
color: "#757575",
|
|
fontSize: 14,
|
|
marginRight: 7
|
|
}
|
|
}, t.key), r.createElement(Ee.a, {
|
|
onClick: function(a) {
|
|
return e.deleteLabel(i.uid, t.key, t.scope)
|
|
},
|
|
className: n.icon,
|
|
viewBox: "0 0 32 32"
|
|
}, r.createElement("path", {
|
|
d: "m15,0.25c8.15675,0 14.75,6.59325 14.75,14.75c0,8.15675 -6.59325,14.75 -14.75,14.75c-8.15675,0 -14.75,-6.59325 -14.75,-14.75c0,-8.15675 6.59325,-14.75 14.75,-14.75m5.29525,7.375l-5.29525,5.29525l-5.29525,-5.29525l-2.07975,2.07975l5.29525,5.29525l-5.29525,5.29525l2.07975,2.07975l5.29525,-5.29525l5.29525,5.29525l2.07975,-2.07975l-5.29525,-5.29525l5.29525,-5.29525l-2.07975,-2.07975z",
|
|
id: "svg_1",
|
|
fill: "#979797",
|
|
stroke: "null"
|
|
}))))
|
|
}
|
|
}, e.openAddLabelModal = function() {
|
|
return e.props.openAddLabelModal()
|
|
}, e.openEditLabelModal = function(t, a, n) {
|
|
e.props.openEditLabelModal(t, a, n)
|
|
}, e.modalClose = function() {
|
|
return e.props.closeModal()
|
|
}, e.deleteLabel = function(t, a, n) {
|
|
e.props.deleteUserLabel(a, n)
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this,
|
|
t = this.props,
|
|
a = t.classes,
|
|
n = t.newLabelName,
|
|
i = t.newLabelValue,
|
|
o = t.newLabelScope,
|
|
s = py.EditLabel;
|
|
return r.createElement("div", {
|
|
className: a.paper
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 12,
|
|
style: {
|
|
display: "flex",
|
|
justifyContent: "space-between"
|
|
}
|
|
}, r.createElement(F.a, {
|
|
variant: "h6",
|
|
gutterBottom: !0,
|
|
className: a.title,
|
|
style: {
|
|
paddingLeft: 0,
|
|
paddingTop: 0
|
|
}
|
|
}, "Labels"), r.createElement(I.a, {
|
|
item: !0
|
|
}, r.createElement(L.a, {
|
|
onClick: function(t) {
|
|
return e.openAddLabelModal()
|
|
},
|
|
disableFocusRipple: !0,
|
|
className: a.addNewButton
|
|
}, "Add new"))), r.createElement(I.a, {
|
|
container: !0,
|
|
justify: "flex-start",
|
|
spacing: 2
|
|
}, this.renderContent(), r.createElement(s, {
|
|
editLabel: this.props.addNewLabel,
|
|
handleChangeSelect: this.props.handleChange,
|
|
modalClose: this.modalClose,
|
|
name: n,
|
|
open: this.props.isAddLabelModalOpened,
|
|
scope: o,
|
|
value: i,
|
|
header: "Create label"
|
|
}), r.createElement(s, {
|
|
editLabel: this.props.editLabel,
|
|
handleChangeSelect: this.props.handleChange,
|
|
modalClose: this.modalClose,
|
|
name: n,
|
|
open: this.props.isEditLabelModalOpened,
|
|
scope: o,
|
|
value: i,
|
|
header: "Edit label"
|
|
})))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Fm = a(626),
|
|
Um = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).renderDeleteButton = function() {
|
|
var t = e.props,
|
|
a = t.classes,
|
|
n = t.user;
|
|
return n && n.data_storages && n.data_storages.length ? r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 12,
|
|
style: {
|
|
display: "flex",
|
|
justifyContent: "flex-end"
|
|
}
|
|
}, r.createElement(F.a, {
|
|
gutterBottom: !0,
|
|
className: a.deleteInfo,
|
|
onClick: e.deleteDataStorage
|
|
}, "Delete information"), r.createElement(Fm.a, {
|
|
className: a.cancelIcon,
|
|
onClick: e.deleteDataStorage
|
|
})) : null
|
|
}, e.getQuestionnaire = function() {
|
|
var t = e.props,
|
|
a = t.classes,
|
|
n = t.user;
|
|
return n && n.data_storages && n.data_storages.length ? n.data_storages.map(function(e, t) {
|
|
return r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 12,
|
|
sm: 6,
|
|
key: t
|
|
}, r.createElement(F.a, {
|
|
gutterBottom: !0,
|
|
className: a.question
|
|
}, e.title), r.createElement(F.a, {
|
|
gutterBottom: !0,
|
|
className: a.answer
|
|
}, e.value))
|
|
}) : r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 12,
|
|
sm: 6
|
|
}, r.createElement(F.a, {
|
|
gutterBottom: !0,
|
|
className: a.answer
|
|
}, "There is no data yet."))
|
|
}, e.deleteDataStorage = function() {
|
|
var t = e.props.user;
|
|
t.data_storages && e.props.deleteDataStorage(t.data_storages[0].mainTitle, t.uid)
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props.classes;
|
|
return r.createElement("div", {
|
|
className: e.paper
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 12,
|
|
style: {
|
|
display: "flex",
|
|
justifyContent: "space-between"
|
|
}
|
|
}, r.createElement(F.a, {
|
|
variant: "h6",
|
|
gutterBottom: !0,
|
|
className: e.title,
|
|
style: {
|
|
paddingLeft: 0,
|
|
paddingTop: 0
|
|
}
|
|
}, "Additional data storage")), this.renderDeleteButton(), r.createElement(I.a, {
|
|
container: !0,
|
|
spacing: 8
|
|
}, this.getQuestionnaire()))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Mm = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
textField: {
|
|
marginLeft: e.spacing(1),
|
|
marginRight: e.spacing(1),
|
|
width: "75%"
|
|
},
|
|
paper: {
|
|
padding: "20px 24px 24px 24px"
|
|
},
|
|
title: {
|
|
marginBottom: e.spacing(3),
|
|
letterSpacing: "0.15px",
|
|
fontWeight: 600,
|
|
paddingLeft: 26,
|
|
paddingTop: 26
|
|
},
|
|
deleteInfo: {
|
|
letterSpacing: "0.4px",
|
|
fontWeight: "bold",
|
|
fontSize: "14px",
|
|
color: "rgba(151, 151, 151, 1)",
|
|
cursor: "pointer"
|
|
},
|
|
question: {
|
|
color: "rgba(0, 0, 0, 0.47)",
|
|
fontSize: "14px",
|
|
lineHeight: "18px",
|
|
fontWeight: "normal"
|
|
},
|
|
answer: {
|
|
color: "rgba(0, 0, 0, 0.87)",
|
|
fontSize: "16px",
|
|
lineHeight: "22px",
|
|
fontWeight: "normal"
|
|
},
|
|
cancelIcon: {
|
|
color: "rgba(151, 151, 151, 1)",
|
|
fontSize: "20px",
|
|
marginLeft: "4px",
|
|
cursor: "pointer"
|
|
}
|
|
})
|
|
})(Um),
|
|
Bm = [{
|
|
value: "Pending",
|
|
key: "pending"
|
|
}, {
|
|
value: "Active",
|
|
key: "active"
|
|
}, {
|
|
value: "Banned",
|
|
key: "banned"
|
|
}],
|
|
Wm = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).getSelectMenuItems = function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e.key,
|
|
value: e.key
|
|
}, e.value)
|
|
}, e.getSuperAdminMenuItem = function() {
|
|
var t = e.props,
|
|
a = t.user,
|
|
n = t.classes,
|
|
i = t.currentUser;
|
|
return i && "superadmin" === i.role && r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 5
|
|
}, r.createElement(sg.a, {
|
|
fullWidth: !0,
|
|
className: n.formControl
|
|
}, r.createElement(jg.a, {
|
|
htmlFor: "role-label-placeholder"
|
|
}, "Role"), r.createElement(Tg.a, {
|
|
value: a.role,
|
|
onChange: e.props.handleChangeRole,
|
|
input: r.createElement(cg.a, {
|
|
id: "role-label-placeholder"
|
|
})
|
|
}, R().length && R().sort(function(e, t) {
|
|
return e.value.localeCompare(t.value)
|
|
}).map(function(t) {
|
|
return e.getRoleTypes(t)
|
|
}))))
|
|
}, e.getFeeGroupMenuItem = function() {
|
|
var t = e.props,
|
|
a = t.userFeeGroup,
|
|
n = t.classes,
|
|
i = t.tradingFeeGroups;
|
|
return r.createElement(sg.a, {
|
|
fullWidth: !0,
|
|
className: n.formControl
|
|
}, r.createElement(jg.a, {
|
|
htmlFor: "fee-group-label-placeholder"
|
|
}, "Fee group"), r.createElement(Tg.a, {
|
|
value: a.group,
|
|
onChange: e.props.handleChangeFeeGroup,
|
|
input: r.createElement(cg.a, {
|
|
id: "fee-group-label-placeholder"
|
|
}),
|
|
disabled: !i.length
|
|
}, i.map(function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e,
|
|
value: e
|
|
}, e)
|
|
})))
|
|
}, e.getRoleTypes = function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e.key,
|
|
value: e.key
|
|
}, e.value)
|
|
}, e.renderEmailButton = function() {
|
|
var t = e.props,
|
|
a = t.user,
|
|
n = t.classes;
|
|
return !(a && a.labels && a.labels.find(function(e) {
|
|
return "email" === e.key && "verified" === e.value
|
|
})) && r.createElement(L.a, {
|
|
className: n.editButton,
|
|
onClick: e.props.resendEmail
|
|
}, r.createElement(F.a, {
|
|
variant: "caption",
|
|
className: n.btnLabel
|
|
}, "Resend email"))
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this,
|
|
t = this.props,
|
|
a = t.classes,
|
|
n = t.user,
|
|
i = t.handleChangeUserState,
|
|
o = t.handleChangeUserOTP;
|
|
return r.createElement("div", {
|
|
className: a.paper
|
|
}, r.createElement(I.a, {
|
|
container: !0
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 12,
|
|
className: a.gridRow
|
|
}, r.createElement(F.a, {
|
|
variant: "h6",
|
|
className: a.title
|
|
}, "Settings")), r.createElement(I.a, {
|
|
container: !0,
|
|
justify: "flex-start",
|
|
item: !0,
|
|
xs: 12,
|
|
className: a.gridRow,
|
|
direction: "row"
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 5
|
|
}, r.createElement(sg.a, {
|
|
fullWidth: !0,
|
|
className: a.formControl
|
|
}, r.createElement(jg.a, {
|
|
htmlFor: "state-label-placeholder"
|
|
}, "Status"), r.createElement(Tg.a, {
|
|
value: n.state,
|
|
onChange: i,
|
|
input: r.createElement(cg.a, {
|
|
id: "state-label-placeholder"
|
|
})
|
|
}, Bm.map(function(t) {
|
|
return e.getSelectMenuItems(t)
|
|
})))), r.createElement(I.a, {
|
|
container: !0,
|
|
item: !0,
|
|
justify: "flex-start",
|
|
xs: 5
|
|
}, r.createElement(N.a, {
|
|
id: "referrer_uid",
|
|
value: n.referral_uid,
|
|
label: "Referrer ID",
|
|
InputLabelProps: {
|
|
shrink: !0,
|
|
disabled: !0
|
|
},
|
|
fullWidth: !0
|
|
}))), r.createElement(I.a, {
|
|
container: !0,
|
|
justify: "flex-start",
|
|
item: !0,
|
|
xs: 12,
|
|
className: a.gridRow,
|
|
direction: "row"
|
|
}, this.getSuperAdminMenuItem(), r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 5
|
|
}, this.getFeeGroupMenuItem())), r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 12,
|
|
className: a.gridRowCenter
|
|
}, r.createElement(I.a, {
|
|
container: !0,
|
|
justify: "flex-start",
|
|
alignItems: "center",
|
|
item: !0,
|
|
xs: 4
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 12
|
|
}, r.createElement(F.a, {
|
|
variant: "caption",
|
|
gutterBottom: !0
|
|
}, "Authorization 2FA")), r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 12
|
|
}, r.createElement(F.a, null, n.otp ? "Enabled" : "Disabled"))), r.createElement(I
|
|
.a, {
|
|
container: !0,
|
|
item: !0,
|
|
xs: 2,
|
|
justify: "flex-start",
|
|
alignItems: "center"
|
|
}, r.createElement(re.a, {
|
|
checked: n.otp,
|
|
onChange: o,
|
|
color: "primary"
|
|
})), this.renderEmailButton())))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Hm = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
paper: {
|
|
padding: "20px 24px 12px 24px"
|
|
},
|
|
formControl: {
|
|
marginBottom: e.spacing(3)
|
|
},
|
|
gridRow: {
|
|
justifyContent: "space-between",
|
|
paddingRight: e.spacing(5),
|
|
width: "50%"
|
|
},
|
|
gridRowCenter: {
|
|
display: "flex",
|
|
alignItems: "center"
|
|
},
|
|
title: {
|
|
marginBottom: e.spacing(3),
|
|
letterSpacing: "0.15px",
|
|
fontWeight: 600
|
|
},
|
|
editButton: {
|
|
color: "#ffffff",
|
|
background: "#0030ae",
|
|
padding: "3px 8px",
|
|
height: 34,
|
|
width: 115,
|
|
marginRight: 40,
|
|
"&:hover": {
|
|
background: "#002484"
|
|
},
|
|
position: "absolute",
|
|
right: 40
|
|
},
|
|
btnLabel: {
|
|
color: "#ffffff",
|
|
lineHeight: "16px",
|
|
fontWeight: 500,
|
|
fontSize: "0.875rem",
|
|
letterSpacing: .4
|
|
}
|
|
})
|
|
})(Wm),
|
|
Vm = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).getWalletLabel = function(t) {
|
|
var a = e.props.classes;
|
|
return r.createElement(F.a, {
|
|
className: te()({
|
|
[a.switcherActive]: t,
|
|
[a.switcherDisabled]: !t
|
|
})
|
|
}, t ? "Active" : "Disabled")
|
|
}, e.handleChangeInput = function(t, a) {
|
|
return e.props.handleChangeInput(t, a)
|
|
}, e.handleChangeSettings = function(t, a) {
|
|
return e.props.handleChangeSettings(t, a)
|
|
}, e.submit = function(t) {
|
|
t && t.preventDefault(), e.props.handleSubmit()
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this,
|
|
t = this.props,
|
|
a = t.name,
|
|
n = t.blockchain_key,
|
|
i = t.currency_id,
|
|
o = t.gateway,
|
|
s = t.address,
|
|
c = t.kind,
|
|
l = t.max_balance,
|
|
u = t.settings,
|
|
d = t.currencies,
|
|
p = t.blockchainKeys,
|
|
h = t.classes,
|
|
g = t.status,
|
|
m = t.kinds,
|
|
f = t.isBitGo,
|
|
b = t.gateways,
|
|
y = "active" === g ? "disabled" : "active",
|
|
v = "active" === g;
|
|
return r.createElement(D.a, {
|
|
className: h.root
|
|
}, r.createElement("div", {
|
|
className: h.separateBlocks
|
|
}, r.createElement("div", {
|
|
className: h.walletTitle
|
|
}, r.createElement(N.a, {
|
|
id: "name",
|
|
label: "Name",
|
|
onChange: function(t) {
|
|
return e.handleChangeInput(t.target.value, "name")
|
|
},
|
|
className: te()(h.textField, h.dense),
|
|
margin: "dense",
|
|
value: a
|
|
}), r.createElement("div", {
|
|
className: h.switcher
|
|
}, r.createElement(F.a, {
|
|
className: h.status
|
|
}, "Status"), r.createElement(re.a, {
|
|
checked: v,
|
|
onChange: function(t) {
|
|
return e.handleChangeInput(y, "status")
|
|
},
|
|
value: g,
|
|
color: "primary"
|
|
}), this.getWalletLabel(v))), r.createElement(N.a, {
|
|
id: "blockchain_key",
|
|
select: !0,
|
|
label: "Blockchain Key",
|
|
value: n,
|
|
onChange: function(t) {
|
|
return e.handleChangeInput(t.target.value, "blockchain_key")
|
|
},
|
|
fullWidth: !0,
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
},
|
|
margin: "normal"
|
|
}, p.map(function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e.key,
|
|
value: e.key
|
|
}, e.key)
|
|
}), ")}"), r.createElement(N.a, {
|
|
id: "gateway",
|
|
select: !0,
|
|
label: "Gateway Client",
|
|
value: o,
|
|
onChange: function(t) {
|
|
return e.handleChangeInput(t.target.value, "gateway")
|
|
},
|
|
fullWidth: !0,
|
|
InputLabelProps: {
|
|
shrink: !0
|
|
},
|
|
margin: "normal"
|
|
}, b.map(function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e,
|
|
value: e
|
|
}, e)
|
|
})), r.createElement(N.a, {
|
|
id: "address",
|
|
label: "Address",
|
|
placeholder: "Enter Address",
|
|
fullWidth: !0,
|
|
margin: "normal",
|
|
value: s,
|
|
onChange: function(t) {
|
|
return e.handleChangeInput(t.target.value, "address")
|
|
}
|
|
}), r.createElement(N.a, {
|
|
id: "selectCurrencyId",
|
|
select: !0,
|
|
label: "Currency Id",
|
|
value: i,
|
|
onChange: function(t) {
|
|
return e.handleChangeInput(t.target.value, "currency_id")
|
|
},
|
|
fullWidth: !0,
|
|
margin: "normal"
|
|
}, d.map(function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e.code,
|
|
value: e.code
|
|
}, e.code)
|
|
}))), r.createElement("div", {
|
|
className: h.separateBlocks
|
|
}, r.createElement(N.a, {
|
|
id: "kind",
|
|
select: !0,
|
|
label: "Kind",
|
|
value: c,
|
|
className: h.extraSpaceTop,
|
|
onChange: function(t) {
|
|
return e.handleChangeInput(t.target.value, "kind")
|
|
},
|
|
fullWidth: !0,
|
|
margin: "normal"
|
|
}, m.map(function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e,
|
|
value: e
|
|
}, e)
|
|
})), r.createElement(N.a, {
|
|
id: "max_balance",
|
|
label: "Maximum Balance",
|
|
value: l,
|
|
onChange: function(t) {
|
|
return e.handleChangeInput(String(t.target.value), "max_balance")
|
|
},
|
|
fullWidth: !0,
|
|
type: "number",
|
|
margin: "normal"
|
|
}), r.createElement(N.a, {
|
|
id: "uri",
|
|
label: "Uri",
|
|
placeholder: "Enter Uri",
|
|
type: "text",
|
|
fullWidth: !0,
|
|
margin: "normal",
|
|
value: u.uri,
|
|
onChange: function(t) {
|
|
return e.handleChangeSettings(t.target.value, "uri")
|
|
}
|
|
}), r.createElement(N.a, {
|
|
id: "secret",
|
|
label: "Secret",
|
|
placeholder: "Password",
|
|
fullWidth: !0,
|
|
margin: "normal",
|
|
type: "password",
|
|
value: u.secret,
|
|
onChange: function(t) {
|
|
return e.handleChangeSettings(t.target.value, "secret")
|
|
}
|
|
}), r.createElement("div", {
|
|
className: te()(h.switcher, {
|
|
[h.textFieldLast]: !f
|
|
})
|
|
}, r.createElement(F.a, {
|
|
className: h.status
|
|
}, "BitGo"), r.createElement(re.a, {
|
|
checked: f,
|
|
onChange: function(t) {
|
|
return e.handleChangeInput(!f, "isBitGo")
|
|
},
|
|
color: "primary"
|
|
})), f ? this.renderBitGoFields() : null, r.createElement(F.a, {
|
|
variant: "h6",
|
|
color: "inherit",
|
|
className: h.grow
|
|
}), r.createElement(L.a, {
|
|
onClick: this.submit,
|
|
variant: "contained",
|
|
color: "primary",
|
|
className: h.submit
|
|
}, "Submit")))
|
|
}
|
|
}, {
|
|
key: "renderBitGoFields",
|
|
value: function() {
|
|
var e = this,
|
|
t = this.props,
|
|
a = t.settings,
|
|
n = t.classes;
|
|
return r.createElement(r.Fragment, null, r.createElement(N.a, {
|
|
id: "access_token",
|
|
label: "Access Token",
|
|
placeholder: "Access Token",
|
|
fullWidth: !0,
|
|
margin: "normal",
|
|
type: "text",
|
|
value: a.access_token,
|
|
onChange: function(t) {
|
|
return e.handleChangeSettings(t.target.value, "access_token")
|
|
}
|
|
}), r.createElement("div", {
|
|
className: n.switcher
|
|
}, r.createElement(F.a, {
|
|
className: n.status
|
|
}, "Testnet"), r.createElement(re.a, {
|
|
checked: a.testnet,
|
|
onChange: function(t) {
|
|
return e.handleChangeSettings(!a.testnet, "testnet")
|
|
},
|
|
color: "primary"
|
|
})), r.createElement(N.a, {
|
|
className: n.textFieldLast,
|
|
id: "wallet_id",
|
|
label: "Wallet id",
|
|
placeholder: "Wallet id",
|
|
fullWidth: !0,
|
|
margin: "normal",
|
|
type: "text",
|
|
value: a.wallet_id,
|
|
onChange: function(t) {
|
|
return e.handleChangeSettings(t.target.value, "wallet_id")
|
|
}
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Gm = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
root: {
|
|
display: "flex",
|
|
padding: e.spacing(1),
|
|
paddingBottom: 25
|
|
},
|
|
textField: {
|
|
marginLeft: e.spacing(1),
|
|
marginRight: e.spacing(1),
|
|
width: 300
|
|
},
|
|
dense: {
|
|
margin: 0
|
|
},
|
|
submit: {
|
|
marginTop: e.spacing(1),
|
|
marginBottom: e.spacing(1),
|
|
marginLeft: e.spacing(1),
|
|
marginRight: e.spacing(2),
|
|
bottom: 0,
|
|
right: 0,
|
|
position: "absolute"
|
|
},
|
|
grow: {
|
|
flexGrow: 1
|
|
},
|
|
separateBlocks: {
|
|
padding: "10px 20px",
|
|
width: "50%",
|
|
"&:first-child": {
|
|
borderRight: "1px solid #e6e6e6"
|
|
},
|
|
"&:last-child": {
|
|
position: "relative"
|
|
}
|
|
},
|
|
switcher: {
|
|
position: "relative",
|
|
float: "right"
|
|
},
|
|
status: {
|
|
position: "absolute",
|
|
top: 14,
|
|
right: 85,
|
|
color: "#999999"
|
|
},
|
|
switcherActive: {
|
|
color: "#00A41A",
|
|
margin: 0,
|
|
textAlign: "center"
|
|
},
|
|
switcherDisabled: {
|
|
color: "#E23328",
|
|
margin: 0,
|
|
textAlign: "center"
|
|
},
|
|
walletTitle: {
|
|
marginBottom: "50px"
|
|
},
|
|
json: {
|
|
position: "relative",
|
|
border: "1px solid #e6e6e6",
|
|
borderRadius: 5,
|
|
padding: 20,
|
|
width: "100%",
|
|
marginTop: 50
|
|
},
|
|
jsonLegend: {
|
|
top: "-8px",
|
|
left: "13px",
|
|
position: "absolute",
|
|
fontSize: "14px",
|
|
background: "#FFFFFF"
|
|
},
|
|
editIcon: {
|
|
"& svg": {
|
|
fontSize: 40,
|
|
position: "relative",
|
|
top: 8,
|
|
left: 8
|
|
}
|
|
},
|
|
extraSpaceTop: {
|
|
marginTop: 38
|
|
},
|
|
textFieldLast: {
|
|
marginBottom: 70
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(Vm),
|
|
zm = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).getMemberInfo = function() {
|
|
var t = e.props,
|
|
a = t.classes,
|
|
n = t.user,
|
|
i = t.account;
|
|
return r.createElement(D.a, {
|
|
className: a.paper
|
|
}, r.createElement("div", {
|
|
className: a.row
|
|
}, r.createElement(F.a, {
|
|
variant: "h6"
|
|
}, "Member info")), r.createElement("div", {
|
|
className: a.block
|
|
}, r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "Email"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, n && n.email)), r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "UID"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, n && n.uid)), r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "Created"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, n && Wa(n.created_at, "fullDate")))), r.createElement("div", {
|
|
className: a.row
|
|
}, r.createElement(F.a, {
|
|
variant: "h6"
|
|
}, "Account info: ", i && i.currency.toUpperCase())), r.createElement("div", {
|
|
className: a.block
|
|
}, r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "Total balance"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, i && e.calculateTotal(i.locked, i.balance))), r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "Locked"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, i && i.locked)), r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "Available balance"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, i && i.balance))))
|
|
}, e.getWithdraw = function() {
|
|
var t = e.props,
|
|
a = t.classes,
|
|
n = t.withdraw;
|
|
return r.createElement(D.a, {
|
|
className: a.paper
|
|
}, r.createElement("div", {
|
|
className: a.row
|
|
}, r.createElement(F.a, {
|
|
variant: "h6"
|
|
}, "Withdraw"), n && e.renderActions(n.state)), r.createElement("div", {
|
|
className: a.block
|
|
}, r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "ID"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, n && n.tid)), r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "Txid"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, n && n.blockchain_txid)), r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "Date"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, n && Wa(n.created_at, "fullDate"))), r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "State"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, n && n.state)), r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "Email"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, n && n.email)), r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "Recipient Address"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, n && n.rid)), r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "Amount"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, n && n.amount))), n && e.renderLoadButton(n.state))
|
|
}, e.canProcess = function(e) {
|
|
return ["errored", "accepted", "skipped"].includes(e)
|
|
}, e.canReject = function(e) {
|
|
return ["errored", "accepted", "confirming"].includes(e)
|
|
}, e.renderLoadButton = function(t) {
|
|
if ("accepted" === t) {
|
|
var a = e.props,
|
|
n = a.classes,
|
|
i = a.txid;
|
|
return r.createElement("div", {
|
|
className: n.row
|
|
}, r.createElement(N.a, {
|
|
onChange: function(t) {
|
|
return e.props.handleChangeTxid(t.target.value)
|
|
},
|
|
className: n.dense,
|
|
margin: "normal",
|
|
type: "string",
|
|
value: i,
|
|
placeholder: "Enter txid here",
|
|
label: "Txid"
|
|
}), r.createElement(L.a, {
|
|
variant: "contained",
|
|
className: "".concat(n.loadBtn, " ").concat(!i.length && n.shadowedBtn),
|
|
onClick: e.handleLoadWithdraw
|
|
}, "Load withdraw"))
|
|
}
|
|
return null
|
|
}, e.renderActions = function(t) {
|
|
return r.createElement("div", null, e.canReject(t) && e.renderRejectButton("errored" === t ?
|
|
"Fail" : "Reject"), e.canProcess(t) && e.renderProcessButton())
|
|
}, e.renderProcessButton = function(t) {
|
|
return r.createElement(L.a, {
|
|
variant: "contained",
|
|
className: e.props.classes.blueBtn,
|
|
onClick: e.handleProcessWithdraw
|
|
}, t || "Process")
|
|
}, e.renderRejectButton = function(t) {
|
|
return r.createElement(L.a, {
|
|
variant: "contained",
|
|
className: e.props.classes.redBtn,
|
|
onClick: e.handleRejectWithdraw
|
|
}, t || "Reject")
|
|
}, e.calculateTotal = function(t, a) {
|
|
var n = e.props.precision,
|
|
r = Number(t) + Number(a);
|
|
return Pa(r, n)
|
|
}, e.handleRejectWithdraw = function() {
|
|
return e.props.handleRejectWithdraw()
|
|
}, e.handleProcessWithdraw = function() {
|
|
return e.props.handleProcessWithdraw()
|
|
}, e.handleLoadWithdraw = function() {
|
|
return e.props.handleLoadWithdraw()
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props.classes;
|
|
return r.createElement("div", {
|
|
className: e.root
|
|
}, this.getMemberInfo(), this.getWithdraw())
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Km = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
root: {
|
|
display: "flex",
|
|
padding: e.spacing(1),
|
|
paddingBottom: 25,
|
|
width: "100%",
|
|
justifyContent: "space-between"
|
|
},
|
|
paper: {
|
|
padding: "14px 26px",
|
|
width: "49%"
|
|
},
|
|
row: {
|
|
display: "flex",
|
|
paddingBottom: 14,
|
|
justifyContent: "space-between",
|
|
alignItems: "center"
|
|
},
|
|
block: {
|
|
display: "flex",
|
|
flexDirection: "column",
|
|
marginBottom: 14
|
|
},
|
|
infoRow: {
|
|
display: "flex",
|
|
flexDirection: "column",
|
|
padding: "8px 0"
|
|
},
|
|
blueBtn: {
|
|
background: "#0030AE",
|
|
color: "#FFFFFF",
|
|
textTransform: "none",
|
|
width: 100,
|
|
fontSize: 12,
|
|
lineHeight: 1
|
|
},
|
|
redBtn: {
|
|
background: "#E23328",
|
|
color: "#FFFFFF",
|
|
textTransform: "none",
|
|
width: 100,
|
|
marginRight: 30,
|
|
lineHeight: 1,
|
|
fontSize: 12
|
|
},
|
|
formControl: {
|
|
flex: 1,
|
|
marginRight: 10
|
|
},
|
|
dense: {
|
|
paddingTop: 10.5,
|
|
paddingBottom: 10.5
|
|
},
|
|
shadowedBtn: {
|
|
opacity: .5
|
|
},
|
|
loadBtn: {
|
|
background: "#0030AE",
|
|
color: "#FFFFFF",
|
|
textTransform: "none",
|
|
width: 120,
|
|
fontSize: 12,
|
|
lineHeight: 1,
|
|
margin: "24px 0 0 24px"
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(zm),
|
|
Zm = a(206),
|
|
Ym = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).getMemberInfo = function() {
|
|
var t = e.props,
|
|
a = t.classes,
|
|
n = t.withdraw;
|
|
return r.createElement(D.a, {
|
|
className: a.paper
|
|
}, r.createElement("div", {
|
|
className: a.row
|
|
}, r.createElement(F.a, {
|
|
variant: "h6"
|
|
}, n && n.email)), r.createElement("div", {
|
|
className: a.rowWithBorder
|
|
}, r.createElement("div", {
|
|
className: a.block
|
|
}, r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "State"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, n && xa(n.state))), r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "Created"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, n && Wa(n.created_at, "fullDate"))), r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "UID"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, n && n.uid)), r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "Amount"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, n && n.amount)), r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "Currency"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, n && n.currency.toUpperCase()))), r.createElement("div", {
|
|
className: a.block
|
|
}, r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "Full name"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, n && n.beneficiary && n.beneficiary.data.full_name || "-")), r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "Address"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, n && n.beneficiary && n.beneficiary.data.address || "-")), r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "Country"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, e.displayCountry())), r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "Account number"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, n && n.account)), r.createElement("div", {
|
|
className: a.infoRow
|
|
}, r.createElement(F.a, {
|
|
variant: "caption"
|
|
}, "RID"), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, n && n.rid)))), n && n.beneficiary && n.beneficiary.data ? e.renderBeneficiaryData(n
|
|
.beneficiary.data) : null, n && "accepted" === n.state && e.renderActions())
|
|
}, e.renderBeneficiaryData = function(t) {
|
|
var a = e.props.classes;
|
|
return r.createElement("div", {
|
|
className: a.row
|
|
}, r.createElement("div", {
|
|
className: a.blockWrap
|
|
}, Object.keys(t).map(function(n) {
|
|
return r.createElement("div", {
|
|
className: a.infoRowWrap,
|
|
key: n
|
|
}, r.createElement(F.a, {
|
|
variant: "caption",
|
|
className: a.infoRowItemTitle
|
|
}, e.handleFormatKeyField(n)), r.createElement(F.a, {
|
|
variant: "body2"
|
|
}, t[n]))
|
|
})))
|
|
}, e.renderActions = function() {
|
|
var t = e.props.classes;
|
|
return r.createElement("div", {
|
|
className: t.rowEnd
|
|
}, r.createElement("div", null, r.createElement(L.a, {
|
|
variant: "contained",
|
|
className: t.redBtn,
|
|
onClick: e.props.handleRejectWithdraw
|
|
}, "Reject"), r.createElement(L.a, {
|
|
variant: "contained",
|
|
className: t.blueBtn,
|
|
onClick: e.props.handleProcessWithdraw
|
|
}, "Process")))
|
|
}, e.displayCountry = function() {
|
|
var t = e.props.withdraw;
|
|
return t && t.beneficiary && t.beneficiary.data && t.beneficiary.data.country ? void 0 !== Zm
|
|
.countries[t.beneficiary.data.country.toUpperCase()] ? Zm.countries[t.beneficiary.data.country
|
|
.toUpperCase()].name : t.beneficiary.data.country : "-"
|
|
}, e.handleFormatKeyField = function(e) {
|
|
return e.replace(/_/g, " ")
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props.classes;
|
|
return r.createElement("div", {
|
|
className: e.root
|
|
}, this.getMemberInfo())
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
qm = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
root: {
|
|
display: "flex",
|
|
padding: e.spacing(1),
|
|
paddingBottom: 25,
|
|
width: "100%",
|
|
justifyContent: "space-between"
|
|
},
|
|
paper: {
|
|
padding: "14px 26px",
|
|
width: "100%"
|
|
},
|
|
row: {
|
|
display: "flex",
|
|
paddingBottom: 14,
|
|
justifyContent: "space-between",
|
|
alignItems: "center"
|
|
},
|
|
rowEnd: {
|
|
display: "flex",
|
|
paddingBottom: 14,
|
|
justifyContent: "flex-end",
|
|
alignItems: "center"
|
|
},
|
|
rowWithBorder: {
|
|
display: "flex",
|
|
paddingBottom: 14,
|
|
marginBottom: 28,
|
|
justifyContent: "space-between",
|
|
alignItems: "center",
|
|
borderBottom: "1px solid rgba(0,0,0,0.1)"
|
|
},
|
|
block: {
|
|
display: "flex",
|
|
flexDirection: "column",
|
|
marginBottom: 14,
|
|
width: "50%"
|
|
},
|
|
blockWrap: {
|
|
display: "flex",
|
|
flexWrap: "wrap",
|
|
marginBottom: 14,
|
|
width: "100%"
|
|
},
|
|
infoRow: {
|
|
display: "flex",
|
|
flexDirection: "column",
|
|
padding: "8px 0"
|
|
},
|
|
infoRowWrap: {
|
|
display: "flex",
|
|
flexDirection: "column",
|
|
padding: "8px 0",
|
|
width: "50%"
|
|
},
|
|
infoRowItemTitle: {
|
|
textTransform: "capitalize"
|
|
},
|
|
blueBtn: {
|
|
background: "#0030AE",
|
|
color: "#FFFFFF",
|
|
textTransform: "none",
|
|
width: 100,
|
|
fontSize: 12,
|
|
lineHeight: 1
|
|
},
|
|
redBtn: {
|
|
background: "#E23328",
|
|
color: "#FFFFFF",
|
|
textTransform: "none",
|
|
width: 100,
|
|
marginRight: 30,
|
|
lineHeight: 1,
|
|
fontSize: 12
|
|
},
|
|
formControl: {
|
|
flex: 1,
|
|
marginRight: 10
|
|
},
|
|
dense: {
|
|
paddingTop: 10.5,
|
|
paddingBottom: 10.5
|
|
},
|
|
shadowedBtn: {
|
|
opacity: .5
|
|
},
|
|
loadBtn: {
|
|
background: "#0030AE",
|
|
color: "#FFFFFF",
|
|
textTransform: "none",
|
|
width: 120,
|
|
fontSize: 12,
|
|
lineHeight: 1,
|
|
margin: "24px 0 0 24px"
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(Ym),
|
|
Jm = {
|
|
AdjustmentsCreate: X,
|
|
AdjustmentsInfo: H,
|
|
AlertMessage: ne,
|
|
BlockchainComponent: oe,
|
|
CurrencyComponent: he,
|
|
CurrentNavBar: og,
|
|
DateTimePicker: lg,
|
|
DepositInfo: dg,
|
|
DocumentCarousel: hg,
|
|
FilterElement: yg,
|
|
Footer: wg,
|
|
HeaderIcons: Og,
|
|
InfoPopper: xg,
|
|
LoginBox: Sg,
|
|
MarketComponent: Lg,
|
|
CancelOrderModal: $g,
|
|
CancelOrdersModal: Ig,
|
|
CreateDepositModal: Fg,
|
|
EditLabel: Bg,
|
|
Modal: Vg,
|
|
Navbar: lm,
|
|
PermissionModal: zg,
|
|
RestrictionModal: qg,
|
|
Table: xm,
|
|
Tabs: pm,
|
|
TradingFeeModal: Qg,
|
|
UserData: _m,
|
|
UserKYC: Im,
|
|
UserLabel: Nm,
|
|
UserProfile: Pm,
|
|
UserProfileComparison: Lm,
|
|
UserQuestionnaire: Mm,
|
|
UserSettings: Hm,
|
|
WithdrawCryptoComponent: Km,
|
|
WithdrawFiatComponent: qm,
|
|
WalletComponent: Gm
|
|
},
|
|
Qm = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).adjustmentsRows = [{
|
|
key: "id",
|
|
alignRight: !1,
|
|
label: "ID"
|
|
}, {
|
|
key: "reason",
|
|
alignRight: !1,
|
|
label: "Reason"
|
|
}, {
|
|
key: "amount",
|
|
alignRight: !1,
|
|
label: "Amount"
|
|
}, {
|
|
key: "currency",
|
|
alignRight: !1,
|
|
label: "Currency"
|
|
}, {
|
|
key: "category",
|
|
alignRight: !1,
|
|
label: "Category"
|
|
}, {
|
|
key: "creator_uid",
|
|
alignRight: !1,
|
|
label: "Creator ID"
|
|
}, {
|
|
key: "receiving_account_code",
|
|
alignRight: !1,
|
|
label: "Receiving Account"
|
|
}, {
|
|
key: "state",
|
|
alignRight: !1,
|
|
label: "State"
|
|
}, {
|
|
key: "arrow_icon",
|
|
alignRight: !0,
|
|
label: ""
|
|
}], n.filterData = [{
|
|
property: "currency",
|
|
value: "",
|
|
title: "Currency"
|
|
}, {
|
|
property: "state",
|
|
value: "",
|
|
title: "State"
|
|
}, {
|
|
property: "category",
|
|
value: "",
|
|
title: "Category"
|
|
}, {
|
|
property: "from",
|
|
value: null
|
|
}, {
|
|
property: "to",
|
|
value: null
|
|
}], n.handleSubmitFilter = function(e) {
|
|
n.setState({
|
|
filterCurrency: Aa(e, "currency"),
|
|
filterCategory: Aa(e, "category"),
|
|
filterState: Aa(e, "state"),
|
|
filterFrom: Aa(e, "from"),
|
|
filterTo: Aa(e, "to"),
|
|
page: 0
|
|
});
|
|
var t = {
|
|
currency: Aa(e, "currency"),
|
|
category: Aa(e, "category"),
|
|
state: Aa(e, "state"),
|
|
from: Aa(e, "from"),
|
|
to: Aa(e, "to"),
|
|
page: 1,
|
|
limit: n.state.rowsPerPage,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getAdjustmentsList(t)
|
|
}, n.onRowClick = function(e) {
|
|
n.props.history.replace("/tower/accountings/adjustments/".concat(e.id))
|
|
}, n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetAdjasments(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetAdjasments(e, 0)
|
|
}, n.handleGetAdjasments = function(e, t) {
|
|
var a = {
|
|
currency: n.state.filterCurrency,
|
|
category: n.state.filterCategory,
|
|
state: n.state.filterState,
|
|
from: null !== n.state.filterFrom ? n.state.filterFrom : "",
|
|
to: null !== n.state.filterTo ? n.state.filterTo : "",
|
|
page: t + 1,
|
|
limit: e,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getAdjustmentsList(a)
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O(),
|
|
filterCurrency: "",
|
|
filterState: "",
|
|
filterCategory: "",
|
|
filterFrom: null,
|
|
filterTo: null
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getAdjustmentsList({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
ordering: "desc"
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.page,
|
|
a = e.rowsPerPage,
|
|
n = this.props,
|
|
i = n.total,
|
|
o = n.list,
|
|
s = py.FilterContainer,
|
|
c = py.Table;
|
|
return r.createElement(r.Fragment, null, r.createElement(c, {
|
|
dataLength: i,
|
|
rows: this.adjustmentsRows,
|
|
data: o,
|
|
page: t,
|
|
rowsPerPage: a,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
handleRowOnClick: this.onRowClick
|
|
}), r.createElement(s, {
|
|
data: this.filterData,
|
|
handleSubmit: this.handleSubmitFilter,
|
|
api: "peatio"
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Xm = Object(o.b)(function(e) {
|
|
return {
|
|
list: On(e),
|
|
total: kn(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getAdjustmentsList: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: je,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
}
|
|
}
|
|
})(Object(xe.g)(Qm)),
|
|
$m = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++) r[i] = arguments[i];
|
|
return (e = t.call.apply(t, [this].concat(r))).handleReject = function() {
|
|
e.props.adjustment && e.props.updateAdjustment({
|
|
id: e.props.adjustment.id,
|
|
action: "reject"
|
|
})
|
|
}, e.handleAccept = function() {
|
|
e.props.adjustment && e.props.updateAdjustment({
|
|
id: e.props.adjustment.id,
|
|
action: "accept"
|
|
})
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getAdjustment({
|
|
id: Number(this.props.match.params.id)
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props.adjustment,
|
|
t = py.AdjustmentsInfo;
|
|
return r.createElement(t, {
|
|
adjustment: e,
|
|
handleReject: this.handleReject,
|
|
handleAccept: this.handleAccept
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
ef = Object(o.b)(function(e) {
|
|
return {
|
|
adjustment: xn(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getAdjustment: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Re,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
updateAdjustment: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Se,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
}
|
|
}
|
|
})($m),
|
|
tf = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).handleCreate = function() {
|
|
var e = {
|
|
reason: n.state.reason,
|
|
description: n.state.description,
|
|
amount: n.state.amount,
|
|
currency_id: n.state.currency,
|
|
asset_account_code: n.state.assetCode,
|
|
receiving_account_code: n.state.receivingAccountNumberCode,
|
|
receiving_member_uid: n.state.accountUID,
|
|
category: n.state.category
|
|
};
|
|
n.props.addAdjustment(e)
|
|
}, n.handleChangeValue = function(e, t) {
|
|
n.setState({
|
|
[t]: e
|
|
})
|
|
}, n.handleSetCurrency = function(e, t) {
|
|
var a = n.props.currencies.find(function(t) {
|
|
return t.code === e
|
|
}),
|
|
r = a ? "fiat" === a.type ? 101 : 102 : 0;
|
|
n.setState({
|
|
currency: e,
|
|
assetCode: r
|
|
})
|
|
}, n.state = {
|
|
page: 0,
|
|
reason: "",
|
|
currency: "",
|
|
amount: "",
|
|
assetCode: 0,
|
|
receivingAccountNumberCode: 0,
|
|
accountUID: "",
|
|
description: "",
|
|
category: ""
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getCurrenciesList({
|
|
page: this.state.page + 1,
|
|
limit: O()
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = py.AdjustmentsCreate;
|
|
return r.createElement(e, {
|
|
reason: this.state.reason,
|
|
currency: this.state.currency,
|
|
amount: this.state.amount,
|
|
assetCode: this.state.assetCode,
|
|
receivingAccountNumberCode: this.state.receivingAccountNumberCode,
|
|
accountUID: this.state.accountUID,
|
|
description: this.state.description,
|
|
handleCreate: this.handleCreate,
|
|
handleChangeValue: this.handleChangeValue,
|
|
handleSetCurrency: this.handleSetCurrency,
|
|
currencies: this.props.currencies,
|
|
category: this.state.category
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
af = Object(o.b)(function(e) {
|
|
return {
|
|
currencies: Qr(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
addAdjustment: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: _e,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
getCurrenciesList: function(t) {
|
|
return e(Mr(t))
|
|
}
|
|
}
|
|
})(tf),
|
|
nf = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++) r[i] = arguments[i];
|
|
return (e = t.call.apply(t, [this].concat(r))).handleRejectDeposit = function() {
|
|
var t = e.props.deposit;
|
|
e.props.getDepositReject({
|
|
id: t[0].id,
|
|
action: "reject"
|
|
})
|
|
}, e.handleAcceptDeposit = function() {
|
|
var t = e.props.deposit;
|
|
"fiat" === t[0].type ? e.props.getDepositAccept({
|
|
id: t[0].id,
|
|
action: "accept"
|
|
}) : e.props.getDepositAccept({
|
|
id: t[0].id,
|
|
action: "dispatch"
|
|
})
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getDepositItem({
|
|
tid: this.props.match.params.tid
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props.deposit,
|
|
t = py.DepositInfo;
|
|
return e && e.length && r.createElement(t, {
|
|
deposit: e[0],
|
|
handleRejectDeposit: this.handleRejectDeposit,
|
|
handleAcceptDeposit: this.handleAcceptDeposit
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
rf = Object(xe.g)(Object(o.b)(function(e) {
|
|
return {
|
|
deposit: xi(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getDepositItem: function(t) {
|
|
return e(mi(t))
|
|
},
|
|
getDepositReject: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: qe,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
getDepositAccept: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Ye,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
}
|
|
}
|
|
})(nf)),
|
|
of = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).depositsRows = [{
|
|
key: "id",
|
|
alignRight: !1,
|
|
label: "Id"
|
|
}, {
|
|
key: "uid",
|
|
alignRight: !1,
|
|
label: "UID",
|
|
linkSuffix: "/history#deposits"
|
|
}, {
|
|
key: "txid",
|
|
alignRight: !1,
|
|
label: "TxID"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !1,
|
|
label: "Created"
|
|
}, {
|
|
key: "amount",
|
|
alignRight: !1,
|
|
label: "Amount"
|
|
}, {
|
|
key: "currency",
|
|
alignRight: !1,
|
|
label: "Currency"
|
|
}, {
|
|
key: "confirmations",
|
|
alignRight: !1,
|
|
label: "Confirmations"
|
|
}, {
|
|
key: "state",
|
|
alignRight: !0,
|
|
label: "State"
|
|
}, {
|
|
key: "arrow_icon",
|
|
alignRight: !1,
|
|
label: ""
|
|
}], n.filterData = [{
|
|
property: "email",
|
|
value: "",
|
|
type: "email",
|
|
title: "Email"
|
|
}, {
|
|
property: "currency",
|
|
value: "",
|
|
title: "Currency"
|
|
}, {
|
|
property: "state",
|
|
value: "",
|
|
title: "State"
|
|
}, {
|
|
property: "from",
|
|
value: null
|
|
}, {
|
|
property: "to",
|
|
value: null
|
|
}], n.onRowClick = function(e) {
|
|
n.props.history.push("/tower/accountings/deposits/".concat(e.tid, "/details"))
|
|
}, n.getExplorerLink = function(e) {
|
|
var t = n.props.currencies.find(function(t) {
|
|
return t.code === e.currency
|
|
});
|
|
if (!e.txid || !t || !t.explorer_transaction) return e;
|
|
var a = t.explorer_transaction.replace("#{txid}", e.txid);
|
|
return Object(b.a)({
|
|
explorer_txid: a
|
|
}, e)
|
|
}, n.handleSubmitFilter = function(e) {
|
|
n.setState({
|
|
filterEmail: Aa(e, "email"),
|
|
filterState: Aa(e, "state"),
|
|
filterCurrency: Aa(e, "currency"),
|
|
filterFrom: Aa(e, "from"),
|
|
filterTo: Aa(e, "to"),
|
|
page: 0
|
|
});
|
|
var t = {
|
|
email: Aa(e, "email"),
|
|
state: Aa(e, "state"),
|
|
currency: Aa(e, "currency"),
|
|
from: Aa(e, "from"),
|
|
to: Aa(e, "to"),
|
|
page: 1,
|
|
limit: n.state.rowsPerPage,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getDepositsList(t)
|
|
}, n.handleChangeValue = function(e, t) {
|
|
n.setState({
|
|
[t]: e
|
|
})
|
|
}, n.getCurrencies = function() {
|
|
return n.props.currencies.filter(function(e) {
|
|
return "fiat" === e.type
|
|
}).map(function(e) {
|
|
return e.code
|
|
})
|
|
}, n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetDeposits(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetDeposits(e, 0)
|
|
}, n.handleGetDeposits = function(e, t) {
|
|
var a = {
|
|
email: n.state.filterEmail,
|
|
state: n.state.filterState,
|
|
currency: n.state.filterCurrency,
|
|
from: null !== n.state.filterFrom ? n.state.filterFrom : "",
|
|
to: null !== n.state.filterTo ? n.state.filterTo : "",
|
|
page: t + 1,
|
|
limit: e,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getDepositsList(a)
|
|
}, n.handleCreateDeposit = function() {
|
|
var e = n.state,
|
|
t = e.uid,
|
|
a = {
|
|
params: {
|
|
page: e.page,
|
|
limit: e.rowsPerPage,
|
|
ordering: "desc"
|
|
},
|
|
deposit: {
|
|
uid: t,
|
|
amount: e.amount,
|
|
currency: e.currency
|
|
}
|
|
};
|
|
n.props.getDepositAdd(a), n.props.changeNavbarModalStatus(!1)
|
|
}, n.toggleCreateModal = function() {
|
|
n.props.modalCreate && n.clearFields(), n.props.changeNavbarModalStatus(!1)
|
|
}, n.clearFields = function() {
|
|
n.setState({
|
|
uid: "",
|
|
amount: "",
|
|
currency: ""
|
|
})
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O(),
|
|
tid: -1,
|
|
amount: "",
|
|
currency: "",
|
|
uid: "",
|
|
filterEmail: "",
|
|
filterCurrency: "",
|
|
filterState: "",
|
|
filterFrom: null,
|
|
filterTo: null
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getDepositsList({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
ordering: "desc"
|
|
}), this.props.currencies.length || this.props.getCurrenciesList({
|
|
page: 1,
|
|
limit: 50
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.page,
|
|
a = e.rowsPerPage,
|
|
n = e.uid,
|
|
i = e.amount,
|
|
o = e.currency,
|
|
s = this.props,
|
|
c = s.total,
|
|
l = s.list,
|
|
u = s.modalCreate,
|
|
d = py.FilterContainer,
|
|
p = py.Table,
|
|
h = py.CreateDepositModal;
|
|
return r.createElement(r.Fragment, null, r.createElement(p, {
|
|
dataLength: c,
|
|
rows: this.depositsRows,
|
|
data: l.map(this.getExplorerLink),
|
|
page: t,
|
|
rowsPerPage: a,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
handleRowOnClick: this.onRowClick
|
|
}), r.createElement(h, {
|
|
open: u,
|
|
currency: o,
|
|
amount: i,
|
|
uid: n,
|
|
handleClick: this.handleCreateDeposit,
|
|
handleChangeSelect: this.handleChangeValue,
|
|
currencies: this.getCurrencies(),
|
|
modalClose: this.toggleCreateModal
|
|
}), r.createElement(d, {
|
|
data: this.filterData,
|
|
handleSubmit: this.handleSubmitFilter,
|
|
api: "peatio"
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
sf = Object(xe.g)(Object(o.b)(function(e) {
|
|
return {
|
|
list: Oi(e),
|
|
total: ki(e),
|
|
modalCreate: ls(e),
|
|
currencies: Qr(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getDepositsList: function(t) {
|
|
return e(pi(t))
|
|
},
|
|
changeNavbarModalStatus: function(t) {
|
|
return e(os(t))
|
|
},
|
|
getDepositAdd: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Je,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
getCurrenciesList: function(t) {
|
|
return e(Mr(t))
|
|
}
|
|
}
|
|
})(of)),
|
|
cf = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).labels = ["Assets", "Liabilities", "Revenue",
|
|
"Expenses"
|
|
], n.routes = ["/assets", "/liabilities", "/revenues", "/expenses"], n.handleChangeTab = function(e,
|
|
t) {
|
|
n.setState({
|
|
activeIndex: t
|
|
}), n.props.history.push("/tower/accountings/operations".concat(n.routes[t]))
|
|
}, n.renderContent = function() {
|
|
var e = n.state.activeIndex,
|
|
t = py.Assets,
|
|
a = py.Liabilities,
|
|
i = py.Revenues,
|
|
o = py.Expenses;
|
|
switch (e) {
|
|
case 0:
|
|
return r.createElement(t, null);
|
|
case 1:
|
|
return r.createElement(a, null);
|
|
case 2:
|
|
return r.createElement(i, null);
|
|
case 3:
|
|
return r.createElement(o, null);
|
|
default:
|
|
return
|
|
}
|
|
}, n.state = {
|
|
activeIndex: 0
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
var e = this,
|
|
t = this.props.history;
|
|
this.routes.map(function(a, n) {
|
|
return t.location.pathname.includes(a) && e.setState({
|
|
activeIndex: n
|
|
})
|
|
})
|
|
}
|
|
}, {
|
|
key: "UNSAFE_componentWillReceiveProps",
|
|
value: function(e) {
|
|
var t = this,
|
|
a = this.props.history;
|
|
e.history && e.history.location.pathname !== a.location.pathname && this.routes.map(
|
|
function(e, n) {
|
|
return a.location.pathname.includes(e) && t.setState({
|
|
activeIndex: n
|
|
})
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state.activeIndex,
|
|
t = py.Tabs;
|
|
return r.createElement(r.Fragment, null, r.createElement(t, {
|
|
labels: this.labels,
|
|
handleChange: this.handleChangeTab,
|
|
activeIndex: e
|
|
}), this.renderContent())
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
lf = Object(xe.g)(cf),
|
|
uf = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).withdrawsRows = [{
|
|
key: "id",
|
|
alignRight: !1,
|
|
label: "ID"
|
|
}, {
|
|
key: "email",
|
|
alignRight: !1,
|
|
label: "Email"
|
|
}, {
|
|
key: "currency",
|
|
alignRight: !1,
|
|
label: "Currency"
|
|
}, {
|
|
key: "blockchain_txid",
|
|
alignRight: !1,
|
|
label: "TxID"
|
|
}, {
|
|
key: "rid",
|
|
alignRight: !1,
|
|
label: "Recipient Address"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !1,
|
|
label: "Date"
|
|
}, {
|
|
key: "amount",
|
|
alignRight: !0,
|
|
label: "Amount"
|
|
}, {
|
|
key: "state",
|
|
alignRight: !1,
|
|
label: "State"
|
|
}, {
|
|
key: "arrow_icon",
|
|
alignRight: !1,
|
|
label: ""
|
|
}], n.onRowClick = function(e) {
|
|
n.props.history.push("/tower/accountings/withdrawals/".concat(e.id, "/details"))
|
|
}, n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetWithdraws(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetWithdraws(e, 0)
|
|
}, n.handleGetWithdraws = function(e, t) {
|
|
var a = n.props.uid;
|
|
n.props.getWithdrawsHistory({
|
|
page: t + 1,
|
|
limit: e,
|
|
uid: a
|
|
})
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O()
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
var e = this.props.uid;
|
|
e && this.props.getWithdrawsHistory({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
uid: e || ""
|
|
})
|
|
}
|
|
}, {
|
|
key: "UNSAFE_componentWillReceiveProps",
|
|
value: function(e) {
|
|
var t = this.props.uid;
|
|
e.uid && e.uid !== t && this.props.getWithdrawsHistory({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
uid: e.uid
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.page,
|
|
a = e.rowsPerPage,
|
|
n = this.props,
|
|
i = n.total,
|
|
o = n.list,
|
|
s = py.Table;
|
|
return r.createElement(s, {
|
|
dataLength: i,
|
|
rows: this.withdrawsRows,
|
|
data: o,
|
|
page: t,
|
|
rowsPerPage: a,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
handleRowOnClick: this.onRowClick
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
df = Object(xe.g)(Object(o.b)(function(e) {
|
|
return {
|
|
list: $h(e),
|
|
total: eg(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getWithdrawsHistory: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: aa,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
}
|
|
}
|
|
})(uf)),
|
|
pf = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).labels = ["Coin", "Fiat"], n.handleChangeTab =
|
|
function(e, t) {
|
|
n.setState({
|
|
activeIndex: t
|
|
}), n.props.history.push("/tower/accountings/withdrawals-pending/".concat(0 === t ? "coin" :
|
|
"fiat"))
|
|
}, n.renderContent = function() {
|
|
var e = n.state.activeIndex,
|
|
t = py.WithdrawalsPendingCoin,
|
|
a = py.WithdrawalsPendingFiat;
|
|
switch (e) {
|
|
case 0:
|
|
return r.createElement(t, null);
|
|
case 1:
|
|
return r.createElement(a, null);
|
|
default:
|
|
return
|
|
}
|
|
}, n.state = {
|
|
activeIndex: 0
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.history.location.pathname.includes("/coin") ? this.setState({
|
|
activeIndex: 0
|
|
}) : this.setState({
|
|
activeIndex: 1
|
|
})
|
|
}
|
|
}, {
|
|
key: "UNSAFE_componentWillReceiveProps",
|
|
value: function(e) {
|
|
var t = this.props.history;
|
|
e.history && e.history.location.pathname !== t.location.pathname && (t.location.pathname
|
|
.includes("/coin") ? this.setState({
|
|
activeIndex: 0
|
|
}) : this.setState({
|
|
activeIndex: 1
|
|
}))
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state.activeIndex,
|
|
t = py.Tabs;
|
|
return r.createElement(r.Fragment, null, r.createElement(t, {
|
|
labels: this.labels,
|
|
handleChange: this.handleChangeTab,
|
|
activeIndex: e
|
|
}), this.renderContent())
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
hf = Object(xe.g)(pf),
|
|
gf = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).labels = ["Coin", "Fiat"], n.handleChangeTab =
|
|
function(e, t) {
|
|
n.setState({
|
|
activeIndex: t
|
|
}), n.props.history.push("/tower/accountings/withdrawals/".concat(0 === t ? "coin" : "fiat"))
|
|
}, n.renderContent = function() {
|
|
var e = n.state.activeIndex,
|
|
t = py.WithdrawsCoin,
|
|
a = py.WithdrawsFiat;
|
|
switch (e) {
|
|
case 0:
|
|
return r.createElement(t, null);
|
|
case 1:
|
|
return r.createElement(a, null);
|
|
default:
|
|
return
|
|
}
|
|
}, n.state = {
|
|
activeIndex: 0
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.history.location.pathname.includes("/coin") ? this.setState({
|
|
activeIndex: 0
|
|
}) : this.setState({
|
|
activeIndex: 1
|
|
})
|
|
}
|
|
}, {
|
|
key: "UNSAFE_componentWillReceiveProps",
|
|
value: function(e) {
|
|
var t = this.props.history;
|
|
e.history && e.history.location.pathname !== t.location.pathname && (t.location.pathname
|
|
.includes("/coin") ? this.setState({
|
|
activeIndex: 0
|
|
}) : this.setState({
|
|
activeIndex: 1
|
|
}))
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state.activeIndex,
|
|
t = py.Tabs;
|
|
return r.createElement(r.Fragment, null, r.createElement(t, {
|
|
labels: this.labels,
|
|
handleChange: this.handleChangeTab,
|
|
activeIndex: e
|
|
}), this.renderContent())
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
mf = Object(xe.g)(gf),
|
|
ff = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).renderCryptoWithdraw = function() {
|
|
var e, t = n.state.txid,
|
|
a = n.props,
|
|
i = a.userBalance,
|
|
o = a.withdraw,
|
|
s = a.currency,
|
|
c = py.WithdrawCryptoComponent;
|
|
return o && (e = i && i.accounts.find(function(e) {
|
|
return e.currency === o.currency
|
|
})), r.createElement(c, {
|
|
handleProcessWithdraw: n.handleProcessWithdraw,
|
|
handleRejectWithdraw: n.handleRejectWithdraw,
|
|
handleLoadWithdraw: n.handleLoadWithdraw,
|
|
handleChangeTxid: n.handleChangeValue,
|
|
txid: t,
|
|
user: i,
|
|
withdraw: o,
|
|
account: e,
|
|
precision: s && s.precision
|
|
})
|
|
}, n.renderFiatWithdraw = function() {
|
|
var e = n.props.withdraw,
|
|
t = py.WithdrawFiatComponent;
|
|
return e && r.createElement(t, {
|
|
handleProcessWithdraw: n.handleAcceptWithdraw,
|
|
handleRejectWithdraw: n.handleRejectWithdraw,
|
|
withdraw: e
|
|
})
|
|
}, n.handleRejectWithdraw = function() {
|
|
var e = n.props.withdraw;
|
|
e && "errored" === e.state ? n.props.getWithdrawReject({
|
|
id: e.id,
|
|
action: "fail"
|
|
}) : e && n.props.getWithdrawReject({
|
|
id: e.id,
|
|
action: "reject"
|
|
})
|
|
}, n.handleAcceptWithdraw = function() {
|
|
var e = n.props.withdraw;
|
|
e && n.props.getWithdrawProcessFiat({
|
|
id: e.id
|
|
})
|
|
}, n.handleProcessWithdraw = function() {
|
|
var e = n.props.withdraw;
|
|
e && n.props.getWithdrawProcess({
|
|
id: e.id,
|
|
action: "process"
|
|
})
|
|
}, n.handleLoadWithdraw = function() {
|
|
var e = n.props.withdraw,
|
|
t = n.state.txid;
|
|
e && n.props.getWithdrawLoad({
|
|
id: e.id,
|
|
action: "load",
|
|
txid: t
|
|
})
|
|
}, n.handleChangeValue = function(e) {
|
|
n.setState({
|
|
txid: e
|
|
})
|
|
}, n.state = {
|
|
txid: ""
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getWithdrawItem({
|
|
id: Number(this.props.match.params.id)
|
|
})
|
|
}
|
|
}, {
|
|
key: "UNSAFE_componentWillReceiveProps",
|
|
value: function(e) {
|
|
e.withdraw && e.withdraw !== this.props.withdraw && (this.props.getUserBalances({
|
|
uid: e.withdraw && e.withdraw.uid
|
|
}), this.props.getCurrency({
|
|
code: e.withdraw && e.withdraw.currency
|
|
})), e.match.params.id !== this.props.match.params.id && (this.props.getWithdrawItem({
|
|
id: Number(e.match.params.id)
|
|
}), this.props.getUserBalances({
|
|
uid: e.withdraw && e.withdraw.uid || ""
|
|
}), this.props.getCurrency({
|
|
code: e.withdraw && e.withdraw.currency || ""
|
|
}))
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props.withdraw,
|
|
t = py.WithdrawsHistory;
|
|
return r.createElement(r.Fragment, null, e && "coin" === e.type ? this
|
|
.renderCryptoWithdraw() : this.renderFiatWithdraw(), r.createElement(t, {
|
|
uid: e && e.uid
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
bf = Object(o.b)(function(e) {
|
|
return {
|
|
withdraw: Rh(e),
|
|
userBalance: Eu(e),
|
|
currency: $r(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getWithdrawItem: function(t) {
|
|
return e(bh(t))
|
|
},
|
|
getUserBalances: function(t) {
|
|
return e(pu(t))
|
|
},
|
|
getCurrency: function(t) {
|
|
return e(Kr(t))
|
|
},
|
|
getWithdrawReject: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: ea,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
getWithdrawLoad: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: ta,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
getWithdrawProcess: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Xt,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
getWithdrawProcessFiat: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: $t,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
}
|
|
}
|
|
})(Object(xe.g)(ff)),
|
|
yf = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).assetsRows = [{
|
|
key: "id",
|
|
alignRight: !1,
|
|
label: "Assets ID"
|
|
}, {
|
|
key: "code",
|
|
alignRight: !1,
|
|
label: "Code"
|
|
}, {
|
|
key: "currency",
|
|
alignRight: !1,
|
|
label: "Currency ID"
|
|
}, {
|
|
key: "rid",
|
|
alignRight: !1,
|
|
label: "Ref ID"
|
|
}, {
|
|
key: "reference_type",
|
|
alignRight: !1,
|
|
label: "Ref type"
|
|
}, {
|
|
key: "credit",
|
|
alignRight: !1,
|
|
label: "Credit"
|
|
}, {
|
|
key: "debit",
|
|
alignRight: !1,
|
|
label: "Debit"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !0,
|
|
label: "Date"
|
|
}], n.filterData = [{
|
|
property: "reference_type",
|
|
value: "",
|
|
title: "Reference type"
|
|
}, {
|
|
property: "rid",
|
|
value: null,
|
|
title: "Ref ID"
|
|
}, {
|
|
property: "code",
|
|
value: null,
|
|
title: "Code"
|
|
}, {
|
|
property: "currency",
|
|
value: "",
|
|
title: "Currency"
|
|
}, {
|
|
property: "from",
|
|
value: null
|
|
}, {
|
|
property: "to",
|
|
value: null
|
|
}], n.handleSubmitFilter = function(e) {
|
|
n.setState({
|
|
filterReferenceType: Aa(e, "reference_type"),
|
|
filterRid: Aa(e, "rid"),
|
|
filterCode: Aa(e, "code"),
|
|
filterCurrency: Aa(e, "currency"),
|
|
filterFrom: Aa(e, "from"),
|
|
filterTo: Aa(e, "to"),
|
|
page: 0
|
|
});
|
|
var t = {
|
|
reference_type: Aa(e, "reference_type"),
|
|
rid: Aa(e, "rid"),
|
|
code: Aa(e, "code"),
|
|
currency: Aa(e, "currency"),
|
|
from: Aa(e, "from"),
|
|
to: Aa(e, "to"),
|
|
page: 1,
|
|
limit: n.state.rowsPerPage,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getAssetsList(t)
|
|
}, n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetAssets(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetAssets(e, 0)
|
|
}, n.handleGetAssets = function(e, t) {
|
|
var a = {
|
|
reference_type: n.state.filterReferenceType,
|
|
rid: null !== n.state.filterRid ? n.state.filterRid : "",
|
|
code: null !== n.state.filterCode ? n.state.filterCode : "",
|
|
currency: n.state.filterCurrency,
|
|
from: null !== n.state.filterFrom ? n.state.filterFrom : "",
|
|
to: null !== n.state.filterTo ? n.state.filterTo : "",
|
|
page: t + 1,
|
|
limit: e,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getAssetsList(a)
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O(),
|
|
filterReferenceType: "",
|
|
filterRid: null,
|
|
filterCode: null,
|
|
filterCurrency: "",
|
|
filterFrom: null,
|
|
filterTo: null
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getAssetsList({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
ordering: "desc"
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.page,
|
|
a = e.rowsPerPage,
|
|
n = this.props,
|
|
i = n.total,
|
|
o = n.list,
|
|
s = py.FilterContainer,
|
|
c = py.Table;
|
|
return r.createElement(r.Fragment, null, r.createElement(c, {
|
|
dataLength: i,
|
|
rows: this.assetsRows,
|
|
data: o,
|
|
page: t,
|
|
rowsPerPage: a,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
disableTotal: !0
|
|
}), r.createElement(s, {
|
|
data: this.filterData,
|
|
handleSubmit: this.handleSubmitFilter
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
vf = Object(o.b)(function(e) {
|
|
return {
|
|
list: Tn(e),
|
|
total: Pn(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getAssetsList: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Pe,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
}
|
|
}
|
|
})(yf),
|
|
wf = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).ExpensesRows = [{
|
|
key: "id",
|
|
alignRight: !1,
|
|
label: "Expenses ID"
|
|
}, {
|
|
key: "code",
|
|
alignRight: !1,
|
|
label: "Account code"
|
|
}, {
|
|
key: "currency",
|
|
alignRight: !1,
|
|
label: "Currency ID"
|
|
}, {
|
|
key: "rid",
|
|
alignRight: !1,
|
|
label: "Ref ID"
|
|
}, {
|
|
key: "reference_type",
|
|
alignRight: !1,
|
|
label: "Ref type"
|
|
}, {
|
|
key: "debit",
|
|
alignRight: !1,
|
|
label: "Debit"
|
|
}, {
|
|
key: "credit",
|
|
alignRight: !1,
|
|
label: "Credit"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !0,
|
|
label: "Date"
|
|
}], n.filterData = [{
|
|
property: "reference_type",
|
|
value: "",
|
|
title: "Reference type"
|
|
}, {
|
|
property: "rid",
|
|
value: null,
|
|
title: "Ref ID"
|
|
}, {
|
|
property: "code",
|
|
value: null,
|
|
title: "Code"
|
|
}, {
|
|
property: "currency",
|
|
value: "",
|
|
title: "Currency"
|
|
}, {
|
|
property: "from",
|
|
value: null
|
|
}, {
|
|
property: "to",
|
|
value: null
|
|
}], n.handleSubmitFilter = function(e) {
|
|
n.setState({
|
|
filterReferenceType: Aa(e, "reference_type"),
|
|
filterRid: Aa(e, "rid"),
|
|
filterCode: Aa(e, "code"),
|
|
filterCurrency: Aa(e, "currency"),
|
|
filterFrom: Aa(e, "from"),
|
|
filterTo: Aa(e, "to"),
|
|
page: 0
|
|
});
|
|
var t = {
|
|
reference_type: Aa(e, "reference_type"),
|
|
rid: Aa(e, "rid"),
|
|
code: Aa(e, "code"),
|
|
currency: Aa(e, "currency"),
|
|
from: Aa(e, "from"),
|
|
to: Aa(e, "to"),
|
|
page: 1,
|
|
limit: n.state.rowsPerPage,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getExpensesList(t)
|
|
}, n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetExpenses(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetExpenses(e, 0)
|
|
}, n.handleGetExpenses = function(e, t) {
|
|
var a = {
|
|
reference_type: n.state.filterReferenceType,
|
|
rid: null !== n.state.filterRid ? n.state.filterRid : "",
|
|
code: null !== n.state.filterCode ? n.state.filterCode : "",
|
|
currency: n.state.filterCurrency,
|
|
from: null !== n.state.filterFrom ? n.state.filterFrom : "",
|
|
to: null !== n.state.filterTo ? n.state.filterTo : "",
|
|
page: t + 1,
|
|
limit: e,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getExpensesList(a)
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O(),
|
|
filterReferenceType: "",
|
|
filterRid: null,
|
|
filterCode: null,
|
|
filterCurrency: "",
|
|
filterFrom: null,
|
|
filterTo: null
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getExpensesList({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
ordering: "desc"
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.page,
|
|
a = e.rowsPerPage,
|
|
n = this.props,
|
|
i = n.total,
|
|
o = n.list,
|
|
s = py.FilterContainer,
|
|
c = py.Table;
|
|
return r.createElement(r.Fragment, null, r.createElement(c, {
|
|
dataLength: i,
|
|
rows: this.ExpensesRows,
|
|
data: o,
|
|
page: t,
|
|
rowsPerPage: a,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
disableTotal: !0
|
|
}), r.createElement(s, {
|
|
data: this.filterData,
|
|
handleSubmit: this.handleSubmitFilter
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Ef = Object(o.b)(function(e) {
|
|
return {
|
|
list: Gi(e),
|
|
total: zi(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getExpensesList: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Qe,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
}
|
|
}
|
|
})(wf),
|
|
Cf = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).liabilitiesRows = [{
|
|
key: "id",
|
|
alignRight: !1,
|
|
label: "Liabilities ID"
|
|
}, {
|
|
key: "code",
|
|
alignRight: !1,
|
|
label: "Code"
|
|
}, {
|
|
key: "currency",
|
|
alignRight: !1,
|
|
label: "Currency ID"
|
|
}, {
|
|
key: "uid",
|
|
alignRight: !1,
|
|
label: "UID"
|
|
}, {
|
|
key: "rid",
|
|
alignRight: !1,
|
|
label: "Ref ID"
|
|
}, {
|
|
key: "reference_type",
|
|
alignRight: !1,
|
|
label: "Ref type"
|
|
}, {
|
|
key: "credit",
|
|
alignRight: !1,
|
|
label: "Credit"
|
|
}, {
|
|
key: "debit",
|
|
alignRight: !1,
|
|
label: "Debit"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !0,
|
|
label: "Date"
|
|
}], n.filterData = [{
|
|
property: "uid",
|
|
value: "",
|
|
title: "UID"
|
|
}, {
|
|
property: "reference_type",
|
|
value: "",
|
|
title: "Reference type"
|
|
}, {
|
|
property: "rid",
|
|
value: null,
|
|
title: "Ref ID"
|
|
}, {
|
|
property: "code",
|
|
value: null,
|
|
title: "Code"
|
|
}, {
|
|
property: "currency",
|
|
value: "",
|
|
title: "Currency"
|
|
}, {
|
|
property: "from",
|
|
value: null
|
|
}, {
|
|
property: "to",
|
|
value: null
|
|
}], n.handleSubmitFilter = function(e) {
|
|
n.setState({
|
|
filterUid: Aa(e, "uid"),
|
|
filterReferenceType: Aa(e, "reference_type"),
|
|
filterRid: Aa(e, "rid"),
|
|
filterCode: Aa(e, "code"),
|
|
filterCurrency: Aa(e, "currency"),
|
|
filterFrom: Aa(e, "from"),
|
|
filterTo: Aa(e, "to"),
|
|
page: 0
|
|
});
|
|
var t = {
|
|
uid: Aa(e, "uid"),
|
|
reference_type: Aa(e, "reference_type"),
|
|
rid: Aa(e, "rid"),
|
|
code: Aa(e, "code"),
|
|
currency: Aa(e, "currency"),
|
|
from: Aa(e, "from"),
|
|
to: Aa(e, "to"),
|
|
page: 1,
|
|
limit: n.state.rowsPerPage,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getLiabilitiesList(t)
|
|
}, n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetLiabilities(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetLiabilities(e, 0)
|
|
}, n.handleGetLiabilities = function(e, t) {
|
|
var a = {
|
|
uid: n.state.filterUid,
|
|
reference_type: n.state.filterReferenceType,
|
|
rid: null !== n.state.filterRid ? n.state.filterRid : "",
|
|
code: null !== n.state.filterCode ? n.state.filterCode : "",
|
|
currency: n.state.filterCurrency,
|
|
from: null !== n.state.filterFrom ? n.state.filterFrom : "",
|
|
to: null !== n.state.filterTo ? n.state.filterTo : "",
|
|
page: t + 1,
|
|
limit: e,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getLiabilitiesList(a)
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O(),
|
|
filterUid: "",
|
|
filterReferenceType: "",
|
|
filterRid: null,
|
|
filterCode: null,
|
|
filterCurrency: "",
|
|
filterFrom: null,
|
|
filterTo: null
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getLiabilitiesList({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
ordering: "desc"
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.page,
|
|
a = e.rowsPerPage,
|
|
n = this.props,
|
|
i = n.total,
|
|
o = n.list,
|
|
s = py.FilterContainer,
|
|
c = py.Table;
|
|
return r.createElement(r.Fragment, null, r.createElement(c, {
|
|
dataLength: i,
|
|
rows: this.liabilitiesRows,
|
|
data: o,
|
|
page: t,
|
|
rowsPerPage: a,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
disableTotal: !0
|
|
}), r.createElement(s, {
|
|
data: this.filterData,
|
|
handleSubmit: this.handleSubmitFilter
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Of = Object(o.b)(function(e) {
|
|
return {
|
|
list: vo(e),
|
|
total: wo(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getLiabilitiesList: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: tt,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
}
|
|
}
|
|
})(Cf),
|
|
kf = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).revenuesRows = [{
|
|
key: "id",
|
|
alignRight: !1,
|
|
label: "Revenues ID"
|
|
}, {
|
|
key: "code",
|
|
alignRight: !1,
|
|
label: "Code"
|
|
}, {
|
|
key: "currency",
|
|
alignRight: !1,
|
|
label: "Currency ID"
|
|
}, {
|
|
key: "rid",
|
|
alignRight: !1,
|
|
label: "Ref ID"
|
|
}, {
|
|
key: "reference_type",
|
|
alignRight: !1,
|
|
label: "Ref type"
|
|
}, {
|
|
key: "credit",
|
|
alignRight: !1,
|
|
label: "Credit"
|
|
}, {
|
|
key: "debit",
|
|
alignRight: !1,
|
|
label: "Debit"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !0,
|
|
label: "Date"
|
|
}], n.filterData = [{
|
|
property: "reference_type",
|
|
value: "",
|
|
title: "Reference type"
|
|
}, {
|
|
property: "rid",
|
|
value: null,
|
|
title: "Ref ID"
|
|
}, {
|
|
property: "code",
|
|
value: null,
|
|
title: "Code"
|
|
}, {
|
|
property: "currency",
|
|
value: "",
|
|
title: "Currency"
|
|
}, {
|
|
property: "from",
|
|
value: null
|
|
}, {
|
|
property: "to",
|
|
value: null
|
|
}], n.handleSubmitFilter = function(e) {
|
|
n.setState({
|
|
filterReferenceType: Aa(e, "reference_type"),
|
|
filterRid: Aa(e, "rid"),
|
|
filterCode: Aa(e, "code"),
|
|
filterCurrency: Aa(e, "currency"),
|
|
filterFrom: Aa(e, "from"),
|
|
filterTo: Aa(e, "to"),
|
|
page: 0
|
|
});
|
|
var t = {
|
|
reference_type: Aa(e, "reference_type"),
|
|
rid: Aa(e, "rid"),
|
|
code: Aa(e, "code"),
|
|
currency: Aa(e, "currency"),
|
|
from: Aa(e, "from"),
|
|
to: Aa(e, "to"),
|
|
page: 1,
|
|
limit: n.state.rowsPerPage,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getRevenuesList(t)
|
|
}, n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetRevenues(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetRevenues(e, 0)
|
|
}, n.handleGetRevenues = function(e, t) {
|
|
var a = {
|
|
reference_type: n.state.filterReferenceType,
|
|
rid: null !== n.state.filterRid ? n.state.filterRid : "",
|
|
code: null !== n.state.filterCode ? n.state.filterCode : "",
|
|
currency: n.state.filterCurrency,
|
|
from: null !== n.state.filterFrom ? n.state.filterFrom : "",
|
|
to: null !== n.state.filterTo ? n.state.filterTo : "",
|
|
page: t + 1,
|
|
limit: e,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getRevenuesList(a)
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O(),
|
|
filterReferenceType: "",
|
|
filterRid: null,
|
|
filterCode: null,
|
|
filterCurrency: "",
|
|
filterFrom: null,
|
|
filterTo: null
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getRevenuesList({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
ordering: "desc"
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.page,
|
|
a = e.rowsPerPage,
|
|
n = this.props,
|
|
i = n.total,
|
|
o = n.list,
|
|
s = py.FilterContainer,
|
|
c = py.Table;
|
|
return r.createElement(r.Fragment, null, r.createElement(c, {
|
|
dataLength: i,
|
|
rows: this.revenuesRows,
|
|
data: o,
|
|
page: t,
|
|
rowsPerPage: a,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
disableTotal: !0
|
|
}), r.createElement(s, {
|
|
data: this.filterData,
|
|
handleSubmit: this.handleSubmitFilter
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
xf = Object(o.b)(function(e) {
|
|
return {
|
|
list: Pc(e),
|
|
total: Ac(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getRevenuesList: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: yt,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
}
|
|
}
|
|
})(kf),
|
|
jf = ["accepted", "errored", "skipped", "confirming"],
|
|
_f = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).withdrawsRows = [{
|
|
key: "id",
|
|
alignRight: !1,
|
|
label: "ID"
|
|
}, {
|
|
key: "email",
|
|
alignRight: !1,
|
|
label: "Email",
|
|
linkSuffix: "/history#withdraws"
|
|
}, {
|
|
key: "currency",
|
|
alignRight: !1,
|
|
label: "Currency"
|
|
}, {
|
|
key: "blockchain_txid",
|
|
alignRight: !1,
|
|
label: "TxID"
|
|
}, {
|
|
key: "rid",
|
|
alignRight: !1,
|
|
label: "Recipient Address"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !1,
|
|
label: "Date"
|
|
}, {
|
|
key: "amount",
|
|
alignRight: !0,
|
|
label: "Amount"
|
|
}, {
|
|
key: "state",
|
|
alignRight: !1,
|
|
label: "State"
|
|
}, {
|
|
key: "arrow_icon",
|
|
alignRight: !1,
|
|
label: ""
|
|
}], n.filterData = [{
|
|
property: "account",
|
|
value: null,
|
|
title: "Account"
|
|
}, {
|
|
property: "id",
|
|
value: null,
|
|
title: "ID"
|
|
}, {
|
|
property: "blockchain_txid",
|
|
value: "",
|
|
title: "TxID"
|
|
}, {
|
|
property: "rid",
|
|
value: "",
|
|
title: "Recipient Address"
|
|
}, {
|
|
property: "uid",
|
|
value: "",
|
|
title: "UID"
|
|
}, {
|
|
property: "currency",
|
|
value: "",
|
|
title: "Currency"
|
|
}, {
|
|
property: "from",
|
|
value: null
|
|
}, {
|
|
property: "to",
|
|
value: null
|
|
}], n.onRowClick = function(e) {
|
|
n.props.history.push("/tower/accountings/withdrawals-pending/".concat(e.id, "/details"))
|
|
}, n.getExplorerLink = function(e) {
|
|
var t = n.props.currencies.find(function(t) {
|
|
return t.code === e.currency
|
|
}),
|
|
a = e;
|
|
if (!t) return e;
|
|
if (e.blockchain_txid && t.explorer_transaction) {
|
|
var r = t.explorer_transaction.replace("#{txid}", e.blockchain_txid);
|
|
a = Object(b.a)({
|
|
explorer_txid: r
|
|
}, e)
|
|
}
|
|
if (e.rid && t.explorer_address) {
|
|
var i = t.explorer_address.replace("#{address}", e.rid);
|
|
a = Object(b.a)({
|
|
explorer_address: i
|
|
}, a)
|
|
}
|
|
return a
|
|
}, n.handleSubmitFilter = function(e) {
|
|
n.setState({
|
|
filterAccount: Aa(e, "account"),
|
|
filterId: Aa(e, "id"),
|
|
filterTxid: Aa(e, "blockchain_txid"),
|
|
filterRid: Aa(e, "rid"),
|
|
filterUid: Aa(e, "uid"),
|
|
filterCurrency: Aa(e, "currency"),
|
|
filterFrom: Aa(e, "from"),
|
|
filterTo: Aa(e, "to"),
|
|
page: 0
|
|
});
|
|
var t = {
|
|
account: Aa(e, "account"),
|
|
id: Aa(e, "id"),
|
|
txid: Aa(e, "blockchain_txid"),
|
|
rid: Aa(e, "rid"),
|
|
uid: Aa(e, "uid"),
|
|
currency: Aa(e, "currency"),
|
|
from: Aa(e, "from"),
|
|
to: Aa(e, "to"),
|
|
page: 1,
|
|
type: "coin",
|
|
limit: n.state.rowsPerPage,
|
|
state: jf,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getWithdrawsList(t)
|
|
}, n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetWithdraws(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetWithdraws(e, 0)
|
|
}, n.handleGetWithdraws = function(e, t) {
|
|
var a = {
|
|
account: n.state.filterAccount,
|
|
id: n.state.filterId,
|
|
txid: n.state.filterTxid,
|
|
rid: n.state.filterRid,
|
|
uid: n.state.filterUid,
|
|
currency: n.state.filterCurrency,
|
|
type: "coin",
|
|
from: null !== n.state.filterFrom ? n.state.filterFrom : "",
|
|
to: null !== n.state.filterTo ? n.state.filterTo : "",
|
|
page: t + 1,
|
|
limit: e,
|
|
state: jf,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getWithdrawsList(a)
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O(),
|
|
filterAccount: "",
|
|
filterId: "",
|
|
filterTxid: "",
|
|
filterRid: "",
|
|
filterUid: "",
|
|
filterCurrency: "",
|
|
filterFrom: null,
|
|
filterTo: null
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getWithdrawsList({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
type: "coin",
|
|
state: jf,
|
|
ordering: "desc"
|
|
}), this.props.currencies.length || this.props.getCurrenciesList({
|
|
page: 1,
|
|
limit: 50
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.page,
|
|
a = e.rowsPerPage,
|
|
n = this.props,
|
|
i = n.total,
|
|
o = n.list,
|
|
s = py.FilterContainer,
|
|
c = py.Table;
|
|
return r.createElement(r.Fragment, null, r.createElement(c, {
|
|
dataLength: i,
|
|
rows: this.withdrawsRows,
|
|
data: o.map(this.getExplorerLink),
|
|
page: t,
|
|
rowsPerPage: a,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
handleRowOnClick: this.onRowClick
|
|
}), r.createElement(s, {
|
|
data: this.filterData,
|
|
handleSubmit: this.handleSubmitFilter,
|
|
api: "peatio"
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Rf = Object(xe.g)(Object(o.b)(function(e) {
|
|
return {
|
|
list: jh(e),
|
|
total: _h(e),
|
|
currencies: Qr(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getWithdrawsList: function(t) {
|
|
return e(gh(t))
|
|
},
|
|
getCurrenciesList: function(t) {
|
|
return e(Mr(t))
|
|
}
|
|
}
|
|
})(_f)),
|
|
Sf = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).withdrawsRows = [{
|
|
key: "id",
|
|
alignRight: !1,
|
|
label: "ID"
|
|
}, {
|
|
key: "email",
|
|
alignRight: !1,
|
|
label: "Email",
|
|
linkSuffix: "/history#withdraws"
|
|
}, {
|
|
key: "currency",
|
|
alignRight: !1,
|
|
label: "Currency"
|
|
}, {
|
|
key: "blockchain_txid",
|
|
alignRight: !1,
|
|
label: "TxID"
|
|
}, {
|
|
key: "rid",
|
|
alignRight: !1,
|
|
label: "Recipient Address"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !1,
|
|
label: "Date"
|
|
}, {
|
|
key: "amount",
|
|
alignRight: !0,
|
|
label: "Amount"
|
|
}, {
|
|
key: "state",
|
|
alignRight: !1,
|
|
label: "State"
|
|
}, {
|
|
key: "arrow_icon",
|
|
alignRight: !1,
|
|
label: ""
|
|
}], n.filterData = [{
|
|
property: "account",
|
|
value: null,
|
|
title: "Account"
|
|
}, {
|
|
property: "id",
|
|
value: null,
|
|
title: "ID"
|
|
}, {
|
|
property: "blockchain_txid",
|
|
value: "",
|
|
title: "TxID"
|
|
}, {
|
|
property: "rid",
|
|
value: "",
|
|
title: "Recipient Address"
|
|
}, {
|
|
property: "uid",
|
|
value: "",
|
|
title: "UID"
|
|
}, {
|
|
property: "currency",
|
|
value: "",
|
|
title: "Currency"
|
|
}, {
|
|
property: "from",
|
|
value: null
|
|
}, {
|
|
property: "to",
|
|
value: null
|
|
}], n.onRowClick = function(e) {
|
|
n.props.history.push("/tower/accountings/withdrawals-pending/".concat(e.id, "/details"))
|
|
}, n.handleSubmitFilter = function(e) {
|
|
n.setState({
|
|
filterAccount: Aa(e, "account"),
|
|
filterId: Aa(e, "id"),
|
|
filterTxid: Aa(e, "blockchain_txid"),
|
|
filterRid: Aa(e, "rid"),
|
|
filterUid: Aa(e, "uid"),
|
|
filterCurrency: Aa(e, "currency"),
|
|
filterFrom: Aa(e, "from"),
|
|
filterTo: Aa(e, "to"),
|
|
page: 0
|
|
});
|
|
var t = {
|
|
account: Aa(e, "account"),
|
|
id: Aa(e, "id"),
|
|
txid: Aa(e, "blockchain_txid"),
|
|
rid: Aa(e, "rid"),
|
|
uid: Aa(e, "uid"),
|
|
currency: Aa(e, "currency"),
|
|
type: "fiat",
|
|
from: Aa(e, "from"),
|
|
to: Aa(e, "to"),
|
|
page: 1,
|
|
limit: n.state.rowsPerPage,
|
|
state: "accepted",
|
|
ordering: "desc"
|
|
};
|
|
n.props.getWithdrawsList(t)
|
|
}, n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetWithdraws(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetWithdraws(e, 0)
|
|
}, n.handleGetWithdraws = function(e, t) {
|
|
var a = {
|
|
account: n.state.filterAccount,
|
|
id: n.state.filterId,
|
|
txid: n.state.filterTxid,
|
|
rid: n.state.filterRid,
|
|
uid: n.state.filterUid,
|
|
currency: n.state.filterCurrency,
|
|
type: "fiat",
|
|
from: null !== n.state.filterFrom ? n.state.filterFrom : "",
|
|
to: null !== n.state.filterTo ? n.state.filterTo : "",
|
|
page: t + 1,
|
|
limit: e,
|
|
state: "accepted",
|
|
ordering: "desc"
|
|
};
|
|
n.props.getWithdrawsList(a)
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O(),
|
|
filterAccount: "",
|
|
filterId: "",
|
|
filterTxid: "",
|
|
filterRid: "",
|
|
filterUid: "",
|
|
filterCurrency: "",
|
|
filterFrom: null,
|
|
filterTo: null
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getWithdrawsList({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
state: "accepted",
|
|
type: "fiat",
|
|
ordering: "desc"
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.page,
|
|
a = e.rowsPerPage,
|
|
n = this.props,
|
|
i = n.total,
|
|
o = n.list,
|
|
s = py.FilterContainer,
|
|
c = py.Table;
|
|
return r.createElement(r.Fragment, null, r.createElement(c, {
|
|
dataLength: i,
|
|
rows: this.withdrawsRows,
|
|
data: o,
|
|
page: t,
|
|
rowsPerPage: a,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
handleRowOnClick: this.onRowClick
|
|
}), r.createElement(s, {
|
|
data: this.filterData,
|
|
handleSubmit: this.handleSubmitFilter,
|
|
api: "peatio"
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Tf = Object(xe.g)(Object(o.b)(function(e) {
|
|
return {
|
|
list: jh(e),
|
|
total: _h(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getWithdrawsList: function(t) {
|
|
return e(gh(t))
|
|
}
|
|
}
|
|
})(Sf)),
|
|
Pf = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).withdrawsRows = [{
|
|
key: "id",
|
|
alignRight: !1,
|
|
label: "ID"
|
|
}, {
|
|
key: "email",
|
|
alignRight: !1,
|
|
label: "Email",
|
|
linkSuffix: "/history#withdraws"
|
|
}, {
|
|
key: "currency",
|
|
alignRight: !1,
|
|
label: "Currency"
|
|
}, {
|
|
key: "blockchain_txid",
|
|
alignRight: !1,
|
|
label: "TxID"
|
|
}, {
|
|
key: "rid",
|
|
alignRight: !1,
|
|
label: "Recipient Address"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !1,
|
|
label: "Date"
|
|
}, {
|
|
key: "amount",
|
|
alignRight: !0,
|
|
label: "Amount"
|
|
}, {
|
|
key: "state",
|
|
alignRight: !1,
|
|
label: "State"
|
|
}, {
|
|
key: "arrow_icon",
|
|
alignRight: !1,
|
|
label: ""
|
|
}], n.filterData = [{
|
|
property: "state",
|
|
value: "",
|
|
title: "State"
|
|
}, {
|
|
property: "account",
|
|
value: null,
|
|
title: "Account"
|
|
}, {
|
|
property: "id",
|
|
value: null,
|
|
title: "ID"
|
|
}, {
|
|
property: "blockchain_txid",
|
|
value: "",
|
|
title: "TxID"
|
|
}, {
|
|
property: "rid",
|
|
value: "",
|
|
title: "Recipient Address"
|
|
}, {
|
|
property: "uid",
|
|
value: "",
|
|
title: "UID"
|
|
}, {
|
|
property: "currency",
|
|
value: "",
|
|
title: "Currency"
|
|
}, {
|
|
property: "from",
|
|
value: null
|
|
}, {
|
|
property: "to",
|
|
value: null
|
|
}], n.onRowClick = function(e) {
|
|
n.props.history.push("/tower/accountings/withdrawals/".concat(e.id, "/details"))
|
|
}, n.getExplorerLink = function(e) {
|
|
var t = n.props.currencies.find(function(t) {
|
|
return t.code === e.currency
|
|
}),
|
|
a = e;
|
|
if (!t) return e;
|
|
if (e.blockchain_txid && t.explorer_transaction) {
|
|
var r = t.explorer_transaction.replace("#{txid}", e.blockchain_txid);
|
|
a = Object(b.a)({
|
|
explorer_txid: r
|
|
}, e)
|
|
}
|
|
if (e.rid && t.explorer_address) {
|
|
var i = t.explorer_address.replace("#{address}", e.rid);
|
|
a = Object(b.a)({
|
|
explorer_address: i
|
|
}, a)
|
|
}
|
|
return a
|
|
}, n.handleSubmitFilter = function(e) {
|
|
n.setState({
|
|
filterState: Aa(e, "state"),
|
|
filterAccount: Aa(e, "account"),
|
|
filterId: Aa(e, "id"),
|
|
filterTxid: Aa(e, "blockchain_txid"),
|
|
filterRid: Aa(e, "rid"),
|
|
filterUid: Aa(e, "uid"),
|
|
filterCurrency: Aa(e, "currency"),
|
|
filterFrom: Aa(e, "from"),
|
|
filterTo: Aa(e, "to"),
|
|
page: 0
|
|
});
|
|
var t = {
|
|
state: Aa(e, "state"),
|
|
account: Aa(e, "account"),
|
|
id: Aa(e, "id"),
|
|
txid: Aa(e, "blockchain_txid"),
|
|
rid: Aa(e, "rid"),
|
|
uid: Aa(e, "uid"),
|
|
currency: Aa(e, "currency"),
|
|
from: Aa(e, "from"),
|
|
to: Aa(e, "to"),
|
|
type: "coin",
|
|
page: 1,
|
|
limit: n.state.rowsPerPage,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getWithdrawsList(t)
|
|
}, n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetWithdraws(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetWithdraws(e, 0)
|
|
}, n.handleGetWithdraws = function(e, t) {
|
|
var a = {
|
|
state: n.state.filterState,
|
|
account: n.state.filterAccount,
|
|
id: n.state.filterId,
|
|
txid: n.state.filterTxid,
|
|
rid: n.state.filterRid,
|
|
uid: n.state.filterUid,
|
|
currency: n.state.filterCurrency,
|
|
type: "coin",
|
|
from: null !== n.state.filterFrom ? n.state.filterFrom : "",
|
|
to: null !== n.state.filterTo ? n.state.filterTo : "",
|
|
page: t + 1,
|
|
limit: e,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getWithdrawsList(a)
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O(),
|
|
filterState: "",
|
|
filterAccount: "",
|
|
filterId: "",
|
|
filterTxid: "",
|
|
filterRid: "",
|
|
filterUid: "",
|
|
filterCurrency: "",
|
|
filterFrom: null,
|
|
filterTo: null
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getWithdrawsList({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
type: "coin",
|
|
ordering: "desc"
|
|
}), this.props.currencies.length || this.props.getCurrenciesList({
|
|
page: 1,
|
|
limit: 50
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.page,
|
|
a = e.rowsPerPage,
|
|
n = this.props,
|
|
i = n.total,
|
|
o = n.list,
|
|
s = py.FilterContainer,
|
|
c = py.Table;
|
|
return r.createElement(r.Fragment, null, r.createElement(c, {
|
|
dataLength: i,
|
|
rows: this.withdrawsRows,
|
|
data: o.map(this.getExplorerLink),
|
|
page: t,
|
|
rowsPerPage: a,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
handleRowOnClick: this.onRowClick
|
|
}), r.createElement(s, {
|
|
data: this.filterData,
|
|
handleSubmit: this.handleSubmitFilter,
|
|
api: "peatio"
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Af = Object(xe.g)(Object(o.b)(function(e) {
|
|
return {
|
|
list: jh(e),
|
|
total: _h(e),
|
|
currencies: Qr(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getWithdrawsList: function(t) {
|
|
return e(gh(t))
|
|
},
|
|
getCurrenciesList: function(t) {
|
|
return e(Mr(t))
|
|
}
|
|
}
|
|
})(Pf)),
|
|
Lf = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).withdrawsRows = [{
|
|
key: "id",
|
|
alignRight: !1,
|
|
label: "ID"
|
|
}, {
|
|
key: "email",
|
|
alignRight: !1,
|
|
label: "Email",
|
|
linkSuffix: "/history#withdraws"
|
|
}, {
|
|
key: "currency",
|
|
alignRight: !1,
|
|
label: "Currency"
|
|
}, {
|
|
key: "blockchain_txid",
|
|
alignRight: !1,
|
|
label: "TxID"
|
|
}, {
|
|
key: "rid",
|
|
alignRight: !1,
|
|
label: "Recipient Address"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !1,
|
|
label: "Date"
|
|
}, {
|
|
key: "amount",
|
|
alignRight: !0,
|
|
label: "Amount"
|
|
}, {
|
|
key: "state",
|
|
alignRight: !1,
|
|
label: "State"
|
|
}, {
|
|
key: "arrow_icon",
|
|
alignRight: !1,
|
|
label: ""
|
|
}], n.filterData = [{
|
|
property: "state",
|
|
value: "",
|
|
title: "State"
|
|
}, {
|
|
property: "account",
|
|
value: null,
|
|
title: "Account"
|
|
}, {
|
|
property: "id",
|
|
value: null,
|
|
title: "ID"
|
|
}, {
|
|
property: "rid",
|
|
value: "",
|
|
title: "Beneficiary ID"
|
|
}, {
|
|
property: "uid",
|
|
value: "",
|
|
title: "UID"
|
|
}, {
|
|
property: "currency",
|
|
value: "",
|
|
title: "Currency"
|
|
}, {
|
|
property: "from",
|
|
value: null
|
|
}, {
|
|
property: "to",
|
|
value: null
|
|
}], n.onRowClick = function(e) {
|
|
n.props.history.push("/tower/accountings/withdrawals/".concat(e.id, "/details"))
|
|
}, n.handleSubmitFilter = function(e) {
|
|
n.setState({
|
|
filterState: Aa(e, "state"),
|
|
filterAccount: Aa(e, "account"),
|
|
filterId: Aa(e, "id"),
|
|
filterTxid: Aa(e, "blockchain_txid"),
|
|
filterRid: Aa(e, "rid"),
|
|
filterUid: Aa(e, "uid"),
|
|
filterCurrency: Aa(e, "currency"),
|
|
filterFrom: Aa(e, "from"),
|
|
filterTo: Aa(e, "to"),
|
|
page: 0
|
|
});
|
|
var t = {
|
|
state: Aa(e, "state"),
|
|
account: Aa(e, "account"),
|
|
id: Aa(e, "id"),
|
|
txid: Aa(e, "blockchain_txid"),
|
|
rid: Aa(e, "rid"),
|
|
uid: Aa(e, "uid"),
|
|
currency: Aa(e, "currency"),
|
|
type: "fiat",
|
|
from: Aa(e, "from"),
|
|
to: Aa(e, "to"),
|
|
page: 1,
|
|
limit: n.state.rowsPerPage,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getWithdrawsList(t)
|
|
}, n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetWithdraws(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetWithdraws(e, 0)
|
|
}, n.handleGetWithdraws = function(e, t) {
|
|
var a = {
|
|
state: n.state.filterState,
|
|
account: n.state.filterAccount,
|
|
id: n.state.filterId,
|
|
txid: n.state.filterTxid,
|
|
rid: n.state.filterRid,
|
|
uid: n.state.filterUid,
|
|
currency: n.state.filterCurrency,
|
|
type: "fiat",
|
|
from: null !== n.state.filterFrom ? n.state.filterFrom : "",
|
|
to: null !== n.state.filterTo ? n.state.filterTo : "",
|
|
page: t + 1,
|
|
limit: e,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getWithdrawsList(a)
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O(),
|
|
filterState: "",
|
|
filterAccount: "",
|
|
filterId: "",
|
|
filterTxid: "",
|
|
filterRid: "",
|
|
filterUid: "",
|
|
filterCurrency: "",
|
|
filterFrom: null,
|
|
filterTo: null
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getWithdrawsList({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
ordering: "desc",
|
|
type: "fiat"
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.page,
|
|
a = e.rowsPerPage,
|
|
n = this.props,
|
|
i = n.total,
|
|
o = n.list,
|
|
s = py.FilterContainer,
|
|
c = py.Table;
|
|
return r.createElement(r.Fragment, null, r.createElement(c, {
|
|
dataLength: i,
|
|
rows: this.withdrawsRows,
|
|
data: o,
|
|
page: t,
|
|
rowsPerPage: a,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
handleRowOnClick: this.onRowClick
|
|
}), r.createElement(s, {
|
|
data: this.filterData,
|
|
handleSubmit: this.handleSubmitFilter,
|
|
api: "peatio"
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Df = Object(xe.g)(Object(o.b)(function(e) {
|
|
return {
|
|
list: jh(e),
|
|
total: _h(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getWithdrawsList: function(t) {
|
|
return e(gh(t))
|
|
}
|
|
}
|
|
})(Lf)),
|
|
If = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).deleteAlertByIndex = function(t) {
|
|
e.props.alertDeleteByIndex(t)
|
|
}, e.getAlerts = function(t, a) {
|
|
return r.createElement("div", {
|
|
key: a,
|
|
onClick: function() {
|
|
return e.deleteAlertByIndex(a)
|
|
}
|
|
}, t.message && t.message.map(function(a, n) {
|
|
return e.getAlertMessage(t, a, n)
|
|
}))
|
|
}, e.getAlertMessage = function(e, t, a) {
|
|
var n = py.AlertMessage;
|
|
return r.createElement(n, {
|
|
key: a,
|
|
message: _a(t),
|
|
type: e.type
|
|
})
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this,
|
|
t = this.props.classes;
|
|
return r.createElement("div", {
|
|
className: t.wrapper
|
|
}, this.props.alerts.alerts.map(function(t, a) {
|
|
return e.getAlerts(t, a)
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Nf = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
wrapper: {
|
|
position: "fixed",
|
|
right: 10,
|
|
top: 10,
|
|
zIndex: 1e4
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(Object(o.b)(function(e) {
|
|
return {
|
|
alerts: un(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
alertDelete: function() {
|
|
return e(en())
|
|
},
|
|
alertDeleteByIndex: function(t) {
|
|
return e({
|
|
type: "ALERT_DELETE_BY_INDEX",
|
|
index: t
|
|
})
|
|
}
|
|
}
|
|
})(If)),
|
|
Ff = a(56),
|
|
Uf = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).getGitTab = function() {
|
|
var t = e.props.classes;
|
|
return yy ? r.createElement(F.a, {
|
|
variant: "body2",
|
|
className: t.gitTagLabel
|
|
}, "GIT TAG ", r.createElement("span", {
|
|
className: t.gitTagVersion
|
|
}, yy)) : null
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.fetchMetrics(), this.props.changeCurrentSidebarStatus({
|
|
currentSidebarStatus: !1
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.classes,
|
|
a = e.metrics,
|
|
n = function(e) {
|
|
for (var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : new Date,
|
|
a = [], n = 0; n < 7; n++) {
|
|
var r = new Date(t);
|
|
r.setDate(r.getDate() - n), a.unshift(new Date(r).toISOString().split("T")[0])
|
|
}
|
|
for (var i = [], o = 0; o < 7; o++) i.push({
|
|
name: Ha(a[o]),
|
|
signups: e.signups[a[o]] || 0,
|
|
sucessful_logins: e.sucessful_logins[a[o]] || 0,
|
|
failed_logins: e.failed_logins[a[o]] || 0
|
|
});
|
|
return i
|
|
}(a);
|
|
return r.createElement(r.Fragment, null, r.createElement("div", {
|
|
className: t.root
|
|
}, r.createElement(I.a, {
|
|
container: !0,
|
|
spacing: 3
|
|
}, r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 3
|
|
}, r.createElement(D.a, {
|
|
className: t.paper
|
|
}, r.createElement(F.a, {
|
|
variant: "body1"
|
|
}, "New Signup"), r.createElement(F.a, {
|
|
className: te()(t.counter, t.blue),
|
|
variant: "h2"
|
|
}, n[n.length - 1].signups.toLocaleString()))), r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 3
|
|
}, r.createElement(D.a, {
|
|
className: t.paper
|
|
}, r.createElement(F.a, {
|
|
variant: "body1"
|
|
}, "Login last 24h"), r.createElement(F.a, {
|
|
className: te()(t.counter, t.blue),
|
|
variant: "h2"
|
|
}, n[n.length - 1].sucessful_logins.toLocaleString()))), r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 3
|
|
}, r.createElement(D.a, {
|
|
className: t.paper
|
|
}, r.createElement(F.a, {
|
|
variant: "body1"
|
|
}, "Failed Login"), r.createElement(F.a, {
|
|
className: te()(t.counter, t.red),
|
|
variant: "h2"
|
|
}, n[n.length - 1].failed_logins.toLocaleString()))), r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 3
|
|
}, r.createElement(D.a, {
|
|
className: t.paper
|
|
}, r.createElement(F.a, {
|
|
variant: "body1"
|
|
}, "Pending Applications"), r.createElement(F.a, {
|
|
className: te()(t.counter, t.blue),
|
|
variant: "h2"
|
|
}, a.pending_applications.toLocaleString()))), r.createElement(I.a, {
|
|
item: !0,
|
|
xs: 12
|
|
}, r.createElement(F.a, {
|
|
className: t.smallMargin,
|
|
variant: "h6"
|
|
}, "Last 7 days user activity"), r.createElement(D.a, {
|
|
className: te()(t.paper, t.schedule)
|
|
}, r.createElement(Ff.e, {
|
|
width: "99%",
|
|
height: 300
|
|
}, r.createElement(Ff.d, {
|
|
data: n,
|
|
margin: {
|
|
top: 15,
|
|
right: 0,
|
|
left: 20,
|
|
bottom: 10
|
|
}
|
|
}, r.createElement(Ff.a, {
|
|
strokeDasharray: "3 3"
|
|
}), r.createElement(Ff.g, {
|
|
dataKey: "name"
|
|
}), r.createElement(Ff.h, {
|
|
orientation: "right"
|
|
}), r.createElement(Ff.f, null), r.createElement(Ff.b, {
|
|
align: "left"
|
|
}), r.createElement(Ff.c, {
|
|
type: "monotone",
|
|
dataKey: "signups",
|
|
name: "New signups",
|
|
stroke: "#2076D2",
|
|
strokeWidth: 2
|
|
}), r.createElement(Ff.c, {
|
|
type: "monotone",
|
|
dataKey: "sucessful_logins",
|
|
name: "Logins",
|
|
stroke: "#43A047",
|
|
strokeWidth: 2
|
|
}), r.createElement(Ff.c, {
|
|
type: "monotone",
|
|
dataKey: "failed_logins",
|
|
name: "Failed logins",
|
|
stroke: "#DD503D",
|
|
strokeWidth: 2
|
|
}))))))), this.getGitTab())
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Mf = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
root: {
|
|
flexGrow: 1
|
|
},
|
|
paper: {
|
|
padding: e.spacing(2)
|
|
},
|
|
smallMargin: {
|
|
marginBottom: 10
|
|
},
|
|
schedule: {
|
|
fontSize: 10,
|
|
fontFamily: "Roboto",
|
|
fontWeight: "normal",
|
|
letterSpacing: "0.015em",
|
|
textTransform: "uppercase"
|
|
},
|
|
counter: {
|
|
marginTop: 10
|
|
},
|
|
blue: {
|
|
color: "#0030AE"
|
|
},
|
|
red: {
|
|
color: "#E23328"
|
|
},
|
|
gitTagLabel: {
|
|
fontSize: 18,
|
|
paddingTop: 10,
|
|
fontWeight: "normal",
|
|
position: "fixed",
|
|
right: 30,
|
|
bottom: 42
|
|
},
|
|
gitTagVersion: {
|
|
fontWeight: 500,
|
|
paddingLeft: 15
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(Object(o.b)(function(e) {
|
|
return {
|
|
metrics: is(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
fetchMetrics: function() {
|
|
return e({
|
|
type: ot
|
|
})
|
|
},
|
|
changeCurrentSidebarStatus: function(t) {
|
|
return e(Uc(t))
|
|
}
|
|
}
|
|
})(Uf)),
|
|
Bf = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).currenciesRows = [{
|
|
key: "code",
|
|
alignRight: !1,
|
|
label: "Code"
|
|
}, {
|
|
key: "name",
|
|
alignRight: !1,
|
|
label: "Name"
|
|
}, {
|
|
key: "symbol",
|
|
alignRight: !1,
|
|
label: "Symbol"
|
|
}, {
|
|
key: "type",
|
|
alignRight: !1,
|
|
label: "Type"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !1,
|
|
label: "Created"
|
|
}, {
|
|
key: "visible",
|
|
alignRight: !1,
|
|
label: "Visible"
|
|
}, {
|
|
key: "deposit_enabled",
|
|
alignRight: !1,
|
|
label: "Deposit"
|
|
}, {
|
|
key: "withdrawal_enabled",
|
|
alignRight: !1,
|
|
label: "Withdrawal"
|
|
}, {
|
|
key: "link",
|
|
alignRight: !1,
|
|
label: ""
|
|
}], n.filterData = [{
|
|
property: "type",
|
|
value: "",
|
|
title: "Type"
|
|
}], n.handleSubmitFilter = function(e) {
|
|
n.setState({
|
|
filterType: Aa(e, "type"),
|
|
page: 0
|
|
});
|
|
var t = {
|
|
type: Aa(e, "type"),
|
|
page: 1,
|
|
limit: n.state.rowsPerPage,
|
|
ordering: "asc"
|
|
};
|
|
n.props.getCurrenciesList(t)
|
|
}, n.onRowClick = function(e) {
|
|
n.props.history.push("/tower/exchange/currencies/".concat(e.code, "/edit"))
|
|
}, n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetCurrencies(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetCurrencies(e, 0)
|
|
}, n.handleGetCurrencies = function(e, t) {
|
|
var a = {
|
|
type: n.state.filterType,
|
|
page: t + 1,
|
|
limit: e,
|
|
ordering: "asc"
|
|
};
|
|
n.props.getCurrenciesList(a)
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O(),
|
|
filterType: ""
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getCurrenciesList({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
ordering: "asc"
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.page,
|
|
a = e.rowsPerPage,
|
|
n = this.props,
|
|
i = n.total,
|
|
o = n.list,
|
|
s = py.FilterContainer,
|
|
c = py.Table;
|
|
return r.createElement(r.Fragment, null, r.createElement(c, {
|
|
dataLength: i,
|
|
rows: this.currenciesRows,
|
|
data: o,
|
|
page: t,
|
|
rowsPerPage: a,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
handleRowOnClick: this.onRowClick
|
|
}), r.createElement(s, {
|
|
data: this.filterData,
|
|
handleSubmit: this.handleSubmitFilter
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Wf = Object(xe.g)(Object(o.b)(function(e) {
|
|
return {
|
|
list: Qr(e),
|
|
total: Xr(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getCurrenciesList: function(t) {
|
|
return e(Mr(t))
|
|
}
|
|
}
|
|
})(Bf)),
|
|
Hf = [{
|
|
key: "erc20_contract_address",
|
|
value: "",
|
|
placeholder: "Enter a contract address"
|
|
}, {
|
|
key: "gas_limit",
|
|
value: "",
|
|
placeholder: "140,000"
|
|
}, {
|
|
key: "gas_price",
|
|
value: "",
|
|
placeholder: "Enter a name"
|
|
}],
|
|
Vf = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).handleChangeOption = function(e, t) {
|
|
var a, r = n.state.options,
|
|
i = Object(se.a)(r);
|
|
try {
|
|
for (i.s(); !(a = i.n()).done;) {
|
|
var o = a.value;
|
|
o.key === t && (o.value = e)
|
|
}
|
|
} catch (s) {
|
|
i.e(s)
|
|
} finally {
|
|
i.f()
|
|
}
|
|
n.setState({
|
|
options: r
|
|
})
|
|
}, n.handleAddOption = function(e) {
|
|
var t = n.state.options;
|
|
t.push({
|
|
key: e,
|
|
value: ""
|
|
}), n.setState({
|
|
options: t
|
|
})
|
|
}, n.handleRemoveOption = function(e) {
|
|
var t = n.state.options;
|
|
n.setState({
|
|
options: t.filter(function(t) {
|
|
return t.key !== e
|
|
})
|
|
})
|
|
}, n.create = function() {
|
|
var e, t = n.state,
|
|
a = t.name,
|
|
r = t.code,
|
|
i = t.symbol,
|
|
o = t.type,
|
|
s = t.subunits,
|
|
c = t.precision,
|
|
l = t.blockchain_key,
|
|
u = t.deposit_fee,
|
|
d = t.min_deposit_amount,
|
|
p = t.min_collection_amount,
|
|
h = t.min_withdraw_amount,
|
|
g = t.withdraw_fee,
|
|
m = t.withdraw_limit_24h,
|
|
f = t.withdraw_limit_72h,
|
|
b = t.position,
|
|
y = t.icon_url,
|
|
v = t.visible,
|
|
w = t.options,
|
|
E = t.withdrawal_enabled,
|
|
C = t.deposit_enabled,
|
|
O = {},
|
|
k = Object(se.a)(w);
|
|
try {
|
|
for (k.s(); !(e = k.n()).done;) {
|
|
var x = e.value;
|
|
O[x.key] = x.value
|
|
}
|
|
} catch (j) {
|
|
k.e(j)
|
|
} finally {
|
|
k.f()
|
|
}
|
|
n.props.create({
|
|
name: a,
|
|
code: r,
|
|
symbol: i,
|
|
type: o,
|
|
subunits: s,
|
|
precision: c,
|
|
blockchain_key: l,
|
|
deposit_fee: String(u),
|
|
min_deposit_amount: String(d),
|
|
min_collection_amount: String(p),
|
|
min_withdraw_amount: String(h),
|
|
withdraw_fee: String(g),
|
|
withdraw_limit_24h: String(m),
|
|
withdraw_limit_72h: String(f),
|
|
position: b,
|
|
icon_url: y,
|
|
visible: v,
|
|
withdrawal_enabled: E,
|
|
deposit_enabled: C,
|
|
options: O
|
|
})
|
|
}, n.handleChangeValue = function(e, t) {
|
|
n.setState({
|
|
[t]: e
|
|
})
|
|
}, n.state = {
|
|
name: "",
|
|
code: "",
|
|
symbol: "",
|
|
type: "",
|
|
subunits: 0,
|
|
precision: 0,
|
|
blockchain_key: "",
|
|
deposit_fee: "0",
|
|
min_deposit_amount: "0",
|
|
min_collection_amount: "0",
|
|
min_withdraw_amount: "0",
|
|
withdraw_fee: "0",
|
|
withdraw_limit_24h: "0",
|
|
withdraw_limit_72h: "0",
|
|
position: 0,
|
|
icon_url: "",
|
|
options: Hf,
|
|
visible: !0,
|
|
blockchainPage: 0,
|
|
deposit_enabled: !1,
|
|
withdrawal_enabled: !1
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.blockchains.length || this.props.getBlockchainsList({
|
|
page: this.state.blockchainPage + 1,
|
|
limit: O()
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.name,
|
|
a = e.code,
|
|
n = e.symbol,
|
|
i = e.type,
|
|
o = e.subunits,
|
|
s = e.precision,
|
|
c = e.blockchain_key,
|
|
l = e.deposit_fee,
|
|
u = e.min_deposit_amount,
|
|
d = e.min_collection_amount,
|
|
p = e.min_withdraw_amount,
|
|
h = e.withdraw_fee,
|
|
g = e.withdraw_limit_24h,
|
|
m = e.withdraw_limit_72h,
|
|
f = e.position,
|
|
b = e.icon_url,
|
|
y = e.options,
|
|
v = e.visible,
|
|
w = e.withdrawal_enabled,
|
|
E = e.deposit_enabled,
|
|
C = py.CurrencyComponent;
|
|
return r.createElement(C, {
|
|
name: t,
|
|
code: a,
|
|
symbol: n,
|
|
type: i,
|
|
subunits: o,
|
|
precision: s,
|
|
blockchain_key: c,
|
|
deposit_fee: l,
|
|
min_deposit_amount: u,
|
|
min_collection_amount: d,
|
|
min_withdraw_amount: p,
|
|
withdraw_fee: h,
|
|
withdraw_limit_24h: g,
|
|
withdraw_limit_72h: m,
|
|
position: f,
|
|
icon_url: b,
|
|
visible: v,
|
|
blockchains: this.props.blockchains,
|
|
options: y,
|
|
handleChangeValue: this.handleChangeValue,
|
|
handleChangeOption: this.handleChangeOption,
|
|
handleSubmit: this.create,
|
|
withdrawal_enabled: w,
|
|
deposit_enabled: E,
|
|
handleAddOption: this.handleAddOption,
|
|
handleRemoveOption: this.handleRemoveOption
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Gf = Object(o.b)(function(e) {
|
|
return {
|
|
blockchains: ur(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
create: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Ve,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
getBlockchainsList: function(t) {
|
|
return e(Jn(t))
|
|
}
|
|
}
|
|
})(Vf),
|
|
zf = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).update = function() {
|
|
var e, t = n.props.match.params.code,
|
|
a = n.state,
|
|
r = a.name,
|
|
i = a.symbol,
|
|
o = a.type,
|
|
s = a.subunits,
|
|
c = a.precision,
|
|
l = a.blockchain_key,
|
|
u = a.deposit_fee,
|
|
d = a.min_deposit_amount,
|
|
p = a.min_collection_amount,
|
|
h = a.min_withdraw_amount,
|
|
g = a.withdraw_fee,
|
|
m = a.withdraw_limit_24h,
|
|
f = a.withdraw_limit_72h,
|
|
b = a.position,
|
|
y = a.icon_url,
|
|
v = a.visible,
|
|
w = a.options,
|
|
E = a.deposit_enabled,
|
|
C = a.withdrawal_enabled,
|
|
O = {},
|
|
k = Object(se.a)(w);
|
|
try {
|
|
for (k.s(); !(e = k.n()).done;) {
|
|
var x = e.value;
|
|
O[x.key] = x.value
|
|
}
|
|
} catch (j) {
|
|
k.e(j)
|
|
} finally {
|
|
k.f()
|
|
}
|
|
n.props.update({
|
|
name: r,
|
|
code: t,
|
|
symbol: i,
|
|
type: o,
|
|
subunits: s,
|
|
precision: c,
|
|
blockchain_key: l,
|
|
deposit_fee: String(u),
|
|
min_deposit_amount: String(d),
|
|
min_collection_amount: String(p),
|
|
min_withdraw_amount: String(h),
|
|
withdraw_fee: String(g),
|
|
withdraw_limit_24h: String(m),
|
|
withdraw_limit_72h: String(f),
|
|
position: b,
|
|
icon_url: y,
|
|
visible: v,
|
|
deposit_enabled: E,
|
|
withdrawal_enabled: C,
|
|
options: O
|
|
})
|
|
}, n.handleChangeOption = function(e, t) {
|
|
var a, r = n.state.options,
|
|
i = Object(se.a)(r);
|
|
try {
|
|
for (i.s(); !(a = i.n()).done;) {
|
|
var o = a.value;
|
|
o.key === t && (o.value = e)
|
|
}
|
|
} catch (s) {
|
|
i.e(s)
|
|
} finally {
|
|
i.f()
|
|
}
|
|
n.setState({
|
|
options: r
|
|
})
|
|
}, n.handleAddOption = function(e) {
|
|
var t = n.state.options;
|
|
t.push({
|
|
key: e,
|
|
value: ""
|
|
}), n.setState({
|
|
options: t
|
|
})
|
|
}, n.handleRemoveOption = function(e) {
|
|
var t = n.state.options;
|
|
n.setState({
|
|
options: t.filter(function(t) {
|
|
return t.key !== e
|
|
})
|
|
})
|
|
}, n.handleChangeValue = function(e, t) {
|
|
n.setState({
|
|
[t]: e
|
|
})
|
|
}, n.state = {
|
|
name: "",
|
|
symbol: "",
|
|
type: "",
|
|
subunits: 0,
|
|
precision: 0,
|
|
blockchain_key: "",
|
|
deposit_fee: "0",
|
|
min_deposit_amount: "0",
|
|
min_collection_amount: "0",
|
|
min_withdraw_amount: "0",
|
|
withdraw_fee: "0",
|
|
withdraw_limit_24h: "0",
|
|
withdraw_limit_72h: "0",
|
|
position: 0,
|
|
icon_url: "",
|
|
options: [],
|
|
visible: !1,
|
|
blockchainPage: 0,
|
|
deposit_enabled: !1,
|
|
withdrawal_enabled: !1
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "UNSAFE_componentWillReceiveProps",
|
|
value: function(e) {
|
|
var t = e.currency;
|
|
if (t && (this.setState({
|
|
name: t.name,
|
|
symbol: t.symbol,
|
|
type: t.type,
|
|
subunits: t.subunits,
|
|
precision: t.precision,
|
|
blockchain_key: t.blockchain_key,
|
|
deposit_fee: t.deposit_fee,
|
|
min_deposit_amount: t.min_deposit_amount,
|
|
min_collection_amount: t.min_collection_amount,
|
|
min_withdraw_amount: t.min_withdraw_amount,
|
|
withdraw_fee: t.withdraw_fee,
|
|
withdraw_limit_24h: t.withdraw_limit_24h,
|
|
withdraw_limit_72h: t.withdraw_limit_72h,
|
|
position: t.position,
|
|
icon_url: t.icon_url,
|
|
visible: t.visible,
|
|
blockchainPage: 0,
|
|
deposit_enabled: t.deposit_enabled,
|
|
withdrawal_enabled: t.withdrawal_enabled
|
|
}), t.options)) {
|
|
for (var a = [], n = 0, r = Object.keys(t.options); n < r.length; n++) {
|
|
var i = r[n];
|
|
a.push({
|
|
key: i,
|
|
value: t.options[i]
|
|
})
|
|
}
|
|
this.setState({
|
|
options: a
|
|
})
|
|
}
|
|
}
|
|
}, {
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
var e = this.props.match.params.code;
|
|
this.props.getCurrency({
|
|
code: e
|
|
}), this.props.blockchains.length || this.props.getBlockchainsList({
|
|
page: this.state.blockchainPage + 1,
|
|
limit: O()
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.name,
|
|
a = e.symbol,
|
|
n = e.type,
|
|
i = e.subunits,
|
|
o = e.precision,
|
|
s = e.blockchain_key,
|
|
c = e.deposit_fee,
|
|
l = e.min_deposit_amount,
|
|
u = e.min_collection_amount,
|
|
d = e.min_withdraw_amount,
|
|
p = e.withdraw_fee,
|
|
h = e.withdraw_limit_24h,
|
|
g = e.withdraw_limit_72h,
|
|
m = e.position,
|
|
f = e.icon_url,
|
|
b = e.options,
|
|
y = e.visible,
|
|
v = e.withdrawal_enabled,
|
|
w = e.deposit_enabled,
|
|
E = py.CurrencyComponent,
|
|
C = this.props.match.params.code;
|
|
return r.createElement(E, {
|
|
name: t,
|
|
code: C,
|
|
symbol: a,
|
|
type: n,
|
|
subunits: i,
|
|
precision: o,
|
|
blockchain_key: s,
|
|
deposit_fee: c,
|
|
min_deposit_amount: l,
|
|
min_collection_amount: u,
|
|
min_withdraw_amount: d,
|
|
withdraw_fee: p,
|
|
withdraw_limit_24h: h,
|
|
withdraw_limit_72h: g,
|
|
position: m,
|
|
icon_url: f,
|
|
visible: y,
|
|
blockchains: this.props.blockchains,
|
|
options: b,
|
|
handleChangeValue: this.handleChangeValue,
|
|
handleChangeOption: this.handleChangeOption,
|
|
handleSubmit: this.update,
|
|
withdrawal_enabled: v,
|
|
deposit_enabled: w,
|
|
handleAddOption: this.handleAddOption,
|
|
handleRemoveOption: this.handleRemoveOption
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Kf = Object(o.b)(function(e) {
|
|
return {
|
|
blockchains: ur(e),
|
|
currency: $r(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
update: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Ge,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
getBlockchainsList: function(t) {
|
|
return e(Jn(t))
|
|
},
|
|
getCurrency: function(t) {
|
|
return e(Kr(t))
|
|
}
|
|
}
|
|
})(Object(xe.g)(zf)),
|
|
Zf = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).marketsRows = [{
|
|
key: "name",
|
|
alignRight: !1,
|
|
label: "Market ID"
|
|
}, {
|
|
key: "price_precision",
|
|
alignRight: !1,
|
|
label: "Price precision"
|
|
}, {
|
|
key: "amount_precision",
|
|
alignRight: !1,
|
|
label: "Amount precision"
|
|
}, {
|
|
key: "min_price",
|
|
alignRight: !1,
|
|
label: "Min Price"
|
|
}, {
|
|
key: "max_price",
|
|
alignRight: !1,
|
|
label: "Max Price"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !1,
|
|
label: "Created"
|
|
}, {
|
|
key: "state",
|
|
alignRight: !1,
|
|
label: "Status"
|
|
}, {
|
|
key: "arrow_icon",
|
|
alignRight: !1,
|
|
label: ""
|
|
}], n.onRowClick = function(e) {
|
|
n.props.history.push("/tower/exchange/markets/".concat(e.id, "/info"))
|
|
}, n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetMarkets(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetMarkets(e, 0)
|
|
}, n.handleGetMarkets = function(e, t) {
|
|
n.props.getMarketsList({
|
|
page: t + 1,
|
|
limit: e,
|
|
ordering: "asc"
|
|
})
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O()
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getMarketsList({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
ordering: "desc"
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.page,
|
|
a = e.rowsPerPage,
|
|
n = this.props,
|
|
i = n.total,
|
|
o = n.list,
|
|
s = py.Table;
|
|
return r.createElement(s, {
|
|
dataLength: i,
|
|
rows: this.marketsRows,
|
|
data: o,
|
|
page: t,
|
|
rowsPerPage: a,
|
|
handleChangePage: this.handleChangePage,
|
|
handleRowOnClick: this.onRowClick,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Yf = Object(o.b)(function(e) {
|
|
return {
|
|
list: No(e),
|
|
total: Fo(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getMarketsList: function(t) {
|
|
return e(jo(t))
|
|
}
|
|
}
|
|
})(Object(xe.g)(Zf)),
|
|
qf = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).handleUpdateMarket = function(e, t) {
|
|
n.setState({
|
|
market: Object(b.a)(Object(b.a)({}, n.state.market), {}, {
|
|
[t]: e.target.value
|
|
})
|
|
})
|
|
}, n.handleChange = function() {
|
|
var e = n.state.market;
|
|
n.setState({
|
|
market: Object(b.a)(Object(b.a)({}, e), {}, {
|
|
state: "enabled" === e.state ? "disabled" : "enabled"
|
|
})
|
|
})
|
|
}, n.handleSelectBase = function(e) {
|
|
var t = n.state.market,
|
|
a = e.target.value.toUpperCase(),
|
|
r = t.quote_unit.toUpperCase();
|
|
n.setState({
|
|
market: Object(b.a)(Object(b.a)({}, t), {}, {
|
|
base_unit: e.target.value.toLowerCase(),
|
|
name: "".concat(a, "/").concat(r),
|
|
id: "".concat(a.toLowerCase()).concat(r.toLowerCase())
|
|
})
|
|
})
|
|
}, n.handleSelectQuote = function(e) {
|
|
var t = n.state.market,
|
|
a = e.target.value.toUpperCase(),
|
|
r = t.base_unit.toUpperCase();
|
|
n.setState({
|
|
market: Object(b.a)(Object(b.a)({}, t), {}, {
|
|
quote_unit: a.toLowerCase(),
|
|
name: "".concat(r, "/").concat(a),
|
|
id: "".concat(r.toLowerCase()).concat(a.toLowerCase())
|
|
})
|
|
})
|
|
}, n.getBaseCurrencies = function() {
|
|
var e = n.props.currencies,
|
|
t = n.state.market;
|
|
return e.filter(function(e) {
|
|
return e.code.toLowerCase() !== t.quote_unit.toLowerCase()
|
|
}).map(function(e, t) {
|
|
return r.createElement(G.a, {
|
|
key: t,
|
|
value: e.code
|
|
}, e.code.toUpperCase())
|
|
})
|
|
}, n.getQuoteCurrencies = function() {
|
|
var e = n.props.currencies,
|
|
t = n.state.market;
|
|
return e.filter(function(e) {
|
|
return e.code.toLowerCase() !== t.base_unit.toLowerCase()
|
|
}).map(function(e, t) {
|
|
return r.createElement(G.a, {
|
|
key: t,
|
|
value: e.code
|
|
}, e.code.toUpperCase())
|
|
})
|
|
}, n.createMarket = function(e) {
|
|
if (!e.engine_id) {
|
|
return window.alert("Please select an Engine (required by Peatio).")
|
|
}
|
|
var t = {
|
|
max_price: String(e.max_price),
|
|
position: e.position,
|
|
state: e.state,
|
|
base_currency: e.base_unit,
|
|
quote_currency: e.quote_unit,
|
|
amount_precision: e.amount_precision,
|
|
price_precision: e.price_precision,
|
|
min_price: String(e.min_price),
|
|
min_amount: String(e.min_amount),
|
|
engine_id: Number(e.engine_id)
|
|
};
|
|
n.props.createMarketFetch(t)
|
|
}, n.getEngines = function() {
|
|
return (n.state.engines || []).map(function(e) {
|
|
return r.createElement(G.a, {
|
|
key: e.id,
|
|
value: String(e.id)
|
|
}, e.name + " (" + e.driver + ")")
|
|
})
|
|
}, n.loadEngines = function() {
|
|
var e = window.env && window.env.peatioUrl ? String(window.env.peatioUrl).replace(/\/$/, "") : "",
|
|
t = e + "/admin/engines?limit=100&page=1&ordering=asc&order_by=id";
|
|
fetch(t, {
|
|
credentials: "include",
|
|
headers: {
|
|
Accept: "application/json",
|
|
"X-CSRF-Token": localStorage.getItem("csrfToken") || ""
|
|
}
|
|
}).then(function(e) {
|
|
if (!e.ok) throw new Error("engines HTTP " + e.status);
|
|
return e.json()
|
|
}).then(function(e) {
|
|
var t = Array.isArray(e) ? e : [],
|
|
a = t[0];
|
|
n.setState({
|
|
engines: t,
|
|
market: Object(b.a)(Object(b.a)({}, n.state.market), {}, {
|
|
engine_id: n.state.market.engine_id || (a ? String(a.id) : "")
|
|
})
|
|
})
|
|
}).catch(function(e) {
|
|
console.error("Failed to load engines", e)
|
|
})
|
|
}, n.state = {
|
|
market: {
|
|
state: "disabled",
|
|
base_unit: "",
|
|
quote_unit: "",
|
|
name: "",
|
|
min_price: "0.0",
|
|
max_price: "0.0",
|
|
maker_fee: "",
|
|
taker_fee: "",
|
|
min_amount: "0.0",
|
|
price_precision: 0,
|
|
amount_precision: 0,
|
|
position: 0,
|
|
engine_id: "",
|
|
id: "",
|
|
created_at: "",
|
|
updated_at: ""
|
|
},
|
|
engines: [],
|
|
base_unit: "",
|
|
quote_unit: ""
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
0 === this.props.currencies.length && this.props.getCurrenciesList({
|
|
page: 1,
|
|
limit: 50
|
|
}), this.loadEngines()
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = py.MarketComponent;
|
|
return r.createElement(e, {
|
|
handleSelectBase: this.handleSelectBase,
|
|
handleSelectQuote: this.handleSelectQuote,
|
|
getBaseCurrencies: this.getBaseCurrencies,
|
|
handleChange: this.handleChange,
|
|
handleUpdateMarket: this.handleUpdateMarket,
|
|
getQuoteCurrencies: this.getQuoteCurrencies,
|
|
getEngines: this.getEngines,
|
|
handleSubmit: this.createMarket,
|
|
market: this.state.market
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Jf = Object(o.b)(function(e) {
|
|
return {
|
|
market: Uo(e),
|
|
currencies: Qr(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getMarket: function(t) {
|
|
return e(_o(t))
|
|
},
|
|
createMarketFetch: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: it,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
getCurrenciesList: function(t) {
|
|
return e(Mr(t))
|
|
}
|
|
}
|
|
})(qf),
|
|
Qf = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).handleUpdateMarket = function(e, t) {
|
|
n.setState({
|
|
market: Object(b.a)(Object(b.a)({}, n.state.market), {}, {
|
|
[t]: e.target.value
|
|
})
|
|
})
|
|
}, n.handleChange = function() {
|
|
var e = n.state.market;
|
|
n.setState({
|
|
market: Object(b.a)(Object(b.a)({}, e), {}, {
|
|
state: "enabled" === e.state ? "disabled" : "enabled"
|
|
})
|
|
})
|
|
}, n.getBaseCurrencies = function() {
|
|
var e = n.props.currencies,
|
|
t = n.state,
|
|
a = t.quote_unit,
|
|
i = t.base_unit,
|
|
o = t.market;
|
|
return e.filter(function(e) {
|
|
return e.code.toLowerCase() !== o.quote_unit.toLowerCase()
|
|
}).filter(function(e) {
|
|
return !(o.quote_unit === i && e.code === a)
|
|
}).map(function(e, t) {
|
|
return r.createElement(G.a, {
|
|
key: t,
|
|
value: e.code
|
|
}, e.code.toUpperCase())
|
|
})
|
|
}, n.getQuoteCurrencies = function() {
|
|
var e = n.props.currencies,
|
|
t = n.state,
|
|
a = t.quote_unit,
|
|
i = t.base_unit,
|
|
o = t.market;
|
|
return e.filter(function(e) {
|
|
return e.code.toLowerCase() !== o.base_unit.toLowerCase()
|
|
}).filter(function(e) {
|
|
return !(o.base_unit === a && e.code === i)
|
|
}).map(function(e, t) {
|
|
return r.createElement(G.a, {
|
|
key: t,
|
|
value: e.code
|
|
}, e.code.toUpperCase())
|
|
})
|
|
}, n.updateMarketFetch = function(e) {
|
|
var t = {
|
|
max_price: String(e.max_price),
|
|
position: e.position,
|
|
state: e.state,
|
|
id: e.id,
|
|
min_price: String(e.min_price),
|
|
min_amount: String(e.min_amount),
|
|
price_precision: Number(e.price_precision),
|
|
amount_precision: Number(e.amount_precision)
|
|
};
|
|
n.props.updateMarketFetch(t)
|
|
}, n.state = {
|
|
market: {
|
|
state: "",
|
|
base_unit: "",
|
|
quote_unit: "",
|
|
name: "",
|
|
min_price: "",
|
|
max_price: "",
|
|
maker_fee: "",
|
|
taker_fee: "",
|
|
min_amount: "",
|
|
price_precision: 0,
|
|
amount_precision: 0,
|
|
position: 0,
|
|
id: "",
|
|
created_at: "",
|
|
updated_at: ""
|
|
},
|
|
base_unit: "",
|
|
quote_unit: ""
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getMarket({
|
|
pair: this.props.match.params.id
|
|
}), 0 === this.props.currencies.length && this.props.getCurrenciesList({
|
|
page: 1,
|
|
limit: 50
|
|
})
|
|
}
|
|
}, {
|
|
key: "UNSAFE_componentWillReceiveProps",
|
|
value: function(e) {
|
|
var t = this.state.market;
|
|
!e.market || !e.market.id || t.id && t.id === e.market.id || this.setState({
|
|
market: e.market,
|
|
base_unit: e.market.base_unit,
|
|
quote_unit: e.market.quote_unit
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = py.MarketComponent;
|
|
return r.createElement(e, {
|
|
getBaseCurrencies: this.getBaseCurrencies,
|
|
handleChange: this.handleChange,
|
|
handleUpdateMarket: this.handleUpdateMarket,
|
|
getQuoteCurrencies: this.getQuoteCurrencies,
|
|
handleSubmit: this.updateMarketFetch,
|
|
market: this.state.market
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Xf = Object(o.b)(function(e) {
|
|
return {
|
|
market: Uo(e),
|
|
currencies: Qr(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getMarket: function(t) {
|
|
return e(_o(t))
|
|
},
|
|
updateMarketFetch: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: rt,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
getCurrenciesList: function(t) {
|
|
return e(Mr(t))
|
|
}
|
|
}
|
|
})(Object(xe.g)(Qf)),
|
|
$f = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).labels = ["Orderbook", "Configuration"], n
|
|
.handleChangeTab = function(e, t) {
|
|
n.setState({
|
|
activeIndex: t
|
|
})
|
|
}, n.renderContent = function() {
|
|
switch (n.state.activeIndex) {
|
|
case 0:
|
|
return r.createElement(tb, null);
|
|
case 1:
|
|
return r.createElement(Xf, null);
|
|
default:
|
|
return
|
|
}
|
|
}, n.state = {
|
|
activeIndex: 0
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state.activeIndex,
|
|
t = py.Tabs;
|
|
return r.createElement(r.Fragment, null, r.createElement(t, {
|
|
labels: this.labels,
|
|
handleChange: this.handleChangeTab,
|
|
activeIndex: e
|
|
}), r.createElement("div", {
|
|
style: {
|
|
marginTop: 10
|
|
}
|
|
}, this.renderContent()))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
eb = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).tableRowsBids = [{
|
|
key: "id",
|
|
alignRight: !1,
|
|
label: "Order ID"
|
|
}, {
|
|
key: "uid",
|
|
alignRight: !1,
|
|
label: "UID"
|
|
}, {
|
|
key: "ord_type",
|
|
alignRight: !1,
|
|
label: "Type"
|
|
}, {
|
|
key: "price",
|
|
alignRight: !1,
|
|
label: "Price"
|
|
}, {
|
|
key: "origin_volume",
|
|
alignRight: !1,
|
|
label: "Amount"
|
|
}, {
|
|
key: "total_value",
|
|
alignRight: !1,
|
|
label: "Total"
|
|
}, {
|
|
key: "cancel",
|
|
alignRight: !0,
|
|
label: ""
|
|
}], n.formatTableData = function(e) {
|
|
var t = n.props.currentMarket,
|
|
a = Oa(n.props[e]),
|
|
r = t ? t.price_precision : 0,
|
|
i = t ? t.amount_precision : 0;
|
|
return n.props[e].sort(function(e, t) {
|
|
return Number(t[0]) - Number(e[0])
|
|
}).map(function(e, t) {
|
|
var n = e.id,
|
|
o = e.uid,
|
|
s = e.ord_type,
|
|
c = e.price,
|
|
l = e.origin_volume;
|
|
return {
|
|
id: n,
|
|
uid: o,
|
|
ord_type: s,
|
|
price: Pa(c, r),
|
|
origin_volume: Pa(l, i),
|
|
total_value: Pa(a[t], i)
|
|
}
|
|
})
|
|
}, n.handleChangePageAsks = function(e) {
|
|
var t = n.state.rowsPerPageAsks,
|
|
a = n.props.match.params.id;
|
|
n.setState({
|
|
pageAsks: e
|
|
}), n.getAsksList(t, e, a)
|
|
}, n.handleChangePageBids = function(e) {
|
|
var t = n.state.rowsPerPageBids,
|
|
a = n.props.match.params.id;
|
|
n.setState({
|
|
pageBids: e
|
|
}), n.getBidsList(t, e, a)
|
|
}, n.onClickShowAllAsks = function() {
|
|
var e = n.props.match.params.id;
|
|
n.props.asksFetch({
|
|
market: e
|
|
}), n.setState({
|
|
displayShowAllAsks: !1
|
|
})
|
|
}, n.onClickShowAllBids = function() {
|
|
var e = n.props.match.params.id;
|
|
n.props.bidsFetch({
|
|
market: e
|
|
}), n.setState({
|
|
displayShowAllBids: !1
|
|
})
|
|
}, n.handleChangeRowsPerPageAsks = function(e) {
|
|
var t = n.props.match.params.id;
|
|
n.setState({
|
|
rowsPerPageAsks: e
|
|
}), n.getAsksList(e, 0, t)
|
|
}, n.handleChangeRowsPerPageBids = function(e) {
|
|
var t = n.props.match.params.id;
|
|
n.setState({
|
|
rowsPerPageBids: e
|
|
}), n.getBidsList(e, 0, t)
|
|
}, n.getAsksList = function(e, t, a) {
|
|
n.props.asksFetch({
|
|
page: t + 1,
|
|
limit: e,
|
|
market: a
|
|
})
|
|
}, n.getBidsList = function(e, t, a) {
|
|
n.props.bidsFetch({
|
|
page: t + 1,
|
|
limit: e,
|
|
market: a
|
|
})
|
|
}, n.handleDeleteAsk = function(e) {
|
|
n.props.cancelOrder({
|
|
orders: {
|
|
id: e
|
|
}
|
|
}), n.getAsksList(n.state.rowsPerPageAsks, n.state.pageAsks, n.props.match.params.id), n
|
|
.getBidsList(n.state.rowsPerPageBids, n.state.pageBids, n.props.match.params.id)
|
|
}, n.handleDeleteBid = function(e) {
|
|
n.props.cancelOrder({
|
|
orders: {
|
|
id: e
|
|
}
|
|
}), n.getBidsList(n.state.rowsPerPageBids, n.state.pageBids, n.props.match.params.id), n
|
|
.getAsksList(n.state.rowsPerPageAsks, n.state.pageAsks, n.props.match.params.id)
|
|
}, n.state = {
|
|
rowsPerPageAsks: O(),
|
|
rowsPerPageBids: O(),
|
|
pageAsks: 0,
|
|
pageBids: 0,
|
|
displayShowAllAsks: !0,
|
|
displayShowAllBids: !0
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
var e = this.props.match.params.id,
|
|
t = this.state,
|
|
a = t.rowsPerPageAsks,
|
|
n = t.rowsPerPageBids,
|
|
r = t.pageAsks,
|
|
i = t.pageBids;
|
|
this.getAsksList(a, r, e), this.getBidsList(n, i, e), this.props.getMarket({
|
|
pair: e
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.rowsPerPageAsks,
|
|
a = e.rowsPerPageBids,
|
|
n = e.displayShowAllAsks,
|
|
i = e.displayShowAllBids,
|
|
o = e.pageAsks,
|
|
s = e.pageBids,
|
|
c = this.props,
|
|
l = c.totalBids,
|
|
u = c.totalAsks,
|
|
d = py.Table;
|
|
return r.createElement("div", {
|
|
style: {
|
|
display: "flex",
|
|
justifyContent: "space-between",
|
|
width: "100%"
|
|
}
|
|
}, r.createElement("div", {
|
|
style: {
|
|
width: "50%",
|
|
marginRight: 10
|
|
}
|
|
}, r.createElement(F.a, {
|
|
variant: "h6",
|
|
style: {
|
|
fontWeight: "bold"
|
|
}
|
|
}, "Buy orders"), r.createElement(d, {
|
|
data: this.formatTableData("bids"),
|
|
rows: this.tableRowsBids,
|
|
dataLength: l,
|
|
rowsPerPage: a,
|
|
isSmall: !0,
|
|
showAll: i,
|
|
handleShowAll: this.onClickShowAllBids,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPageBids,
|
|
handleChangePage: this.handleChangePageBids,
|
|
page: s,
|
|
handleDelete: this.handleDeleteBid
|
|
})), r.createElement("div", {
|
|
style: {
|
|
width: "50%"
|
|
}
|
|
}, r.createElement(F.a, {
|
|
variant: "h6",
|
|
style: {
|
|
fontWeight: "bold"
|
|
}
|
|
}, "Sell orders"), r.createElement(d, {
|
|
data: this.formatTableData("asks"),
|
|
rows: this.tableRowsBids,
|
|
rowsPerPage: t,
|
|
dataLength: u,
|
|
isSmall: !0,
|
|
showAll: n,
|
|
handleShowAll: this.onClickShowAllAsks,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPageAsks,
|
|
handleChangePage: this.handleChangePageAsks,
|
|
page: o,
|
|
handleDelete: this.handleDeleteAsk
|
|
})))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
tb = Object(xe.g)(Object(o.b)(function(e) {
|
|
return {
|
|
asks: js(e),
|
|
bids: Rs(e),
|
|
totalAsks: _s(e),
|
|
totalBids: Ss(e),
|
|
currentMarket: Uo(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
asksFetch: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: st,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
bidsFetch: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: ct,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
getMarket: function(t) {
|
|
return e(_o(t))
|
|
},
|
|
cancelOrder: function(t) {
|
|
return e(Is(t))
|
|
}
|
|
}
|
|
})(eb)),
|
|
ab = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).state = {
|
|
activeIndex: 0
|
|
}, e.labels = ["Open Orders", "Orders history"], e.handleChangeTab = function(t, a) {
|
|
e.setState({
|
|
activeIndex: a
|
|
}), e.props.history.push("/tower/exchange/orders/".concat(0 === a ? "open" : "history"))
|
|
}, e.renderContent = function() {
|
|
var t = e.state.activeIndex,
|
|
a = py.OrdersElement;
|
|
switch (t) {
|
|
case 0:
|
|
return r.createElement(a, {
|
|
type: "open"
|
|
});
|
|
case 1:
|
|
return r.createElement(a, {
|
|
type: "all"
|
|
});
|
|
default:
|
|
return
|
|
}
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.history.location.pathname.includes("/open") ? this.setState({
|
|
activeIndex: 0
|
|
}) : this.setState({
|
|
activeIndex: 1
|
|
})
|
|
}
|
|
}, {
|
|
key: "UNSAFE_componentWillReceiveProps",
|
|
value: function(e) {
|
|
var t = this.props.history;
|
|
e.history && e.history.location.pathname !== t.location.pathname && (e.history.location
|
|
.pathname.includes("/open") ? this.setState({
|
|
activeIndex: 0
|
|
}) : this.setState({
|
|
activeIndex: 1
|
|
}))
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state.activeIndex,
|
|
t = py.Tabs;
|
|
return r.createElement(r.Fragment, null, r.createElement(t, {
|
|
labels: this.labels,
|
|
handleChange: this.handleChangeTab,
|
|
activeIndex: e
|
|
}), this.renderContent())
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
nb = Object(xe.g)(ab),
|
|
rb = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).ordersHistoryRows = [{
|
|
key: "id",
|
|
alignRight: !1,
|
|
label: "Order ID"
|
|
}, {
|
|
key: "email",
|
|
alignRight: !1,
|
|
label: "Email",
|
|
linkSuffix: "/history#orders"
|
|
}, {
|
|
key: "market",
|
|
alignRight: !1,
|
|
label: "Market"
|
|
}, {
|
|
key: "ord_type",
|
|
alignRight: !1,
|
|
label: "Type"
|
|
}, {
|
|
key: "origin_volume",
|
|
alignRight: !1,
|
|
label: "Amount"
|
|
}, {
|
|
key: "executed_volume",
|
|
alignRight: !1,
|
|
label: "Executed"
|
|
}, {
|
|
key: "price",
|
|
alignRight: !1,
|
|
label: "Price"
|
|
}, {
|
|
key: "side",
|
|
alignRight: !1,
|
|
label: "Side"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !1,
|
|
label: "Created"
|
|
}, {
|
|
key: "updated_at",
|
|
alignRight: !0,
|
|
label: "Updated"
|
|
}, {
|
|
key: "state",
|
|
alignRight: !0,
|
|
label: "State"
|
|
}], n.ordersOpenRows = [{
|
|
key: "id",
|
|
alignRight: !1,
|
|
label: "Order ID"
|
|
}, {
|
|
key: "email",
|
|
alignRight: !1,
|
|
label: "Email",
|
|
linkSuffix: "/open-orders"
|
|
}, {
|
|
key: "market",
|
|
alignRight: !1,
|
|
label: "Market"
|
|
}, {
|
|
key: "ord_type",
|
|
alignRight: !1,
|
|
label: "Type"
|
|
}, {
|
|
key: "origin_volume",
|
|
alignRight: !1,
|
|
label: "Amount"
|
|
}, {
|
|
key: "executed_volume",
|
|
alignRight: !1,
|
|
label: "Executed"
|
|
}, {
|
|
key: "price",
|
|
alignRight: !1,
|
|
label: "Price"
|
|
}, {
|
|
key: "side",
|
|
alignRight: !1,
|
|
label: "Side"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !1,
|
|
label: "Created"
|
|
}, {
|
|
key: "updated_at",
|
|
alignRight: !0,
|
|
label: "Updated"
|
|
}, {
|
|
key: "cancel",
|
|
alignRight: !0,
|
|
label: ""
|
|
}], n.filterData = [{
|
|
property: "market",
|
|
value: "",
|
|
title: "Market"
|
|
}, {
|
|
property: "ord_type",
|
|
value: "",
|
|
title: "Order type"
|
|
}, {
|
|
property: "price",
|
|
value: null,
|
|
title: "Price"
|
|
}, {
|
|
property: "origin_volume",
|
|
value: null,
|
|
title: "Amount"
|
|
}, {
|
|
property: "type",
|
|
value: "",
|
|
title: "Side"
|
|
}, {
|
|
property: "email",
|
|
value: "",
|
|
title: "Email"
|
|
}, {
|
|
property: "uid",
|
|
value: "",
|
|
title: "UID"
|
|
}, {
|
|
property: "from",
|
|
value: null
|
|
}, {
|
|
property: "to",
|
|
value: null
|
|
}], n.handleSubmitFilter = function(e) {
|
|
n.setState({
|
|
filterMarket: Aa(e, "market"),
|
|
filterOrdType: Aa(e, "ord_type"),
|
|
filterPrice: Aa(e, "price"),
|
|
filterOriginVolume: Aa(e, "origin_volume"),
|
|
filterType: Aa(e, "type"),
|
|
filterEmail: Aa(e, "email"),
|
|
filterUid: Aa(e, "uid"),
|
|
filterFrom: Aa(e, "from"),
|
|
filterTo: Aa(e, "to"),
|
|
page: 0
|
|
});
|
|
var t = {
|
|
market: Aa(e, "market").toLowerCase(),
|
|
ord_type: Aa(e, "ord_type").toLowerCase(),
|
|
price: Aa(e, "price"),
|
|
origin_volume: Aa(e, "origin_volume"),
|
|
type: Aa(e, "type").toLowerCase(),
|
|
email: Aa(e, "email"),
|
|
uid: Aa(e, "uid"),
|
|
from: Aa(e, "from"),
|
|
to: Aa(e, "to"),
|
|
page: 1,
|
|
limit: n.state.rowsPerPage,
|
|
ordering: "desc",
|
|
state: "open" === n.props.type ? "wait" : ""
|
|
};
|
|
n.props.getOrdersList(t)
|
|
}, n.handleDeleteClick = function(e) {
|
|
n.setState({
|
|
id: e
|
|
}), n.toggleCancelOrder()
|
|
}, n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetOrders(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetOrders(e, 0)
|
|
}, n.handleGetOrders = function(e, t) {
|
|
var a = n.props.type,
|
|
r = {
|
|
market: n.state.filterMarket.toLowerCase(),
|
|
ord_type: n.state.filterOrdType.toLowerCase(),
|
|
price: null !== n.state.filterPrice ? String(n.state.filterPrice) : "",
|
|
origin_volume: null !== n.state.filterOriginVolume ? String(n.state.filterOriginVolume) : "",
|
|
type: n.state.filterType.toLowerCase(),
|
|
email: n.state.filterEmail,
|
|
uid: n.state.filterUid,
|
|
from: null !== n.state.filterFrom ? n.state.filterFrom : "",
|
|
to: null !== n.state.filterTo ? n.state.filterTo : "",
|
|
page: t + 1,
|
|
limit: e,
|
|
ordering: "desc",
|
|
state: "open" === a ? "wait" : ""
|
|
};
|
|
n.props.getOrdersList(r)
|
|
}, n.handleClick = function() {
|
|
var e = n.state.market;
|
|
n.props.cancelOrders({
|
|
orders: {
|
|
market: e
|
|
},
|
|
params: {
|
|
limit: n.state.rowsPerPage,
|
|
page: n.state.page + 1,
|
|
state: "open" === n.props.type ? "wait" : "",
|
|
market: n.state.filterMarket,
|
|
ord_type: n.state.filterOrdType,
|
|
price: null !== n.state.filterPrice ? String(n.state.filterPrice) : "",
|
|
origin_volume: null !== n.state.filterOriginVolume ? String(n.state.filterOriginVolume) :
|
|
"",
|
|
type: n.state.filterType,
|
|
email: n.state.filterEmail,
|
|
uid: n.state.filterUid,
|
|
from: null !== n.state.filterFrom ? n.state.filterFrom : "",
|
|
to: null !== n.state.filterTo ? n.state.filterTo : "",
|
|
ordering: "desc"
|
|
}
|
|
}), n.props.changeNavbarModalStatus(!1)
|
|
}, n.toggleCreateModal = function() {
|
|
n.props.modalCreate && n.clearFields(), n.props.changeNavbarModalStatus(!1)
|
|
}, n.toggleCancelOrder = function() {
|
|
var e = n.state.openModal;
|
|
n.setState({
|
|
openModal: !e
|
|
})
|
|
}, n.handleDelete = function() {
|
|
n.props.cancelOrder({
|
|
orders: {
|
|
id: n.state.id
|
|
},
|
|
params: {
|
|
limit: n.state.rowsPerPage,
|
|
page: n.state.page + 1,
|
|
state: "open" === n.props.type ? "wait" : "",
|
|
market: n.state.filterMarket,
|
|
ord_type: n.state.filterOrdType,
|
|
price: null !== n.state.filterPrice ? String(n.state.filterPrice) : "",
|
|
origin_volume: null !== n.state.filterOriginVolume ? String(n.state.filterOriginVolume) :
|
|
"",
|
|
type: n.state.filterType,
|
|
email: n.state.filterEmail,
|
|
uid: n.state.filterUid,
|
|
from: null !== n.state.filterFrom ? n.state.filterFrom : "",
|
|
to: null !== n.state.filterTo ? n.state.filterTo : "",
|
|
ordering: "desc"
|
|
}
|
|
}), n.toggleCancelOrder()
|
|
}, n.clearFields = function() {
|
|
n.setState({
|
|
market: ""
|
|
})
|
|
}, n.handleChangeValue = function(e, t) {
|
|
n.setState({
|
|
market: e
|
|
})
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O(),
|
|
market: "",
|
|
filterMarket: "",
|
|
filterOrdType: "",
|
|
filterPrice: null,
|
|
filterOriginVolume: null,
|
|
filterType: "",
|
|
filterEmail: "",
|
|
filterUid: "",
|
|
filterFrom: null,
|
|
filterTo: null,
|
|
openModal: !1,
|
|
id: -1
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
var e = this.props.type;
|
|
this.props.getOrdersList({
|
|
limit: this.state.rowsPerPage,
|
|
page: this.state.page + 1,
|
|
state: "open" === e ? "wait" : "",
|
|
ordering: "desc"
|
|
}), this.props.getMarketsList({
|
|
page: this.state.page + 1,
|
|
limit: O()
|
|
})
|
|
}
|
|
}, {
|
|
key: "UNSAFE_componentWillReceiveProps",
|
|
value: function(e) {
|
|
var t = this.props.type;
|
|
e.type !== t && (this.props.getOrdersList({
|
|
limit: O(),
|
|
page: 1,
|
|
state: "open" === e.type ? "wait" : "",
|
|
ordering: "desc"
|
|
}), this.setState({
|
|
page: 0,
|
|
rowsPerPage: O()
|
|
}))
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.orders,
|
|
a = e.total,
|
|
n = e.type,
|
|
i = e.markets,
|
|
o = e.modalCreate,
|
|
s = this.state,
|
|
c = s.page,
|
|
l = s.rowsPerPage,
|
|
u = s.market,
|
|
d = s.openModal,
|
|
p = py.FilterContainer,
|
|
h = py.CancelOrderModal,
|
|
g = py.CancelOrdersModal,
|
|
m = py.Table,
|
|
f = "open" === n ? this.ordersOpenRows : this.ordersHistoryRows,
|
|
y = t.length && t.map(function(e) {
|
|
return e.price ? e : Object(b.a)(Object(b.a)({}, e), {}, {
|
|
price: e.avg_price
|
|
})
|
|
});
|
|
return r.createElement(r.Fragment, null, r.createElement(m, {
|
|
dataLength: a,
|
|
rows: f,
|
|
data: y,
|
|
page: c,
|
|
rowsPerPage: l,
|
|
handleDelete: this.handleDeleteClick,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
location: this.props.location,
|
|
disableTotal: !0
|
|
}), r.createElement(g, {
|
|
market: u,
|
|
markets: i,
|
|
open: o,
|
|
handleChangeSelect: this.handleChangeValue,
|
|
modalClose: this.toggleCreateModal,
|
|
handleClick: this.handleClick,
|
|
header: "Cancel orders",
|
|
buttonLabel: "CANCEL ALL ORDERS"
|
|
}), r.createElement(h, {
|
|
open: d,
|
|
modalClose: this.toggleCancelOrder,
|
|
handleClick: this.handleDelete,
|
|
header: "Cancel order",
|
|
buttonLabel: "CANCEL ORDER"
|
|
}), r.createElement(p, {
|
|
data: this.filterData,
|
|
handleSubmit: this.handleSubmitFilter
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
ib = Object(xe.g)(Object(o.b)(function(e) {
|
|
return {
|
|
orders: qs(e),
|
|
total: Js(e),
|
|
modalCreate: ls(e),
|
|
markets: No(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getOrdersList: function(t) {
|
|
return e(Ts(t))
|
|
},
|
|
changeNavbarModalStatus: function(t) {
|
|
return e(os(t))
|
|
},
|
|
getMarketsList: function(t) {
|
|
return e(jo(t))
|
|
},
|
|
cancelOrders: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: pt,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
cancelOrder: function(t) {
|
|
return e(Is(t))
|
|
}
|
|
}
|
|
})(rb)),
|
|
ob = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).tradesRows = [{
|
|
key: "id",
|
|
alignRight: !1,
|
|
label: "Trade ID"
|
|
}, {
|
|
key: "maker_order_email",
|
|
alignRight: !1,
|
|
label: "Maker order email",
|
|
linkSuffix: "/history#trades"
|
|
}, {
|
|
key: "taker_order_email",
|
|
alignRight: !1,
|
|
label: "Taker order email",
|
|
linkSuffix: "/history#trades"
|
|
}, {
|
|
key: "maker_uid",
|
|
alignRight: !1,
|
|
label: "Maker UID",
|
|
linkSuffix: "/history#trades"
|
|
}, {
|
|
key: "taker_uid",
|
|
alignRight: !1,
|
|
label: "Taker UID",
|
|
linkSuffix: "/history#trades"
|
|
}, {
|
|
key: "market",
|
|
alignRight: !1,
|
|
label: "Market"
|
|
}, {
|
|
key: "price",
|
|
alignRight: !1,
|
|
label: "Price"
|
|
}, {
|
|
key: "amount",
|
|
alignRight: !1,
|
|
label: "Amount"
|
|
}, {
|
|
key: "total",
|
|
alignRight: !1,
|
|
label: "Total"
|
|
}, {
|
|
key: "taker_type",
|
|
alignRight: !1,
|
|
label: "Side"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !1,
|
|
label: "Trade time"
|
|
}], n.filterData = [{
|
|
property: "uid",
|
|
value: "",
|
|
title: "UID"
|
|
}, {
|
|
property: "orderId",
|
|
value: "",
|
|
title: "Order ID"
|
|
}, {
|
|
property: "from",
|
|
value: null
|
|
}, {
|
|
property: "to",
|
|
value: null
|
|
}], n.handleSubmitFilter = function(e) {
|
|
n.setState({
|
|
filterUID: Aa(e, "uid"),
|
|
filterOrderId: Aa(e, "orderId"),
|
|
filterFrom: Aa(e, "from"),
|
|
filterTo: Aa(e, "to"),
|
|
page: 0
|
|
});
|
|
var t = {
|
|
uid: Aa(e, "uid"),
|
|
order_id: Aa(e, "orderId"),
|
|
from: Aa(e, "from"),
|
|
to: Aa(e, "to"),
|
|
page: 1,
|
|
limit: n.state.rowsPerPage,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getTradesList(t)
|
|
}, n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetTrades(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetTrades(e, 0)
|
|
}, n.handleGetTrades = function(e, t) {
|
|
var a = {
|
|
uid: n.state.filterUID,
|
|
order_id: n.state.filterOrderId,
|
|
from: null !== n.state.filterFrom ? n.state.filterFrom : "",
|
|
to: null !== n.state.filterTo ? n.state.filterTo : "",
|
|
page: t + 1,
|
|
limit: e,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getTradesList(a)
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O(),
|
|
filterOrderId: "",
|
|
filterUID: "",
|
|
filterFrom: null,
|
|
filterTo: null
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getTradesList({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
ordering: "desc"
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.page,
|
|
a = e.rowsPerPage,
|
|
n = this.props,
|
|
i = n.total,
|
|
o = n.list,
|
|
s = py.FilterContainer,
|
|
c = py.Table;
|
|
return r.createElement(r.Fragment, null, r.createElement(c, {
|
|
dataLength: i,
|
|
rows: this.tradesRows,
|
|
data: o,
|
|
page: t,
|
|
rowsPerPage: a,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
disableTotal: !0
|
|
}), r.createElement(s, {
|
|
data: this.filterData,
|
|
handleSubmit: this.handleSubmitFilter,
|
|
api: "peatio"
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
sb = Object(o.b)(function(e) {
|
|
return {
|
|
list: Kc(e),
|
|
total: Zc(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getTradesList: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: vt,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
}
|
|
}
|
|
})(ob),
|
|
cb = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).handleClose = function() {
|
|
n.props.handleToggleFilter({
|
|
isFilterOpen: !1
|
|
})
|
|
}, n.handleChange = function(e, t) {
|
|
var a = n.state.data,
|
|
r = a.find(function(e) {
|
|
return e.property === t
|
|
});
|
|
if (r) {
|
|
var i = a.indexOf(r);
|
|
i > -1 && (a[i].value = e.target.value, n.setState({
|
|
data: a
|
|
}))
|
|
}
|
|
}, n.handleChangeDatePickerElem = function(e, t) {
|
|
var a = n.state.data,
|
|
r = a.find(function(e) {
|
|
return e.property === t
|
|
});
|
|
if (r) {
|
|
var i = a.indexOf(r);
|
|
i > -1 && (a[i].value = e, n.setState({
|
|
data: a
|
|
}))
|
|
}
|
|
}, n.handleResetAll = function() {
|
|
var e = n.state.data;
|
|
e.map(function(e) {
|
|
switch (e.property) {
|
|
case "from":
|
|
case "to":
|
|
e.value = null;
|
|
break;
|
|
default:
|
|
e.value = ""
|
|
}
|
|
return e.value
|
|
}), n.setState({
|
|
data: e
|
|
})
|
|
}, n.filterSubmit = function() {
|
|
var e, t = n.state.data,
|
|
a = [],
|
|
r = Object(se.a)(t);
|
|
try {
|
|
for (r.s(); !(e = r.n()).done;) {
|
|
var i = e.value;
|
|
if (i.value)
|
|
if ("barong" === n.props.api) switch (i.property) {
|
|
case "from":
|
|
var o = {
|
|
key: i.property,
|
|
value: i.value && B()(i.value).startOf("day").unix()
|
|
};
|
|
a.push(o);
|
|
break;
|
|
case "to":
|
|
var s = {
|
|
key: i.property,
|
|
value: i.value && B()(i.value).endOf("day").unix()
|
|
};
|
|
a.push(s);
|
|
break;
|
|
default:
|
|
var c = {
|
|
key: i.property,
|
|
value: i.value
|
|
};
|
|
a.push(c)
|
|
} else switch (i.property) {
|
|
case "from":
|
|
var l = {
|
|
key: i.property,
|
|
value: i.value && B()(i.value).startOf("day").toISOString()
|
|
};
|
|
a.push(l);
|
|
break;
|
|
case "to":
|
|
var u = {
|
|
key: i.property,
|
|
value: i.value && B()(i.value).endOf("day").toISOString()
|
|
};
|
|
a.push(u);
|
|
break;
|
|
default:
|
|
var d = {
|
|
key: i.property,
|
|
value: i.value
|
|
};
|
|
a.push(d)
|
|
}
|
|
}
|
|
} catch (p) {
|
|
r.e(p)
|
|
} finally {
|
|
r.f()
|
|
}
|
|
n.props.handleSubmit(a), n.props.saveFilterDataToState(a), n.handleClose()
|
|
}, n.state = {
|
|
data: e.data
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "UNSAFE_componentWillReceiveProps",
|
|
value: function(e) {
|
|
this.props.location.pathname !== e.location.pathname && (this.handleResetAll(), this.props
|
|
.saveFilterDataToState([]))
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = py.FilterElement;
|
|
return r.createElement(e, {
|
|
isOpen: this.props.isFilterOpen,
|
|
data: this.state.data,
|
|
handleOnClose: this.handleClose,
|
|
handleChange: this.handleChange,
|
|
handleResetAll: this.handleResetAll,
|
|
handleSubmit: this.filterSubmit,
|
|
handlePickerChange: this.handleChangeDatePickerElem
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
lb = Object(xe.g)(Object(o.b)(function(e) {
|
|
return {
|
|
isFilterOpen: eo(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
handleToggleFilter: function(t) {
|
|
return e(Qi(t))
|
|
},
|
|
saveFilterDataToState: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: "SAVE_FILTER_DATA_TO_STATE",
|
|
payload: e
|
|
}
|
|
}(t))
|
|
}
|
|
}
|
|
})(cb)),
|
|
ub = a(627),
|
|
db = a(542),
|
|
pb = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).getCurrentNavbar = function(t) {
|
|
var a = e.props,
|
|
n = a.loggedIn,
|
|
i = a.isSuperAdmin,
|
|
o = py.CurrentNavBar;
|
|
return r.createElement(o, {
|
|
pathname: t,
|
|
loggedIn: n,
|
|
isSuperAdmin: i,
|
|
logout: e.handleLogout
|
|
})
|
|
}, e.handleLogout = function() {
|
|
return e.props.logout()
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this,
|
|
t = this.props,
|
|
a = t.classes,
|
|
n = t.children,
|
|
i = t.history,
|
|
o = t.loggedIn,
|
|
s = t.toggleDrawer,
|
|
c = t.handleDrawerClose,
|
|
l = t.handleToggleFilter,
|
|
u = t.isFilterOpen,
|
|
d = t.isSuperAdmin,
|
|
p = t.open,
|
|
h = t.mobile,
|
|
g = t.toggleContent,
|
|
m = t.isLoggedIn,
|
|
f = i.location && ("/tower/" === i.location.pathname || "/tower" === i.location.pathname),
|
|
b = te()(a.content, {
|
|
[a.mobileContent]: h
|
|
}, {
|
|
[a.contentShift]: o && !f || p && f
|
|
}, {
|
|
[a.contentFullWidth]: g
|
|
}, {
|
|
[a.signInBackground]: !m
|
|
}),
|
|
y = f && h,
|
|
v = py.Navbar;
|
|
return r.createElement(xe.c, {
|
|
history: i
|
|
}, r.createElement("div", {
|
|
className: a.root
|
|
}, r.createElement(ub.a, null), r.createElement(v, {
|
|
loggedIn: o,
|
|
logout: this.handleLogout,
|
|
open: p,
|
|
toggleDrawer: s,
|
|
handleToggleFilter: function() {
|
|
return l({
|
|
isFilterOpen: !u
|
|
})
|
|
},
|
|
isFilterOpen: u,
|
|
handleDrawerClose: c,
|
|
pathname: i.location && i.location.pathname,
|
|
isSuperAdmin: d,
|
|
isDashboard: f,
|
|
mobile: h,
|
|
changeNavbarModalStatus: function() {
|
|
return e.props.changeNavbarModalStatus(!0)
|
|
},
|
|
filterData: this.props.filterData
|
|
}), y ? null : this.getCurrentNavbar(i.location && i.location.pathname), r
|
|
.createElement("div", {
|
|
className: te()(p && a.backgroundOverlay),
|
|
onClick: c
|
|
}), r.createElement("main", {
|
|
className: b
|
|
}, r.createElement("div", {
|
|
className: a.toolbar
|
|
}), n)))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
hb = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
root: {
|
|
display: "flex",
|
|
flexDirection: "column",
|
|
minHeight: "calc(100vh - 33px)"
|
|
},
|
|
toolbar: Object(b.a)({
|
|
display: "flex",
|
|
alignItems: "center",
|
|
justifyContent: "flex-end",
|
|
padding: "0 8px"
|
|
}, e.mixins.toolbar),
|
|
content: {
|
|
flexGrow: 1,
|
|
padding: e.spacing(1.5),
|
|
transition: e.transitions.create("margin", {
|
|
easing: e.transitions.easing.sharp,
|
|
duration: e.transitions.duration.leavingScreen
|
|
})
|
|
},
|
|
contentShift: {
|
|
transition: e.transitions.create("margin", {
|
|
easing: e.transitions.easing.easeOut,
|
|
duration: e.transitions.duration.enteringScreen
|
|
}),
|
|
marginLeft: 256
|
|
},
|
|
mobileContent: {
|
|
marginLeft: 0,
|
|
height: "100vh"
|
|
},
|
|
contentFullWidth: {
|
|
marginLeft: 60
|
|
},
|
|
backgroundOverlay: {
|
|
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
zIndex: 1,
|
|
top: 0,
|
|
left: 0,
|
|
right: 0,
|
|
bottom: 0,
|
|
position: "fixed",
|
|
transition: "opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms"
|
|
},
|
|
signInBackground: {
|
|
backgroundImage: "url(".concat(db, ")"),
|
|
backgroundSize: "cover"
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(Object(o.b)(function(e) {
|
|
return {
|
|
toggleContent: Wc(e),
|
|
isFilterOpen: eo(e),
|
|
filterData: to(e),
|
|
isLoggedIn: Xl(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
changeNavbarModalStatus: function(t) {
|
|
return e(os(t))
|
|
},
|
|
handleToggleFilter: function(t) {
|
|
return e(Qi(t))
|
|
}
|
|
}
|
|
})(pb)),
|
|
gb = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, r = new Array(n), i = 0; i < n; i++) r[i] = arguments[i];
|
|
return (e = t.call.apply(t, [this].concat(r))).state = {
|
|
email: "",
|
|
password: "",
|
|
otp_code: "",
|
|
recaptchaChecked: !1
|
|
}, e.handleChangeEmailValue = function(t) {
|
|
e.setState({
|
|
email: t.target.value
|
|
})
|
|
}, e.handleChangePasswordValue = function(t) {
|
|
e.setState({
|
|
password: t.target.value
|
|
})
|
|
}, e.handleChangeOTPCodeValue = function(t) {
|
|
e.setState({
|
|
otp_code: t.target.value
|
|
})
|
|
}, e.handleCheckRecaptcha = function() {
|
|
e.setState({
|
|
recaptchaChecked: !0
|
|
})
|
|
}, e.signIn = function() {
|
|
var t = e.state,
|
|
a = t.email,
|
|
n = t.password,
|
|
r = t.otp_code;
|
|
e.props.login({
|
|
email: a,
|
|
password: n,
|
|
otp_code: r
|
|
})
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props.classes,
|
|
t = this.state,
|
|
a = t.email,
|
|
n = t.password,
|
|
i = t.recaptchaChecked,
|
|
o = py.LoginBox,
|
|
s = this.props.require2fa;
|
|
return r.createElement("div", {
|
|
className: e.root
|
|
}, r.createElement("main", {
|
|
className: e.main
|
|
}, r.createElement(ub.a, null), r.createElement(D.a, {
|
|
className: e.paper
|
|
}, r.createElement(o, {
|
|
email: a,
|
|
password: n,
|
|
handleChangeEmail: this.handleChangeEmailValue,
|
|
handleChangePassword: this.handleChangePasswordValue,
|
|
handleOTPCode: this.handleChangeOTPCodeValue,
|
|
handleSignIn: this.signIn,
|
|
require2FA: s,
|
|
siteKey: v.config.captcha.siteKey || y.captcha.siteKey,
|
|
captchaType: v.config.captcha.captchaType || y.captcha.captchaType,
|
|
captchaOnChange: this.handleCheckRecaptcha,
|
|
captchaChecked: i
|
|
}))))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
mb = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
root: {
|
|
display: "flex",
|
|
flexDirection: "column"
|
|
},
|
|
main: {
|
|
width: "auto",
|
|
display: "block",
|
|
marginLeft: e.spacing(3),
|
|
marginRight: e.spacing(3),
|
|
[e.breakpoints.up(e.spacing(6) + 400)]: {
|
|
width: 400,
|
|
marginLeft: "auto",
|
|
marginRight: "auto"
|
|
},
|
|
flexGrow: 1
|
|
},
|
|
paper: {
|
|
marginTop: e.spacing(8),
|
|
display: "flex",
|
|
flexDirection: "column",
|
|
alignItems: "center",
|
|
padding: e.spacing(3),
|
|
boxShadow: "0px 32px 32px rgba(38, 50, 56, 0.32)"
|
|
},
|
|
logo: {
|
|
position: "absolute",
|
|
top: e.spacing(3.75),
|
|
left: e.spacing(3.75)
|
|
},
|
|
copyrights: {
|
|
position: "absolute",
|
|
bottom: e.spacing(3.75),
|
|
right: e.spacing(3.75)
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(Object(o.b)(function(e) {
|
|
return {
|
|
require2fa: qn(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
login: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Ae,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
}
|
|
}
|
|
})(gb)),
|
|
fb = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).create = function() {
|
|
var e = n.state,
|
|
t = e.name,
|
|
a = e.client,
|
|
r = e.server,
|
|
i = e.min_confirmations,
|
|
o = e.height,
|
|
s = e.key,
|
|
c = e.explorer_address,
|
|
l = e.explorer_transaction,
|
|
u = e.status;
|
|
n.props.createBlockchainItem({
|
|
name: t,
|
|
client: a,
|
|
server: r,
|
|
min_confirmations: i,
|
|
height: o,
|
|
key: s,
|
|
explorer_address: c,
|
|
explorer_transaction: l,
|
|
status: u
|
|
})
|
|
}, n.handleChangeValue = function(e, t) {
|
|
n.setState({
|
|
[t]: e
|
|
})
|
|
}, n.state = {
|
|
name: "",
|
|
client: "",
|
|
server: "",
|
|
min_confirmations: 0,
|
|
height: 0,
|
|
key: "",
|
|
explorer_address: "",
|
|
explorer_transaction: "",
|
|
status: "disabled"
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getClients()
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.name,
|
|
a = e.client,
|
|
n = e.server,
|
|
i = e.min_confirmations,
|
|
o = e.height,
|
|
s = e.key,
|
|
c = e.explorer_address,
|
|
l = e.explorer_transaction,
|
|
u = e.status,
|
|
d = py.BlockchainComponent;
|
|
return r.createElement(d, {
|
|
name: t,
|
|
client: a,
|
|
server: n,
|
|
min_confirmations: i,
|
|
height: o,
|
|
blockchain_key: s,
|
|
explorer_address: c,
|
|
explorer_transaction: l,
|
|
status: u,
|
|
clients: this.props.clientsList,
|
|
handleChangeValue: this.handleChangeValue,
|
|
handleSubmit: this.create
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
bb = Object(o.b)(function(e) {
|
|
return {
|
|
clientsList: hr(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
createBlockchainItem: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Fe,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
getClients: function() {
|
|
return e(ir())
|
|
}
|
|
}
|
|
})(fb),
|
|
yb = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).handleChangeValue = function(e, t) {
|
|
n.setState({
|
|
[t]: e
|
|
})
|
|
}, n.update = function() {
|
|
var e = n.state,
|
|
t = e.name,
|
|
a = e.client,
|
|
r = e.server,
|
|
i = e.min_confirmations,
|
|
o = e.key,
|
|
s = e.explorer_address,
|
|
c = e.explorer_transaction,
|
|
l = e.status,
|
|
u = Number(n.props.match.params.id);
|
|
n.props.updateBlockchainItem({
|
|
id: u,
|
|
name: t,
|
|
client: a,
|
|
server: r,
|
|
min_confirmations: i,
|
|
key: o,
|
|
explorer_address: s,
|
|
explorer_transaction: c,
|
|
status: l
|
|
})
|
|
}, n.reset = function() {
|
|
var e = n.state.height,
|
|
t = Number(n.props.match.params.id);
|
|
n.props.updateBlockchainItem({
|
|
id: t,
|
|
height: e
|
|
})
|
|
}, n.state = {
|
|
name: "",
|
|
client: "",
|
|
server: "",
|
|
min_confirmations: 0,
|
|
height: 0,
|
|
key: "",
|
|
explorer_address: "",
|
|
explorer_transaction: "",
|
|
status: ""
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "UNSAFE_componentWillReceiveProps",
|
|
value: function(e) {
|
|
var t = e.currentBlockchain;
|
|
t && this.setState({
|
|
name: t.name,
|
|
client: t.client,
|
|
server: t.server,
|
|
min_confirmations: t.min_confirmations,
|
|
height: t.height,
|
|
key: t.key,
|
|
explorer_address: t.explorer_address,
|
|
explorer_transaction: t.explorer_transaction,
|
|
status: t.status
|
|
})
|
|
}
|
|
}, {
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getBlockchainInfo(Number(this.props.match.params.id)), this.props.getClients()
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.name,
|
|
a = e.client,
|
|
n = e.server,
|
|
i = e.min_confirmations,
|
|
o = e.height,
|
|
s = e.key,
|
|
c = e.explorer_address,
|
|
l = e.explorer_transaction,
|
|
u = e.status,
|
|
d = py.BlockchainComponent;
|
|
return r.createElement(d, {
|
|
name: t,
|
|
client: a,
|
|
server: n,
|
|
min_confirmations: i,
|
|
height: o,
|
|
blockchain_key: s,
|
|
explorer_address: c,
|
|
explorer_transaction: l,
|
|
status: u,
|
|
clients: this.props.clientsList,
|
|
handleChangeValue: this.handleChangeValue,
|
|
handleSubmit: this.update,
|
|
handleReset: this.reset
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
vb = Object(o.b)(function(e) {
|
|
return {
|
|
currentBlockchain: pr(e),
|
|
clientsList: hr(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getBlockchainInfo: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Ie,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
updateBlockchainItem: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Ne,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
getClients: function() {
|
|
return e(ir())
|
|
}
|
|
}
|
|
})(Object(xe.g)(yb)),
|
|
wb = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).blockchainsRows = [{
|
|
key: "id",
|
|
alignRight: !1,
|
|
label: "Id"
|
|
}, {
|
|
key: "key",
|
|
alignRight: !1,
|
|
label: "Key"
|
|
}, {
|
|
key: "name",
|
|
alignRight: !1,
|
|
label: "Name"
|
|
}, {
|
|
key: "client",
|
|
alignRight: !1,
|
|
label: "Client"
|
|
}, {
|
|
key: "height",
|
|
alignRight: !1,
|
|
label: "Height"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !1,
|
|
label: "Created"
|
|
}, {
|
|
key: "status",
|
|
alignRight: !1,
|
|
label: "Status"
|
|
}, {
|
|
key: "arrow_icon",
|
|
alignRight: !1,
|
|
label: ""
|
|
}], n.onRowClick = function(e) {
|
|
n.props.history.push("/tower/settings/blockchains/".concat(e.id, "/edit"))
|
|
}, n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetBlockchains(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetBlockchains(e, 0)
|
|
}, n.handleGetBlockchains = function(e, t) {
|
|
n.props.getBlockchainsList({
|
|
ordering: "desc",
|
|
page: t + 1,
|
|
limit: e
|
|
})
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O()
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getBlockchainsList({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
ordering: "desc"
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.page,
|
|
a = e.rowsPerPage,
|
|
n = this.props,
|
|
i = n.total,
|
|
o = n.list,
|
|
s = py.Table;
|
|
return r.createElement(s, {
|
|
dataLength: i,
|
|
rows: this.blockchainsRows,
|
|
data: o,
|
|
page: t,
|
|
rowsPerPage: a,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
handleRowOnClick: this.onRowClick
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Eb = Object(xe.g)(Object(o.b)(function(e) {
|
|
return {
|
|
list: ur(e),
|
|
total: dr(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getBlockchainsList: function(t) {
|
|
return e(Jn(t))
|
|
}
|
|
}
|
|
})(wb)),
|
|
Cb = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).permissionsRows = [{
|
|
key: "role",
|
|
alignRight: !1,
|
|
label: "Role"
|
|
}, {
|
|
key: "verb",
|
|
alignRight: !1,
|
|
label: "Verb"
|
|
}, {
|
|
key: "path",
|
|
alignRight: !1,
|
|
label: "Path"
|
|
}, {
|
|
key: "topic",
|
|
alignRight: !1,
|
|
label: "Topic"
|
|
}, {
|
|
key: "action",
|
|
alignRight: !1,
|
|
label: "Action"
|
|
}, {
|
|
key: "settings",
|
|
alignRight: !0,
|
|
label: ""
|
|
}], n.verbs = ["all", "get", "post", "put", "delete"], n.actions = ["accept", "audit", "drop"], n
|
|
.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetPermissions(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetPermissions(e, 0)
|
|
}, n.handleGetPermissions = function(e, t) {
|
|
n.props.getPermissionsList({
|
|
page: t + 1,
|
|
limit: e
|
|
})
|
|
}, n.handleDeletePermission = function(e) {
|
|
var t = n.state,
|
|
a = t.rowsPerPage,
|
|
r = t.page;
|
|
n.props.deletePermission({
|
|
permission: {
|
|
id: e
|
|
},
|
|
params: {
|
|
page: r + 1,
|
|
limit: a
|
|
}
|
|
})
|
|
}, n.handleEditPermission = function(e) {
|
|
var t = n.props.list.find(function(t) {
|
|
return t.id === e
|
|
});
|
|
t && n.setState({
|
|
id: e,
|
|
role: t.role,
|
|
path: t.path,
|
|
action: t.action,
|
|
topic: t.topic ? t.topic : "",
|
|
verb: t.verb
|
|
}), n.toggleEditModal()
|
|
}, n.handleEditClick = function() {
|
|
var e = n.state,
|
|
t = e.id,
|
|
a = e.role,
|
|
r = e.path,
|
|
i = e.action,
|
|
o = e.verb,
|
|
s = e.topic,
|
|
c = e.rowsPerPage,
|
|
l = {
|
|
permission: {
|
|
role: a,
|
|
path: r,
|
|
verb: o,
|
|
action: i,
|
|
id: t,
|
|
topic: s
|
|
},
|
|
params: {
|
|
page: e.page + 1,
|
|
limit: c
|
|
}
|
|
};
|
|
n.props.updatePermission(l), n.toggleEditModal()
|
|
}, n.handleChangeValue = function(e, t) {
|
|
n.setState({
|
|
[t]: e
|
|
})
|
|
}, n.handleCreateClick = function() {
|
|
var e = n.state,
|
|
t = e.role,
|
|
a = e.path,
|
|
r = e.action,
|
|
i = e.verb,
|
|
o = e.topic,
|
|
s = e.rowsPerPage,
|
|
c = {
|
|
permission: {
|
|
role: t,
|
|
path: a,
|
|
verb: i,
|
|
action: r,
|
|
topic: o
|
|
},
|
|
params: {
|
|
page: e.page + 1,
|
|
limit: s
|
|
}
|
|
};
|
|
n.props.addPermission(c), n.toggleCreateModal()
|
|
}, n.toggleCreateModal = function() {
|
|
n.props.changeNavbarModalStatus(!1), n.clearFields()
|
|
}, n.toggleEditModal = function() {
|
|
var e = n.state.openEdit;
|
|
e && n.clearFields(), n.setState({
|
|
openEdit: !e
|
|
})
|
|
}, n.clearFields = function() {
|
|
n.setState({
|
|
role: "",
|
|
path: "",
|
|
action: "",
|
|
topic: "",
|
|
verb: ""
|
|
})
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O(),
|
|
role: "",
|
|
path: "",
|
|
topic: "",
|
|
verb: "",
|
|
action: "",
|
|
openEdit: !1,
|
|
id: -1
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getPermissionsList({
|
|
page: this.state.page + 1,
|
|
limit: O()
|
|
})
|
|
}
|
|
}, {
|
|
key: "componentWillUnmount",
|
|
value: function() {
|
|
this.props.changeNavbarModalStatus(!1)
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this,
|
|
t = this.state,
|
|
a = t.page,
|
|
n = t.rowsPerPage,
|
|
i = t.role,
|
|
o = t.path,
|
|
s = t.verb,
|
|
c = t.topic,
|
|
l = t.action,
|
|
u = t.openEdit,
|
|
d = this.props,
|
|
p = d.total,
|
|
h = d.list,
|
|
g = d.modalCreate,
|
|
m = py.PermissionModal,
|
|
f = py.Table;
|
|
return r.createElement(r.Fragment, null, r.createElement(f, {
|
|
dataLength: p,
|
|
rows: this.permissionsRows,
|
|
data: h,
|
|
page: a,
|
|
rowsPerPage: n,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
handleDelete: this.handleDeletePermission,
|
|
handleEdit: this.handleEditPermission,
|
|
handleRowOnClick: function(t) {
|
|
return e.handleEditPermission(t.id)
|
|
}
|
|
}), r.createElement(m, {
|
|
role: i,
|
|
path: o,
|
|
topic: c,
|
|
verb: s.toLowerCase(),
|
|
action: l.toLowerCase(),
|
|
handleChangeSelect: this.handleChangeValue,
|
|
open: g,
|
|
modalClose: this.toggleCreateModal,
|
|
handleClick: this.handleCreateClick,
|
|
header: "Create permission",
|
|
buttonLabel: "Create",
|
|
verbs: this.verbs,
|
|
actions: this.actions
|
|
}), r.createElement(m, {
|
|
role: i,
|
|
path: o,
|
|
topic: c,
|
|
verb: s.toLowerCase(),
|
|
action: l.toLowerCase(),
|
|
handleChangeSelect: this.handleChangeValue,
|
|
open: u,
|
|
modalClose: this.toggleEditModal,
|
|
handleClick: this.handleEditClick,
|
|
header: "Edit permission",
|
|
buttonLabel: "Edit",
|
|
verbs: this.verbs,
|
|
actions: this.actions
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Ob = Object(o.b)(function(e) {
|
|
return {
|
|
list: ic(e),
|
|
total: oc(e),
|
|
modalCreate: ls(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getPermissionsList: function(t) {
|
|
return e(Qs(t))
|
|
},
|
|
updatePermission: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: ft,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
deletePermission: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: bt,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
addPermission: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: mt,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
changeNavbarModalStatus: function(t) {
|
|
return e(os(t))
|
|
}
|
|
}
|
|
})(Cb),
|
|
kb = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).blacklistRuleRows = [{
|
|
key: "scope",
|
|
alignRight: !1,
|
|
label: "Scope"
|
|
}, {
|
|
key: "value",
|
|
alignRight: !1,
|
|
label: "Value"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !1,
|
|
label: "Created"
|
|
}, {
|
|
key: "updated_at",
|
|
alignRight: !1,
|
|
label: "Updated"
|
|
}, {
|
|
key: "state",
|
|
alignRight: !1,
|
|
label: "State"
|
|
}, {
|
|
key: "settings",
|
|
alignRight: !0,
|
|
label: ""
|
|
}], n.filterData = [{
|
|
property: "scope",
|
|
value: "",
|
|
title: "Scope"
|
|
}, {
|
|
property: "from",
|
|
value: null
|
|
}, {
|
|
property: "to",
|
|
value: null
|
|
}], n.handleSubmitFilter = function(e) {
|
|
n.setState({
|
|
filterScope: Aa(e, "scope"),
|
|
filterFrom: Aa(e, "from"),
|
|
filterTo: Aa(e, "to"),
|
|
currentPage: 0
|
|
});
|
|
var t = {
|
|
scope: Aa(e, "scope"),
|
|
from: Aa(e, "from"),
|
|
to: Aa(e, "to"),
|
|
page: 1,
|
|
limit: n.state.currentLimit
|
|
};
|
|
n.props.getBlacklistRules(t)
|
|
}, n.handleChangePage = function(e) {
|
|
n.setState({
|
|
currentPage: e
|
|
}), n.handleGetUserActivity(n.state.currentLimit, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
currentLimit: e,
|
|
currentPage: 0
|
|
}), n.handleGetUserActivity(e, 0)
|
|
}, n.handleGetUserActivity = function(e, t) {
|
|
var a = {
|
|
scope: n.state.filterScope,
|
|
from: null !== n.state.filterFrom ? n.state.filterFrom : "",
|
|
to: null !== n.state.filterTo ? n.state.filterTo : "",
|
|
page: t + 1,
|
|
limit: e
|
|
};
|
|
n.props.getBlacklistRules(a)
|
|
}, n.toggleCreateModal = function() {
|
|
n.props.changeNavbarModalStatus(!1), n.clearFields()
|
|
}, n.toggleEditModal = function() {
|
|
n.state.openEdit && n.clearFields(), n.setState({
|
|
openEdit: !n.state.openEdit
|
|
})
|
|
}, n.handleEditRule = function(e) {
|
|
var t = n.props.blacklistRules.find(function(t) {
|
|
return t.id === e
|
|
});
|
|
t && n.setState({
|
|
id: e,
|
|
scope_key: t.scope,
|
|
state_key: t.state,
|
|
param_key: t.value
|
|
}), n.toggleEditModal()
|
|
}, n.handleDeleteRule = function(e) {
|
|
var t = n.state,
|
|
a = t.currentPage,
|
|
r = t.currentLimit;
|
|
n.props.deleteBlacklistRules({
|
|
id: String(e)
|
|
}), n.props.getBlacklistRules({
|
|
page: a + 1,
|
|
limit: r
|
|
})
|
|
}, n.addRestriction = function() {
|
|
var e = n.state,
|
|
t = e.currentPage,
|
|
a = e.currentLimit,
|
|
r = e.scope_key,
|
|
i = e.param_key,
|
|
o = e.state_key;
|
|
n.props.addBlacklistRules({
|
|
scope: r,
|
|
value: i,
|
|
state: o
|
|
}), n.props.getBlacklistRules({
|
|
page: t + 1,
|
|
limit: a
|
|
}), n.toggleCreateModal()
|
|
}, n.editRestiction = function() {
|
|
var e = n.state,
|
|
t = e.id,
|
|
a = e.currentPage,
|
|
r = e.currentLimit,
|
|
i = e.scope_key,
|
|
o = e.param_key,
|
|
s = e.state_key;
|
|
n.props.editBlacklistRules({
|
|
id: String(t),
|
|
scope: i,
|
|
value: o,
|
|
state: s
|
|
}), n.props.getBlacklistRules({
|
|
page: a + 1,
|
|
limit: r
|
|
}), n.toggleEditModal(), n.clearFields()
|
|
}, n.handleChangeValue = function(e, t) {
|
|
n.setState({
|
|
[t]: e.target.value
|
|
})
|
|
}, n.clearFields = function() {
|
|
n.setState({
|
|
state_key: "",
|
|
scope_key: "",
|
|
param_key: ""
|
|
})
|
|
}, n.state = {
|
|
currentPage: 0,
|
|
currentLimit: O(),
|
|
openEdit: !1,
|
|
state_key: "",
|
|
scope_key: "",
|
|
param_key: "",
|
|
id: 0,
|
|
filterScope: "",
|
|
filterFrom: null,
|
|
filterTo: null
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.currentLimit,
|
|
a = e.currentPage;
|
|
this.props.getBlacklistRules({
|
|
page: a + 1,
|
|
limit: t
|
|
})
|
|
}
|
|
}, {
|
|
key: "componentWillUnmount",
|
|
value: function() {
|
|
this.props.changeNavbarModalStatus(!1)
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this,
|
|
t = this.props,
|
|
a = t.blacklistRules,
|
|
n = t.total,
|
|
i = t.modalCreate,
|
|
o = this.state,
|
|
s = o.currentLimit,
|
|
c = o.openEdit,
|
|
l = o.currentPage,
|
|
u = o.state_key,
|
|
d = o.scope_key,
|
|
p = o.param_key,
|
|
h = py.FilterContainer,
|
|
g = py.RestrictionModal,
|
|
m = py.Table;
|
|
return r.createElement(r.Fragment, null, r.createElement(m, {
|
|
dataLength: n,
|
|
rows: this.blacklistRuleRows,
|
|
data: a,
|
|
page: l,
|
|
rowsPerPage: s,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
hidePagination: !1,
|
|
handleDelete: this.handleDeleteRule,
|
|
handleEdit: this.handleEditRule,
|
|
handleRowOnClick: function(t) {
|
|
return e.handleEditRule(t.id)
|
|
}
|
|
}), r.createElement(g, {
|
|
open: i,
|
|
state: u,
|
|
scope: d,
|
|
value: p,
|
|
modalClose: this.toggleCreateModal,
|
|
handleCreateClick: this.addRestriction,
|
|
handleChangeSelect: this.handleChangeValue,
|
|
header: "Add parameter"
|
|
}), r.createElement(g, {
|
|
open: c,
|
|
state: u,
|
|
scope: d,
|
|
value: p,
|
|
modalClose: this.toggleEditModal,
|
|
handleCreateClick: this.editRestiction,
|
|
handleChangeSelect: this.handleChangeValue,
|
|
header: "Edit parameter"
|
|
}), r.createElement(h, {
|
|
data: this.filterData,
|
|
handleSubmit: this.handleSubmitFilter
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
xb = Object(o.b)(function(e) {
|
|
return {
|
|
blacklistRules: fp(e),
|
|
loading: vp(e),
|
|
total: bp(e),
|
|
page: yp(e),
|
|
modalCreate: ls(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getBlacklistRules: function(t) {
|
|
return e({
|
|
type: _t,
|
|
payload: t
|
|
})
|
|
},
|
|
deleteBlacklistRules: function(t) {
|
|
return e({
|
|
type: Tt,
|
|
payload: t
|
|
})
|
|
},
|
|
addBlacklistRules: function(t) {
|
|
return e({
|
|
type: St,
|
|
payload: t
|
|
})
|
|
},
|
|
editBlacklistRules: function(t) {
|
|
return e({
|
|
type: Rt,
|
|
payload: t
|
|
})
|
|
},
|
|
changeNavbarModalStatus: function(t) {
|
|
return e(os(t))
|
|
}
|
|
}
|
|
})(kb),
|
|
jb = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).tradingFeesRows = [{
|
|
key: "id",
|
|
alignRight: !1,
|
|
label: "ID"
|
|
}, {
|
|
key: "group",
|
|
alignRight: !1,
|
|
label: "Group"
|
|
}, {
|
|
key: "market_id",
|
|
alignRight: !1,
|
|
label: "Market"
|
|
}, {
|
|
key: "maker",
|
|
alignRight: !1,
|
|
label: "Maker fee"
|
|
}, {
|
|
key: "taker",
|
|
alignRight: !1,
|
|
label: "Taker fee"
|
|
}, {
|
|
key: "settings",
|
|
alignRight: !0,
|
|
label: ""
|
|
}], n.filterData = [{
|
|
property: "group",
|
|
value: "",
|
|
title: "Group"
|
|
}, {
|
|
property: "market_id",
|
|
value: "",
|
|
title: "Market id"
|
|
}], n.handleSubmitFilter = function(e) {
|
|
n.setState({
|
|
filterGroup: Aa(e, "group"),
|
|
marketId: Aa(e, "market_id"),
|
|
page: 0
|
|
});
|
|
var t = {
|
|
group: Aa(e, "group"),
|
|
market_id: Aa(e, "market_id"),
|
|
page: 1,
|
|
limit: n.state.rowsPerPage,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getTradingFeesList(t)
|
|
}, n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetTrades(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetTrades(e, 0)
|
|
}, n.handleGetTrades = function(e, t) {
|
|
n.props.getTradingFeesList({
|
|
page: t + 1,
|
|
limit: e,
|
|
group: n.state.filterGroup,
|
|
market_id: n.state.marketId,
|
|
ordering: "desc"
|
|
})
|
|
}, n.toggleCreateModal = function() {
|
|
n.props.modalCreate && n.clearFields(), n.props.changeNavbarModalStatus(!1)
|
|
}, n.toggleEditModal = function() {
|
|
var e = n.state.openEdit;
|
|
e && n.clearFields(), n.setState({
|
|
openEdit: !e
|
|
})
|
|
}, n.handleEditRule = function(e) {
|
|
var t = n.props.list.find(function(t) {
|
|
return t.id === e
|
|
});
|
|
t && n.setState({
|
|
id: e,
|
|
group: t.group,
|
|
maker: t.maker,
|
|
market_id: t.market_id,
|
|
taker: t.taker
|
|
}), n.toggleEditModal()
|
|
}, n.handleDeleteRule = function(e) {
|
|
var t = {
|
|
fee: {
|
|
id: e
|
|
},
|
|
params: {
|
|
page: n.state.page + 1,
|
|
limit: n.state.rowsPerPage
|
|
}
|
|
};
|
|
n.props.deleteTradingFee(t)
|
|
}, n.add = function() {
|
|
var e = n.state,
|
|
t = {
|
|
fee: {
|
|
group: e.group,
|
|
market_id: e.market_id,
|
|
maker: e.maker,
|
|
taker: e.taker
|
|
},
|
|
params: {
|
|
page: n.state.page + 1,
|
|
limit: n.state.rowsPerPage
|
|
}
|
|
};
|
|
n.props.addTradingFee(t), n.clearFields(), n.toggleCreateModal()
|
|
}, n.edit = function() {
|
|
var e = n.state,
|
|
t = {
|
|
fee: {
|
|
id: e.id,
|
|
group: e.group,
|
|
market_id: e.market_id,
|
|
maker: e.maker,
|
|
taker: e.taker
|
|
},
|
|
params: {
|
|
page: n.state.page + 1,
|
|
limit: n.state.rowsPerPage
|
|
}
|
|
};
|
|
n.props.updateTradingFee(t), n.toggleEditModal()
|
|
}, n.handleChangeValue = function(e, t) {
|
|
n.setState({
|
|
[t]: e.target.value
|
|
})
|
|
}, n.clearFields = function() {
|
|
n.setState({
|
|
group: "",
|
|
market_id: "",
|
|
maker: "",
|
|
taker: ""
|
|
})
|
|
}, n.state = {
|
|
page: 0,
|
|
id: 0,
|
|
rowsPerPage: O(),
|
|
group: "",
|
|
market_id: "",
|
|
maker: "",
|
|
taker: "",
|
|
openEdit: !1,
|
|
markets: [],
|
|
filterGroup: "",
|
|
marketId: ""
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getMarketsList({
|
|
page: this.state.page + 1,
|
|
limit: O()
|
|
}), this.props.getTradingFeesList({
|
|
page: this.state.page + 1,
|
|
limit: O()
|
|
})
|
|
}
|
|
}, {
|
|
key: "UNSAFE_componentWillReceiveProps",
|
|
value: function(e) {
|
|
if (this.props.marketList.length && e.marketList.length && !this.state.markets.length) {
|
|
var t = e.marketList.map(function(e) {
|
|
return {
|
|
id: e.id
|
|
}
|
|
});
|
|
t.push({
|
|
id: "any"
|
|
}), this.setState({
|
|
markets: t
|
|
})
|
|
}
|
|
}
|
|
}, {
|
|
key: "componentWillUnmount",
|
|
value: function() {
|
|
this.props.changeNavbarModalStatus(!1)
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this,
|
|
t = this.state,
|
|
a = t.page,
|
|
n = t.rowsPerPage,
|
|
i = t.group,
|
|
o = t.maker,
|
|
s = t.taker,
|
|
c = t.market_id,
|
|
l = t.openEdit,
|
|
u = t.markets,
|
|
d = this.props,
|
|
p = d.total,
|
|
h = d.list,
|
|
g = d.modalCreate,
|
|
m = py.FilterContainer,
|
|
f = py.Table,
|
|
b = py.TradingFeeModal;
|
|
return r.createElement(r.Fragment, null, r.createElement(f, {
|
|
dataLength: p,
|
|
rows: this.tradingFeesRows,
|
|
data: h,
|
|
page: a,
|
|
rowsPerPage: n,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
handleDelete: this.handleDeleteRule,
|
|
handleEdit: this.handleEditRule,
|
|
handleRowOnClick: function(t) {
|
|
e.handleEditRule(t.id)
|
|
}
|
|
}), r.createElement(b, {
|
|
open: g,
|
|
name: i,
|
|
market_id: c,
|
|
maker_fee: o,
|
|
taker_fee: s,
|
|
markets: u,
|
|
modalClose: this.toggleCreateModal,
|
|
handleCreateClick: this.add,
|
|
handleChangeSelect: this.handleChangeValue,
|
|
header: "Add fees schedule"
|
|
}), r.createElement(b, {
|
|
open: l,
|
|
name: i,
|
|
market_id: c,
|
|
maker_fee: o,
|
|
taker_fee: s,
|
|
markets: u,
|
|
modalClose: this.toggleEditModal,
|
|
handleCreateClick: this.edit,
|
|
handleChangeSelect: this.handleChangeValue,
|
|
header: "Edit fees schedule"
|
|
}), r.createElement(m, {
|
|
data: this.filterData,
|
|
handleSubmit: this.handleSubmitFilter
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
_b = Object(o.b)(function(e) {
|
|
return {
|
|
list: dl(e),
|
|
total: hl(e),
|
|
marketList: No(e),
|
|
modalCreate: ls(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getTradingFeesList: function(t) {
|
|
return e($c(t))
|
|
},
|
|
deleteTradingFee: function(t) {
|
|
return e({
|
|
type: xt,
|
|
payload: t
|
|
})
|
|
},
|
|
addTradingFee: function(t) {
|
|
return e({
|
|
type: Ot,
|
|
payload: t
|
|
})
|
|
},
|
|
updateTradingFee: function(t) {
|
|
return e({
|
|
type: kt,
|
|
payload: t
|
|
})
|
|
},
|
|
getMarketsList: function(t) {
|
|
return e(jo(t))
|
|
},
|
|
changeNavbarModalStatus: function(t) {
|
|
return e(os(t))
|
|
}
|
|
}
|
|
})(jb),
|
|
Rb = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).walletsRows = [{
|
|
key: "id",
|
|
alignRight: !1,
|
|
label: "Id"
|
|
}, {
|
|
key: "currency",
|
|
alignRight: !1,
|
|
label: "Code"
|
|
}, {
|
|
key: "kind",
|
|
alignRight: !1,
|
|
label: "Kind"
|
|
}, {
|
|
key: "name",
|
|
alignRight: !1,
|
|
label: "Name"
|
|
}, {
|
|
key: "address",
|
|
alignRight: !1,
|
|
label: "Address"
|
|
}, {
|
|
key: "max_balance",
|
|
alignRight: !1,
|
|
label: "Max Balance"
|
|
}, {
|
|
key: "status",
|
|
alignRight: !1,
|
|
label: "Status"
|
|
}, {
|
|
key: "arrow_icon",
|
|
alignRight: !1,
|
|
label: ""
|
|
}], n.filterData = [{
|
|
property: "currency",
|
|
value: "",
|
|
title: "Currency"
|
|
}, {
|
|
property: "blockchain_key",
|
|
value: "",
|
|
title: "Blockchain key"
|
|
}, {
|
|
property: "kind",
|
|
value: "",
|
|
title: "Kind"
|
|
}], n.getExplorerLink = function(e) {
|
|
var t = n.props.currencies.find(function(t) {
|
|
return t.code === e.currency
|
|
});
|
|
if (!e.address || !t || !t.explorer_address) return e;
|
|
var a = t.explorer_address.replace("#{address}", e.address);
|
|
return Object(b.a)({
|
|
explorer_address: a
|
|
}, e)
|
|
}, n.handleSubmitFilter = function(e) {
|
|
n.setState({
|
|
filterCurrency: Aa(e, "currency"),
|
|
filterBlockchain: Aa(e, "blockchain_key"),
|
|
filterKind: Aa(e, "kind"),
|
|
page: 0
|
|
});
|
|
var t = {
|
|
currency: Aa(e, "currency"),
|
|
blockchain_key: Aa(e, "blockchain_key"),
|
|
kind: Aa(e, "kind"),
|
|
page: 1,
|
|
limit: n.state.rowsPerPage,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getWalletsList(t)
|
|
}, n.onRowClick = function(e) {
|
|
n.props.history.push("/tower/settings/wallets/".concat(e.id, "/edit"))
|
|
}, n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetWallets(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetWallets(e, 0)
|
|
}, n.handleGetWallets = function(e, t) {
|
|
n.props.getWalletsList({
|
|
currency: n.state.filterCurrency,
|
|
blockchain_key: n.state.filterBlockchain,
|
|
kind: n.state.filterKind,
|
|
page: t + 1,
|
|
limit: e,
|
|
ordering: "desc"
|
|
})
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O(),
|
|
filterCurrency: "",
|
|
filterBlockchain: "",
|
|
filterKind: ""
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getWalletsList({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
ordering: "desc"
|
|
}), this.props.currencies.length || this.props.getCurrenciesList({
|
|
page: 1,
|
|
limit: 50
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this,
|
|
t = this.state,
|
|
a = t.page,
|
|
n = t.rowsPerPage,
|
|
i = this.props,
|
|
o = i.total,
|
|
s = i.list,
|
|
c = py.FilterContainer,
|
|
l = py.Table;
|
|
return r.createElement(r.Fragment, null, r.createElement(l, {
|
|
dataLength: o,
|
|
rows: this.walletsRows,
|
|
data: s.map(function(t) {
|
|
return e.getExplorerLink(t)
|
|
}),
|
|
page: a,
|
|
rowsPerPage: n,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
handleRowOnClick: this.onRowClick
|
|
}), r.createElement(c, {
|
|
data: this.filterData,
|
|
handleSubmit: this.handleSubmitFilter
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Sb = Object(xe.g)(Object(o.b)(function(e) {
|
|
return {
|
|
list: zp(e),
|
|
total: Zp(e),
|
|
currencies: Qr(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getWalletsList: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Gt,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
getCurrenciesList: function(t) {
|
|
return e(Mr(t))
|
|
}
|
|
}
|
|
})(Rb)),
|
|
Tb = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).submit = function() {
|
|
var e = n.state,
|
|
t = e.name,
|
|
a = e.blockchain_key,
|
|
r = e.currency_id,
|
|
i = e.gateway,
|
|
o = e.address,
|
|
s = e.kind,
|
|
c = e.max_balance,
|
|
l = e.status,
|
|
u = e.settings,
|
|
d = u;
|
|
e.isBitGo && (d = Object(b.a)(Object(b.a)({}, u), {}, {
|
|
testnet: u.testnet || !1
|
|
})), n.props.submit({
|
|
settings: d,
|
|
max_balance: c,
|
|
blockchain_key: a,
|
|
currency: r,
|
|
gateway: i,
|
|
address: o,
|
|
status: l,
|
|
name: t,
|
|
kind: s
|
|
})
|
|
}, n.handleChangeSettings = function(e, t) {
|
|
var a = n.state.settings,
|
|
r = Object(b.a)(Object(b.a)({}, a), {}, {
|
|
[t]: e
|
|
});
|
|
n.setState({
|
|
settings: r
|
|
})
|
|
}, n.handleChangeInput = function(e, t) {
|
|
n.setState({
|
|
[t]: e
|
|
})
|
|
}, n.state = {
|
|
name: "",
|
|
blockchain_key: "",
|
|
currency_id: "",
|
|
gateway: "",
|
|
address: "",
|
|
kind: "",
|
|
max_balance: "0",
|
|
status: "disabled",
|
|
settings: {
|
|
uri: "",
|
|
secret: ""
|
|
},
|
|
page: 0,
|
|
isBitGo: !1
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getBlockchainsList({
|
|
page: this.state.page + 1,
|
|
limit: O()
|
|
}), this.props.getCurrenciesList({
|
|
page: this.state.page + 1,
|
|
limit: O()
|
|
}), this.props.getKinds(), this.props.getGateways()
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.name,
|
|
a = e.blockchain_key,
|
|
n = e.currency_id,
|
|
i = e.gateway,
|
|
o = e.address,
|
|
s = e.kind,
|
|
c = e.max_balance,
|
|
l = e.status,
|
|
u = e.settings,
|
|
d = e.isBitGo,
|
|
p = py.WalletComponent;
|
|
return r.createElement(p, {
|
|
name: t,
|
|
blockchain_key: a,
|
|
blockchainKeys: this.props.blockchainKeys,
|
|
currency_id: n,
|
|
gateway: i,
|
|
address: o,
|
|
kind: s,
|
|
isBitGo: d,
|
|
max_balance: c,
|
|
currencies: this.props.currencies,
|
|
handleChangeInput: this.handleChangeInput,
|
|
status: l,
|
|
handleSubmit: this.submit,
|
|
handleChangeSettings: this.handleChangeSettings,
|
|
settings: u,
|
|
gateways: this.props.gatewaysList,
|
|
kinds: this.props.kindsList
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Pb = Object(o.b)(function(e) {
|
|
return {
|
|
blockchainKeys: ur(e),
|
|
currencies: Qr(e),
|
|
gatewaysList: Yp(e),
|
|
kindsList: qp(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getBlockchainsList: function(t) {
|
|
return e(Jn(t))
|
|
},
|
|
getCurrenciesList: function(t) {
|
|
return e(Mr(t))
|
|
},
|
|
submit: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Kt,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
getKinds: function() {
|
|
return e(Bp())
|
|
},
|
|
getGateways: function() {
|
|
return e(Fp())
|
|
}
|
|
}
|
|
})(Tb),
|
|
Ab = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).update = function() {
|
|
var e = n.state,
|
|
t = e.id,
|
|
a = e.name,
|
|
r = e.blockchain_key,
|
|
i = e.currency_id,
|
|
o = e.gateway,
|
|
s = e.address,
|
|
c = e.kind,
|
|
l = e.max_balance,
|
|
u = e.status,
|
|
d = e.settings;
|
|
n.props.update({
|
|
id: t,
|
|
settings: d,
|
|
max_balance: l,
|
|
blockchain_key: r,
|
|
currency: i,
|
|
gateway: o,
|
|
address: s,
|
|
status: u,
|
|
name: a,
|
|
kind: c
|
|
})
|
|
}, n.handleChangeSettings = function(e, t) {
|
|
var a = n.state.settings,
|
|
r = Object(b.a)(Object(b.a)({}, a), {}, {
|
|
[t]: e
|
|
});
|
|
n.setState({
|
|
settings: r
|
|
})
|
|
}, n.handleChangeInput = function(e, t) {
|
|
n.setState({
|
|
[t]: e
|
|
})
|
|
}, n.state = {
|
|
id: 0,
|
|
name: "",
|
|
blockchain_key: "",
|
|
currency_id: "",
|
|
gateway: "",
|
|
address: "",
|
|
kind: "",
|
|
max_balance: "0",
|
|
status: "disabled",
|
|
settings: {
|
|
uri: "",
|
|
secret: ""
|
|
},
|
|
page: 0,
|
|
isBitGo: !1
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getBlockchainsList({
|
|
page: this.state.page + 1,
|
|
limit: O()
|
|
}), this.props.getCurrenciesList({
|
|
page: this.state.page + 1,
|
|
limit: O()
|
|
}), this.props.getWallet({
|
|
id: this.props.match.params.id
|
|
}), this.props.getKinds(), this.props.getGateways()
|
|
}
|
|
}, {
|
|
key: "UNSAFE_componentWillReceiveProps",
|
|
value: function(e) {
|
|
var t = e.wallet;
|
|
t && JSON.stringify(t) !== JSON.stringify(this.props.wallet) && (this.setState({
|
|
id: this.props.match.params.id,
|
|
name: t.name,
|
|
blockchain_key: t.blockchain_key,
|
|
currency_id: t.currency,
|
|
gateway: t.gateway,
|
|
address: t.address,
|
|
kind: t.kind,
|
|
max_balance: t.max_balance,
|
|
status: t.status
|
|
}), t.settings && this.setState({
|
|
settings: t.settings
|
|
}))
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.name,
|
|
a = e.blockchain_key,
|
|
n = e.currency_id,
|
|
i = e.gateway,
|
|
o = e.address,
|
|
s = e.kind,
|
|
c = e.max_balance,
|
|
l = e.status,
|
|
u = e.settings,
|
|
d = e.isBitGo,
|
|
p = py.WalletComponent;
|
|
return r.createElement(p, {
|
|
name: t,
|
|
blockchain_key: a,
|
|
blockchainKeys: this.props.blockchainKeys,
|
|
currency_id: n,
|
|
gateway: i,
|
|
address: o,
|
|
kind: s,
|
|
max_balance: c,
|
|
currencies: this.props.currencies,
|
|
status: l,
|
|
handleSubmit: this.update,
|
|
isBitGo: d,
|
|
settings: u,
|
|
handleChangeInput: this.handleChangeInput,
|
|
handleChangeSettings: this.handleChangeSettings,
|
|
gateways: this.props.gatewaysList,
|
|
kinds: this.props.kindsList
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Lb = Object(o.b)(function(e) {
|
|
return {
|
|
wallet: Kp(e),
|
|
blockchainKeys: ur(e),
|
|
currencies: Qr(e),
|
|
gatewaysList: Yp(e),
|
|
kindsList: qp(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
update: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Zt,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
getWallet: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: zt,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
getBlockchainsList: function(t) {
|
|
return e(Jn(t))
|
|
},
|
|
getCurrenciesList: function(t) {
|
|
return e(Mr(t))
|
|
},
|
|
getKinds: function() {
|
|
return e(Bp())
|
|
},
|
|
getGateways: function() {
|
|
return e(Fp())
|
|
}
|
|
}
|
|
})(Object(xe.g)(Ab)),
|
|
Db = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).activityRows = [{
|
|
key: "created_at",
|
|
alignRight: !1,
|
|
label: "Date"
|
|
}, {
|
|
key: "user_email",
|
|
alignRight: !1,
|
|
label: "Email"
|
|
}, {
|
|
key: "user_role",
|
|
alignRight: !1,
|
|
label: "Role"
|
|
}, {
|
|
key: "topic",
|
|
alignRight: !0,
|
|
label: "Topic"
|
|
}, {
|
|
key: "action",
|
|
alignRight: !1,
|
|
label: "Action"
|
|
}, {
|
|
key: "result",
|
|
alignRight: !1,
|
|
label: "Result"
|
|
}, {
|
|
key: "user_ip",
|
|
alignRight: !0,
|
|
label: "IP"
|
|
}, {
|
|
key: "browser",
|
|
alignRight: !0,
|
|
label: "Browser"
|
|
}, {
|
|
key: "os",
|
|
alignRight: !0,
|
|
label: "OS"
|
|
}], n.getUserActivityData = function() {
|
|
var e = n.props.classes;
|
|
return r.createElement(F.a, {
|
|
variant: "caption",
|
|
align: "center",
|
|
className: e.emptyTable
|
|
}, "There is no data to show")
|
|
}, n.renderContent = function() {
|
|
var e = n.props,
|
|
t = e.userActivity,
|
|
a = e.total,
|
|
i = n.state,
|
|
o = i.currentLimit,
|
|
s = i.currentPage,
|
|
c = py.Table;
|
|
return r.createElement(c, {
|
|
dataLength: a,
|
|
rows: n.activityRows,
|
|
data: t,
|
|
page: s,
|
|
rowsPerPage: o,
|
|
handleChangePage: n.handleChangePage,
|
|
handleChangeRowsPerPage: n.handleChangeRowsPerPage,
|
|
hidePagination: !1,
|
|
location: n.props.location
|
|
})
|
|
}, n.handleChangePage = function(e) {
|
|
n.setState({
|
|
currentPage: e
|
|
}), n.handleGetUserActivity(n.state.currentLimit, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
currentLimit: e,
|
|
currentPage: 0
|
|
}), n.handleGetUserActivity(e, 0)
|
|
}, n.handleGetUserActivity = function(e, t) {
|
|
n.props.getUserActivity({
|
|
page: t + 1,
|
|
limit: e
|
|
})
|
|
}, n.state = {
|
|
currentPage: 0,
|
|
currentLimit: O()
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.currentLimit,
|
|
a = e.currentPage;
|
|
this.props.getUserActivity({
|
|
page: a + 1,
|
|
limit: t
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.userActivity,
|
|
a = e.loading;
|
|
return r.createElement(D.a, {
|
|
style: {
|
|
marginTop: 25
|
|
}
|
|
}, t[0] && this.renderContent(), !t.length && !a && this.getUserActivityData())
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Ib = (Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
emptyTable: {
|
|
padding: e.spacing(1)
|
|
},
|
|
root: {
|
|
width: "100%"
|
|
},
|
|
table: {
|
|
minWidth: 1020
|
|
},
|
|
tableWrapper: {
|
|
overflowX: "auto"
|
|
},
|
|
tableRow: {
|
|
"&:hover": {
|
|
backgroundColor: "#f9f9f9"
|
|
}
|
|
},
|
|
selectIcon: {
|
|
paddingLeft: "10px"
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(Object(o.b)(function(e) {
|
|
return {
|
|
userActivity: cu(e),
|
|
loading: du(e),
|
|
total: lu(e),
|
|
page: uu(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getUserActivity: function(t) {
|
|
return e(ru(t))
|
|
}
|
|
}
|
|
})(Object(xe.g)(Db))), function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).activityRows = [{
|
|
key: "admin_email",
|
|
alignRight: !1,
|
|
label: "Email"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !1,
|
|
label: "Date"
|
|
}, {
|
|
key: "admin_role",
|
|
alignRight: !1,
|
|
label: "Role"
|
|
}, {
|
|
key: "topic",
|
|
alignRight: !1,
|
|
label: "Topic"
|
|
}, {
|
|
key: "action",
|
|
alignRight: !1,
|
|
label: "Action"
|
|
}, {
|
|
key: "target",
|
|
alignRight: !1,
|
|
label: "Target"
|
|
}, {
|
|
key: "browser",
|
|
alignRight: !1,
|
|
label: "Browser"
|
|
}, {
|
|
key: "user_ip",
|
|
alignRight: !1,
|
|
label: "IP"
|
|
}, {
|
|
key: "os",
|
|
alignRight: !1,
|
|
label: "OS"
|
|
}, {
|
|
key: "result",
|
|
alignRight: !1,
|
|
label: "Result"
|
|
}, {
|
|
key: "info",
|
|
alignRight: !0,
|
|
label: ""
|
|
}], n.filterData = [{
|
|
property: "topic",
|
|
value: "",
|
|
title: "Topic"
|
|
}, {
|
|
property: "action",
|
|
value: "",
|
|
title: "Action"
|
|
}, {
|
|
property: "uid",
|
|
value: "",
|
|
title: "UID"
|
|
}, {
|
|
property: "email",
|
|
value: "",
|
|
title: "Email",
|
|
type: "email"
|
|
}, {
|
|
property: "targetUID",
|
|
value: "",
|
|
title: "Target UID"
|
|
}, {
|
|
property: "from",
|
|
value: null
|
|
}, {
|
|
property: "to",
|
|
value: null
|
|
}], n.onRowClick = function(e) {
|
|
n.props.history.push("/tower/users/user-directory/".concat(e.admin.uid, "/main"))
|
|
}, n.handleSubmitFilter = function(e) {
|
|
n.setState({
|
|
filterTopic: Aa(e, "topic"),
|
|
filterAction: Aa(e, "action"),
|
|
filterEmail: Aa(e, "email"),
|
|
filterTargetUID: Aa(e, "targetUID"),
|
|
filterUID: Aa(e, "uid"),
|
|
filterFrom: Aa(e, "from"),
|
|
filterTo: Aa(e, "to"),
|
|
page: 0
|
|
});
|
|
var t = {
|
|
uid: Aa(e, "uid"),
|
|
topic: Aa(e, "topic"),
|
|
action: Aa(e, "action"),
|
|
email: Aa(e, "email"),
|
|
target_uid: Aa(e, "targetUID"),
|
|
from: Aa(e, "from"),
|
|
to: Aa(e, "to"),
|
|
page: 1,
|
|
limit: n.state.rowsPerPage
|
|
};
|
|
n.props.getAdminActivity(t)
|
|
}, n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetUserActivity(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetUserActivity(e, 0)
|
|
}, n.handleGetUserActivity = function(e, t) {
|
|
var a = {
|
|
uid: n.state.filterUID,
|
|
topic: n.state.filterTopic,
|
|
action: n.state.filterAction,
|
|
email: n.state.filterEmail,
|
|
target_uid: n.state.filterTargetUID,
|
|
from: null !== n.state.filterFrom ? n.state.filterFrom : "",
|
|
to: null !== n.state.filterTo ? n.state.filterTo : "",
|
|
page: t + 1,
|
|
limit: e
|
|
};
|
|
n.props.getAdminActivity(a)
|
|
}, n.handleOpenPopper = function(e) {
|
|
return function(t) {
|
|
n.setState({
|
|
selectIndex: e,
|
|
anchorEl: t.currentTarget
|
|
})
|
|
}
|
|
}, n.handleClosePopper = function() {
|
|
n.setState({
|
|
anchorEl: null
|
|
})
|
|
}, n.renderData = function() {
|
|
var e = n.props,
|
|
t = e.classes,
|
|
a = e.adminActivity,
|
|
i = n.state.selectIndex,
|
|
o = a && a[i] && a[i].data;
|
|
if (o && o.length > 0) {
|
|
var s = o.map(function(e, a) {
|
|
return "key" === e.type ? r.createElement(F.a, {
|
|
variant: "body2",
|
|
className: t.title,
|
|
key: a
|
|
}, xa(e.value)) : r.createElement(F.a, {
|
|
variant: "body1",
|
|
className: t.value,
|
|
key: a
|
|
}, e.value)
|
|
});
|
|
return r.createElement(r.Fragment, null, s)
|
|
}
|
|
return r.createElement(F.a, {
|
|
variant: "caption",
|
|
align: "center"
|
|
}, "There is no data to show")
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O(),
|
|
anchorEl: null,
|
|
selectIndex: 0,
|
|
filterTopic: "",
|
|
filterAction: "",
|
|
filterEmail: "",
|
|
filterUID: "",
|
|
filterTargetUID: "",
|
|
filterFrom: null,
|
|
filterTo: null
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.rowsPerPage,
|
|
a = e.page;
|
|
this.props.getAdminActivity({
|
|
page: a + 1,
|
|
limit: t
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.page,
|
|
a = e.rowsPerPage,
|
|
n = e.anchorEl,
|
|
i = this.props,
|
|
o = i.total,
|
|
s = i.adminActivity,
|
|
c = i.location,
|
|
l = py.FilterContainer,
|
|
u = py.InfoPopper,
|
|
d = py.Table;
|
|
return r.createElement(r.Fragment, null, r.createElement(d, {
|
|
dataLength: o,
|
|
rows: this.activityRows,
|
|
data: s,
|
|
page: t,
|
|
rowsPerPage: a,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
handleOpenPopper: this.handleOpenPopper,
|
|
location: c,
|
|
handleRowOnClick: this.onRowClick
|
|
}), r.createElement(u, {
|
|
style: {
|
|
padding: "20px"
|
|
},
|
|
anchorEl: n,
|
|
open: Boolean(n),
|
|
handleClose: this.handleClosePopper,
|
|
data: this.renderData(),
|
|
anchorOrigin: {
|
|
vertical: "top",
|
|
horizontal: "left"
|
|
},
|
|
transformOrigin: {
|
|
vertical: "top",
|
|
horizontal: "right"
|
|
}
|
|
}), r.createElement(l, {
|
|
data: this.filterData,
|
|
handleSubmit: this.handleSubmitFilter,
|
|
api: "barong"
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component)),
|
|
Nb = Object(U.a)(function(e) {
|
|
return Object(A.a)({
|
|
title: {
|
|
opacity: .54
|
|
},
|
|
popper: {
|
|
padding: "8px 10px"
|
|
},
|
|
value: {
|
|
paddingBottom: 8
|
|
}
|
|
})
|
|
}, {
|
|
withTheme: !0
|
|
})(Object(o.b)(function(e) {
|
|
return {
|
|
adminActivity: Ml(e),
|
|
total: Bl(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getAdminActivity: function(t) {
|
|
return e({
|
|
type: jt,
|
|
payload: t
|
|
})
|
|
}
|
|
}
|
|
})(Object(xe.g)(Ib))),
|
|
Fb = a(628),
|
|
Ub = function(e) {
|
|
Object(p.a)(n, e);
|
|
var t = Object(h.a)(n);
|
|
|
|
function n(e) {
|
|
var i;
|
|
return Object(u.a)(this, n), (i = t.call(this, e)).filterData = [{
|
|
property: "email",
|
|
value: "",
|
|
type: "email",
|
|
title: "Email"
|
|
}, {
|
|
property: "uid",
|
|
value: "",
|
|
title: "UID"
|
|
}, {
|
|
property: "role",
|
|
value: "",
|
|
title: "Role"
|
|
}, {
|
|
property: "country",
|
|
value: "",
|
|
title: "Country"
|
|
}, {
|
|
property: "from",
|
|
value: null
|
|
}, {
|
|
property: "to",
|
|
value: null
|
|
}], i.onRowClick = function(e) {
|
|
i.props.history.push("/tower/users/user-directory/".concat(e.uid, "/main"))
|
|
}, i.handleSubmitFilter = function(e) {
|
|
i.setState({
|
|
filterUID: Aa(e, "uid"),
|
|
filterRole: Aa(e, "role"),
|
|
filterCountry: Aa(e, "country"),
|
|
filterEmail: Aa(e, "email"),
|
|
filterFrom: Aa(e, "from"),
|
|
filterTo: Aa(e, "to"),
|
|
page: 0
|
|
});
|
|
var t = {
|
|
uid: Aa(e, "uid"),
|
|
role: Aa(e, "role"),
|
|
country: Aa(e, "country"),
|
|
email: Aa(e, "email"),
|
|
from: Aa(e, "from"),
|
|
to: Aa(e, "to"),
|
|
page: 1,
|
|
limit: i.state.rowsPerPage,
|
|
extended: !0
|
|
};
|
|
i.props.getUsers(t)
|
|
}, i.getIcon = function(e, t) {
|
|
return e ? r.createElement("img", {
|
|
alt: a(253),
|
|
src: a(253),
|
|
className: i.props.classes.blueIcon,
|
|
onClick: t
|
|
}) : r.createElement(Fb.a, {
|
|
className: i.props.classes.greyIcon,
|
|
onClick: t
|
|
})
|
|
}, i.documentsRows = function() {
|
|
var e = i.state.selectAll;
|
|
return [{
|
|
key: "selectIcon",
|
|
alignRight: !1,
|
|
label: i.getIcon(e, i.handleSelectAll())
|
|
}, {
|
|
key: "uid",
|
|
alignRight: !1,
|
|
label: "UID"
|
|
}, {
|
|
key: "email",
|
|
alignRight: !1,
|
|
label: "Email"
|
|
}, {
|
|
key: "name",
|
|
alignRight: !1,
|
|
label: "Name"
|
|
}, {
|
|
key: "country",
|
|
alignRight: !1,
|
|
label: "Country"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !1,
|
|
label: "Created"
|
|
}, {
|
|
key: "upload",
|
|
alignRight: !0,
|
|
label: "Attachments"
|
|
}]
|
|
}, i.renderHeader = function() {
|
|
var e = i.state.selectedUsers,
|
|
t = i.props.classes;
|
|
return r.createElement("div", {
|
|
className: t.header
|
|
}, r.createElement(L.a, {
|
|
variant: "contained",
|
|
className: "".concat(t.redBtn, " ").concat(!e.length && t.shadowedBtn),
|
|
onClick: i.deleteSelected
|
|
}, "Reject"), r.createElement(L.a, {
|
|
variant: "contained",
|
|
className: "".concat(t.blueBtn, " ").concat(!e.length && t.shadowedBtn),
|
|
onClick: i.approveSelected
|
|
}, "Verify"))
|
|
}, i.getRowSelectIcon = function(e) {
|
|
var t = i.state.selectedUsers;
|
|
return i.getIcon(t.filter(function(t) {
|
|
return t === e
|
|
}).length > 0, i.handleClick(e))
|
|
}, i.getRowStatus = function(e) {
|
|
return i.state.selectedUsers.filter(function(t) {
|
|
return t === e
|
|
}).length > 0
|
|
}, i.getOpenDocumentCarousel = function() {
|
|
var e = i.state.documentIndex,
|
|
t = py.DocumentCarousel;
|
|
return r.createElement(t, {
|
|
documents: i.getUserDocuments(),
|
|
documentIndex: e,
|
|
handleClose: i.handleCloseDocumentCarousel,
|
|
handleNavigate: i.handleNavigateDocumentCarousel
|
|
})
|
|
}, i.handleChangePage = function(e) {
|
|
var t = i.state.rowsPerPage;
|
|
i.setState({
|
|
page: e
|
|
}), i.handleGetRequestData(t, e)
|
|
}, i.handleChangeRowsPerPage = function(e) {
|
|
i.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), i.handleGetRequestData(e, 0)
|
|
}, i.handleGetRequestData = function(e, t) {
|
|
var a = {
|
|
uid: i.state.filterUID,
|
|
role: i.state.filterRole,
|
|
country: i.state.filterCountry,
|
|
email: i.state.filterEmail,
|
|
from: null !== i.state.filterFrom ? i.state.filterFrom : "",
|
|
to: null !== i.state.filterTo ? i.state.filterTo : "",
|
|
page: t + 1,
|
|
limit: e,
|
|
extended: !0
|
|
};
|
|
i.props.getUsers(a)
|
|
}, i.filterSelected = function() {
|
|
var e, t = i.props.users,
|
|
a = i.state.selectedUsers,
|
|
n = [],
|
|
r = Object(se.a)(t);
|
|
try {
|
|
var o = function() {
|
|
var t = e.value;
|
|
n.push(a.find(function(e) {
|
|
return e === t.uid
|
|
}) || "")
|
|
};
|
|
for (r.s(); !(e = r.n()).done;) o()
|
|
} catch (c) {
|
|
r.e(c)
|
|
} finally {
|
|
r.f()
|
|
}
|
|
var s = (n = n.filter(function(e) {
|
|
return "" !== e
|
|
})).length === i.props.users.length;
|
|
i.setState({
|
|
selectedUsers: n,
|
|
selectAll: s
|
|
})
|
|
}, i.handleClick = function(e) {
|
|
return function(t) {
|
|
var a, n = i.state.selectedUsers,
|
|
r = n.find(function(t) {
|
|
return t === e
|
|
});
|
|
t.stopPropagation(), r ? (a = n.filter(function(t) {
|
|
return t !== e
|
|
}), i.setState({
|
|
selectAll: !1
|
|
})) : (a = n).push(e);
|
|
var o = a.length === i.props.users.length;
|
|
i.setState({
|
|
selectedUsers: a,
|
|
selectAll: o
|
|
})
|
|
}
|
|
}, i.handleSelectAll = function() {
|
|
return function() {
|
|
var e = i.props.users,
|
|
t = [];
|
|
if (!i.state.selectAll && e) {
|
|
var a, n = Object(se.a)(e);
|
|
try {
|
|
for (n.s(); !(a = n.n()).done;) {
|
|
var r = a.value;
|
|
t.push(r.uid)
|
|
}
|
|
} catch (o) {
|
|
n.e(o)
|
|
} finally {
|
|
n.f()
|
|
}
|
|
}
|
|
i.setState({
|
|
selectedUsers: t,
|
|
selectAll: !i.state.selectAll
|
|
})
|
|
}
|
|
}, i.approveSelected = function() {
|
|
var e, t = i.state.selectedUsers,
|
|
a = Object(se.a)(t);
|
|
try {
|
|
for (a.s(); !(e = a.n()).done;) {
|
|
var n = e.value;
|
|
i.props.editLabel({
|
|
uid: n,
|
|
value: "verified",
|
|
key: "document",
|
|
scope: "private"
|
|
})
|
|
}
|
|
} catch (r) {
|
|
a.e(r)
|
|
} finally {
|
|
a.f()
|
|
}
|
|
i.setState({
|
|
selectedUsers: []
|
|
})
|
|
}, i.deleteSelected = function() {
|
|
var e, t = i.state.selectedUsers,
|
|
a = Object(se.a)(t);
|
|
try {
|
|
for (a.s(); !(e = a.n()).done;) {
|
|
var n = e.value;
|
|
i.props.deleteLabel({
|
|
uid: n,
|
|
key: "document",
|
|
scope: "private"
|
|
})
|
|
}
|
|
} catch (r) {
|
|
a.e(r)
|
|
} finally {
|
|
a.f()
|
|
}
|
|
i.setState({
|
|
selectedUsers: []
|
|
})
|
|
}, i.handleOpenDocumentCarousel = function(e, t) {
|
|
i.setState({
|
|
openDocumentCarousel: !0,
|
|
documentIndex: 0,
|
|
userUID: t || ""
|
|
})
|
|
}, i.handleCloseDocumentCarousel = function() {
|
|
i.setState({
|
|
openDocumentCarousel: !1
|
|
})
|
|
}, i.handleNavigateDocumentCarousel = function(e) {
|
|
i.setState({
|
|
documentIndex: e
|
|
})
|
|
}, i.getUserDocuments = function() {
|
|
var e = i.state.userUID,
|
|
t = i.props.users,
|
|
a = t && t.find(function(t) {
|
|
return t.uid === e
|
|
});
|
|
return a && a.documents || []
|
|
}, i.state = {
|
|
selectedUsers: [],
|
|
selectAll: !1,
|
|
page: 0,
|
|
rowsPerPage: O(),
|
|
documentIndex: 0,
|
|
openDocumentCarousel: !1,
|
|
userUID: "",
|
|
filterUID: "",
|
|
filterEmail: "",
|
|
filterRole: "",
|
|
filterCountry: "",
|
|
filterFrom: null,
|
|
filterTo: null
|
|
}, i
|
|
}
|
|
return Object(d.a)(n, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getUsers({
|
|
limit: this.state.rowsPerPage,
|
|
page: this.state.page + 1,
|
|
extended: !0
|
|
})
|
|
}
|
|
}, {
|
|
key: "componentDidUpdate",
|
|
value: function(e) {
|
|
e.total !== this.props.total && this.filterSelected()
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.page,
|
|
a = e.rowsPerPage,
|
|
n = e.openDocumentCarousel,
|
|
i = this.props,
|
|
o = i.users,
|
|
s = i.total,
|
|
c = i.location,
|
|
l = py.FilterContainer,
|
|
u = py.Table;
|
|
return r.createElement(r.Fragment, null, this.renderHeader(), r.createElement(u, {
|
|
dataLength: s,
|
|
rows: this.documentsRows(),
|
|
data: o,
|
|
page: t,
|
|
rowsPerPage: a,
|
|
hidePagination: !1,
|
|
handleOpen: this.handleOpenDocumentCarousel,
|
|
getSelectIcon: this.getRowSelectIcon,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
location: c,
|
|
getRowStatus: this.getRowStatus,
|
|
handleRowOnClick: this.onRowClick
|
|
}), r.createElement(l, {
|
|
data: this.filterData,
|
|
handleSubmit: this.handleSubmitFilter,
|
|
api: "barong"
|
|
}), n && this.getOpenDocumentCarousel())
|
|
}
|
|
}]), n
|
|
}(r.Component),
|
|
Mb = Object(U.a)(function() {
|
|
return Object(A.a)({
|
|
header: {
|
|
display: "flex",
|
|
justifyContent: "flex-end",
|
|
minWidth: 80,
|
|
marginBottom: 20
|
|
},
|
|
greyIcon: {
|
|
cursor: "pointer",
|
|
color: "#979797",
|
|
marginTop: 4,
|
|
marginBottom: -4
|
|
},
|
|
blueIcon: {
|
|
background: "#0030AE",
|
|
cursor: "pointer",
|
|
borderRadius: 4,
|
|
marginTop: 4,
|
|
marginBottom: -4
|
|
},
|
|
blueBtn: {
|
|
background: "#0030AE",
|
|
color: "#FFFFFF",
|
|
textTransform: "none",
|
|
width: 100,
|
|
lineHeight: 1
|
|
},
|
|
redBtn: {
|
|
background: "#E23328",
|
|
color: "#FFFFFF",
|
|
textTransform: "none",
|
|
width: 100,
|
|
marginRight: 30,
|
|
lineHeight: 1
|
|
},
|
|
shadowedBtn: {
|
|
opacity: .5
|
|
},
|
|
selectIcon: {
|
|
paddingLeft: "10px"
|
|
},
|
|
attachments: {
|
|
textAlign: "right",
|
|
display: "flex",
|
|
alignItems: "center",
|
|
justifyContent: "flex-end"
|
|
}
|
|
})
|
|
})(Object(o.b)(function(e) {
|
|
return {
|
|
users: Td(e),
|
|
total: Ad(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getUsers: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Ht,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
deleteLabel: function(t) {
|
|
return e(ao(t))
|
|
},
|
|
editLabel: function(t) {
|
|
return e(no(t))
|
|
}
|
|
}
|
|
})(Object(xe.g)(Ub))),
|
|
Bb = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
var e;
|
|
Object(u.a)(this, a);
|
|
for (var n = arguments.length, i = new Array(n), o = 0; o < n; o++) i[o] = arguments[o];
|
|
return (e = t.call.apply(t, [this].concat(i))).state = {
|
|
activeIndex: 0
|
|
}, e.labels = ["Activities"], e.handleChangeTab = function(t, a) {
|
|
e.setState({
|
|
activeIndex: a
|
|
})
|
|
}, e.renderContent = function() {
|
|
var t = e.state.activeIndex,
|
|
a = py.AdminActivities;
|
|
switch (t) {
|
|
case 0:
|
|
return r.createElement(a, null);
|
|
default:
|
|
return
|
|
}
|
|
}, e
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state.activeIndex,
|
|
t = py.Tabs;
|
|
return r.createElement(r.Fragment, null, r.createElement(t, {
|
|
labels: this.labels,
|
|
handleChange: this.handleChangeTab,
|
|
activeIndex: e
|
|
}), this.renderContent())
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Wb = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).labels = ["Main info", "KYC", "Open orders",
|
|
"Balances", "History", "Activities"
|
|
], n.routes = ["/main", "/kyc", "/open-orders", "/balances", "/history", "/activities"], n
|
|
.handleChangeTab = function(e, t) {
|
|
var a = n.props.history;
|
|
if (t !== n.state.activeIndex) {
|
|
n.setState({
|
|
activeIndex: t
|
|
});
|
|
var r = a.location.pathname.split("/").splice(1, 4).join("/");
|
|
n.props.history.push("/".concat(r).concat(n.routes[t]))
|
|
}
|
|
}, n.renderContent = function() {
|
|
var e = n.state.activeIndex,
|
|
t = py.UserActivities,
|
|
a = py.UserBalances,
|
|
i = py.UserInfo,
|
|
o = py.UserKYCTab,
|
|
s = py.UserOpenOrders,
|
|
c = py.UsersHistory;
|
|
switch (e) {
|
|
case 0:
|
|
return r.createElement(i, null);
|
|
case 1:
|
|
return r.createElement(o, null);
|
|
case 2:
|
|
return r.createElement(s, null);
|
|
case 3:
|
|
return r.createElement(a, null);
|
|
case 4:
|
|
return r.createElement(c, null);
|
|
case 5:
|
|
return r.createElement(t, null);
|
|
default:
|
|
return
|
|
}
|
|
}, n.state = {
|
|
activeIndex: 0
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
var e = this,
|
|
t = this.props.history;
|
|
this.routes.map(function(a, n) {
|
|
return t.location.pathname.includes(a) && e.setState({
|
|
activeIndex: n
|
|
})
|
|
})
|
|
}
|
|
}, {
|
|
key: "UNSAFE_componentWillReceiveProps",
|
|
value: function(e) {
|
|
var t = this.props.history,
|
|
a = this.state.activeIndex,
|
|
n = t.location.pathname.split("/"),
|
|
r = this.routes.indexOf("/".concat(n[n.length - 1])); - 1 !== r && a !== r && this
|
|
.setState({
|
|
activeIndex: r
|
|
})
|
|
}
|
|
}, {
|
|
key: "componentWillUnmount",
|
|
value: function() {
|
|
this.props.resetUserData()
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state.activeIndex,
|
|
t = py.Tabs;
|
|
return r.createElement(r.Fragment, null, r.createElement(t, {
|
|
labels: this.labels,
|
|
handleChange: this.handleChangeTab,
|
|
activeIndex: e
|
|
}), this.renderContent())
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Hb = Object(xe.g)(Object(o.b)(null, function(e) {
|
|
return {
|
|
resetUserData: function() {
|
|
return e({
|
|
type: "RESET_USER_DATA"
|
|
})
|
|
}
|
|
}
|
|
})(Wb)),
|
|
Vb = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).balancesRows = [{
|
|
key: "currency",
|
|
alignRight: !1,
|
|
label: "Currency"
|
|
}, {
|
|
key: "balance",
|
|
alignRight: !1,
|
|
label: "Available balance"
|
|
}, {
|
|
key: "locked",
|
|
alignRight: !1,
|
|
label: "Locked balance"
|
|
}, {
|
|
key: "total",
|
|
alignRight: !1,
|
|
label: "Total balance"
|
|
}], n.applyPrecision = function(e, t) {
|
|
return e.map(function(e) {
|
|
var a = t && t.find(function(t) {
|
|
return t.code === e.currency
|
|
});
|
|
return {
|
|
currency: e.currency,
|
|
balance: Pa(e.balance, a ? a.precision : "4"),
|
|
locked: Pa(e.locked, a ? a.precision : "4")
|
|
}
|
|
})
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O()
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getUserBalances({
|
|
uid: this.props.match.params.uid
|
|
}), this.props.getCurrenciesList({
|
|
page: this.state.page + 1,
|
|
limit: O()
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.userData,
|
|
a = e.currencies,
|
|
n = py.Table,
|
|
i = t && a && this.applyPrecision(t.accounts, a);
|
|
return r.createElement(n, {
|
|
dataLength: i && i.length || 0,
|
|
rows: this.balancesRows,
|
|
data: i || [],
|
|
page: 1,
|
|
rowsPerPage: i && i.length || 0,
|
|
hidePagination: !0,
|
|
handleChangePage: function() {},
|
|
handleChangeRowsPerPage: function() {}
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Gb = Object(xe.g)(Object(o.b)(function(e) {
|
|
return {
|
|
userData: Eu(e),
|
|
currencies: Qr(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getUserBalances: function(t) {
|
|
return e(pu(t))
|
|
},
|
|
getCurrenciesList: function(t) {
|
|
return e(Mr(t))
|
|
}
|
|
}
|
|
})(Vb)),
|
|
zb = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).userOpenOrdersRows = [{
|
|
key: "id",
|
|
alignRight: !1,
|
|
label: "Order ID"
|
|
}, {
|
|
key: "market",
|
|
alignRight: !1,
|
|
label: "Market"
|
|
}, {
|
|
key: "ord_type",
|
|
alignRight: !1,
|
|
label: "Type"
|
|
}, {
|
|
key: "origin_volume",
|
|
alignRight: !1,
|
|
label: "Amount"
|
|
}, {
|
|
key: "executed_volume",
|
|
alignRight: !1,
|
|
label: "Executed"
|
|
}, {
|
|
key: "price",
|
|
alignRight: !1,
|
|
label: "Price"
|
|
}, {
|
|
key: "side",
|
|
alignRight: !1,
|
|
label: "Side"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !1,
|
|
label: "Created"
|
|
}, {
|
|
key: "updated_at",
|
|
alignRight: !1,
|
|
label: "Updated"
|
|
}, {
|
|
key: "cancel",
|
|
alignRight: !0,
|
|
label: ""
|
|
}], n.filterData = [{
|
|
property: "market",
|
|
value: "",
|
|
title: "Market"
|
|
}, {
|
|
property: "ord_type",
|
|
value: "",
|
|
title: "Order type"
|
|
}, {
|
|
property: "price",
|
|
value: null,
|
|
title: "Price"
|
|
}, {
|
|
property: "origin_volume",
|
|
value: null,
|
|
title: "Amount"
|
|
}, {
|
|
property: "type",
|
|
value: "",
|
|
title: "Type"
|
|
}, {
|
|
property: "from",
|
|
value: null
|
|
}, {
|
|
property: "to",
|
|
value: null
|
|
}, {
|
|
property: "order_by",
|
|
value: "",
|
|
title: "Order by"
|
|
}], n.handleSubmitFilter = function(e) {
|
|
n.setState({
|
|
filterMarket: Aa(e, "market"),
|
|
filterOrdType: Aa(e, "ord_type"),
|
|
filterPrice: Aa(e, "price"),
|
|
filterOriginVolume: Aa(e, "origin_volume"),
|
|
filterType: Aa(e, "type"),
|
|
filterFrom: Aa(e, "from"),
|
|
filterTo: Aa(e, "to"),
|
|
filterOrderBy: Aa(e, "order_by"),
|
|
page: 0
|
|
});
|
|
var t = {
|
|
market: Aa(e, "market"),
|
|
ord_type: Aa(e, "ord_type"),
|
|
price: Aa(e, "price"),
|
|
origin_volume: Aa(e, "origin_volume"),
|
|
type: Aa(e, "type"),
|
|
email: Aa(e, "email"),
|
|
to: Aa(e, "to"),
|
|
order_by: Aa(e, "order_by"),
|
|
page: 1,
|
|
limit: n.state.rowsPerPage,
|
|
uid: n.props.match.params.uid,
|
|
ordering: "desc"
|
|
};
|
|
n.props.getUserOpenOrders(t)
|
|
}, n.handleDelete = function(e) {
|
|
var t = n.state,
|
|
a = t.page,
|
|
r = t.rowsPerPage,
|
|
i = {
|
|
orders: {
|
|
id: e
|
|
},
|
|
params: {
|
|
market: n.state.filterMarket,
|
|
ord_type: n.state.filterOrdType,
|
|
price: null !== n.state.filterPrice ? String(n.state.filterPrice) : "",
|
|
origin_volume: null !== n.state.filterOriginVolume ? String(n.state.filterOriginVolume) :
|
|
"",
|
|
type: n.state.filterType,
|
|
from: null !== n.state.filterFrom ? n.state.filterFrom : "",
|
|
to: null !== n.state.filterTo ? n.state.filterTo : "",
|
|
order_by: n.state.filterOrderBy,
|
|
page: a + 1,
|
|
limit: r,
|
|
uid: n.props.match.params.uid,
|
|
state: "wait",
|
|
ordering: "desc"
|
|
}
|
|
};
|
|
n.props.cancelOrder(i)
|
|
}, n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetUserOpenOrders(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetUserOpenOrders(e, 0)
|
|
}, n.handleGetUserOpenOrders = function(e, t) {
|
|
var a = {
|
|
market: n.state.filterMarket,
|
|
ord_type: n.state.filterOrdType,
|
|
price: null !== n.state.filterPrice ? String(n.state.filterPrice) : "",
|
|
origin_volume: null !== n.state.filterOriginVolume ? String(n.state.filterOriginVolume) : "",
|
|
type: n.state.filterType,
|
|
from: null !== n.state.filterFrom ? n.state.filterFrom : "",
|
|
to: null !== n.state.filterTo ? n.state.filterTo : "",
|
|
order_by: n.state.filterOrderBy,
|
|
page: t + 1,
|
|
limit: e,
|
|
ordering: "desc",
|
|
uid: n.props.match.params.uid
|
|
};
|
|
n.props.getUserOpenOrders(a)
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O(),
|
|
filterMarket: "",
|
|
filterOrdType: "",
|
|
filterPrice: null,
|
|
filterOriginVolume: null,
|
|
filterType: "",
|
|
filterFrom: null,
|
|
filterTo: null,
|
|
filterOrderBy: ""
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getUserOpenOrders({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
uid: this.props.match.params.uid
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.page,
|
|
a = e.rowsPerPage,
|
|
n = this.props,
|
|
i = n.total,
|
|
o = n.list,
|
|
s = py.FilterContainer,
|
|
c = py.Table;
|
|
return r.createElement(r.Fragment, null, r.createElement(c, {
|
|
dataLength: i,
|
|
rows: this.userOpenOrdersRows,
|
|
data: o,
|
|
page: t,
|
|
handleDelete: this.handleDelete,
|
|
rowsPerPage: a,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
disableTotal: !0
|
|
}), r.createElement(s, {
|
|
data: this.filterData,
|
|
handleSubmit: this.handleSubmitFilter
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Kb = Object(xe.g)(Object(o.b)(function(e) {
|
|
return {
|
|
list: nd(e),
|
|
total: rd(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getUserOpenOrders: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Ut,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
cancelOrder: function(t) {
|
|
return e(Is(t))
|
|
}
|
|
}
|
|
})(zb)),
|
|
Zb = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).documentsRows = [{
|
|
key: "created_at",
|
|
alignRight: !1,
|
|
label: "Created"
|
|
}, {
|
|
key: "doc_type",
|
|
alignRight: !1,
|
|
label: "Doc type"
|
|
}, {
|
|
key: "doc_number",
|
|
alignRight: !1,
|
|
label: "Doc number"
|
|
}, {
|
|
key: "doc_expire",
|
|
alignRight: !0,
|
|
label: "Expire date"
|
|
}, {
|
|
key: "upload",
|
|
alignRight: !0,
|
|
label: "Attachments"
|
|
}], n.getDocumentCarousel = function() {
|
|
var e = n.props.user,
|
|
t = n.state.documentIndex,
|
|
a = py.DocumentCarousel;
|
|
return r.createElement(a, {
|
|
documents: e && e.documents,
|
|
documentIndex: t,
|
|
handleClose: n.handleCloseDocumentCarousel,
|
|
handleNavigate: n.handleNavigateDocumentCarousel
|
|
})
|
|
}, n.editProfile = function() {
|
|
var e = n.props.profile,
|
|
t = n.state.userProfile;
|
|
n.setState({
|
|
isEditing: !0,
|
|
userProfile: Object(b.a)(Object(b.a)({}, t), {}, {
|
|
country: e ? e.country : ""
|
|
})
|
|
})
|
|
}, n.saveProfile = function() {
|
|
var e = n.state.userProfile,
|
|
t = n.props,
|
|
a = t.user,
|
|
r = t.profile,
|
|
i = {
|
|
uid: a.uid,
|
|
first_name: e.firstName,
|
|
last_name: e.lastName,
|
|
dob: e.dob,
|
|
address: e.address,
|
|
city: e.city,
|
|
country: e.country,
|
|
metadata: e.nationality && JSON.stringify({
|
|
nationality: e.nationality
|
|
}),
|
|
postcode: e.postcode
|
|
};
|
|
n.setState({
|
|
isEditing: !1
|
|
}), Ja(e.country).length || r && n.handleChangeInput(Ja(r.country), "country"), n.props
|
|
.editUserProfile(i)
|
|
}, n.updateProfileState = function(e) {
|
|
var t = n.state.userProfile,
|
|
a = n.props,
|
|
r = a.profile,
|
|
i = a.user;
|
|
n.setState({
|
|
userProfile: Object(b.a)(Object(b.a)({}, t), {}, {
|
|
state: e
|
|
})
|
|
});
|
|
var o = Object(b.a)(Object(b.a)({
|
|
uid: i.uid
|
|
}, r), {}, {
|
|
state: e
|
|
});
|
|
n.props.editUserProfile(o)
|
|
}, n.handleChangeInput = function(e, t) {
|
|
var a = n.state.userProfile;
|
|
a[t] = e, n.setState({
|
|
userProfile: a
|
|
})
|
|
}, n.handleOpenDocumentCarousel = function(e, t) {
|
|
n.setState({
|
|
openDocumentCarousel: !0,
|
|
documentIndex: e
|
|
})
|
|
}, n.handleCloseDocumentCarousel = function() {
|
|
n.setState({
|
|
openDocumentCarousel: !1
|
|
})
|
|
}, n.handleNavigateDocumentCarousel = function(e) {
|
|
n.setState({
|
|
documentIndex: e
|
|
})
|
|
}, n.state = {
|
|
openDocumentCarousel: !1,
|
|
documentIndex: -1,
|
|
isEditing: !1,
|
|
userProfile: vy
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.profile;
|
|
e.user || this.props.getUserData({
|
|
uid: this.props.match.params.uid
|
|
}), t && this.setState({
|
|
userProfile: Qa(t)
|
|
})
|
|
}
|
|
}, {
|
|
key: "componentWillReceiveProps",
|
|
value: function(e) {
|
|
var t = this.props.profile;
|
|
e.profile && t !== e.profile && this.setState({
|
|
userProfile: Qa(e.profile)
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props.user,
|
|
t = this.state,
|
|
a = t.openDocumentCarousel,
|
|
n = t.isEditing,
|
|
i = t.userProfile,
|
|
o = py.Table,
|
|
s = py.UserProfileComparison;
|
|
return r.createElement(r.Fragment, null, r.createElement(F.a, {
|
|
component: "h1",
|
|
variant: "h5"
|
|
}, "Documents"), r.createElement(o, {
|
|
dataLength: e && e.documents && e.documents.length,
|
|
rows: this.documentsRows,
|
|
data: e && e.documents,
|
|
rowsPerPage: e && e.documents && e.documents.length,
|
|
hidePagination: !0,
|
|
handleOpen: this.handleOpenDocumentCarousel
|
|
}), a && this.getDocumentCarousel(), r.createElement(F.a, {
|
|
component: "h1",
|
|
variant: "h5"
|
|
}, "Profiles"), r.createElement(s, {
|
|
userProfile: i,
|
|
user: e,
|
|
isEditing: n,
|
|
handleChange: this.handleChangeInput,
|
|
editProfile: this.editProfile,
|
|
saveProfile: this.saveProfile,
|
|
updateProfileState: this.updateProfileState
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Yb = Object(xe.g)(Object(o.b)(function(e) {
|
|
return {
|
|
user: Fu(e),
|
|
profile: Uu(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getUserData: function(t) {
|
|
return e(Cu(t))
|
|
},
|
|
editUserProfile: function(t) {
|
|
return e(ku(t))
|
|
}
|
|
}
|
|
})(Zb)),
|
|
qb = a(123),
|
|
Jb = a.n(qb),
|
|
Qb = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
return Object(u.a)(this, a), t.apply(this, arguments)
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props.match.params.uid,
|
|
t = py.WithdrawsHistory,
|
|
a = py.UserDeposits,
|
|
n = py.UserTrades,
|
|
i = py.UserOrders;
|
|
return r.createElement(r.Fragment, null, r.createElement(Jb.a, {
|
|
id: "trades"
|
|
}, r.createElement(F.a, {
|
|
component: "h1",
|
|
variant: "h5"
|
|
}, "Trades")), r.createElement(n, {
|
|
uid: e
|
|
}), r.createElement(Jb.a, {
|
|
id: "orders"
|
|
}, r.createElement(F.a, {
|
|
component: "h1",
|
|
variant: "h5"
|
|
}, "Orders")), r.createElement(i, {
|
|
uid: e
|
|
}), r.createElement(Jb.a, {
|
|
id: "deposits"
|
|
}, r.createElement(F.a, {
|
|
component: "h1",
|
|
variant: "h5"
|
|
}, "Deposits")), r.createElement(a, {
|
|
uid: e
|
|
}), r.createElement(Jb.a, {
|
|
id: "withdraws"
|
|
}, r.createElement(F.a, {
|
|
component: "h1",
|
|
variant: "h5"
|
|
}, "Withdraws")), r.createElement(t, {
|
|
uid: e
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Xb = Object(xe.g)(Qb),
|
|
$b = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).getContent = function() {
|
|
var e = n.state,
|
|
t = e.openAddLabelModal,
|
|
a = e.openEditLabelModal,
|
|
i = e.name,
|
|
o = e.value,
|
|
s = e.scope,
|
|
c = e.userProfile,
|
|
l = py.UserData;
|
|
return r.createElement(l, {
|
|
addNewLabel: n.addLabel,
|
|
handleAddLabel: n.handleAddLabel,
|
|
editLabel: n.editLabel,
|
|
closeModal: n.handleCloseModal,
|
|
deleteUserLabel: n.deleteLabel,
|
|
handleChangeUserState: n.handleChangeUserState,
|
|
handleChangeRole: n.handleChangeRole,
|
|
handleChangeUserOTP: n.handleChangeUserOTP,
|
|
handleChangeFeeGroup: n.handleChangeFeeGroup,
|
|
newLabelName: i,
|
|
newLabelScope: s,
|
|
newLabelValue: o,
|
|
isAddLabelModalOpened: t,
|
|
isEditLabelModalOpened: a,
|
|
openAddLabelModal: n.handleOpenAddLabelModal,
|
|
openEditLabelModal: n.handleOpenEditLabelModal,
|
|
user: n.props.userData,
|
|
handleEditLabel: n.handleEditLabel,
|
|
goBack: n.goBack,
|
|
pathname: n.props.location.pathname,
|
|
currentUser: n.props.currentUser,
|
|
userFeeGroup: n.props.userFeeGroup,
|
|
tradingFeeGroups: n.props.tradingFeeGroups,
|
|
handleChange: n.handleChangeValue,
|
|
alertPush: n.props.alertPush,
|
|
deleteAnyLabel: n.deleteAnyLabel,
|
|
onVerifyClick: n.redirectToKYC,
|
|
userProfile: c,
|
|
resendEmail: n.handleResendEmail,
|
|
deleteDataStorage: n.deleteDataStorage
|
|
})
|
|
}, n.deleteDataStorage = function(e, t) {
|
|
n.props.deleteDataStorage({
|
|
title: e,
|
|
uid: t
|
|
})
|
|
}, n.goBack = function(e) {
|
|
e.preventDefault(), n.props.history.goBack()
|
|
}, n.handleCloseModal = function() {
|
|
n.setState({
|
|
openAddLabelModal: !1,
|
|
openEditLabelModal: !1
|
|
}), n.clearFields()
|
|
}, n.handleOpenAddLabelModal = function() {
|
|
n.setState({
|
|
openAddLabelModal: !0
|
|
})
|
|
}, n.handleOpenEditLabelModal = function(e, t, a) {
|
|
n.setState({
|
|
openEditLabelModal: !0,
|
|
name: e,
|
|
value: t,
|
|
scope: a
|
|
})
|
|
}, n.deleteLabel = function(e, t) {
|
|
var a = n.props.userData;
|
|
n.checkLabel(e) && n.props.deleteLabel({
|
|
uid: a.uid,
|
|
key: e,
|
|
scope: t
|
|
})
|
|
}, n.deleteAnyLabel = function(e, t) {
|
|
var a = n.props.userData;
|
|
n.props.deleteLabel({
|
|
uid: a.uid,
|
|
key: e,
|
|
scope: t
|
|
})
|
|
}, n.handleChangeValue = function(e, t) {
|
|
n.setState({
|
|
[t]: e.target.value.toLowerCase()
|
|
})
|
|
}, n.addLabel = function() {
|
|
var e = n.state,
|
|
t = {
|
|
key: e.name,
|
|
value: e.value,
|
|
scope: e.scope,
|
|
uid: n.props.userData.uid
|
|
};
|
|
n.props.addNewLabel(t), n.handleCloseModal()
|
|
}, n.editLabel = function() {
|
|
var e = n.state,
|
|
t = {
|
|
key: e.name,
|
|
value: e.value,
|
|
scope: e.scope,
|
|
uid: n.props.userData.uid
|
|
};
|
|
n.props.editLabel(t), n.handleCloseModal()
|
|
}, n.clearFields = function() {
|
|
n.setState({
|
|
name: "",
|
|
value: "",
|
|
scope: ""
|
|
})
|
|
}, n.getLabelValue = function(e) {
|
|
return Object.values(j().map(function(t) {
|
|
return Ra(t.name).filter(function(t) {
|
|
return Object.keys(t)[0] === e
|
|
})
|
|
}).filter(function(e) {
|
|
return e.length > 0
|
|
})[0][0])[0]
|
|
}, n.checkLabel = function(e) {
|
|
var t = n.props.userData;
|
|
return t.labels && t.labels.find(function(t) {
|
|
return t.key === e && t.value === n.getLabelValue(e)
|
|
})
|
|
}, n.handleAddLabel = function(e, t, a) {
|
|
var r = n.props.userData;
|
|
!n.checkLabel(e) && n.props.addNewLabel({
|
|
key: e,
|
|
value: t,
|
|
scope: a,
|
|
uid: r.uid
|
|
})
|
|
}, n.handleEditLabel = function(e, t, a) {
|
|
var r = n.props.userData.uid;
|
|
n.setState({
|
|
name: e,
|
|
value: t,
|
|
scope: a
|
|
});
|
|
var i = {
|
|
key: e,
|
|
value: t,
|
|
scope: a,
|
|
uid: r
|
|
};
|
|
n.props.editLabel(i), n.handleCloseModal()
|
|
}, n.handleChangeUserState = function(e) {
|
|
var t = n.props.userData.uid;
|
|
n.props.changeUserState({
|
|
uid: t,
|
|
state: e.target.value
|
|
})
|
|
}, n.handleChangeRole = function(e) {
|
|
var t = n.props.userData.uid;
|
|
n.props.changeUserRole({
|
|
uid: t,
|
|
role: e.target.value
|
|
})
|
|
}, n.handleChangeUserOTP = function(e) {
|
|
if (e.target.checked) n.props.alertPush({
|
|
message: ["2FA can only be enabled by the user"],
|
|
type: "error"
|
|
});
|
|
else {
|
|
var t = n.props.userData.uid;
|
|
n.props.changeUserOTP({
|
|
uid: t,
|
|
otp: e.target.checked
|
|
})
|
|
}
|
|
}, n.handleChangeFeeGroup = function(e) {
|
|
var t = n.props.userData.uid;
|
|
n.props.changeUserFeeGroupData({
|
|
uid: t,
|
|
group: e.target.value
|
|
})
|
|
}, n.handleResendEmail = function() {
|
|
var e = n.props.userData;
|
|
n.props.resendEmail({
|
|
email: e.email,
|
|
lang: "en"
|
|
})
|
|
}, n.redirectToKYC = function() {
|
|
var e = n.props.history,
|
|
t = e.location.pathname.split("/").splice(1, 4).join("/");
|
|
e.replace("/".concat(t, "/kyc"))
|
|
}, n.state = {
|
|
openAddLabelModal: !1,
|
|
openEditLabelModal: !1,
|
|
name: "",
|
|
value: "",
|
|
scope: "private",
|
|
isEditing: !1,
|
|
showEdit: !1,
|
|
userProfile: vy
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getUserData({
|
|
uid: this.props.match.params.uid
|
|
}), this.props.getUserFeeGroupData({
|
|
uid: this.props.match.params.uid
|
|
}), this.props.getTradingFeeGroups()
|
|
}
|
|
}, {
|
|
key: "UNSAFE_componentWillReceiveProps",
|
|
value: function(e) {
|
|
var t = this.props.profile;
|
|
e.profile && e.profile !== t && this.setState({
|
|
userProfile: Qa(e.profile)
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
return r.createElement(r.Fragment, null, this.props.userData ? this.getContent() :
|
|
"Loading")
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
ey = Object(o.b)(function(e) {
|
|
return {
|
|
userData: Fu(e),
|
|
currentUser: Jl(e),
|
|
userFeeGroup: tp(e),
|
|
profile: Uu(e),
|
|
tradingFeeGroups: pl(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
addNewLabel: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: $e,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
editLabel: function(t) {
|
|
return e(no(t))
|
|
},
|
|
changeUserState: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Me,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
changeUserRole: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Be,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
changeUserOTP: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: We,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
changeUserFeeGroupData: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: lt,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
deleteLabel: function(t) {
|
|
return e(ao(t))
|
|
},
|
|
getUserData: function(t) {
|
|
return e(Cu(t))
|
|
},
|
|
getUserFeeGroupData: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: ut,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
getUserActivity: function(t) {
|
|
return e(ru(t))
|
|
},
|
|
getTradingFeeGroups: function() {
|
|
return e({
|
|
type: Et
|
|
})
|
|
},
|
|
alertPush: function(t) {
|
|
return e(Xa(t))
|
|
},
|
|
editUserProfile: function(t) {
|
|
return e(ku(t))
|
|
},
|
|
resendEmail: function(t) {
|
|
return e({
|
|
type: At,
|
|
payload: t
|
|
})
|
|
},
|
|
deleteDataStorage: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: ra,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
}
|
|
}
|
|
})($b),
|
|
ty = Object(xe.g)(ey),
|
|
ay = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).activityRows = [{
|
|
key: "created_at",
|
|
alignRight: !1,
|
|
label: "Date"
|
|
}, {
|
|
key: "action",
|
|
alignRight: !1,
|
|
label: "Action"
|
|
}, {
|
|
key: "result",
|
|
alignRight: !1,
|
|
label: "Result"
|
|
}, {
|
|
key: "user_ip",
|
|
alignRight: !0,
|
|
label: "IP"
|
|
}, {
|
|
key: "browser",
|
|
alignRight: !0,
|
|
label: "Browser"
|
|
}, {
|
|
key: "os",
|
|
alignRight: !0,
|
|
label: "OS"
|
|
}], n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetUserActivity(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetUserActivity(e, 0)
|
|
}, n.handleGetUserActivity = function(e, t) {
|
|
var a = n.props.userData.uid;
|
|
n.props.getUserActivity({
|
|
limit: e,
|
|
page: t + 1,
|
|
uid: a
|
|
})
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O()
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.page,
|
|
a = e.rowsPerPage,
|
|
n = this.props.match;
|
|
this.props.getUserActivity({
|
|
page: t + 1,
|
|
limit: a,
|
|
uid: n && n.params.uid
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.userActivity,
|
|
a = e.total,
|
|
n = this.state,
|
|
i = n.page,
|
|
o = n.rowsPerPage,
|
|
s = py.Table;
|
|
return r.createElement(s, {
|
|
dataLength: a,
|
|
rows: this.activityRows,
|
|
data: t,
|
|
page: i,
|
|
rowsPerPage: o,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
ny = Object(xe.g)(Object(o.b)(function(e) {
|
|
return {
|
|
userData: Fu(e),
|
|
userActivity: cu(e),
|
|
loading: du(e),
|
|
total: lu(e),
|
|
page: uu(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getUserActivity: function(t) {
|
|
return e(ru(t))
|
|
}
|
|
}
|
|
})(ay)),
|
|
ry = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).usersRows = [{
|
|
key: "uid",
|
|
alignRight: !1,
|
|
label: "UID"
|
|
}, {
|
|
key: "name",
|
|
alignRight: !1,
|
|
label: "Name"
|
|
}, {
|
|
key: "email",
|
|
alignRight: !1,
|
|
label: "Email"
|
|
}, {
|
|
key: "role",
|
|
alignRight: !1,
|
|
label: "Role"
|
|
}, {
|
|
key: "level",
|
|
alignRight: !0,
|
|
label: "KYC"
|
|
}, {
|
|
key: "country",
|
|
alignRight: !1,
|
|
label: "Country"
|
|
}, {
|
|
key: "referral_uid",
|
|
alignRight: !1,
|
|
label: "Referrer ID"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !1,
|
|
label: "Created"
|
|
}, {
|
|
key: "state",
|
|
alignRight: !1,
|
|
label: "Status"
|
|
}], n.filterData = [{
|
|
property: "email",
|
|
value: "",
|
|
type: "email",
|
|
title: "Email"
|
|
}, {
|
|
property: "uid",
|
|
value: "",
|
|
title: "UID"
|
|
}, {
|
|
property: "role",
|
|
value: "",
|
|
title: "Role"
|
|
}, {
|
|
property: "country",
|
|
value: "",
|
|
title: "Country"
|
|
}, {
|
|
property: "level",
|
|
value: "",
|
|
title: "Level"
|
|
}, {
|
|
property: "state",
|
|
value: "",
|
|
title: "State"
|
|
}, {
|
|
property: "from",
|
|
value: null
|
|
}, {
|
|
property: "to",
|
|
value: null
|
|
}], n.onRowClick = function(e) {
|
|
n.props.history.push("/tower/users/user-directory/".concat(e.uid, "/main"))
|
|
}, n.handleSubmitFilter = function(e) {
|
|
n.setState({
|
|
filterEmail: Aa(e, "email"),
|
|
filterUID: Aa(e, "uid"),
|
|
filterRole: Aa(e, "role"),
|
|
filterCountry: Aa(e, "country"),
|
|
filterLevel: Aa(e, "level"),
|
|
filterState: Aa(e, "state"),
|
|
filterFrom: Aa(e, "from"),
|
|
filterTo: Aa(e, "to"),
|
|
page: 0
|
|
});
|
|
var t = {
|
|
email: Aa(e, "email"),
|
|
uid: Aa(e, "uid"),
|
|
role: Aa(e, "role"),
|
|
country: Aa(e, "country"),
|
|
level: Aa(e, "level"),
|
|
state: Aa(e, "state"),
|
|
from: Aa(e, "from"),
|
|
to: Aa(e, "to"),
|
|
page: 1,
|
|
limit: n.state.rowsPerPage,
|
|
extended: !0
|
|
};
|
|
n.props.getDataByFilter(t)
|
|
}, n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetUsers(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetUsers(e, 0)
|
|
}, n.handleGetUsers = function(e, t) {
|
|
var a = {
|
|
email: n.state.filterEmail,
|
|
uid: n.state.filterUID,
|
|
role: n.state.filterRole,
|
|
country: n.state.filterCountry,
|
|
level: n.state.filterLevel,
|
|
state: n.state.filterState,
|
|
from: null !== n.state.filterFrom ? n.state.filterFrom : "",
|
|
to: null !== n.state.filterTo ? n.state.filterTo : "",
|
|
page: t + 1,
|
|
limit: e,
|
|
extended: !0
|
|
};
|
|
n.props.getDataByFilter(a)
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O(),
|
|
filterEmail: "",
|
|
filterUID: "",
|
|
filterRole: "",
|
|
filterCountry: "",
|
|
filterLevel: "",
|
|
filterState: "",
|
|
filterFrom: null,
|
|
filterTo: null
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.location.hash && this.props.getUsers({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
extended: !0
|
|
}), this.props.getUsers({
|
|
limit: this.state.rowsPerPage,
|
|
page: this.state.page + 1,
|
|
extended: !0
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.total,
|
|
a = e.users,
|
|
n = e.location,
|
|
i = this.state,
|
|
o = i.page,
|
|
s = i.rowsPerPage,
|
|
c = py.FilterContainer,
|
|
l = py.Table;
|
|
return r.createElement(r.Fragment, null, r.createElement(l, {
|
|
dataLength: t,
|
|
rows: this.usersRows,
|
|
data: a,
|
|
page: o,
|
|
rowsPerPage: s,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
location: n,
|
|
handleRowOnClick: this.onRowClick
|
|
}), r.createElement(c, {
|
|
data: this.filterData,
|
|
handleSubmit: this.handleSubmitFilter,
|
|
api: "barong"
|
|
}))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
iy = Object(xe.g)(Object(o.b)(function(e) {
|
|
return {
|
|
users: Sd(e),
|
|
total: Pd(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getUsers: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Bt,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
},
|
|
getDataByFilter: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Wt,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
}
|
|
}
|
|
})(ry)),
|
|
oy = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).userDepositsRows = [{
|
|
key: "id",
|
|
alignRight: !1,
|
|
label: "ID"
|
|
}, {
|
|
key: "txid",
|
|
alignRight: !1,
|
|
label: "TxID"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !1,
|
|
label: "Created"
|
|
}, {
|
|
key: "amount",
|
|
alignRight: !1,
|
|
label: "Amount"
|
|
}, {
|
|
key: "currency",
|
|
alignRight: !1,
|
|
label: "Currency"
|
|
}, {
|
|
key: "confirmations",
|
|
alignRight: !1,
|
|
label: "Confirmations"
|
|
}, {
|
|
key: "state",
|
|
alignRight: !0,
|
|
label: "State"
|
|
}], n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetUserDeposits(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetUserDeposits(e, 0)
|
|
}, n.handleGetUserDeposits = function(e, t) {
|
|
n.props.getUserDeposits({
|
|
page: t + 1,
|
|
limit: e,
|
|
uid: n.props.uid,
|
|
ordering: "desc"
|
|
})
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O()
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getUserDeposits({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
uid: this.props.uid,
|
|
ordering: "desc"
|
|
})
|
|
}
|
|
}, {
|
|
key: "UNSAFE_componentWillReceiveProps",
|
|
value: function(e) {
|
|
this.props.uid !== e.uid && this.props.getUserDeposits({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
uid: e.uid,
|
|
ordering: "desc"
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.page,
|
|
a = e.rowsPerPage,
|
|
n = this.props,
|
|
i = n.total,
|
|
o = n.list,
|
|
s = py.Table;
|
|
return r.createElement(s, {
|
|
dataLength: i,
|
|
rows: this.userDepositsRows,
|
|
data: o,
|
|
page: t,
|
|
rowsPerPage: a,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
sy = Object(o.b)(function(e) {
|
|
return {
|
|
list: Zu(e),
|
|
total: Yu(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getUserDeposits: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Ft,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
}
|
|
}
|
|
})(oy),
|
|
cy = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).userOrdersRows = [{
|
|
key: "id",
|
|
alignRight: !1,
|
|
label: "Order ID"
|
|
}, {
|
|
key: "market",
|
|
alignRight: !1,
|
|
label: "Market"
|
|
}, {
|
|
key: "ord_type",
|
|
alignRight: !1,
|
|
label: "Type"
|
|
}, {
|
|
key: "origin_volume",
|
|
alignRight: !1,
|
|
label: "Amount"
|
|
}, {
|
|
key: "executed_volume",
|
|
alignRight: !1,
|
|
label: "Executed"
|
|
}, {
|
|
key: "price",
|
|
alignRight: !1,
|
|
label: "Price"
|
|
}, {
|
|
key: "avg_price",
|
|
alignRight: !1,
|
|
label: "Average"
|
|
}, {
|
|
key: "side",
|
|
alignRight: !1,
|
|
label: "Side"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !1,
|
|
label: "Created"
|
|
}, {
|
|
key: "updated_at",
|
|
alignRight: !1,
|
|
label: "Updated"
|
|
}, {
|
|
key: "state",
|
|
alignRight: !0,
|
|
label: "Status"
|
|
}], n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetUserOrders(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetUserOrders(e, 0)
|
|
}, n.handleGetUserOrders = function(e, t) {
|
|
n.props.getUserOrders({
|
|
page: t + 1,
|
|
limit: e,
|
|
uid: n.props.uid,
|
|
ordering: "desc"
|
|
})
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O()
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getUserOrders({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
uid: this.props.uid,
|
|
ordering: "desc"
|
|
})
|
|
}
|
|
}, {
|
|
key: "UNSAFE_componentWillReceiveProps",
|
|
value: function(e) {
|
|
this.props.uid !== e.uid && this.props.getUserOrders({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
uid: e.uid,
|
|
ordering: "desc"
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.page,
|
|
a = e.rowsPerPage,
|
|
n = this.props,
|
|
i = n.total,
|
|
o = n.list,
|
|
s = py.Table;
|
|
return r.createElement(s, {
|
|
dataLength: i,
|
|
rows: this.userOrdersRows,
|
|
data: o,
|
|
page: t,
|
|
rowsPerPage: a,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
disableTotal: !0
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
ly = Object(o.b)(function(e) {
|
|
return {
|
|
list: hd(e),
|
|
total: gd(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getUserOrders: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Mt,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
}
|
|
}
|
|
})(cy),
|
|
uy = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).userTradesRows = [{
|
|
key: "id",
|
|
alignRight: !1,
|
|
label: "Trade ID"
|
|
}, {
|
|
key: "maker_order_email",
|
|
alignRight: !1,
|
|
label: "Maker order email"
|
|
}, {
|
|
key: "taker_order_email",
|
|
alignRight: !1,
|
|
label: "Taker order email"
|
|
}, {
|
|
key: "maker_uid",
|
|
alignRight: !1,
|
|
label: "Maker UID"
|
|
}, {
|
|
key: "taker_uid",
|
|
alignRight: !1,
|
|
label: "Taker UID"
|
|
}, {
|
|
key: "market",
|
|
alignRight: !1,
|
|
label: "Market"
|
|
}, {
|
|
key: "price",
|
|
alignRight: !1,
|
|
label: "Price"
|
|
}, {
|
|
key: "amount",
|
|
alignRight: !1,
|
|
label: "Amount"
|
|
}, {
|
|
key: "total",
|
|
alignRight: !1,
|
|
label: "Total"
|
|
}, {
|
|
key: "taker_type",
|
|
alignRight: !1,
|
|
label: "Side"
|
|
}, {
|
|
key: "created_at",
|
|
alignRight: !0,
|
|
label: "Trade time"
|
|
}], n.handleChangePage = function(e) {
|
|
var t = n.state.rowsPerPage;
|
|
n.setState({
|
|
page: e
|
|
}), n.handleGetUserTrades(t, e)
|
|
}, n.handleChangeRowsPerPage = function(e) {
|
|
n.setState({
|
|
rowsPerPage: e,
|
|
page: 0
|
|
}), n.handleGetUserTrades(e, 0)
|
|
}, n.handleGetUserTrades = function(e, t) {
|
|
n.props.getUserTrades({
|
|
page: t + 1,
|
|
limit: e,
|
|
uid: n.props.uid,
|
|
ordering: "desc"
|
|
})
|
|
}, n.state = {
|
|
page: 0,
|
|
rowsPerPage: O()
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getUserTrades({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
uid: this.props.uid,
|
|
ordering: "desc"
|
|
})
|
|
}
|
|
}, {
|
|
key: "UNSAFE_componentWillReceiveProps",
|
|
value: function(e) {
|
|
this.props.uid !== e.uid && this.props.getUserTrades({
|
|
page: this.state.page + 1,
|
|
limit: O(),
|
|
uid: e.uid,
|
|
ordering: "desc"
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = e.page,
|
|
a = e.rowsPerPage,
|
|
n = this.props,
|
|
i = n.total,
|
|
o = n.list,
|
|
s = py.Table;
|
|
return r.createElement(s, {
|
|
dataLength: i,
|
|
rows: this.userTradesRows,
|
|
data: o,
|
|
page: t,
|
|
rowsPerPage: a,
|
|
handleChangePage: this.handleChangePage,
|
|
handleChangeRowsPerPage: this.handleChangeRowsPerPage,
|
|
disableTotal: !0
|
|
})
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
FibitexEnginesPage = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).state = {
|
|
engines: [],
|
|
loading: !0,
|
|
error: ""
|
|
}, n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
var e = this,
|
|
t = window.env && window.env.peatioUrl ? String(window.env.peatioUrl).replace(/\/$/, "") : "",
|
|
a = t + "/admin/engines?limit=100&page=1&ordering=asc&order_by=id";
|
|
fetch(a, {
|
|
credentials: "include",
|
|
headers: {
|
|
Accept: "application/json",
|
|
"X-CSRF-Token": localStorage.getItem("csrfToken") || ""
|
|
}
|
|
}).then(function(e) {
|
|
if (!e.ok) throw new Error("HTTP " + e.status);
|
|
return e.json()
|
|
}).then(function(t) {
|
|
e.setState({
|
|
engines: Array.isArray(t) ? t : [],
|
|
loading: !1
|
|
})
|
|
}).catch(function(t) {
|
|
e.setState({
|
|
loading: !1,
|
|
error: String(t && t.message || t)
|
|
})
|
|
})
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.state,
|
|
t = {
|
|
padding: 8,
|
|
borderBottom: "1px solid #eee",
|
|
textAlign: "left"
|
|
},
|
|
a = {
|
|
padding: 8,
|
|
borderBottom: "1px solid #ddd",
|
|
textAlign: "left"
|
|
};
|
|
return e.loading ? r.createElement("div", {
|
|
style: {
|
|
padding: 24
|
|
}
|
|
}, "Loading engines…") : e.error ? r.createElement("div", {
|
|
style: {
|
|
padding: 24,
|
|
color: "#c62828"
|
|
}
|
|
}, "Failed to load engines: ", e.error) : r.createElement("div", {
|
|
style: {
|
|
padding: 24
|
|
}
|
|
}, r.createElement("h2", null, "Engines"), r.createElement("p", {
|
|
style: {
|
|
opacity: .7,
|
|
marginBottom: 16
|
|
}
|
|
}, "Matching engines registered in Peatio. Select one when creating a market (Exchange → Markets → Add)."), r.createElement("table", {
|
|
style: {
|
|
width: "100%",
|
|
borderCollapse: "collapse",
|
|
background: "#fff"
|
|
}
|
|
}, r.createElement("thead", null, r.createElement("tr", null, r.createElement("th", {
|
|
style: a
|
|
}, "ID"), r.createElement("th", {
|
|
style: a
|
|
}, "Name"), r.createElement("th", {
|
|
style: a
|
|
}, "Driver"), r.createElement("th", {
|
|
style: a
|
|
}, "State"), r.createElement("th", {
|
|
style: a
|
|
}, "UID"))), r.createElement("tbody", null, e.engines.length ? e.engines.map(function(e) {
|
|
return r.createElement("tr", {
|
|
key: e.id
|
|
}, r.createElement("td", {
|
|
style: t
|
|
}, e.id), r.createElement("td", {
|
|
style: t
|
|
}, e.name), r.createElement("td", {
|
|
style: t
|
|
}, e.driver), r.createElement("td", {
|
|
style: t
|
|
}, String(e.state)), r.createElement("td", {
|
|
style: t
|
|
}, e.uid || "—"))
|
|
}) : r.createElement("tr", null, r.createElement("td", {
|
|
style: t,
|
|
colSpan: 5
|
|
}, "No engines found. Seed engines.yml / check Peatio admin/engines.")))))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
dy = {
|
|
AdminActivities: Nb,
|
|
Alerts: Nf,
|
|
Assets: vf,
|
|
Adjustments: Xm,
|
|
AdjustmentsAdd: af,
|
|
AdjustmentsUpdate: ef,
|
|
Operations: lf,
|
|
Blockchains: Eb,
|
|
BlockchainsAdd: bb,
|
|
BlockchainsEdit: vb,
|
|
Currencies: Wf,
|
|
CurrencyAdd: Gf,
|
|
CurrencyEdit: Kf,
|
|
Deposits: sf,
|
|
DepositDetails: rf,
|
|
Dashboard: Mf,
|
|
DocumentReview: Mb,
|
|
FilterContainer: lb,
|
|
Expenses: Ef,
|
|
Engines: FibitexEnginesPage,
|
|
Layout: hb,
|
|
Operators: Bb,
|
|
Markets: Yf,
|
|
MarketCreate: Jf,
|
|
MarketsInfo: $f,
|
|
OrdersContainer: nb,
|
|
OrdersElement: ib,
|
|
Trades: sb,
|
|
Login: mb,
|
|
Liabilities: Of,
|
|
Wallets: Sb,
|
|
Restrictions: xb,
|
|
Revenues: xf,
|
|
Permissions: Ob,
|
|
TradingFees: _b,
|
|
WalletAdd: Pb,
|
|
WalletEdit: Lb,
|
|
Withdraws: mf,
|
|
WithdrawsCoin: Af,
|
|
WithdrawsFiat: Df,
|
|
WithdrawDetails: bf,
|
|
WithdrawalsPending: hf,
|
|
WithdrawalsPendingCoin: Rf,
|
|
WithdrawalsPendingFiat: Tf,
|
|
WithdrawsHistory: df,
|
|
UserActivities: ny,
|
|
UserBalances: Gb,
|
|
UsersDirectory: iy,
|
|
UserDeposits: sy,
|
|
UserOrders: ly,
|
|
UserTrades: Object(o.b)(function(e) {
|
|
return {
|
|
list: Wd(e),
|
|
total: Hd(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
getUserTrades: function(t) {
|
|
return e(function(e) {
|
|
return {
|
|
type: Vt,
|
|
payload: e
|
|
}
|
|
}(t))
|
|
}
|
|
}
|
|
})(uy),
|
|
UserInfo: ty,
|
|
UserInfoContainer: Hb,
|
|
UserKYCTab: Yb,
|
|
UserOpenOrders: Kb,
|
|
UsersHistory: Xb
|
|
},
|
|
py = Object(b.a)(Object(b.a)({}, Jm), dy),
|
|
hy = {},
|
|
gy = _().map(function(e) {
|
|
return e.name
|
|
}),
|
|
my = new(function() {
|
|
function e() {
|
|
var t = this;
|
|
Object(u.a)(this, e), this.pluginsReducer = void 0, this.rootPluginsSaga = void 0, this
|
|
.menuItems = [], this.getRoutes = function(e, t) {
|
|
return Object.keys(hy).map(function(a) {
|
|
return hy[a].getRoutes(e, t)
|
|
})
|
|
}, this.getMenu = function() {
|
|
return Object(f.a)(t.menuItems)
|
|
}, this.getMenuIcons = function(e) {
|
|
return r.createElement(r.Fragment, null, Object.keys(hy).map(function(t) {
|
|
return hy[t].getMenuIcons ? hy[t].getMenuIcons(e) : null
|
|
}))
|
|
}, this.getHeaderActions = function() {
|
|
return Object.keys(hy).map(function(e) {
|
|
return hy[e].getHeaderActions ? hy[e].getHeaderActions() : null
|
|
})
|
|
};
|
|
var a = {},
|
|
n = [];
|
|
if (hy) {
|
|
for (var i = 0, o = Object.keys(hy); i < o.length; i++) {
|
|
var s = o[i];
|
|
gy.includes(s) && (a = Object(b.a)(Object(b.a)({}, a), {}, {
|
|
[s]: hy[s].getReduxReducer()
|
|
}), n = [].concat(Object(f.a)(n), [Object(P.b)(hy[s].getReduxSaga())]), this.menuItems = []
|
|
.concat(Object(f.a)(this.menuItems), Object(f.a)(hy[s].getMenu())))
|
|
}
|
|
this.pluginsReducer = Object(c.combineReducers)(Object.keys(a).length ? Object(b.a)({}, a) : {
|
|
initialReducer: function() {
|
|
var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [];
|
|
arguments.length > 1 && arguments[1];
|
|
return e
|
|
}
|
|
}), this.rootPluginsSaga = T.a.mark(function e() {
|
|
return T.a.wrap(function(e) {
|
|
for (;;) switch (e.prev = e.next) {
|
|
case 0:
|
|
return e.next = 2, Object(P.a)(Object(f.a)(n));
|
|
case 2:
|
|
case "end":
|
|
return e.stop()
|
|
}
|
|
}, e)
|
|
})
|
|
}
|
|
}
|
|
return Object(d.a)(e, [{
|
|
key: "getReduxReducer",
|
|
value: function() {
|
|
return this.pluginsReducer
|
|
}
|
|
}, {
|
|
key: "getRootPluginsSaga",
|
|
value: function() {
|
|
return this.rootPluginsSaga
|
|
}
|
|
}]), e
|
|
}()),
|
|
fy = function(e, t) {
|
|
var a = [{
|
|
key: "/tower/",
|
|
value: "Dashboard",
|
|
isLink: !0
|
|
}, {
|
|
key: "users",
|
|
value: "Users",
|
|
isLink: !1
|
|
}, {
|
|
key: "exchange",
|
|
value: "Exchange",
|
|
isLink: !1
|
|
}, {
|
|
key: "accountings",
|
|
value: "Accountings",
|
|
isLink: !1
|
|
}, {
|
|
key: "settings",
|
|
value: "Settings",
|
|
isLink: !1
|
|
}];
|
|
a = _().length > 0 ? [].concat(Object(f.a)(a), [{
|
|
key: "plugins",
|
|
value: "Plugins",
|
|
isLink: !1
|
|
}]) : a;
|
|
switch (e) {
|
|
case "mainMenu":
|
|
return a;
|
|
case "users":
|
|
return [{
|
|
key: "/tower/users/user-directory",
|
|
value: "Users directory",
|
|
isLink: !0
|
|
}, {
|
|
key: "/tower/users/operators",
|
|
value: "Operators",
|
|
isLink: !0
|
|
}, {
|
|
key: "/tower/users/pending",
|
|
value: "Pending applications",
|
|
isLink: !0
|
|
}];
|
|
case "exchange":
|
|
return [{
|
|
key: "/tower/exchange/currencies",
|
|
value: "Currencies",
|
|
isLink: !0
|
|
}, {
|
|
key: "/tower/exchange/markets",
|
|
value: "Markets",
|
|
isLink: !0
|
|
}, {
|
|
key: "/tower/exchange/engines",
|
|
value: "Engines",
|
|
isLink: !0
|
|
}, {
|
|
key: "/tower/exchange/orders/open",
|
|
value: "Orders",
|
|
isLink: !0
|
|
}, {
|
|
key: "/tower/exchange/trades",
|
|
value: "Trades",
|
|
isLink: !0
|
|
}];
|
|
case "accountings":
|
|
return [{
|
|
key: "/tower/accountings/deposits",
|
|
value: "Deposits",
|
|
isLink: !0
|
|
}, {
|
|
key: "/tower/accountings/withdrawals/coin",
|
|
value: "Withdrawals",
|
|
isLink: !0
|
|
}, {
|
|
key: "/tower/accountings/withdrawals-pending/coin",
|
|
value: "Withdrawals pending",
|
|
isLink: !0
|
|
}, {
|
|
key: "/tower/accountings/adjustments",
|
|
value: "Adjustments",
|
|
isLink: !0
|
|
}, {
|
|
key: "/tower/accountings/operations/assets",
|
|
value: "Operations",
|
|
isLink: !0
|
|
}];
|
|
case "settings":
|
|
return [{
|
|
key: "/tower/settings/blockchains",
|
|
value: "Blockchains",
|
|
isLink: !0
|
|
}, {
|
|
key: "/tower/settings/wallets",
|
|
value: "Wallets",
|
|
isLink: !0
|
|
}, {
|
|
key: "/tower/settings/fees-schedules",
|
|
value: "Fees Schedule",
|
|
isLink: !0
|
|
}, {
|
|
key: "/tower/settings/permissions",
|
|
value: "Permissions",
|
|
isLink: !0
|
|
}, {
|
|
key: "/tower/settings/restrictions",
|
|
value: "Restrictions",
|
|
isLink: !0
|
|
}];
|
|
case "plugins":
|
|
return my.getMenu();
|
|
default:
|
|
return []
|
|
}
|
|
},
|
|
by = 768,
|
|
yy = "2.4.11",
|
|
vy = {
|
|
firstName: "",
|
|
lastName: "",
|
|
dob: "",
|
|
address: "",
|
|
city: "",
|
|
country: "",
|
|
postcode: "",
|
|
state: "",
|
|
created_at: "",
|
|
updated_at: "",
|
|
nationality: ""
|
|
},
|
|
wy = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a() {
|
|
return Object(u.a)(this, a), t.apply(this, arguments)
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "render",
|
|
value: function() {
|
|
var e;
|
|
return Object({
|
|
NODE_ENV: "production",
|
|
PUBLIC_URL: "/tower",
|
|
REACT_APP_GIT_SHA: "2.4.11"
|
|
}).BUILD_EXPIRE && (e = parseInt(Object({
|
|
NODE_ENV: "production",
|
|
PUBLIC_URL: "/tower",
|
|
REACT_APP_GIT_SHA: "2.4.11"
|
|
}).BUILD_EXPIRE, 10)), e && Date.now() > e ? r.createElement("div", null, r.createElement(
|
|
"h1", null, "Your build has expired!")) : this.props.children
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Ey = a(150),
|
|
Cy = function() {
|
|
return r.createElement("div", null, "Loading...")
|
|
},
|
|
Oy = 15e3,
|
|
ky = "lastAction",
|
|
xy = function(e) {
|
|
var t = e.component,
|
|
a = e.loading,
|
|
n = e.isLogged,
|
|
i = Object(Ey.a)(e, ["component", "loading", "isLogged"]);
|
|
if (a) return Cy();
|
|
return n ? r.createElement(xe.b, Object.assign({}, i, {
|
|
render: function(e) {
|
|
return r.createElement(t, e)
|
|
}
|
|
})) : r.createElement(xe.b, i, r.createElement(xe.a, {
|
|
to: "/tower/login"
|
|
}))
|
|
},
|
|
jy = function(e) {
|
|
var t = e.component,
|
|
a = e.loading,
|
|
n = e.isLogged,
|
|
i = e.user,
|
|
o = Object(Ey.a)(e, ["component", "loading", "isLogged", "user"]);
|
|
if (a) return Cy();
|
|
return n && i && "superadmin" === i.role ? r.createElement(xe.b, Object.assign({}, o, {
|
|
render: function(e) {
|
|
return r.createElement(t, e)
|
|
}
|
|
})) : r.createElement(xe.b, o, r.createElement(xe.a, {
|
|
to: "/tower/login"
|
|
}))
|
|
},
|
|
_y = function(e) {
|
|
var t = e.component,
|
|
a = e.loading,
|
|
n = e.isLogged,
|
|
i = Object(Ey.a)(e, ["component", "loading", "isLogged"]);
|
|
if (a) return Cy();
|
|
if (n) return r.createElement(xe.b, i, r.createElement(xe.a, {
|
|
to: "/tower"
|
|
}));
|
|
return r.createElement(xe.b, Object.assign({}, i, {
|
|
render: function(e) {
|
|
return r.createElement(t, e)
|
|
}
|
|
}))
|
|
},
|
|
Ry = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).timer = void 0, n.getLastAction = function() {
|
|
return null !== localStorage.getItem(ky) ? parseInt(localStorage.getItem(ky) || "0", 10) : 0
|
|
}, n.setLastAction = function(e) {
|
|
localStorage.setItem(ky, e.toString())
|
|
}, n.initListener = function() {
|
|
n.reset();
|
|
var e, t = Object(se.a)(a.eventsListen);
|
|
try {
|
|
for (t.s(); !(e = t.n()).done;) {
|
|
var r = e.value;
|
|
document.body.addEventListener(r, n.reset)
|
|
}
|
|
} catch (i) {
|
|
t.e(i)
|
|
} finally {
|
|
t.f()
|
|
}
|
|
}, n.reset = function() {
|
|
n.setLastAction(Date.now())
|
|
}, n.initInterval = function() {
|
|
n.timer = setInterval(function() {
|
|
n.check()
|
|
}, Oy)
|
|
}, n.check = function() {
|
|
var e = n.props.user,
|
|
t = Date.now();
|
|
n.getLastAction() + 60 * parseFloat(k()) * 1e3 - t < 0 && e && e.email && n.props.logout()
|
|
}, n.initListener(), n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.initInterval(), this.check()
|
|
}
|
|
}, {
|
|
key: "componentWillUnmount",
|
|
value: function() {
|
|
var e, t = Object(se.a)(a.eventsListen);
|
|
try {
|
|
for (t.s(); !(e = t.n()).done;) {
|
|
var n = e.value;
|
|
document.body.removeEventListener(n, this.reset)
|
|
}
|
|
} catch (r) {
|
|
t.e(r)
|
|
} finally {
|
|
t.f()
|
|
}
|
|
clearInterval(this.timer)
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.isCurrentSession,
|
|
a = e.userLoading,
|
|
n = e.user,
|
|
i = py.Adjustments,
|
|
o = py.AdjustmentsAdd,
|
|
s = py.AdjustmentsUpdate,
|
|
c = py.Dashboard,
|
|
l = py.DocumentReview,
|
|
u = py.DepositDetails,
|
|
d = py.Deposits,
|
|
p = py.Currencies,
|
|
h = py.CurrencyAdd,
|
|
g = py.CurrencyEdit,
|
|
m = py.Login,
|
|
f = py.MarketCreate,
|
|
b = py.Markets,
|
|
y = py.MarketsInfo,
|
|
FibitexEngines = py.Engines,
|
|
v = py.OrdersContainer,
|
|
w = py.Trades,
|
|
E = py.Operations,
|
|
C = py.WithdrawalsPending,
|
|
O = py.WithdrawDetails,
|
|
k = py.Withdraws,
|
|
x = py.Blockchains,
|
|
j = py.BlockchainsAdd,
|
|
_ = py.BlockchainsEdit,
|
|
R = py.Permissions,
|
|
S = py.Restrictions,
|
|
T = py.TradingFees,
|
|
P = py.WalletAdd,
|
|
A = py.WalletEdit,
|
|
L = py.Wallets,
|
|
D = py.AdminActivities,
|
|
I = py.Operators,
|
|
N = py.UserInfoContainer,
|
|
F = py.UsersDirectory;
|
|
return r.createElement(xe.d, null, r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/users/user-directory",
|
|
component: F
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/users/pending",
|
|
component: l
|
|
}), r.createElement(xy, {
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/users/pending/:uid",
|
|
component: N
|
|
}), r.createElement(jy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/users/admin-activities",
|
|
component: D,
|
|
user: n
|
|
}), r.createElement(jy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/users/admin-activities/:uid",
|
|
component: N,
|
|
user: n
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
path: "/tower/users/operators",
|
|
component: I
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower",
|
|
component: c
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
path: "/tower/users/user-directory/:uid/:tab",
|
|
component: N
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/exchange/currencies",
|
|
component: p
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/exchange/currencies/add",
|
|
component: h
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/exchange/currencies/:code/edit",
|
|
component: g
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/exchange/markets",
|
|
component: b
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/exchange/markets/add",
|
|
component: f
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/exchange/markets/:id/info",
|
|
component: y
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/exchange/engines",
|
|
component: FibitexEngines
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/exchange/orders/open",
|
|
component: v
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/exchange/orders/history",
|
|
component: v
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/exchange/trades",
|
|
component: w
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/accountings/deposits",
|
|
component: d
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/accountings/deposits/:tid/details",
|
|
component: u
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/accountings/withdrawals/coin",
|
|
component: k
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/accountings/withdrawals/fiat",
|
|
component: k
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/accountings/withdrawals/:id/details",
|
|
component: O
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/accountings/withdrawals-pending/:id/details",
|
|
component: O
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/accountings/withdrawals-pending/coin",
|
|
component: C
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/accountings/withdrawals-pending/fiat",
|
|
component: C
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/accountings/adjustments",
|
|
component: i
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/accountings/adjustments/add",
|
|
component: o
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/accountings/adjustments/:id",
|
|
component: s
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/accountings/operations/assets",
|
|
component: E
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/accountings/operations/liabilities",
|
|
component: E
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/accountings/operations/revenues",
|
|
component: E
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/accountings/operations/expenses",
|
|
component: E
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/settings/blockchains",
|
|
component: x
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/settings/blockchains/add",
|
|
component: j
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/settings/blockchains/:id/edit",
|
|
component: _
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/settings/wallets",
|
|
component: L
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/settings/restrictions",
|
|
component: S
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/settings/permissions",
|
|
component: R
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/settings/fees-schedules",
|
|
component: T
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/settings/wallets/add",
|
|
component: P
|
|
}), r.createElement(xy, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/settings/wallets/:id/edit",
|
|
component: A
|
|
}), r.createElement(_y, {
|
|
loading: a,
|
|
isLogged: t,
|
|
exact: !0,
|
|
path: "/tower/login",
|
|
component: m
|
|
}), my.getRoutes(a, t), r.createElement(xe.b, {
|
|
path: "**"
|
|
}, r.createElement(xe.a, {
|
|
to: "/tower/"
|
|
})))
|
|
}
|
|
}]), a
|
|
}(r.Component);
|
|
Ry.eventsListen = ["click", "keydown", "scroll", "resize", "mousemove", "TabSelect", "TabHide"];
|
|
var Sy, Ty = Ry,
|
|
Py = Object(g.a)({
|
|
palette: {
|
|
primary: {
|
|
main: "#0030AE"
|
|
}
|
|
},
|
|
typography: {
|
|
fontFamily: "Roboto, Open Sans",
|
|
h5: {
|
|
fontWeight: 500,
|
|
fontSize: 26,
|
|
letterSpacing: .5,
|
|
marginBottom: 8
|
|
},
|
|
h2: {
|
|
color: "rgba(0, 0, 0, 0.87)",
|
|
fontSize: 20,
|
|
fontWeight: 500,
|
|
lineHeight: 1
|
|
},
|
|
body1: {
|
|
fontWeight: 500,
|
|
fontSize: 14
|
|
},
|
|
body2: {
|
|
color: "rgba(0, 0, 0, 0.87)",
|
|
fontSize: 14,
|
|
fontWeight: "normal",
|
|
lineHeight: 1.71,
|
|
letterSpacing: .1
|
|
}
|
|
},
|
|
shape: {
|
|
borderRadius: 4
|
|
},
|
|
props: {
|
|
MuiTab: {
|
|
disableRipple: !0
|
|
}
|
|
},
|
|
mixins: {
|
|
toolbar: {
|
|
minHeight: 48
|
|
}
|
|
},
|
|
overrides: {
|
|
MuiTableRow: {
|
|
root: {
|
|
height: 34
|
|
},
|
|
head: {
|
|
height: 34
|
|
}
|
|
},
|
|
MuiTableCell: {
|
|
root: {
|
|
padding: "0px 14px 0px 6px",
|
|
"&:last-child": {
|
|
paddingRight: 24
|
|
},
|
|
"&:first-child": {
|
|
paddingLeft: 24
|
|
}
|
|
},
|
|
head: {
|
|
overflow: "hidden",
|
|
whiteSpace: "nowrap",
|
|
padding: "0px 14px 0px 6px",
|
|
"&:last-child": {
|
|
paddingRight: 24
|
|
},
|
|
"&:first-child": {
|
|
paddingLeft: 24
|
|
}
|
|
}
|
|
},
|
|
MuiTypography: {
|
|
gutterBottom: {
|
|
marginBottom: 0
|
|
}
|
|
},
|
|
MuiToolbar: {
|
|
regular: {
|
|
"@media (min-width: 600px)": {
|
|
minHeight: 48
|
|
}
|
|
}
|
|
},
|
|
MuiIconButton: {
|
|
root: {
|
|
padding: 8
|
|
}
|
|
},
|
|
MuiGrid: {
|
|
"spacing-xs-3": {
|
|
"& > $item": {
|
|
"&:nth-child(-n+4)": {
|
|
padding: "12px 6px",
|
|
"&:first-child": {
|
|
padding: "12px 6px 12px 12px"
|
|
},
|
|
"&:nth-last-child(2)": {
|
|
padding: "12px 12px 12px 6px"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
MuiInput: {
|
|
underline: {
|
|
"&:hover": {
|
|
"&:before": {
|
|
borderBottom: "2px solid #0030AE !important"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
MuiInputBase: {
|
|
input: {
|
|
"&::placeholder": {
|
|
fontSize: 13
|
|
}
|
|
}
|
|
},
|
|
MuiButton: {
|
|
contained: {
|
|
boxShadow: "none"
|
|
},
|
|
label: {
|
|
textTransform: "initial"
|
|
}
|
|
}
|
|
}
|
|
}),
|
|
Ay = function(e) {
|
|
Object(p.a)(a, e);
|
|
var t = Object(h.a)(a);
|
|
|
|
function a(e) {
|
|
var n;
|
|
return Object(u.a)(this, a), (n = t.call(this, e)).resize = function() {
|
|
var e = window.innerWidth < by;
|
|
e !== n.state.mobile && n.setState({
|
|
mobile: e
|
|
})
|
|
}, n.userLogout = function() {
|
|
n.props.logout(), n.handleDrawerClose()
|
|
}, n.toggleDrawer = function() {
|
|
n.setState({
|
|
open: !n.state.open
|
|
})
|
|
}, n.handleDrawerClose = function() {
|
|
n.setState({
|
|
open: !1
|
|
})
|
|
}, n.state = {
|
|
open: !1,
|
|
mobile: !1
|
|
}, window.addEventListener("resize", n.resize), n
|
|
}
|
|
return Object(d.a)(a, [{
|
|
key: "componentDidMount",
|
|
value: function() {
|
|
this.props.getCurrentUser(), this.resize()
|
|
}
|
|
}, {
|
|
key: "componentWillUnmount",
|
|
value: function() {
|
|
window.removeEventListener("resize", this.resize)
|
|
}
|
|
}, {
|
|
key: "render",
|
|
value: function() {
|
|
var e = this.props,
|
|
t = e.history,
|
|
a = e.user,
|
|
n = e.isUserLoading,
|
|
i = e.loggedIn,
|
|
o = py.Alerts,
|
|
s = py.Layout,
|
|
c = py.Footer;
|
|
return r.createElement(m.a, {
|
|
theme: Py
|
|
}, r.createElement(wy, null, r.createElement(s, {
|
|
logout: this.userLogout,
|
|
loggedIn: i,
|
|
toggleDrawer: this.toggleDrawer,
|
|
handleDrawerClose: this.handleDrawerClose,
|
|
history: t,
|
|
open: this.state.open,
|
|
isSuperAdmin: a && "superadmin" === a.role || !1,
|
|
mobile: this.state.mobile
|
|
}, r.createElement(o, null), r.createElement(Ty, {
|
|
userLoading: n,
|
|
isCurrentSession: i,
|
|
logout: this.userLogout,
|
|
user: a
|
|
})), r.createElement(c, null)))
|
|
}
|
|
}]), a
|
|
}(r.Component),
|
|
Ly = Object(o.b)(function(e) {
|
|
return {
|
|
user: Jl(e),
|
|
isUserLoading: Ql(e),
|
|
loggedIn: Xl(e)
|
|
}
|
|
}, function(e) {
|
|
return {
|
|
logout: function() {
|
|
return e(Un())
|
|
},
|
|
getCurrentUser: function() {
|
|
return e({
|
|
type: Pt
|
|
})
|
|
}
|
|
}
|
|
})(Ay),
|
|
Dy = Object(n.a)(),
|
|
Iy = Object(s.routerMiddleware)(Dy),
|
|
Ny = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || c.compose,
|
|
Fy = Object(l.a)(),
|
|
Uy = Object(c.createStore)((Sy = my.getReduxReducer(), Object(c.combineReducers)({
|
|
adminActivity: Ul,
|
|
alert: ln,
|
|
auth: Bn,
|
|
changeUserState: Tr,
|
|
userLabels: io,
|
|
userActivity: su,
|
|
blacklistRules: mp,
|
|
usersData: ag,
|
|
metrics: $o,
|
|
blockchains: lr,
|
|
currencies: Jr,
|
|
markets: Io,
|
|
wallets: Gp,
|
|
orders: Ms,
|
|
deposits: Ci,
|
|
withdraws: xh,
|
|
trades: zc,
|
|
userBalances: wu,
|
|
userOpenOrders: ad,
|
|
userTrades: Bd,
|
|
userDeposits: Ku,
|
|
withdrawsHistory: Xh,
|
|
userOrders: pd,
|
|
permissions: rc,
|
|
tradingFees: ul,
|
|
assets: Sn,
|
|
liabilities: yo,
|
|
revenues: Tc,
|
|
sidebarStatus: Bc,
|
|
filterStatus: $i,
|
|
asks: ks,
|
|
bids: xs,
|
|
navbarStatus: cs,
|
|
adjustments: ga,
|
|
expenses: Vi,
|
|
emailVerification: Rp,
|
|
questions: Ec,
|
|
plugins: Sy
|
|
})), Ny(Object(c.applyMiddleware)(Fy, Iy)));
|
|
Fy.run(ng);
|
|
i.render(r.createElement(o.a, {
|
|
store: Uy
|
|
}, r.createElement(Ly, {
|
|
history: Dy
|
|
})), document.getElementById("root"))
|
|
}
|
|
},
|
|
[
|
|
[319, 1, 2]
|
|
]
|
|
]);
|
|
//# sourceMappingURL=main.cc26925e.chunk.js.map
|