Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FairCoin.Co
faircoin.co
Commits
db67fa87
Commit
db67fa87
authored
Feb 11, 2021
by
tonyford
Browse files
env check
parent
e38bf617
Pipeline
#11515
passed with stage
in 6 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
api/widget.php
View file @
db67fa87
...
@@ -4,6 +4,24 @@ if( empty($_GET['addr'] ) ) exit;
...
@@ -4,6 +4,24 @@ if( empty($_GET['addr'] ) ) exit;
$address
=
$_GET
[
'addr'
];
$address
=
$_GET
[
'addr'
];
define
(
'ELECTRUMFAIR_USER'
,
getenv
(
'erpcuser'
));
define
(
'ELECTRUMFAIR_PASS'
,
getenv
(
'erpcpassword'
));
define
(
'ELECTRUMFAIR_PORT'
,
getenv
(
'erpcport'
));
define
(
'ELECTRUMFAIR_RPC'
,
'http://'
+
ELECTRUMFAIR_USER
+
':'
+
ELECTRUMFAIR_PASS
+
'@127.0.0.1:'
+
ELECTRUMFAIR_PORT
);
define
(
'FAIRCOIND_USER'
,
getenv
(
'rpcuser'
));
define
(
'FAIRCOIND_PASS'
,
getenv
(
'rpcpassword'
));
define
(
'FAIRCOIND_PORT'
,
getenv
(
'rpcport'
));
define
(
'FAIRCOIND_RPC'
,
'http://'
+
FAIRCOIND_USER
+
':'
+
FAIRCOIND_PASS
+
'@127.0.0.1:'
+
FAIRCOIND_PORT
);
if
(
empty
(
ELECTRUMFAIR_USER
)
||
empty
(
ELECTRUMFAIR_PASS
)
||
empty
(
ELECTRUMFAIR_PORT
)
||
empty
(
FAIRCOIND_USER
)
||
empty
(
FAIRCOIND_PASS
)
||
empty
(
FAIRCOIND_PORT
)
||
)
exit
;
/**
/**
*
*
*/
*/
...
@@ -121,17 +139,6 @@ class FaircoinAddress
...
@@ -121,17 +139,6 @@ class FaircoinAddress
}
}
define
(
'ELECTRUMFAIR_USER'
,
getenv
(
'erpcuser'
));
define
(
'ELECTRUMFAIR_PASS'
,
getenv
(
'erpcpassword'
));
define
(
'ELECTRUMFAIR_PORT'
,
getenv
(
'erpcport'
));
define
(
'ELECTRUMFAIR_RPC'
,
'http://'
+
ELECTRUMFAIR_USER
+
':'
+
ELECTRUMFAIR_PASS
+
'@127.0.0.1:'
+
ELECTRUMFAIR_PORT
);
define
(
'FAIRCOIND_USER'
,
getenv
(
'rpcuser'
));
define
(
'FAIRCOIND_PASS'
,
getenv
(
'rpcpassword'
));
define
(
'FAIRCOIND_PORT'
,
getenv
(
'rpcport'
));
define
(
'FAIRCOIND_RPC'
,
'http://'
+
FAIRCOIND_USER
+
':'
+
FAIRCOIND_PASS
+
'@127.0.0.1:'
+
FAIRCOIND_PORT
);
$F
=
new
FairCoinAddress
(
$address
);
$F
=
new
FairCoinAddress
(
$address
);
$F
->
getaddresshistory
();
$F
->
getaddresshistory
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment